diff --git a/.configurations/configuration.vsBuildTools.dsc.yaml b/.configurations/configuration.vsBuildTools.dsc.yaml new file mode 100644 index 00000000000000..5434b44b3e0459 --- /dev/null +++ b/.configurations/configuration.vsBuildTools.dsc.yaml @@ -0,0 +1,54 @@ +# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 +# Reference: https://github.com/nodejs/node/blob/main/BUILDING.md#windows +properties: + resources: + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: pythonPackage + directives: + description: Install Python 3.14 + module: Microsoft.WinGet.DSC + allowPrerelease: true + settings: + id: Python.Python.3.14 + source: winget + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 Build Tools + allowPrerelease: true + settings: + id: Microsoft.VisualStudio.2022.BuildTools + source: winget + useLatest: true + - resource: Microsoft.VisualStudio.DSC/VSComponents + id: vsComponents + dependsOn: + - vsPackage + directives: + description: Install required VS workloads and components + allowPrerelease: true + settings: + productId: Microsoft.VisualStudio.Product.BuildTools + channelId: VisualStudio.17.Release + includeRecommended: true + components: + - Microsoft.VisualStudio.Workload.VCTools + - Microsoft.VisualStudio.Component.VC.Llvm.Clang + - Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: gitPackage + directives: + description: Install Git + allowPrerelease: true + settings: + id: Git.Git + source: winget + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: nasmPackage + directives: + description: Install NetWide Assembler (NASM) + allowPrerelease: true + settings: + id: Nasm.Nasm + source: winget + configurationVersion: 0.1.1 diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 724e68c0b744ab..747b957ee33c85 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -21,7 +21,7 @@ jobs: permissions: pull-requests: read if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim outputs: numbers: ${{ steps.get_prs_for_ci.outputs.numbers }} steps: @@ -43,12 +43,8 @@ jobs: pull-requests: write needs: get-prs-for-ci if: needs.get-prs-for-ci.outputs.numbers != '' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: Install Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -62,14 +58,17 @@ jobs: ncu-config set username "$USERNAME" ncu-config set token "$GH_TOKEN" ncu-config set jenkins_token "$JENKINS_TOKEN" - ncu-config set owner "${{ github.repository_owner }}" - ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)" + ncu-config set owner "$GITHUB_REPOSITORY_OWNER" + ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)" env: USERNAME: ${{ secrets.JENKINS_USER }} GH_TOKEN: ${{ secrets.GH_USER_TOKEN }} JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }} - name: Start the CI - run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }} + run: | + curl -fsSL "https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/start-ci.sh" \ + | sh -s -- ${{ needs.get-prs-for-ci.outputs.numbers }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 68d6c147fd605f..26416ae4bd1000 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -18,7 +18,6 @@ on: - tsconfig.json - test/internet/** - tools/actions/** - - tools/bootstrap/** - tools/dep_updaters/** - tools/doc/** - tools/eslint-rules/** @@ -48,7 +47,6 @@ on: - tsconfig.json - test/internet/** - tools/actions/** - - tools/bootstrap/** - tools/dep_updaters/** - tools/doc/** - tools/eslint-rules/** @@ -74,7 +72,7 @@ permissions: jobs: build-tarball: if: github.event.pull_request.draft == false - runs-on: ubuntu-24.04 + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -102,9 +100,9 @@ jobs: needs: build-tarball runs-on: ubuntu-24.04 env: - CC: sccache clang-19 - CXX: sccache clang++-19 - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19 + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -122,6 +120,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3a218ce40fa946..d29e734a82fd8c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,7 +10,7 @@ permissions: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: actions: read contents: read diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index 25445b760ad9f4..64f8fe1ff3161e 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -37,9 +37,9 @@ env: PYTHON_VERSION: '3.14' FLAKY_TESTS: keep_retrying CLANG_VERSION: '19' - CC: sccache clang-19 - CXX: sccache clang++-19 - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19 + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' permissions: @@ -63,6 +63,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index d2495ef60c3ef2..666f0568f4c4b7 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -37,9 +37,9 @@ env: PYTHON_VERSION: '3.14' FLAKY_TESTS: keep_retrying CLANG_VERSION: '19' - CC: sccache clang-19 - CXX: sccache clang++-19 - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19 + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' permissions: @@ -63,6 +63,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 5b982932330f0b..3a207e91ed91ac 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -3,31 +3,55 @@ name: Coverage Windows on: pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths: - - lib/**/*.js - - vcbuild.bat - - src/**/*.cc - - src/**/*.h - - test/** - - tools/gyp/** - - tools/test.py - - .github/workflows/coverage-windows.yml - - codecov.yml - - .nycrc + paths-ignore: + - '**.md' + - '**.nix' + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - doc/** + - pyproject.yml + - tsconfig.json + - test/internet/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - .** + - '!.github/workflows/coverage-windows.yml' push: branches: - main - paths: - - lib/**/*.js - - vcbuild.bat - - src/**/*.cc - - src/**/*.h - - test/** - - tools/gyp/** - - tools/test.py - - .github/workflows/coverage-windows.yml - - codecov.yml - - .nycrc + paths-ignore: + - '**.md' + - '**.nix' + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - doc/** + - pyproject.yml + - tsconfig.json + - test/internet/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - .** + - '!.github/workflows/coverage-windows.yml' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -55,10 +79,14 @@ jobs: allow-prereleases: true - name: Install deps run: choco install nasm + - name: Install Rust ${{ env.RUSTC_VERSION }} + run: | + rustup override set "$RUSTC_VERSION" + rustup --version - name: Environment Information run: npx envinfo - name: Build - run: ./vcbuild.bat clang-cl + run: ./vcbuild.bat clang-cl v8temporal # TODO(bcoe): investigate tests that fail with coverage enabled # on Windows. - name: Test diff --git a/.github/workflows/create-release-proposal.yml b/.github/workflows/create-release-proposal.yml index 6ae4b98b1ddd3b..c2161d6a8f5e2a 100644 --- a/.github/workflows/create-release-proposal.yml +++ b/.github/workflows/create-release-proposal.yml @@ -31,7 +31,7 @@ jobs: RELEASE_BRANCH: v${{ inputs.release-line }}.x RELEASE_DATE: ${{ inputs.release-date }} RELEASE_LINE: ${{ inputs.release-line }} - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index a575c89ec468b1..2b386e527a5951 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -21,7 +21,7 @@ permissions: jobs: collect-versions: if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + runs-on: ubuntu-slim outputs: matrix: ${{ steps.query.outputs.matrix }} steps: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 6b0a34e6bd9d53..51268b3c475da4 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -22,7 +22,7 @@ permissions: jobs: build-docs: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml index 64c29a81a2ec4c..08ff3c7b014af0 100644 --- a/.github/workflows/license-builder.yml +++ b/.github/workflows/license-builder.yml @@ -15,7 +15,7 @@ jobs: contents: write # for gr2m/create-or-update-pull-request-action to push local changes pull-requests: write # for gr2m/create-or-update-pull-request-action to create a PR if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index 0c95ef406903b8..4ebeff30019b34 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -18,7 +18,7 @@ permissions: jobs: lint-release-commit: - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: contents: read pull-requests: read diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 0af5ce13c6df90..dd6c50b3840d4a 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -23,7 +23,7 @@ permissions: jobs: lint-addon-docs: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -38,7 +38,7 @@ jobs: run: NODE=$(command -v node) make lint-addon-docs lint-cpp: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -54,7 +54,7 @@ jobs: run: make lint-cpp format-cpp: if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }} - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -93,7 +93,7 @@ jobs: fi lint-js-and-md: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -142,7 +142,7 @@ jobs: NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }} lint-nix: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -158,7 +158,7 @@ jobs: lint-py: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -186,7 +186,7 @@ jobs: make lint-py lint-yaml: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -211,7 +211,7 @@ jobs: lint-sh: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -225,6 +225,7 @@ jobs: run: tools/lint-sh.mjs . lint-codeowners: if: github.event.pull_request.draft == false + # cannot use ubuntu-slim here because mszostok/codeowners-validator is dockerized runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -235,7 +236,7 @@ jobs: checks: files,duppatterns lint-pr-url: if: ${{ github.event.pull_request }} - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -248,7 +249,7 @@ jobs: # GH Actions squashes all PR commits, HEAD^ refers to the base branch. - run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }} lint-readme: - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/major-release.yml b/.github/workflows/major-release.yml index dfe49605429583..b65917f89e74b2 100644 --- a/.github/workflows/major-release.yml +++ b/.github/workflows/major-release.yml @@ -10,7 +10,7 @@ permissions: jobs: create-issue: if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: issues: write steps: diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index 4bc9be232baea5..92d7438bf94b1d 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -11,7 +11,8 @@ jobs: notifyOnForcePush: name: Notify on Force Push on `main` if: github.repository == 'nodejs/node' && github.event.forced - runs-on: ubuntu-slim + # cannot use ubuntu-slim here because rtCamp/action-slack-notify is dockerized + runs-on: ubuntu-latest steps: - name: Slack Notification uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3 @@ -30,7 +31,8 @@ jobs: validateCommitMessage: name: Notify on Push on `main` with invalid message if: github.repository == 'nodejs/node' - runs-on: ubuntu-slim + # cannot use ubuntu-slim here because rtCamp/action-slack-notify is dockerized + runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/notify-on-review-wanted.yml b/.github/workflows/notify-on-review-wanted.yml index 96eee3096d8b69..b6c9fe6e7f5d5b 100644 --- a/.github/workflows/notify-on-review-wanted.yml +++ b/.github/workflows/notify-on-review-wanted.yml @@ -12,6 +12,7 @@ jobs: notifyOnReviewWanted: name: Notify on Review Wanted if: github.repository == 'nodejs/node' && github.event.label.name == 'review wanted' + # cannot use ubuntu-slim here because rtCamp/action-slack-notify is dockerized runs-on: ubuntu-latest steps: - name: Determine PR or Issue diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 0f877b3c639bed..87320f3f51da45 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -16,7 +16,7 @@ permissions: jobs: post-release-actions: if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Trigger update-links workflow on nodejs/release-cloudflare-worker run: | diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 4d93965266914b..d3c673d0a860a1 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -21,6 +21,7 @@ permissions: read-all jobs: analysis: name: Scorecard analysis + # cannot use ubuntu-slim here because ossf/scorecard-action is dockerized runs-on: ubuntu-latest permissions: # Needed to upload the results to code-scanning dashboard. diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index bda70922bc5e0d..085657f1ef2db8 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -34,9 +34,9 @@ env: PYTHON_VERSION: '3.14' FLAKY_TESTS: keep_retrying CLANG_VERSION: '19' - CC: sccache clang-19 - CXX: sccache clang++-19 - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19 + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' permissions: @@ -60,6 +60,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 83fd5b0f867ee4..4463a58259ba5e 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,9 +34,9 @@ env: PYTHON_VERSION: '3.14' FLAKY_TESTS: keep_retrying CLANG_VERSION: '19' - CC: sccache clang-19 - CXX: sccache clang++-19 - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang-19 + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' permissions: @@ -65,6 +65,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index dc6283d90ccebd..ce89b27616f39c 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -18,7 +18,6 @@ on: - tsconfig.json - test/internet/** - tools/actions/** - - tools/bootstrap/** - tools/dep_updaters/** - tools/doc/** - tools/eslint-rules/** @@ -49,7 +48,6 @@ on: - tsconfig.json - test/internet/** - tools/actions/** - - tools/bootstrap/** - tools/dep_updaters/** - tools/doc/** - tools/eslint-rules/** @@ -79,9 +77,9 @@ jobs: fail-fast: false runs-on: macos-15 env: - CC: sccache gcc - CXX: sccache g++ - SCCACHE_GHA_ENABLED: 'true' + CC: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} gcc + CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} g++ + SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -96,6 +94,7 @@ jobs: - name: Set up Xcode ${{ env.XCODE_VERSION }} run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app - name: Set up sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 with: version: v0.12.0 diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index 37f82ec0b85653..23f4c1bef60e9d 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -112,7 +112,7 @@ jobs: build-tarball: if: github.event.pull_request.draft == false name: ${{ github.event_name == 'workflow_dispatch' && 'Skipped job' || 'Build slim tarball' }} - runs-on: ubuntu-24.04-arm + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 if: ${{ github.event_name != 'workflow_dispatch' }} @@ -175,32 +175,28 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Configure sccache + if: github.base_ref == 'main' || github.ref_name == 'main' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: | - core.exportVariable('SCCACHE_GHA_VERSION', 'on'); + core.exportVariable('SCCACHE_GHA_ENABLED', 'on'); core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on'); core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Load shell.nix - if: github.event_name != 'workflow_dispatch' - run: | - mv "$TAR_DIR"/*.nix . - mkdir tools - mv "$TAR_DIR"/tools/nix tools/. + core.exportVariable('NIX_SCCACHE', '(import {}).sccache'); - name: Build Node.js and run tests run: | nix-shell \ - -I nixpkgs=./tools/nix/pkgs.nix \ + -I "nixpkgs=$TAR_DIR/tools/nix/pkgs.nix" \ --pure --keep TAR_DIR --keep FLAKY_TESTS \ - --keep SCCACHE_GHA_VERSION --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \ + --keep SCCACHE_GHA_ENABLED --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \ --arg loadJSBuiltinsDynamically false \ - --arg ccache '(import {}).sccache' \ + --arg useSeparateDerivationForV8 true \ + --arg ccache "${NIX_SCCACHE:-null}" \ --arg devTools '[]' \ --arg benchmarkTools '[]' \ ${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }} --run ' make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS" - ' + ' "$TAR_DIR/shell.nix" diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index e2760b1add476c..83e411ac6040fc 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write # to create a PR (gr2m/create-or-update-pull-request-action) if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Checkout nodejs/node diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index c5c71e55ec547b..204d476df4b82f 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -38,6 +38,7 @@ on: - root-certificates - simdjson - sqlite + - test426-fixtures - undici - uvwasi - zlib @@ -52,7 +53,7 @@ permissions: jobs: tools-deps-update: if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + runs-on: ubuntu-slim strategy: fail-fast: false # Prevent other jobs from aborting if one fails matrix: @@ -255,6 +256,14 @@ jobs: cat temp-output tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output + - id: test426-fixtures + subsystem: test + label: test + run: | + bash tools/dep_updaters/update-test426-fixtures.sh > temp-output + cat temp-output + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true + rm temp-output - id: undici subsystem: deps label: dependencies diff --git a/.github/workflows/update-openssl.yml b/.github/workflows/update-openssl.yml index a5824f82444822..162af042e6d7ad 100644 --- a/.github/workflows/update-openssl.yml +++ b/.github/workflows/update-openssl.yml @@ -12,7 +12,7 @@ permissions: jobs: openssl-update: if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index 1cb60bb8ddb2df..326362de1a49b7 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -14,7 +14,7 @@ permissions: jobs: v8-update: if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/update-wpt.yml b/.github/workflows/update-wpt.yml index b3b0016da154c0..b9287b11cf7eea 100644 --- a/.github/workflows/update-wpt.yml +++ b/.github/workflows/update-wpt.yml @@ -20,7 +20,7 @@ env: jobs: wpt-subsystem-update: if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + runs-on: ubuntu-slim strategy: fail-fast: false matrix: diff --git a/BUILDING.md b/BUILDING.md index 00d6cffc0b1691..bf91cc9620c0b6 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -38,7 +38,6 @@ file a new issue. * [Windows Prerequisites](#windows-prerequisites) * [Option 1: Manual install](#option-1-manual-install) * [Option 2: Automated install with WinGet](#option-2-automated-install-with-winget) - * [Option 3: Automated install with Boxstarter](#option-3-automated-install-with-boxstarter) * [Building Node.js](#building-nodejs-2) * [Using ccache](#using-ccache) * [Android](#android) @@ -115,6 +114,7 @@ platforms. This is true regardless of entries in the table below. | GNU/Linux | ppc64le >=power8 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 | | GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 | | GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | +| GNU/Linux | riscv64 | kernel >= 5.19, glibc >= 2.36 | Experimental | | | Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] | | Windows | arm64 | >= Windows 10 | Tier 2 | | | macOS | x64 | >= 13.5 | Tier 1 | For notes about compilation see [^4] | @@ -779,55 +779,36 @@ first and then reinstalling them. ##### Option 2: Automated install with WinGet -[WinGet configuration files](https://github.com/nodejs/node/tree/main/.configurations) +[WinGet configuration files](./.configurations) can be used to install all the required prerequisites for Node.js development easily. These files will install the following [WinGet](https://learn.microsoft.com/en-us/windows/package-manager/winget/) packages: * Git for Windows with the `git` and Unix tools added to the `PATH` * `Python 3.14` -* `Visual Studio 2022` (Community, Enterprise or Professional) -* `Visual Studio 2022 Build Tools` with Visual C++ workload, Clang and ClangToolset +* `Visual Studio 2022` (Build Tools, Community, Professional or Enterprise Edition) and + "Desktop development with C++" workload, Clang and ClangToolset optional components * `NetWide Assembler` -To install Node.js prerequisites from PowerShell Terminal: +The following Desired State Configuration (DSC) files are available: -```powershell -winget configure .\.configurations\configuration.dsc.yaml -``` - -##### Option 3: Automated install with Boxstarter +| Edition | DSC Configuration | +| ------------ | ------------------------------------------------------------------------------------------------ | +| Build Tools | [configuration.vsBuildTools.dsc.yaml](./.configurations/configuration.vsBuildTools.dsc.yaml) | +| Community | [configuration.dsc.yaml](./.configurations/configuration.dsc.yaml) | +| Professional | [configuration.vsProfessional.dsc.yaml](./.configurations/configuration.vsProfessional.dsc.yaml) | +| Enterprise | [configuration.vsEnterprise.dsc.yaml](./.configurations/configuration.vsEnterprise.dsc.yaml) | -A [Boxstarter](https://boxstarter.org/) script can be used for easy setup of -Windows systems with all the required prerequisites for Node.js development. -This script will install the following [Chocolatey](https://chocolatey.org/) -packages: - -* [Git for Windows](https://chocolatey.org/packages/git) with the `git` and - Unix tools added to the `PATH` -* [Python 3.x](https://chocolatey.org/packages/python) -* [Visual Studio 2022 Build Tools](https://chocolatey.org/packages/visualstudio2022buildtools) - with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2022-workload-vctools) -* [NetWide Assembler](https://chocolatey.org/packages/nasm) - -To install Node.js prerequisites using -[Boxstarter WebLauncher](https://boxstarter.org/weblauncher), visit - -with a supported browser. - -Alternatively, you can use PowerShell. Run those commands from -an elevated (Administrator) PowerShell terminal: +Use one of the above DSC files with +[winget configure](https://learn.microsoft.com/en-us/windows/package-manager/winget/configure#configure-subcommands) +in a PowerShell Terminal to install Node.js prerequisites. +For example, using the DSC file for Visual Studio Community Edition, execute the following command line: ```powershell -Set-ExecutionPolicy Unrestricted -Force -iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')) -get-boxstarter -Force -Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter -DisableReboots -refreshenv +winget configure .\.configurations\configuration.dsc.yaml ``` -The entire installation using Boxstarter will take up approximately 10 GB of -disk space. +To add optional components for MSI or ARM64 builds, refer to [Option 1: Manual install](#option-1-manual-install). #### Building Node.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c09b5616e12bb..1a579445b89d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,8 @@ release. -25.6.1
+25.7.0
+25.6.1
25.6.0
25.5.0
25.4.0
diff --git a/README.md b/README.md index 537b4776ca92a1..f1bdb6fea738ce 100644 --- a/README.md +++ b/README.md @@ -889,11 +889,11 @@ releases on a rotation basis as outlined in the * [bengl](https://github.com/bengl) - **Bryan English** <> (he/him) * [HeroDevs](https://www.herodevs.com/) + * [juanarbol](https://github.com/juanarbol) - OpenJSF handle: `juanarbol` + **Juan José Arboleda** <> (he/him) * [marco-ippolito](https://github.com/marco-ippolito) - OpenJSF handle: `Marco Ippolito` **Marco Ippolito** <> (he/him) * [NodeSource](https://nodesource.com/) - * [juanarbol](https://github.com/juanarbol) - - **Juan José Arboleda** <> (he/him) * [RafaelGSS](https://github.com/RafaelGSS) - OpenJSF handle: `RafaelGSS` **Rafael Gonzaga** <> (he/him) * [Platformatic](https://platformatic.dev/) diff --git a/SECURITY.md b/SECURITY.md index 6213ca3d43a704..3a543216723c66 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -335,6 +335,21 @@ the community they pose. proper security boundaries between trusted application logic and untrusted user input. +#### Build System Attacks Requiring Control of the Build Environment (CWE-78, CWE-114, CWE-276) + +* The Node.js build system (e.g., `configure`, `configure.py`, `Makefile`, + `vcbuild.bat`) is designed to run in a trusted build environment. + The build environment, including environment variables, the file system, + and locally installed tools, is a trusted element in the Node.js threat model. +* Reports about command injection via environment variables in build scripts + (e.g., `CC`, `CXX`, `PKG_CONFIG`, `RUSTC`), path hijacking in build output + directories, or file permissions of build artifacts are **not** considered + vulnerabilities. These scenarios require the attacker to already have control + over the build environment, which means the system is already compromised. +* Build scripts are not a security boundary. They are expected to execute + tools and scripts specified by the environment, and to trust the + file system they operate on. + #### Unhandled 'error' Events on EventEmitters (CWE-248) * EventEmitters that can emit `'error'` events require the application to diff --git a/test/fixtures/wpt/FileAPI/BlobURL/support/file_test2.txt b/benchmark/fixtures/empty.mjs similarity index 100% rename from test/fixtures/wpt/FileAPI/BlobURL/support/file_test2.txt rename to benchmark/fixtures/empty.mjs diff --git a/benchmark/fixtures/import-builtins.mjs b/benchmark/fixtures/import-builtins.mjs new file mode 100644 index 00000000000000..03feaa4887c362 --- /dev/null +++ b/benchmark/fixtures/import-builtins.mjs @@ -0,0 +1,34 @@ +import 'node:async_hooks'; +import 'node:assert'; +import 'node:buffer'; +import 'node:child_process'; +import 'node:console'; +import 'node:constants'; +import 'node:crypto'; +import 'node:cluster'; +import 'node:dgram'; +import 'node:dns'; +import 'node:domain'; +import 'node:events'; +import 'node:fs'; +import 'node:http'; +import 'node:http2'; +import 'node:https'; +import 'node:module'; +import 'node:net'; +import 'node:os'; +import 'node:path'; +import 'node:perf_hooks'; +import 'node:process'; +import 'node:querystring'; +import 'node:readline'; +import 'node:repl'; +import 'node:stream'; +import 'node:string_decoder'; +import 'node:timers'; +import 'node:tls'; +import 'node:tty'; +import 'node:url'; +import 'node:util'; +import 'node:vm'; +import 'node:zlib'; diff --git a/benchmark/misc/startup-core.js b/benchmark/misc/startup-core.js index 053a1ec0cbff8f..414b00176ad2c2 100644 --- a/benchmark/misc/startup-core.js +++ b/benchmark/misc/startup-core.js @@ -7,9 +7,11 @@ let Worker; // Lazy loaded in main const bench = common.createBenchmark(main, { script: [ - 'benchmark/fixtures/require-builtins', - 'test/fixtures/semicolon', - 'test/fixtures/snapshot/typescript', + 'benchmark/fixtures/empty.mjs', + 'benchmark/fixtures/import-builtins.mjs', + 'benchmark/fixtures/require-builtins.js', + 'test/fixtures/semicolon.js', + 'test/fixtures/snapshot/typescript.js', ], mode: ['process', 'worker'], n: [30], @@ -58,7 +60,7 @@ function spawnWorker(script, bench, state) { } function main({ n, script, mode }) { - script = path.resolve(__dirname, '../../', `${script}.js`); + script = path.resolve(__dirname, '../../', `${script}`); const warmup = 3; const state = { n, finished: -warmup }; if (mode === 'worker') { diff --git a/benchmark/webstreams/readable-read-buffered.js b/benchmark/webstreams/readable-read-buffered.js new file mode 100644 index 00000000000000..653d5577ef1e95 --- /dev/null +++ b/benchmark/webstreams/readable-read-buffered.js @@ -0,0 +1,54 @@ +'use strict'; +const common = require('../common.js'); +const { ReadableStream } = require('node:stream/web'); + +// Benchmark for reading from a pre-buffered ReadableStream. +// This measures the fast path optimization where data is already +// queued in the controller, avoiding DefaultReadRequest allocation. + +const bench = common.createBenchmark(main, { + n: [1e5], + bufferSize: [1, 10, 100, 1000], +}); + +async function main({ n, bufferSize }) { + let enqueued = 0; + + const rs = new ReadableStream({ + start(controller) { + // Pre-fill the buffer + for (let i = 0; i < bufferSize; i++) { + controller.enqueue('a'); + enqueued++; + } + }, + pull(controller) { + // Refill buffer when pulled + const toEnqueue = Math.min(bufferSize, n - enqueued); + for (let i = 0; i < toEnqueue; i++) { + controller.enqueue('a'); + enqueued++; + } + if (enqueued >= n) { + controller.close(); + } + }, + }, { + // Use buffer size as high water mark to allow pre-buffering + highWaterMark: bufferSize, + }); + + const reader = rs.getReader(); + let x = null; + let reads = 0; + + bench.start(); + while (reads < n) { + const { value, done } = await reader.read(); + if (done) break; + x = value; + reads++; + } + bench.end(reads); + console.assert(x); +} diff --git a/common.gypi b/common.gypi index fec31779ecea1d..ad2b165d1f9ca3 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.19', + 'v8_embedder_string': '-node.20', ##### V8 defaults for Node.js ##### diff --git a/configure.py b/configure.py index bf6ba0d22c4def..eff244f9c41b3f 100755 --- a/configure.py +++ b/configure.py @@ -1280,10 +1280,16 @@ def try_check_compiler(cc, lang): b'__clang_major__ __clang_minor__ __clang_patchlevel__ ' b'__APPLE__') + cc_out = proc.communicate() + cc_stdout = to_utf8(cc_out[0]) if sys.platform == 'zos': - values = (to_utf8(proc.communicate()[0]).split('\n')[-2].split() + ['0'] * 7)[0:8] + values = (cc_stdout.split('\n')[-2].split() + ['0'] * 7)[0:8] else: - values = (to_utf8(proc.communicate()[0]).split() + ['0'] * 7)[0:8] + values = (cc_stdout.split() + ['0'] * 7)[0:8] + + if len(values) < 8: + cc_stderr = to_utf8(cc_out[1]) if cc_out[1] else '' + raise Exception(f'Could not determine compiler version info. \nstdout:\n{cc_stdout}\nstderr:\n{cc_stderr}') is_clang = values[0] == '1' gcc_version = tuple(map(int, values[1:1+3])) @@ -1953,7 +1959,16 @@ def configure_v8(o, configs): o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1 o['variables']['v8_enable_javascript_promise_hooks'] = 1 o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0 - o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 + is_gdbjit_supported_arch = ( + 'x64' in o['variables']['target_arch'] or + 'ia32' in o['variables']['target_arch'] or + 'ppc64' in o['variables']['target_arch'] + ) + is_linux = flavor == 'linux' + if (options.gdb is not None): + o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 + else: + o['variables']['v8_enable_gdbjit'] = 1 if is_gdbjit_supported_arch and is_linux else 0 o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1 o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0 o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1 @@ -1986,10 +2001,16 @@ def configure_v8(o, configs): o['variables']['node_enable_v8windbg'] = b(options.enable_v8windbg) if options.enable_d8: o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp. - if options.without_bundled_v8 and options.enable_d8: - raise Exception('--enable-d8 is incompatible with --without-bundled-v8.') - if options.without_bundled_v8 and options.enable_v8windbg: - raise Exception('--enable-v8windbg is incompatible with --without-bundled-v8.') + if options.without_bundled_v8: + if options.enable_d8: + raise Exception('--enable-d8 is incompatible with --without-bundled-v8.') + if options.enable_v8windbg: + raise Exception('--enable-v8windbg is incompatible with --without-bundled-v8.') + (pkg_libs, pkg_cflags, pkg_libpath, _) = pkg_config("v8") + if pkg_libs and pkg_libpath: + output['libraries'] += [pkg_libpath] + pkg_libs.split() + if pkg_cflags: + output['include_dirs'] += [flag for flag in [flag.strip() for flag in pkg_cflags.split('-I')] if flag] if options.static_zoslib_gyp: o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp if flavor != 'linux' and options.v8_enable_hugepage: diff --git a/deps/googletest/include/gtest/internal/gtest-port.h b/deps/googletest/include/gtest/internal/gtest-port.h index fa11a391fe5c54..3ea95ba5560714 100644 --- a/deps/googletest/include/gtest/internal/gtest-port.h +++ b/deps/googletest/include/gtest/internal/gtest-port.h @@ -1515,13 +1515,13 @@ class [[nodiscard]] ThreadWithParam : public ThreadWithParamBase { ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start) : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {} - ~ThreadWithParam() override {} + ~ThreadWithParam() override = default; private: class RunnableImpl : public Runnable { public: RunnableImpl(UserThreadFunc* func, T param) : func_(func), param_(param) {} - ~RunnableImpl() override {} + ~RunnableImpl() override = default; void Run() override { func_(param_); } private: diff --git a/deps/googletest/src/gtest-port.cc b/deps/googletest/src/gtest-port.cc index d50d07cdb090d4..f8ecb37c48d943 100644 --- a/deps/googletest/src/gtest-port.cc +++ b/deps/googletest/src/gtest-port.cc @@ -89,6 +89,7 @@ #include "gtest/gtest-message.h" #include "gtest/gtest-spi.h" +#include "gtest/gtest.h" #include "gtest/internal/gtest-internal.h" #include "gtest/internal/gtest-string.h" #include "src/gtest-internal-inl.h" @@ -729,7 +730,7 @@ void RE::Init(const char* regex) { char* const full_pattern = new char[full_regex_len]; snprintf(full_pattern, full_regex_len, "^(%s)$", regex); - is_valid_ = regcomp(&full_regex_, full_pattern, reg_flags) == 0; + int error = regcomp(&full_regex_, full_pattern, reg_flags); // We want to call regcomp(&partial_regex_, ...) even if the // previous expression returns false. Otherwise partial_regex_ may // not be properly initialized can may cause trouble when it's @@ -738,13 +739,13 @@ void RE::Init(const char* regex) { // Some implementation of POSIX regex (e.g. on at least some // versions of Cygwin) doesn't accept the empty string as a valid // regex. We change it to an equivalent form "()" to be safe. - if (is_valid_) { + if (!error) { const char* const partial_regex = (*regex == '\0') ? "()" : regex; - is_valid_ = regcomp(&partial_regex_, partial_regex, reg_flags) == 0; + error = regcomp(&partial_regex_, partial_regex, reg_flags); } - EXPECT_TRUE(is_valid_) - << "Regular expression \"" << regex - << "\" is not a valid POSIX Extended regular expression."; + is_valid_ = error == 0; + EXPECT_EQ(error, 0) << "Regular expression \"" << regex + << "\" is not a valid POSIX Extended regular expression."; delete[] full_pattern; } diff --git a/deps/llhttp/.gitignore b/deps/llhttp/.gitignore new file mode 100644 index 00000000000000..98438a2cd3230c --- /dev/null +++ b/deps/llhttp/.gitignore @@ -0,0 +1 @@ +libllhttp.pc diff --git a/deps/llhttp/CMakeLists.txt b/deps/llhttp/CMakeLists.txt index 56f0098c2c5c49..6398043145c879 100644 --- a/deps/llhttp/CMakeLists.txt +++ b/deps/llhttp/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.25.0) cmake_policy(SET CMP0069 NEW) -project(llhttp VERSION 9.3.0) +project(llhttp VERSION 9.3.1) include(GNUInstallDirs) set(CMAKE_C_STANDARD 99) @@ -24,8 +24,8 @@ endif() # Options # # Generic option -option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so)" ON) -option(BUILD_STATIC_LIBS "Build static libraries (.lib/.a)" OFF) +option(LLHTTP_BUILD_SHARED_LIBS "Build shared libraries (.dll/.so)" ON) +option(LLHTTP_BUILD_STATIC_LIBS "Build static libraries (.lib/.a)" OFF) # Source code set(LLHTTP_SOURCES @@ -80,7 +80,7 @@ function(config_library target) ) endfunction(config_library target) -if(BUILD_SHARED_LIBS) +if(LLHTTP_BUILD_SHARED_LIBS) add_library(llhttp_shared SHARED ${llhttp_src} ) @@ -88,13 +88,11 @@ if(BUILD_SHARED_LIBS) config_library(llhttp_shared) endif() -if(BUILD_STATIC_LIBS) +if(LLHTTP_BUILD_STATIC_LIBS) add_library(llhttp_static STATIC ${llhttp_src} ) - if(BUILD_SHARED_LIBS) - add_library(llhttp::llhttp ALIAS llhttp_shared) - else() + if(NOT LLHTTP_BUILD_SHARED_LIBS) add_library(llhttp::llhttp ALIAS llhttp_static) endif() config_library(llhttp_static) @@ -113,6 +111,6 @@ message(STATUS "Project configure summary:") message(STATUS "") message(STATUS " CMake build type .................: ${CMAKE_BUILD_TYPE}") message(STATUS " Install prefix ...................: ${CMAKE_INSTALL_PREFIX}") -message(STATUS " Build shared library .............: ${BUILD_SHARED_LIBS}") -message(STATUS " Build static library .............: ${BUILD_STATIC_LIBS}") +message(STATUS " Build shared library .............: ${LLHTTP_BUILD_SHARED_LIBS}") +message(STATUS " Build static library .............: ${LLHTTP_BUILD_STATIC_LIBS}") message(STATUS "") diff --git a/deps/llhttp/README.md b/deps/llhttp/README.md index 70af44ff0f5a16..008b7e622bc962 100644 --- a/deps/llhttp/README.md +++ b/deps/llhttp/README.md @@ -435,14 +435,16 @@ If you want to use this library in a CMake project as a static library, you can FetchContent_Declare(llhttp URL "https://github.com/nodejs/llhttp/archive/refs/tags/release/v8.1.0.tar.gz") -set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "") -set(BUILD_STATIC_LIBS ON CACHE INTERNAL "") +set(LLHTTP_BUILD_SHARED_LIBS OFF CACHE INTERNAL "") +set(LLHTTP_BUILD_STATIC_LIBS ON CACHE INTERNAL "") FetchContent_MakeAvailable(llhttp) # Link with the llhttp_static target target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp_static ${PROJECT_NAME}) ``` +If using a version prior to 9.3.0, the `LLHTTP_BUILD_SHARED_LIBS` and `LLHTTP_BUILD_STATIC_LIBS` options are known as `BUILD_SHARED_LIBS` and `BUILD_STATIC_LIBS` and should be used instead. + _Note that using the git repo directly (e.g., via a git repo url and tag) will not work with FetchContent_Declare because [CMakeLists.txt](./CMakeLists.txt) requires string replacements (e.g., `_RELEASE_`) before it will build._ ## Building on Windows diff --git a/deps/llhttp/include/llhttp.h b/deps/llhttp/include/llhttp.h index 60544596a9942c..194fee8c906ed3 100644 --- a/deps/llhttp/include/llhttp.h +++ b/deps/llhttp/include/llhttp.h @@ -4,7 +4,7 @@ #define LLHTTP_VERSION_MAJOR 9 #define LLHTTP_VERSION_MINOR 3 -#define LLHTTP_VERSION_PATCH 0 +#define LLHTTP_VERSION_PATCH 1 #ifndef INCLUDE_LLHTTP_ITSELF_H_ #define INCLUDE_LLHTTP_ITSELF_H_ @@ -58,10 +58,8 @@ enum llhttp_errno { HPE_OK = 0, HPE_INTERNAL = 1, HPE_STRICT = 2, - HPE_CR_EXPECTED = 25, HPE_LF_EXPECTED = 3, HPE_UNEXPECTED_CONTENT_LENGTH = 4, - HPE_UNEXPECTED_SPACE = 30, HPE_CLOSED_CONNECTION = 5, HPE_INVALID_METHOD = 6, HPE_INVALID_URL = 7, @@ -82,15 +80,17 @@ enum llhttp_errno { HPE_PAUSED_UPGRADE = 22, HPE_PAUSED_H2_UPGRADE = 23, HPE_USER = 24, + HPE_CR_EXPECTED = 25, HPE_CB_URL_COMPLETE = 26, HPE_CB_STATUS_COMPLETE = 27, - HPE_CB_METHOD_COMPLETE = 32, - HPE_CB_VERSION_COMPLETE = 33, HPE_CB_HEADER_FIELD_COMPLETE = 28, HPE_CB_HEADER_VALUE_COMPLETE = 29, + HPE_UNEXPECTED_SPACE = 30, + HPE_CB_RESET = 31, + HPE_CB_METHOD_COMPLETE = 32, + HPE_CB_VERSION_COMPLETE = 33, HPE_CB_CHUNK_EXTENSION_NAME_COMPLETE = 34, HPE_CB_CHUNK_EXTENSION_VALUE_COMPLETE = 35, - HPE_CB_RESET = 31, HPE_CB_PROTOCOL_COMPLETE = 38 }; typedef enum llhttp_errno llhttp_errno_t; @@ -294,10 +294,8 @@ typedef enum llhttp_status llhttp_status_t; XX(0, OK, OK) \ XX(1, INTERNAL, INTERNAL) \ XX(2, STRICT, STRICT) \ - XX(25, CR_EXPECTED, CR_EXPECTED) \ XX(3, LF_EXPECTED, LF_EXPECTED) \ XX(4, UNEXPECTED_CONTENT_LENGTH, UNEXPECTED_CONTENT_LENGTH) \ - XX(30, UNEXPECTED_SPACE, UNEXPECTED_SPACE) \ XX(5, CLOSED_CONNECTION, CLOSED_CONNECTION) \ XX(6, INVALID_METHOD, INVALID_METHOD) \ XX(7, INVALID_URL, INVALID_URL) \ @@ -318,15 +316,17 @@ typedef enum llhttp_status llhttp_status_t; XX(22, PAUSED_UPGRADE, PAUSED_UPGRADE) \ XX(23, PAUSED_H2_UPGRADE, PAUSED_H2_UPGRADE) \ XX(24, USER, USER) \ + XX(25, CR_EXPECTED, CR_EXPECTED) \ XX(26, CB_URL_COMPLETE, CB_URL_COMPLETE) \ XX(27, CB_STATUS_COMPLETE, CB_STATUS_COMPLETE) \ - XX(32, CB_METHOD_COMPLETE, CB_METHOD_COMPLETE) \ - XX(33, CB_VERSION_COMPLETE, CB_VERSION_COMPLETE) \ XX(28, CB_HEADER_FIELD_COMPLETE, CB_HEADER_FIELD_COMPLETE) \ XX(29, CB_HEADER_VALUE_COMPLETE, CB_HEADER_VALUE_COMPLETE) \ + XX(30, UNEXPECTED_SPACE, UNEXPECTED_SPACE) \ + XX(31, CB_RESET, CB_RESET) \ + XX(32, CB_METHOD_COMPLETE, CB_METHOD_COMPLETE) \ + XX(33, CB_VERSION_COMPLETE, CB_VERSION_COMPLETE) \ XX(34, CB_CHUNK_EXTENSION_NAME_COMPLETE, CB_CHUNK_EXTENSION_NAME_COMPLETE) \ XX(35, CB_CHUNK_EXTENSION_VALUE_COMPLETE, CB_CHUNK_EXTENSION_VALUE_COMPLETE) \ - XX(31, CB_RESET, CB_RESET) \ XX(38, CB_PROTOCOL_COMPLETE, CB_PROTOCOL_COMPLETE) \ diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c index aa4c468209700c..515ba512abbdb0 100644 --- a/deps/llhttp/src/llhttp.c +++ b/deps/llhttp/src/llhttp.c @@ -10,7 +10,7 @@ #endif /* _MSC_VER */ #endif /* __SSE4_2__ */ -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) || defined(__ARM_NEON) #include #endif /* __ARM_NEON__ */ @@ -1542,7 +1542,7 @@ static llparse_state_t llhttp__internal__run( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -2625,7 +2625,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_otherwise; } #endif /* __SSE4_2__ */ - #ifdef __ARM_NEON__ + #if defined(__ARM_NEON__) || defined(__ARM_NEON) while (endp - p >= 16) { uint8x16_t input; uint8x16_t single; @@ -2639,19 +2639,23 @@ static llparse_state_t llhttp__internal__run( /* Find first character that does not match `ranges` */ single = vceqq_u8(input, vdupq_n_u8(0x9)); mask = single; - single = vandq_u16( + single = vandq_u8( vcgeq_u8(input, vdupq_n_u8(' ')), vcleq_u8(input, vdupq_n_u8('~')) ); - mask = vorrq_u16(mask, single); - single = vandq_u16( + mask = vorrq_u8(mask, single); + single = vandq_u8( vcgeq_u8(input, vdupq_n_u8(0x80)), vcleq_u8(input, vdupq_n_u8(0xff)) ); - mask = vorrq_u16(mask, single); - narrow = vshrn_n_u16(mask, 4); + mask = vorrq_u8(mask, single); + narrow = vshrn_n_u16(vreinterpretq_u16_u8(mask), 4); match_mask = ~vget_lane_u64(vreinterpret_u64_u8(narrow), 0); - match_len = __builtin_ctzll(match_mask) >> 2; + if (match_mask == 0) { + match_len = 16; + } else { + match_len = __builtin_ctzll(match_mask) >> 2; + } if (match_len != 16) { p += match_len; goto s_n_llhttp__internal__n_header_value_otherwise; diff --git a/deps/nbytes/.release-please-manifest.json b/deps/nbytes/.release-please-manifest.json new file mode 100644 index 00000000000000..c05df9b5541987 --- /dev/null +++ b/deps/nbytes/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.3" +} diff --git a/deps/nbytes/CHANGELOG.md b/deps/nbytes/CHANGELOG.md new file mode 100644 index 00000000000000..067a946eb30cbd --- /dev/null +++ b/deps/nbytes/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.1.3](https://github.com/nodejs/nbytes/compare/v0.1.2...v0.1.3) (2026-02-18) + + +### Bug Fixes + +* use arithmetic HexEncode instead of lookups ([#12](https://github.com/nodejs/nbytes/issues/12)) ([8011baf](https://github.com/nodejs/nbytes/commit/8011baff1dfecf48b5feca21cb29b72e3562c919)) diff --git a/deps/nbytes/CMakeLists.txt b/deps/nbytes/CMakeLists.txt index f2efa3c52ba1d1..5ac0e31aaa4fce 100644 --- a/deps/nbytes/CMakeLists.txt +++ b/deps/nbytes/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.28) -project(nbytes) +project(nbytes VERSION 0.1.3) # x-release-please-version set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) @@ -40,3 +40,16 @@ install( ARCHIVE COMPONENT nbytes_development INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) + +# Configure and install pkg-config file +configure_file( + "${PROJECT_SOURCE_DIR}/nbytes.pc.in" + "${PROJECT_BINARY_DIR}/nbytes.pc" + @ONLY +) + +install( + FILES "${PROJECT_BINARY_DIR}/nbytes.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT nbytes_development +) diff --git a/deps/nbytes/include/nbytes.h b/deps/nbytes/include/nbytes.h index 525a91735c954a..3a2bcc605bfa58 100644 --- a/deps/nbytes/include/nbytes.h +++ b/deps/nbytes/include/nbytes.h @@ -836,12 +836,12 @@ size_t SearchString(const char *haystack, size_t haystack_length, // ============================================================================ // Version metadata -#define NBYTES_VERSION "0.1.1" +#define NBYTES_VERSION "0.1.3" // x-release-please-version enum { - NBYTES_VERSION_MAJOR = 0, - NBYTES_VERSION_MINOR = 1, - NBYTES_VERSION_REVISION = 1, + NBYTES_VERSION_MAJOR = 0, // x-release-please-major + NBYTES_VERSION_MINOR = 1, // x-release-please-minor + NBYTES_VERSION_REVISION = 3, // x-release-please-patch }; } // namespace nbytes diff --git a/deps/nbytes/nbytes.pc.in b/deps/nbytes/nbytes.pc.in new file mode 100644 index 00000000000000..24119b190e69e6 --- /dev/null +++ b/deps/nbytes/nbytes.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: nbytes +Description: Library of byte handling functions extracted from Node.js core +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lnbytes +Cflags: -I${includedir} diff --git a/deps/nbytes/release-please-config.json b/deps/nbytes/release-please-config.json new file mode 100644 index 00000000000000..079304597b6d88 --- /dev/null +++ b/deps/nbytes/release-please-config.json @@ -0,0 +1,11 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "extra-files": [ + "CMakeLists.txt", + "include/nbytes.h" + ] + } + } +} diff --git a/deps/nbytes/src/nbytes.cpp b/deps/nbytes/src/nbytes.cpp index a827809adbacd3..09e2665f8c67e4 100644 --- a/deps/nbytes/src/nbytes.cpp +++ b/deps/nbytes/src/nbytes.cpp @@ -157,6 +157,11 @@ const int8_t unhex_table[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; +inline constexpr char nibble(uint8_t x) { + uint8_t add = (x >= 10) ? ('a' - 10) : '0'; + return x + add; +} + size_t HexEncode(const char *src, size_t slen, char *dst, size_t dlen) { // We know how much we'll write, just make sure that there's space. NBYTES_ASSERT_TRUE(dlen >= MultiplyWithOverflowCheck(slen, 2u) && @@ -164,10 +169,9 @@ size_t HexEncode(const char *src, size_t slen, char *dst, size_t dlen) { dlen = slen * 2; for (size_t i = 0, k = 0; k < dlen; i += 1, k += 2) { - static const char hex[] = "0123456789abcdef"; uint8_t val = static_cast(src[i]); - dst[k + 0] = hex[val >> 4]; - dst[k + 1] = hex[val & 15]; + dst[k + 0] = nibble(val >> 4); + dst[k + 1] = nibble(val & 15); } return dlen; diff --git a/deps/npm/README.md b/deps/npm/README.md index d31017ec771b16..4d79b192e1f47c 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -50,4 +50,4 @@ npm #### Is "npm" an acronym for "Node Package Manager"? -Contrary to popular belief, **`npm`** **is not** in fact an acronym for "Node Package Manager"; It is a recursive bacronymic abbreviation for **"npm is not an acronym"** (if the project was named "ninaa", then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were to ever have been considered an acronym, it would be as "node pm" or, potentially "new pm". +Contrary to popular belief, **`npm`** **is not** an acronym for "Node Package Manager." It is a recursive backronymic abbreviation for **"npm is not an acronym"** (if the project were named "ninaa," then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were ever considered an acronym, it would be as "node pm" or, potentially, "new pm". diff --git a/deps/npm/docs/content/commands/npm-get.md b/deps/npm/docs/content/commands/npm-get.md new file mode 100644 index 00000000000000..4f79cdde4667ac --- /dev/null +++ b/deps/npm/docs/content/commands/npm-get.md @@ -0,0 +1,32 @@ +--- +title: npm-get +section: 1 +description: Get a value from the npm configuration +--- + +### Synopsis + +```bash +npm get [ ...] (See `npm config`) +``` + +Note: This command is unaware of workspaces. + +### Description + +Get a value from the npm configuration + +### Configuration + +#### `long` + +* Default: false +* Type: Boolean + +Show extended information in `ls`, `search`, and `help-search`. + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index 0af6bde331cbbd..d576d335a66481 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -264,7 +264,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index 84a8aea731b5dd..34c5ee6b1878da 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -606,7 +606,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm-ll.md b/deps/npm/docs/content/commands/npm-ll.md new file mode 100644 index 00000000000000..2114c263d4b854 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-ll.md @@ -0,0 +1,229 @@ +--- +title: npm-ll +section: 1 +description: List installed packages +--- + +### Synopsis + +```bash +npm ll [[<@scope>/] ...] + +alias: la +``` + +### Description + +List installed packages + +### Configuration + +#### `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. + + + +#### `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. + + + +#### `long` + +* Default: false +* Type: Boolean + +Show extended information in `ls`, `search`, and `help-search`. + + + +#### `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. + + + +#### `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` + + + +#### `depth` + +* Default: `Infinity` if `--all` is set; otherwise, `0` +* 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. + + + +#### `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. + + + +#### `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=`. + +Dependency types specified in `--include` will not be omitted, regardless of +the order in which omit/include are specified on the command-line. + + + +#### `link` + +* Default: false +* Type: Boolean + +Used with `npm ls`, limiting output to only those packages that are linked. + + + +#### `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`. + + + +#### `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. + + + +#### `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. + +#### `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. + +#### `install-links` + +* Default: false +* 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. + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 16e4a126dc8911..807b4bfd4c8de9 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -23,7 +23,7 @@ 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@11.9.0 /path/to/npm +npm@11.10.1 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md index d6aa3eb53a79a5..b05f8b5a5c0e1b 100644 --- a/deps/npm/docs/content/commands/npm-outdated.md +++ b/deps/npm/docs/content/commands/npm-outdated.md @@ -165,7 +165,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` ### See Also diff --git a/deps/npm/docs/content/commands/npm-set.md b/deps/npm/docs/content/commands/npm-set.md new file mode 100644 index 00000000000000..9420216a14e18a --- /dev/null +++ b/deps/npm/docs/content/commands/npm-set.md @@ -0,0 +1,58 @@ +--- +title: npm-set +section: 1 +description: Set a value in the npm configuration +--- + +### Synopsis + +```bash +npm set = [= ...] (See `npm config`) +``` + +Note: This command is unaware of workspaces. + +### Description + +Set a value in the npm configuration + +### Configuration + +#### `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` + + + +#### `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` + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-trust.md b/deps/npm/docs/content/commands/npm-trust.md new file mode 100644 index 00000000000000..dd5adb110cf5a9 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-trust.md @@ -0,0 +1,139 @@ +--- +title: npm-trust +section: 1 +description: Manage trusted publishing relationships between packages and CI/CD providers +--- + +### Synopsis + +```bash +npm trust +``` + +Note: This command is unaware of workspaces. + +### Prerequisites + +Before using npm trust commands, ensure the following requirements are met: + +* **npm version**: `npm@11.10.0` or above is required. Use `npm install -g npm@^11.10.0` to update if needed. +* **Write permissions on the package**: You must have write access to the package you're configuring. +* **2FA enabled on account**: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands. +* **Supported authentication methods**: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints. +* **Package must exist**: The package you're configuring must already exist on the npm registry. + +### Description + +Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website. + +For a comprehensive overview of trusted publishing, see the [npm trusted publishers documentation](https://docs.npmjs.com/trusted-publishers). + +The `[package]` argument specifies the package name. If omitted, npm will use the name from the `package.json` in the current directory. + +Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use `npm trust --help`. + +The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the [managing trusted publisher configurations](https://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations) section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the `repository.url` field from your `package.json`, if available. + +Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration: + +1. Use `npm trust list [package]` to view the ID of the existing trusted publisher +2. Use `npm trust revoke --id [package]` to remove the existing configuration +3. Then create your new trust relationship + +### Bulk Usage + +For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the `npm trust ` command with the `--yes` flag for each package. + +The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent `npm trust ` commands to proceed without two-factor authentication, streamlining the bulk configuration process. + +We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window. + +### Configuration + +### `npm trust github` + +Create a trusted relationship between a package and GitHub Actions + +#### Synopsis + +```bash +npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--file` | null | String (required) | Name of workflow file within a repositories .GitHub folder (must end in yaml, yml) | +| `--repository`, `--repo` | null | String | Name of the repository in the format owner/repo | +| `--environment`, `--env` | null | String | CI environment name | +| `--dry-run` | false | 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. | +| `--json` | false | 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. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | + +### `npm trust gitlab` + +Create a trusted relationship between a package and GitLab CI/CD + +#### Synopsis + +```bash +npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--file` | null | String (required) | Name of pipeline file (e.g., .gitlab-ci.yml) | +| `--project` | null | String | Name of the project in the format group/project or group/subgroup/project | +| `--environment`, `--env` | null | String | CI environment name | +| `--dry-run` | false | 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. | +| `--json` | false | 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. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | + +### `npm trust list` + +List trusted relationships for a package + +#### Synopsis + +```bash +npm trust list [package] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--json` | false | 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. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | + +### `npm trust revoke` + +Revoke a trusted relationship for a package + +#### Synopsis + +```bash +npm trust revoke [package] --id= +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--id` | null | String (required) | ID of the trusted relationship to revoke | +| `--dry-run` | false | 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. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | + + +### See Also + +* [npm publish](/commands/npm-publish) +* [npm token](/commands/npm-token) +* [npm access](/commands/npm-access) +* [npm config](/commands/npm-config) +* [npm registry](/using-npm/registry) diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md index 853bb24de32e8d..2011a1e235b2c5 100644 --- a/deps/npm/docs/content/commands/npm-update.md +++ b/deps/npm/docs/content/commands/npm-update.md @@ -330,7 +330,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index a72cffb66130dc..b9e951aaf30b88 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -11.9.0 +11.10.1 ### Description diff --git a/deps/npm/docs/content/configuring-npm/folders.md b/deps/npm/docs/content/configuring-npm/folders.md index 56459c86930ba8..20458512d8b907 100644 --- a/deps/npm/docs/content/configuring-npm/folders.md +++ b/deps/npm/docs/content/configuring-npm/folders.md @@ -1,7 +1,7 @@ --- -title: folders +title: Folders section: 5 -description: Folder Structures Used by npm +description: Folder structures used by npm --- ### Description diff --git a/deps/npm/docs/content/configuring-npm/install.md b/deps/npm/docs/content/configuring-npm/install.md index 1d7e7b80e6c223..4af74954692f8c 100644 --- a/deps/npm/docs/content/configuring-npm/install.md +++ b/deps/npm/docs/content/configuring-npm/install.md @@ -1,5 +1,5 @@ --- -title: install +title: Install section: 5 description: Download and install node and npm --- diff --git a/deps/npm/docs/content/configuring-npm/npmrc.md b/deps/npm/docs/content/configuring-npm/npmrc.md index 41d7c5e462c518..b1e7d16be10c79 100644 --- a/deps/npm/docs/content/configuring-npm/npmrc.md +++ b/deps/npm/docs/content/configuring-npm/npmrc.md @@ -1,5 +1,5 @@ --- -title: npmrc +title: .npmrc section: 5 description: The npm config files --- @@ -105,6 +105,39 @@ If the credential is meant for any request to a registry on a single host, the s If it must be scoped to a specific path on the host that path may also be provided, such as `//my-custom-registry.org/unique/path:`. +### Unsupported Custom Configuration Keys + +Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in `.npmrc`. In a future major version of npm, these unknown keys may no longer be accepted. + +Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, `electron-builder`) should not be placed in `.npmrc`. + +If you need package-level configuration for use in scripts, use the `config` field in your `package.json` instead: + +```json +{ + "name": "my-package", + "config": { + "mirror": "https://example.com/" + } +} + +``` + +Values defined in `package.json#config` are exposed to scripts as environment variables prefixed with `npm_package_config_`. For example: + +``` +npm_package_config_mirror +``` + +If you need to pass arguments to a script command, use `--` to separate npm arguments from script arguments: + +``` +npm run build -- --customFlag +``` + +Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in `.npmrc`. + + ``` ; bad config _authToken=MYTOKEN @@ -124,6 +157,33 @@ _authToken=MYTOKEN //somewhere-else.com/another/:_authToken=MYTOKEN2 ``` +### Custom / third-party config keys + +npm only recognizes its own [configuration options](/using-npm/config). +If your `.npmrc` contains keys that are not part of npm's config definitions +(for example, `electron_mirror` or `sass_binary_site`), npm will emit a +warning: + +``` +warn Unknown user config "electron_mirror". +This will stop working in the next major version of npm. +``` + +These keys were historically tolerated but are not officially supported. +A future major version of npm will treat unknown top-level keys as errors. + +Some tools (such as `@electron/get` or `node-sass`) read their own +configuration from environment variables or from `.npmrc` by convention. +You can set these values as environment variables instead: + +```bash +export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/" +export ELECTRON_CUSTOM_DIR="{{ version }}" +``` + +Environment variables are the most portable approach and work regardless +of `.npmrc` format. + ### See also * [npm folders](/configuring-npm/folders) diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index cca95ff72b0b49..ff897d9f71b02f 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -1,7 +1,7 @@ --- -title: config +title: Config section: 7 -description: More than you probably want to know about npm configuration +description: About npm configuration --- ### Description @@ -240,7 +240,7 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. - +This config cannot be used with: `min-release-age` #### `bin-links` @@ -1071,6 +1071,21 @@ Any "%s" in the message will be replaced with the version number. +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` + #### `name` * Default: null diff --git a/deps/npm/docs/content/using-npm/dependency-selectors.md b/deps/npm/docs/content/using-npm/dependency-selectors.md index 9a1502e9349da4..b12c640c586ec7 100644 --- a/deps/npm/docs/content/using-npm/dependency-selectors.md +++ b/deps/npm/docs/content/using-npm/dependency-selectors.md @@ -1,5 +1,5 @@ --- -title: Dependency Selector Syntax & Querying +title: Dependency Selectors section: 7 description: Dependency Selector Syntax & Querying --- diff --git a/deps/npm/docs/content/using-npm/developers.md b/deps/npm/docs/content/using-npm/developers.md index 0261d137b36b79..de0cb848c59ff4 100644 --- a/deps/npm/docs/content/using-npm/developers.md +++ b/deps/npm/docs/content/using-npm/developers.md @@ -1,7 +1,7 @@ --- -title: developers +title: Developers section: 7 -description: Developer Guide +description: Developer guide --- ### Description diff --git a/deps/npm/docs/content/using-npm/logging.md b/deps/npm/docs/content/using-npm/logging.md index d5fca42f595c2a..6f1a2be102a1a5 100644 --- a/deps/npm/docs/content/using-npm/logging.md +++ b/deps/npm/docs/content/using-npm/logging.md @@ -1,7 +1,7 @@ --- title: Logging section: 7 -description: Why, What & How We Log +description: Why, What & How we Log --- ### Description diff --git a/deps/npm/docs/content/using-npm/orgs.md b/deps/npm/docs/content/using-npm/orgs.md index 8faf939d0b5e89..ea1173a852acc7 100644 --- a/deps/npm/docs/content/using-npm/orgs.md +++ b/deps/npm/docs/content/using-npm/orgs.md @@ -1,7 +1,7 @@ --- -title: orgs +title: Organizations section: 7 -description: Working with Teams & Orgs +description: Working with teams & organizations --- ### Description diff --git a/deps/npm/docs/content/using-npm/package-spec.md b/deps/npm/docs/content/using-npm/package-spec.md index eb074a801895f7..fa98f21eb5686c 100644 --- a/deps/npm/docs/content/using-npm/package-spec.md +++ b/deps/npm/docs/content/using-npm/package-spec.md @@ -1,5 +1,5 @@ --- -title: package-spec +title: Package spec section: 7 description: Package name specifier --- diff --git a/deps/npm/docs/content/using-npm/registry.md b/deps/npm/docs/content/using-npm/registry.md index a707b97ac5a9bf..739f2a6a203f5a 100644 --- a/deps/npm/docs/content/using-npm/registry.md +++ b/deps/npm/docs/content/using-npm/registry.md @@ -1,5 +1,5 @@ --- -title: registry +title: Registry section: 7 description: The JavaScript Package Registry --- diff --git a/deps/npm/docs/content/using-npm/removal.md b/deps/npm/docs/content/using-npm/removal.md index 9b431aaf7f38a0..4cf3b64c6d4cf8 100644 --- a/deps/npm/docs/content/using-npm/removal.md +++ b/deps/npm/docs/content/using-npm/removal.md @@ -1,7 +1,7 @@ --- -title: removal +title: Removal section: 7 -description: Cleaning the Slate +description: Cleaning the slate --- ### Synopsis diff --git a/deps/npm/docs/content/using-npm/scope.md b/deps/npm/docs/content/using-npm/scope.md index ed069752b63add..f9fc14075c4a36 100644 --- a/deps/npm/docs/content/using-npm/scope.md +++ b/deps/npm/docs/content/using-npm/scope.md @@ -1,5 +1,5 @@ --- -title: scope +title: Scope section: 7 description: Scoped packages --- diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md index cf4a4284e4cc96..df4e1fcc754d38 100644 --- a/deps/npm/docs/content/using-npm/scripts.md +++ b/deps/npm/docs/content/using-npm/scripts.md @@ -1,5 +1,5 @@ --- -title: scripts +title: Scripts section: 7 description: How npm handles the "scripts" field --- diff --git a/deps/npm/docs/content/using-npm/workspaces.md b/deps/npm/docs/content/using-npm/workspaces.md index 91d0f99745a250..57344341be76c3 100644 --- a/deps/npm/docs/content/using-npm/workspaces.md +++ b/deps/npm/docs/content/using-npm/workspaces.md @@ -1,5 +1,5 @@ --- -title: workspaces +title: Workspaces section: 7 description: Working with workspaces --- diff --git a/deps/npm/docs/lib/index.js b/deps/npm/docs/lib/index.js index 5e40f48882cad4..1056fd4e120fc8 100644 --- a/deps/npm/docs/lib/index.js +++ b/deps/npm/docs/lib/index.js @@ -22,7 +22,38 @@ const assertPlaceholder = (src, path, placeholder) => { return placeholder } -const getCommandByDoc = (docFile, docExt) => { +// Default command loader - loads commands from lib/commands +const defaultCommandLoader = (name) => { + return require(`../../lib/commands/${name}`) +} + +// Load a command using the provided loader or default +const getCommand = (name, commandLoader = defaultCommandLoader) => { + return commandLoader(name) +} + +// Resolve definitions for a command - use definitions if present, otherwise build from params +const resolveDefinitions = (command) => { + // If command has definitions, use them directly (ignore params) + if (command.definitions && Object.keys(command.definitions).length > 0) { + return command.definitions + } + + // Otherwise build from params using global definitions + if (command.params) { + const resolved = {} + for (const param of command.params) { + if (definitions[param]) { + resolved[param] = definitions[param] + } + } + return resolved + } + + return {} +} + +const getCommandByDoc = (docFile, docExt, commandLoader = defaultCommandLoader) => { // 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` @@ -31,7 +62,7 @@ const getCommandByDoc = (docFile, docExt) => { if (name === 'npm') { return { name, - params: null, + definitions: [], usage: 'npm', } } @@ -40,15 +71,20 @@ const getCommandByDoc = (docFile, docExt) => { // `npx` is not technically a command in and of itself, // so it just needs the usage of npm exec const srcName = name === 'npx' ? 'exec' : name - const { params, usage = [''], workspaces } = require(`../../lib/commands/${srcName}`) + const command = getCommand(srcName, commandLoader) + const { usage = [''], workspaces } = command const usagePrefix = name === 'npx' ? 'npx' : `npm ${name}` - if (params) { - for (const param of params) { - if (definitions[param].exclusive) { - for (const e of definitions[param].exclusive) { - if (!params.includes(e)) { - params.splice(params.indexOf(param) + 1, 0, e) - } + + // Resolve definitions - handles exclusive params expansion + const commandDefs = resolveDefinitions(command) + const resolvedDefs = {} + for (const [key, def] of Object.entries(commandDefs)) { + resolvedDefs[key] = def + // Handle exclusive params + if (def.exclusive) { + for (const e of def.exclusive) { + if (!resolvedDefs[e] && definitions[e]) { + resolvedDefs[e] = definitions[e] } } } @@ -57,16 +93,16 @@ const getCommandByDoc = (docFile, docExt) => { return { name, workspaces, - params: name === 'npx' ? null : params, + definitions: name === 'npx' ? {} : resolvedDefs, usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), } } const replaceVersion = (src) => src.replace(/@VERSION@/g, version) -const replaceUsage = (src, { path }) => { +const replaceUsage = (src, { path, commandLoader }) => { const replacer = assertPlaceholder(src, path, TAGS.USAGE) - const { usage, name, workspaces } = getCommandByDoc(path, DOC_EXT) + const { usage, name, workspaces } = getCommandByDoc(path, DOC_EXT, commandLoader) const synopsis = ['```bash', usage] @@ -92,17 +128,95 @@ const replaceUsage = (src, { path }) => { 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) +// Helper to generate a markdown table from definitions +const generateFlagsTable = (definitionPool) => { + const rows = Object.keys(definitionPool).map((n) => { + const def = definitionPool[n] + const flags = [`\`--${def.key}\``] + if (def.alias) { + flags.push(...def.alias.map(a => `\`--${a}\``)) + } + if (def.short) { + flags.push(`\`-${def.short}\``) + } + const flagsStr = flags.join(', ') + let defaultVal = def.defaultDescription + if (!defaultVal) { + defaultVal = String(def.default) + } + let typeVal = def.typeDescription || String(def.type) + if (def.required) { + typeVal = `${typeVal} (required)` + } + const desc = (def.description || '').replace(/\n/g, ' ').trim() + return `| ${flagsStr} | ${defaultVal} | ${typeVal} | ${desc} |` + }) + + return [ + '| Flag | Default | Type | Description |', + '| --- | --- | --- | --- |', + ...rows, + ].join('\n') +} + +const replaceDefinitions = (src, { path, commandLoader }) => { + const { definitions: commandDefs, name } = getCommandByDoc(path, DOC_EXT, commandLoader) - if (!params) { + let subcommands = {} + try { + const command = getCommand(name, commandLoader) + subcommands = command.subcommands || {} + } catch { + // Command doesn't exist + } + + // If no definitions and no subcommands, nothing to replace + if (Object.keys(commandDefs).length === 0 && Object.keys(subcommands).length === 0) { return src } - const paramsConfig = params.map((n) => definitions[n].describe()) + // Assert placeholder is present + const replacer = assertPlaceholder(src, path, TAGS.CONFIG) + + // If command has subcommands, generate sections for each subcommand + if (Object.keys(subcommands).length > 0) { + const subcommandSections = Object.entries(subcommands).map(([subName, SubCommand]) => { + const subUsage = SubCommand.usage || [] + const subDefs = resolveDefinitions(SubCommand) + + const parts = [`### \`npm ${name} ${subName}\``, ''] + + if (SubCommand.description) { + parts.push(SubCommand.description, '') + } + + // Add usage/synopsis + if (subUsage.length > 0) { + parts.push('#### Synopsis', '', '```bash') + subUsage.forEach(u => { + parts.push(`npm ${name} ${subName} ${u}`.trim()) + }) + parts.push('```', '') + } + + // Add flags section if definitions exist + if (Object.keys(subDefs).length > 0) { + parts.push('#### Flags', '') + parts.push(generateFlagsTable(subDefs), '') + } + + return parts.join('\n') + }) + + return src.replace(replacer, subcommandSections.join('\n')) + } + + // For commands without subcommands - commandDefs must be non-empty here + // (we would have returned early at line 175 if both were empty) + const paramDescriptions = Object.values(commandDefs) + .map(def => def.describe()) - return src.replace(replacer, paramsConfig.join('\n\n')) + return src.replace(replacer, paramDescriptions.join('\n\n')) } const replaceConfig = (src, { path }) => { @@ -177,7 +291,7 @@ module.exports = { md: resolve(__dirname, '..', 'content'), }, usage: replaceUsage, - params: replaceParams, + definitions: replaceDefinitions, config: replaceConfig, shorthands: replaceShorthands, version: replaceVersion, diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index 1da6de86e92f16..90181343fd63b5 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-access - @11.9.0 + @11.10.1

Set access level on published packages
diff --git a/deps/npm/docs/output/commands/npm-adduser.html b/deps/npm/docs/output/commands/npm-adduser.html index 322e00aaa1f020..956502bf1b6207 100644 --- a/deps/npm/docs/output/commands/npm-adduser.html +++ b/deps/npm/docs/output/commands/npm-adduser.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-adduser - @11.9.0 + @11.10.1

Add a registry user account
diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index cd42c291280ab6..79ed03d6686cb9 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-audit - @11.9.0 + @11.10.1

Run a security audit
diff --git a/deps/npm/docs/output/commands/npm-bugs.html b/deps/npm/docs/output/commands/npm-bugs.html index d3b99f599f9aa7..7c6d75eba89295 100644 --- a/deps/npm/docs/output/commands/npm-bugs.html +++ b/deps/npm/docs/output/commands/npm-bugs.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-bugs - @11.9.0 + @11.10.1

Report bugs for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html index 0ca1eb96b626d4..bcc06a488fe1c5 100644 --- a/deps/npm/docs/output/commands/npm-cache.html +++ b/deps/npm/docs/output/commands/npm-cache.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-cache - @11.9.0 + @11.10.1

Manipulates packages cache
diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index bef881d75a5d61..83c37a17abf54e 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-ci - @11.9.0 + @11.10.1

Clean install a project
diff --git a/deps/npm/docs/output/commands/npm-completion.html b/deps/npm/docs/output/commands/npm-completion.html index ad634df2861a7f..a6f617636a87e4 100644 --- a/deps/npm/docs/output/commands/npm-completion.html +++ b/deps/npm/docs/output/commands/npm-completion.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-completion - @11.9.0 + @11.10.1

Tab Completion for npm
diff --git a/deps/npm/docs/output/commands/npm-config.html b/deps/npm/docs/output/commands/npm-config.html index 2d66941aa102fc..acc2e26ffdfa1f 100644 --- a/deps/npm/docs/output/commands/npm-config.html +++ b/deps/npm/docs/output/commands/npm-config.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-config - @11.9.0 + @11.10.1

Manage the npm configuration files
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html index 464824c3df549b..2a19d893e7c18a 100644 --- a/deps/npm/docs/output/commands/npm-dedupe.html +++ b/deps/npm/docs/output/commands/npm-dedupe.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-dedupe - @11.9.0 + @11.10.1

Reduce duplication in the package tree
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html index 222abc661845d3..654943740ec3d6 100644 --- a/deps/npm/docs/output/commands/npm-deprecate.html +++ b/deps/npm/docs/output/commands/npm-deprecate.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-deprecate - @11.9.0 + @11.10.1

Deprecate a version of a package
diff --git a/deps/npm/docs/output/commands/npm-diff.html b/deps/npm/docs/output/commands/npm-diff.html index 07a357bc56933b..846e5a9b1736b0 100644 --- a/deps/npm/docs/output/commands/npm-diff.html +++ b/deps/npm/docs/output/commands/npm-diff.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-diff - @11.9.0 + @11.10.1

The registry diff command
diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html index 97995eac91b150..8886ba8d211428 100644 --- a/deps/npm/docs/output/commands/npm-dist-tag.html +++ b/deps/npm/docs/output/commands/npm-dist-tag.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-dist-tag - @11.9.0 + @11.10.1

Modify package distribution tags
diff --git a/deps/npm/docs/output/commands/npm-docs.html b/deps/npm/docs/output/commands/npm-docs.html index ac7bc097bfb2df..618255cc441c08 100644 --- a/deps/npm/docs/output/commands/npm-docs.html +++ b/deps/npm/docs/output/commands/npm-docs.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-docs - @11.9.0 + @11.10.1

Open documentation for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-doctor.html b/deps/npm/docs/output/commands/npm-doctor.html index 71fdd3be8525a5..1ea36dbafb4ddc 100644 --- a/deps/npm/docs/output/commands/npm-doctor.html +++ b/deps/npm/docs/output/commands/npm-doctor.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-doctor - @11.9.0 + @11.10.1

Check the health of your npm environment
diff --git a/deps/npm/docs/output/commands/npm-edit.html b/deps/npm/docs/output/commands/npm-edit.html index a1fa166681c3c1..2b80cbc4c58e7d 100644 --- a/deps/npm/docs/output/commands/npm-edit.html +++ b/deps/npm/docs/output/commands/npm-edit.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-edit - @11.9.0 + @11.10.1

Edit an installed package
diff --git a/deps/npm/docs/output/commands/npm-exec.html b/deps/npm/docs/output/commands/npm-exec.html index b910df4d695112..e940ef5eeca6a8 100644 --- a/deps/npm/docs/output/commands/npm-exec.html +++ b/deps/npm/docs/output/commands/npm-exec.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-exec - @11.9.0 + @11.10.1

Run a command from a local or remote npm package
diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html index ba1a17bbd893e7..143c532fad04a7 100644 --- a/deps/npm/docs/output/commands/npm-explain.html +++ b/deps/npm/docs/output/commands/npm-explain.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-explain - @11.9.0 + @11.10.1

Explain installed packages
diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html index 0be4fd5138ee6f..96e7944d88bc03 100644 --- a/deps/npm/docs/output/commands/npm-explore.html +++ b/deps/npm/docs/output/commands/npm-explore.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-explore - @11.9.0 + @11.10.1

Browse an installed package
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html index 7255d6df7b1b55..a383932c3fd7bd 100644 --- a/deps/npm/docs/output/commands/npm-find-dupes.html +++ b/deps/npm/docs/output/commands/npm-find-dupes.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-find-dupes - @11.9.0 + @11.10.1

Find duplication in the package tree
diff --git a/deps/npm/docs/output/commands/npm-fund.html b/deps/npm/docs/output/commands/npm-fund.html index bd22701dcc9344..4d46b59e79f492 100644 --- a/deps/npm/docs/output/commands/npm-fund.html +++ b/deps/npm/docs/output/commands/npm-fund.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-fund - @11.9.0 + @11.10.1

Retrieve funding information
diff --git a/deps/npm/docs/output/commands/npm-get.html b/deps/npm/docs/output/commands/npm-get.html new file mode 100644 index 00000000000000..f66d2d8cf61aad --- /dev/null +++ b/deps/npm/docs/output/commands/npm-get.html @@ -0,0 +1,231 @@ + + +npm-get + + + + + +
+
+

+ npm-get + @11.10.1 +

+Get a value from the npm configuration +
+ +
+

Table of contents

+ +
+ +

Synopsis

+
npm get [<key> ...] (See `npm config`)
+
+

Note: This command is unaware of workspaces.

+

Description

+

Get a value from the npm configuration

+

Configuration

+

long

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Show extended information in ls, search, and help-search.

+

See Also

+
+ + +
+ + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-help-search.html b/deps/npm/docs/output/commands/npm-help-search.html index a1f151d902bc33..1e09e109da2750 100644 --- a/deps/npm/docs/output/commands/npm-help-search.html +++ b/deps/npm/docs/output/commands/npm-help-search.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-help-search - @11.9.0 + @11.10.1

Search npm help documentation
diff --git a/deps/npm/docs/output/commands/npm-help.html b/deps/npm/docs/output/commands/npm-help.html index b7db12a84ed902..6822feba0d3913 100644 --- a/deps/npm/docs/output/commands/npm-help.html +++ b/deps/npm/docs/output/commands/npm-help.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-help - @11.9.0 + @11.10.1

Get help on npm
diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html index 81f614100155d6..8050ea825b69ac 100644 --- a/deps/npm/docs/output/commands/npm-init.html +++ b/deps/npm/docs/output/commands/npm-init.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-init - @11.9.0 + @11.10.1

Create a package.json file
diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html index 266cbcdd9926ec..610ee0882ad298 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-install-ci-test - @11.9.0 + @11.10.1

Install a project with a clean slate and run tests
diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index d1ff6afe7ffb4f..900baed5d7b51e 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
-

+

npm-install-test - @11.9.0 + @11.10.1

Install package(s) and run tests

Table of contents

- +

Synopsis

@@ -344,6 +389,19 @@

before

--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.

+

This config cannot be used with: min-release-age

+

min-release-age

+
    +
  • Default: null
  • +
  • Type: null or Number
  • +
+

If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

+

This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

+

This config cannot be used with: before

  • Default: true
  • diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html index 4f73d9c724da86..5d0674df08e57b 100644 --- a/deps/npm/docs/output/commands/npm-install.html +++ b/deps/npm/docs/output/commands/npm-install.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
    -

    +

    npm-install - @11.9.0 + @11.10.1

    Install a package

    Table of contents

    - +

    Synopsis

    @@ -619,6 +664,19 @@

    before

    --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.

    +

    This config cannot be used with: min-release-age

    +

    min-release-age

    +
      +
    • Default: null
    • +
    • Type: null or Number
    • +
    +

    If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

    +

    This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

    +

    This config cannot be used with: before

    • Default: true
    • diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html index 218266435a99c2..f0aa834a2be0ee 100644 --- a/deps/npm/docs/output/commands/npm-link.html +++ b/deps/npm/docs/output/commands/npm-link.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-link - @11.9.0 + @11.10.1

      Symlink a package folder
      diff --git a/deps/npm/docs/output/commands/npm-ll.html b/deps/npm/docs/output/commands/npm-ll.html new file mode 100644 index 00000000000000..62043a5e166799 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-ll.html @@ -0,0 +1,381 @@ + + +npm-ll + + + + + +
      +
      +

      + npm-ll + @11.10.1 +

      +List installed packages +
      + +
      +

      Table of contents

      + +
      + +

      Synopsis

      +
      npm ll [[<@scope>/]<pkg> ...]
      +
      +alias: la
      +
      +

      Description

      +

      List installed packages

      +

      Configuration

      +

      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.

      +

      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.

      +

      long

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Show extended information in ls, search, and help-search.

      +

      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.

      +

      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 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
      • +
      +

      depth

      +
        +
      • Default: Infinity if --all is set; otherwise, 0
      • +
      • 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.

      +

      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.

      +

      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.

      + +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Used with npm ls, limiting output to only those packages that are linked.

      +

      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.

      +

      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.

      +

      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.

      +

      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.

      + +
        +
      • Default: false
      • +
      • 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.

      +

      See Also

      +
      + + +
      + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-login.html b/deps/npm/docs/output/commands/npm-login.html index 7dd5cb2ef79d60..85063b721fb505 100644 --- a/deps/npm/docs/output/commands/npm-login.html +++ b/deps/npm/docs/output/commands/npm-login.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-login - @11.9.0 + @11.10.1

      Login to a registry user account
      diff --git a/deps/npm/docs/output/commands/npm-logout.html b/deps/npm/docs/output/commands/npm-logout.html index 9b50bcf4454ba4..00e61124397413 100644 --- a/deps/npm/docs/output/commands/npm-logout.html +++ b/deps/npm/docs/output/commands/npm-logout.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-logout - @11.9.0 + @11.10.1

      Log out of the registry
      diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 2d67e02415fbe7..a410ba31d0d5dc 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-ls - @11.9.0 + @11.10.1

      List installed packages
      @@ -164,7 +209,7 @@

      Description

      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:

      -
      npm@11.9.0 /path/to/npm
      +
      npm@11.10.1 /path/to/npm
       └─┬ init-package-json@0.0.4
         └── promzard@0.1.5
       
      diff --git a/deps/npm/docs/output/commands/npm-org.html b/deps/npm/docs/output/commands/npm-org.html index 751ea80aabe5e2..054dbecf15819a 100644 --- a/deps/npm/docs/output/commands/npm-org.html +++ b/deps/npm/docs/output/commands/npm-org.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-org - @11.9.0 + @11.10.1

      Manage orgs
      diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html index 43da9712f64cb4..0ee5d927bbda5c 100644 --- a/deps/npm/docs/output/commands/npm-outdated.html +++ b/deps/npm/docs/output/commands/npm-outdated.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
      -

      +

      npm-outdated - @11.9.0 + @11.10.1

      Check for outdated packages

      Table of contents

      - +

      Synopsis

      @@ -283,6 +328,19 @@

      before

      --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.

      +

      This config cannot be used with: min-release-age

      +

      min-release-age

      +
        +
      • Default: null
      • +
      • Type: null or Number
      • +
      +

      If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

      +

      This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

      +

      This config cannot be used with: before

      See Also

      • package spec
      • diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html index c29650dc924105..b4cda07e5bc5ac 100644 --- a/deps/npm/docs/output/commands/npm-owner.html +++ b/deps/npm/docs/output/commands/npm-owner.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-owner - @11.9.0 + @11.10.1

        Manage package owners
        diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html index 557957f2576548..fa15bdbd453cac 100644 --- a/deps/npm/docs/output/commands/npm-pack.html +++ b/deps/npm/docs/output/commands/npm-pack.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-pack - @11.9.0 + @11.10.1

        Create a tarball from a package
        diff --git a/deps/npm/docs/output/commands/npm-ping.html b/deps/npm/docs/output/commands/npm-ping.html index cbc09575ebddb8..123a1c4712c950 100644 --- a/deps/npm/docs/output/commands/npm-ping.html +++ b/deps/npm/docs/output/commands/npm-ping.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-ping - @11.9.0 + @11.10.1

        Ping npm registry
        diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html index 5b969756e85d53..7119e4073027f0 100644 --- a/deps/npm/docs/output/commands/npm-pkg.html +++ b/deps/npm/docs/output/commands/npm-pkg.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-pkg - @11.9.0 + @11.10.1

        Manages your package.json
        diff --git a/deps/npm/docs/output/commands/npm-prefix.html b/deps/npm/docs/output/commands/npm-prefix.html index 1fa84497d5431d..14b06ca7e096db 100644 --- a/deps/npm/docs/output/commands/npm-prefix.html +++ b/deps/npm/docs/output/commands/npm-prefix.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-prefix - @11.9.0 + @11.10.1

        Display prefix
        diff --git a/deps/npm/docs/output/commands/npm-profile.html b/deps/npm/docs/output/commands/npm-profile.html index 100df963676466..39b5ff54e8df49 100644 --- a/deps/npm/docs/output/commands/npm-profile.html +++ b/deps/npm/docs/output/commands/npm-profile.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-profile - @11.9.0 + @11.10.1

        Change settings on your registry profile
        diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index b0c0f81932eead..06d1002b03758d 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-prune - @11.9.0 + @11.10.1

        Remove extraneous packages
        diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index ef6973b02b9b13..74701633ad7797 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-publish - @11.9.0 + @11.10.1

        Publish a package
        diff --git a/deps/npm/docs/output/commands/npm-query.html b/deps/npm/docs/output/commands/npm-query.html index aa30ac76a35f71..8c96409f900de3 100644 --- a/deps/npm/docs/output/commands/npm-query.html +++ b/deps/npm/docs/output/commands/npm-query.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-query - @11.9.0 + @11.10.1

        Dependency selector query
        diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html index c3aee26c5275ee..8c4ad0790a5a62 100644 --- a/deps/npm/docs/output/commands/npm-rebuild.html +++ b/deps/npm/docs/output/commands/npm-rebuild.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-rebuild - @11.9.0 + @11.10.1

        Rebuild a package
        diff --git a/deps/npm/docs/output/commands/npm-repo.html b/deps/npm/docs/output/commands/npm-repo.html index ad6540a3c2869a..32f6cbf604dd7a 100644 --- a/deps/npm/docs/output/commands/npm-repo.html +++ b/deps/npm/docs/output/commands/npm-repo.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-repo - @11.9.0 + @11.10.1

        Open package repository page in the browser
        diff --git a/deps/npm/docs/output/commands/npm-restart.html b/deps/npm/docs/output/commands/npm-restart.html index 4685bd958617e8..cb82857ae8f7de 100644 --- a/deps/npm/docs/output/commands/npm-restart.html +++ b/deps/npm/docs/output/commands/npm-restart.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-restart - @11.9.0 + @11.10.1

        Restart a package
        diff --git a/deps/npm/docs/output/commands/npm-root.html b/deps/npm/docs/output/commands/npm-root.html index a3a8856b1b6172..2c50261bcdc338 100644 --- a/deps/npm/docs/output/commands/npm-root.html +++ b/deps/npm/docs/output/commands/npm-root.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-root - @11.9.0 + @11.10.1

        Display npm root
        diff --git a/deps/npm/docs/output/commands/npm-run.html b/deps/npm/docs/output/commands/npm-run.html index 11345b9c93ebf8..4de340a9d77b9c 100644 --- a/deps/npm/docs/output/commands/npm-run.html +++ b/deps/npm/docs/output/commands/npm-run.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-run - @11.9.0 + @11.10.1

        Run arbitrary package scripts
        diff --git a/deps/npm/docs/output/commands/npm-sbom.html b/deps/npm/docs/output/commands/npm-sbom.html index cca11e4f1fd0de..a537db9d25e56a 100644 --- a/deps/npm/docs/output/commands/npm-sbom.html +++ b/deps/npm/docs/output/commands/npm-sbom.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-sbom - @11.9.0 + @11.10.1

        Generate a Software Bill of Materials (SBOM)
        diff --git a/deps/npm/docs/output/commands/npm-search.html b/deps/npm/docs/output/commands/npm-search.html index a9482d48a3fcb2..54c434bab83a2d 100644 --- a/deps/npm/docs/output/commands/npm-search.html +++ b/deps/npm/docs/output/commands/npm-search.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-search - @11.9.0 + @11.10.1

        Search for packages
        diff --git a/deps/npm/docs/output/commands/npm-set.html b/deps/npm/docs/output/commands/npm-set.html new file mode 100644 index 00000000000000..59046e91191d64 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-set.html @@ -0,0 +1,255 @@ + + +npm-set + + + + + +
        +
        +

        + npm-set + @11.10.1 +

        +Set a value in the npm configuration +
        + +
        +

        Table of contents

        + +
        + +

        Synopsis

        +
        npm set <key>=<value> [<key>=<value> ...] (See `npm config`)
        +
        +

        Note: This command is unaware of workspaces.

        +

        Description

        +

        Set a value in the npm configuration

        +

        Configuration

        +

        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 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
        • +
        +

        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 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
        • +
        +

        See Also

        +
        + + +
        + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-shrinkwrap.html b/deps/npm/docs/output/commands/npm-shrinkwrap.html index 83929137a39b17..c0138b21952843 100644 --- a/deps/npm/docs/output/commands/npm-shrinkwrap.html +++ b/deps/npm/docs/output/commands/npm-shrinkwrap.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-shrinkwrap - @11.9.0 + @11.10.1

        Lock down dependency versions for publication
        diff --git a/deps/npm/docs/output/commands/npm-star.html b/deps/npm/docs/output/commands/npm-star.html index 26511206a26c22..684c1891120005 100644 --- a/deps/npm/docs/output/commands/npm-star.html +++ b/deps/npm/docs/output/commands/npm-star.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-star - @11.9.0 + @11.10.1

        Mark your favorite packages
        diff --git a/deps/npm/docs/output/commands/npm-stars.html b/deps/npm/docs/output/commands/npm-stars.html index 4d8b99572ac59d..56ef96e1a8b549 100644 --- a/deps/npm/docs/output/commands/npm-stars.html +++ b/deps/npm/docs/output/commands/npm-stars.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-stars - @11.9.0 + @11.10.1

        View packages marked as favorites
        diff --git a/deps/npm/docs/output/commands/npm-start.html b/deps/npm/docs/output/commands/npm-start.html index fdaf54fc3fd77c..9f9099ca7316b7 100644 --- a/deps/npm/docs/output/commands/npm-start.html +++ b/deps/npm/docs/output/commands/npm-start.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-start - @11.9.0 + @11.10.1

        Start a package
        diff --git a/deps/npm/docs/output/commands/npm-stop.html b/deps/npm/docs/output/commands/npm-stop.html index bcbcf51f73dbb6..79793beabb92a5 100644 --- a/deps/npm/docs/output/commands/npm-stop.html +++ b/deps/npm/docs/output/commands/npm-stop.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-stop - @11.9.0 + @11.10.1

        Stop a package
        diff --git a/deps/npm/docs/output/commands/npm-team.html b/deps/npm/docs/output/commands/npm-team.html index 837570bdce568d..63924d254cb689 100644 --- a/deps/npm/docs/output/commands/npm-team.html +++ b/deps/npm/docs/output/commands/npm-team.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-team - @11.9.0 + @11.10.1

        Manage organization teams and team memberships
        diff --git a/deps/npm/docs/output/commands/npm-test.html b/deps/npm/docs/output/commands/npm-test.html index 3e6e800e488840..8048ed0207905e 100644 --- a/deps/npm/docs/output/commands/npm-test.html +++ b/deps/npm/docs/output/commands/npm-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-test - @11.9.0 + @11.10.1

        Test a package
        diff --git a/deps/npm/docs/output/commands/npm-token.html b/deps/npm/docs/output/commands/npm-token.html index 538050266b88f0..b7441d2ca7ce9c 100644 --- a/deps/npm/docs/output/commands/npm-token.html +++ b/deps/npm/docs/output/commands/npm-token.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-token - @11.9.0 + @11.10.1

        Manage your authentication tokens
        diff --git a/deps/npm/docs/output/commands/npm-trust.html b/deps/npm/docs/output/commands/npm-trust.html new file mode 100644 index 00000000000000..3e00c001a8cf32 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-trust.html @@ -0,0 +1,438 @@ + + +npm-trust + + + + + +
        +
        +

        + npm-trust + @11.10.1 +

        +Manage trusted publishing relationships between packages and CI/CD providers +
        + +
        +

        Table of contents

        + +
        + +

        Synopsis

        +
        npm trust
        +
        +

        Note: This command is unaware of workspaces.

        +

        Prerequisites

        +

        Before using npm trust commands, ensure the following requirements are met:

        +
          +
        • npm version: npm@11.10.0 or above is required. Use npm install -g npm@^11.10.0 to update if needed.
        • +
        • Write permissions on the package: You must have write access to the package you're configuring.
        • +
        • 2FA enabled on account: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands.
        • +
        • Supported authentication methods: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints.
        • +
        • Package must exist: The package you're configuring must already exist on the npm registry.
        • +
        +

        Description

        +

        Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website.

        +

        For a comprehensive overview of trusted publishing, see the npm trusted publishers documentation.

        +

        The [package] argument specifies the package name. If omitted, npm will use the name from the package.json in the current directory.

        +

        Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use npm trust <provider> --help.

        +

        The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the managing trusted publisher configurations section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the repository.url field from your package.json, if available.

        +

        Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration:

        +
          +
        1. Use npm trust list [package] to view the ID of the existing trusted publisher
        2. +
        3. Use npm trust revoke --id <id> [package] to remove the existing configuration
        4. +
        5. Then create your new trust relationship
        6. +
        +

        Bulk Usage

        +

        For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the npm trust <provider> command with the --yes flag for each package.

        +

        The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent npm trust <provider> commands to proceed without two-factor authentication, streamlining the bulk configuration process.

        +

        We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window.

        +

        Configuration

        +

        npm trust github

        +

        Create a trusted relationship between a package and GitHub Actions

        +

        Synopsis

        +
        npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --filenullString (required)Name of workflow file within a repositories .GitHub folder (must end in yaml, yml)
        --repository, --reponullStringName of the repository in the format owner/repo
        --environment, --envnullStringCI environment name
        --dry-runfalseBooleanIndicates 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.
        --jsonfalseBooleanWhether 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.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        --yes, -ynullnull or BooleanAutomatically answer "yes" to any prompts that npm might print on the command line.
        +

        npm trust gitlab

        +

        Create a trusted relationship between a package and GitLab CI/CD

        +

        Synopsis

        +
        npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --filenullString (required)Name of pipeline file (e.g., .gitlab-ci.yml)
        --projectnullStringName of the project in the format group/project or group/subgroup/project
        --environment, --envnullStringCI environment name
        --dry-runfalseBooleanIndicates 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.
        --jsonfalseBooleanWhether 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.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        --yes, -ynullnull or BooleanAutomatically answer "yes" to any prompts that npm might print on the command line.
        +

        npm trust list

        +

        List trusted relationships for a package

        +

        Synopsis

        +
        npm trust list [package]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --jsonfalseBooleanWhether 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.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        +

        npm trust revoke

        +

        Revoke a trusted relationship for a package

        +

        Synopsis

        +
        npm trust revoke [package] --id=<trust-id>
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --idnullString (required)ID of the trusted relationship to revoke
        --dry-runfalseBooleanIndicates 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.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        +

        See Also

        +
        + + +
        + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-undeprecate.html b/deps/npm/docs/output/commands/npm-undeprecate.html index b4be55e168b585..531199eab9e445 100644 --- a/deps/npm/docs/output/commands/npm-undeprecate.html +++ b/deps/npm/docs/output/commands/npm-undeprecate.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-undeprecate - @11.9.0 + @11.10.1

        Undeprecate a version of a package
        diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html index 44e9cf7c2aa3ed..f63f38bcc009fc 100644 --- a/deps/npm/docs/output/commands/npm-uninstall.html +++ b/deps/npm/docs/output/commands/npm-uninstall.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-uninstall - @11.9.0 + @11.10.1

        Remove a package
        diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html index 2e22356936185c..c7e160999c35ec 100644 --- a/deps/npm/docs/output/commands/npm-unpublish.html +++ b/deps/npm/docs/output/commands/npm-unpublish.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-unpublish - @11.9.0 + @11.10.1

        Remove a package from the registry
        diff --git a/deps/npm/docs/output/commands/npm-unstar.html b/deps/npm/docs/output/commands/npm-unstar.html index 8ecc9dd29d998a..c2172972b3e376 100644 --- a/deps/npm/docs/output/commands/npm-unstar.html +++ b/deps/npm/docs/output/commands/npm-unstar.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-unstar - @11.9.0 + @11.10.1

        Remove an item from your favorite packages
        diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html index 36918bdfe28faa..938112559a8c25 100644 --- a/deps/npm/docs/output/commands/npm-update.html +++ b/deps/npm/docs/output/commands/npm-update.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
        -

        +

        npm-update - @11.9.0 + @11.10.1

        Update packages

        Table of contents

        - +

        Synopsis

        @@ -384,6 +429,19 @@

        before

        --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.

        +

        This config cannot be used with: min-release-age

        +

        min-release-age

        +
          +
        • Default: null
        • +
        • Type: null or Number
        • +
        +

        If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

        +

        This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

        +

        This config cannot be used with: before

        • Default: true
        • diff --git a/deps/npm/docs/output/commands/npm-version.html b/deps/npm/docs/output/commands/npm-version.html index def26114efa130..6ebd1337d2ad14 100644 --- a/deps/npm/docs/output/commands/npm-version.html +++ b/deps/npm/docs/output/commands/npm-version.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-version - @11.9.0 + @11.10.1

          Bump a package version
          diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html index ff28bddcc77722..cdc11e95cb90fb 100644 --- a/deps/npm/docs/output/commands/npm-view.html +++ b/deps/npm/docs/output/commands/npm-view.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-view - @11.9.0 + @11.10.1

          View registry info
          diff --git a/deps/npm/docs/output/commands/npm-whoami.html b/deps/npm/docs/output/commands/npm-whoami.html index 90eefca7360055..af3cfa49551d24 100644 --- a/deps/npm/docs/output/commands/npm-whoami.html +++ b/deps/npm/docs/output/commands/npm-whoami.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-whoami - @11.9.0 + @11.10.1

          Display npm username
          diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 3236401d1e4096..d4e4d0e33e16ae 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm - @11.9.0 + @11.10.1

          javascript package manager
          @@ -158,7 +203,7 @@

          Table of contents

      Note: This command is unaware of workspaces.

      Version

      -

      11.9.0

      +

      11.10.1

      Description

      npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.

      diff --git a/deps/npm/docs/output/commands/npx.html b/deps/npm/docs/output/commands/npx.html index c3ab304803e6b4..0b5b9dbde9d785 100644 --- a/deps/npm/docs/output/commands/npx.html +++ b/deps/npm/docs/output/commands/npx.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npx - @11.9.0 + @11.10.1

      Run a command from a local or remote npm package
      diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html index ad588e49d6601c..a8dfc978f4353d 100644 --- a/deps/npm/docs/output/configuring-npm/folders.html +++ b/deps/npm/docs/output/configuring-npm/folders.html @@ -1,6 +1,6 @@ -folders +Folders @@ -141,11 +186,11 @@
      -

      - folders - @11.9.0 +

      + Folders + @11.10.1

      -Folder Structures Used by npm +Folder structures used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/install.html b/deps/npm/docs/output/configuring-npm/install.html index 75075d822fad4d..ac078eefc99d0a 100644 --- a/deps/npm/docs/output/configuring-npm/install.html +++ b/deps/npm/docs/output/configuring-npm/install.html @@ -1,6 +1,6 @@ -install +Install @@ -141,9 +186,9 @@
      -

      - install - @11.9.0 +

      + Install + @11.10.1

      Download and install node and npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-global.html b/deps/npm/docs/output/configuring-npm/npm-global.html index ad588e49d6601c..a8dfc978f4353d 100644 --- a/deps/npm/docs/output/configuring-npm/npm-global.html +++ b/deps/npm/docs/output/configuring-npm/npm-global.html @@ -1,6 +1,6 @@ -folders +Folders @@ -141,11 +186,11 @@
      -

      - folders - @11.9.0 +

      + Folders + @11.10.1

      -Folder Structures Used by npm +Folder structures used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-json.html b/deps/npm/docs/output/configuring-npm/npm-json.html index 9b15c851a9b962..78eb2e0322869a 100644 --- a/deps/npm/docs/output/configuring-npm/npm-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      package.json - @11.9.0 + @11.10.1

      Specifics of npm's package.json handling
      diff --git a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html index 644718fa76ad24..969d9d34148fe2 100644 --- a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-shrinkwrap.json - @11.9.0 + @11.10.1

      A publishable lockfile
      diff --git a/deps/npm/docs/output/configuring-npm/npmrc.html b/deps/npm/docs/output/configuring-npm/npmrc.html index c2afe2c28d0505..41b2bfa8a446c5 100644 --- a/deps/npm/docs/output/configuring-npm/npmrc.html +++ b/deps/npm/docs/output/configuring-npm/npmrc.html @@ -1,6 +1,6 @@ -npmrc +.npmrc @@ -141,16 +186,16 @@
      -

      - npmrc - @11.9.0 +

      + .npmrc + @11.10.1

      The npm config files

      Table of contents

      - +

      Description

      @@ -224,6 +269,25 @@ 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 specific path on the host that path may also be provided, such as //my-custom-registry.org/unique/path:.

      +

      Unsupported Custom Configuration Keys

      +

      Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in .npmrc. In a future major version of npm, these unknown keys may no longer be accepted.

      +

      Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, electron-builder) should not be placed in .npmrc.

      +

      If you need package-level configuration for use in scripts, use the config field in your package.json instead:

      +
      {
      +  "name": "my-package",
      +  "config": {
      +    "mirror": "https://example.com/"
      +  }
      +}
      +
      +
      +

      Values defined in package.json#config are exposed to scripts as environment variables prefixed with npm_package_config_. For example:

      +
      npm_package_config_mirror
      +
      +

      If you need to pass arguments to a script command, use -- to separate npm arguments from script arguments:

      +
      npm run build -- --customFlag
      +
      +

      Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in .npmrc.

      ; bad config
       _authToken=MYTOKEN
       
      @@ -241,6 +305,24 @@ 
       ; would apply only to @another
       //somewhere-else.com/another/:_authToken=MYTOKEN2
       
      +

      Custom / third-party config keys

      +

      npm only recognizes its own configuration options. +If your .npmrc contains keys that are not part of npm's config definitions +(for example, electron_mirror or sass_binary_site), npm will emit a +warning:

      +
      warn Unknown user config "electron_mirror".
      +This will stop working in the next major version of npm.
      +
      +

      These keys were historically tolerated but are not officially supported. +A future major version of npm will treat unknown top-level keys as errors.

      +

      Some tools (such as @electron/get or node-sass) read their own +configuration from environment variables or from .npmrc by convention. +You can set these values as environment variables instead:

      +
      export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/"
      +export ELECTRON_CUSTOM_DIR="{{ version }}"
      +
      +

      Environment variables are the most portable approach and work regardless +of .npmrc format.

      See also

      • npm folders
      • diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html index 9b15c851a9b962..78eb2e0322869a 100644 --- a/deps/npm/docs/output/configuring-npm/package-json.html +++ b/deps/npm/docs/output/configuring-npm/package-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        package.json - @11.9.0 + @11.10.1

        Specifics of npm's package.json handling
        diff --git a/deps/npm/docs/output/configuring-npm/package-lock-json.html b/deps/npm/docs/output/configuring-npm/package-lock-json.html index f087d02ec1dbc4..c105214e75456a 100644 --- a/deps/npm/docs/output/configuring-npm/package-lock-json.html +++ b/deps/npm/docs/output/configuring-npm/package-lock-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        package-lock.json - @11.9.0 + @11.10.1

        A manifestation of the manifest
        diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index bb3eb98f9d8a63..1cceceed6cb164 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -1,6 +1,6 @@ -config +Config @@ -141,16 +186,16 @@
        -

        - config - @11.9.0 +

        + Config + @11.10.1

        -More than you probably want to know about npm configuration +About npm configuration

        Table of contents

        -
        +

        Description

        @@ -335,6 +380,7 @@

        before

        --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.

        +

        This config cannot be used with: min-release-age

        • Default: true
        • @@ -925,6 +971,18 @@

          message

        Commit message which is used by npm version when creating version commit.

        Any "%s" in the message will be replaced with the version number.

        +

        min-release-age

        +
          +
        • Default: null
        • +
        • Type: null or Number
        • +
        +

        If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

        +

        This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

        +

        This config cannot be used with: before

        name

        • Default: null
        • diff --git a/deps/npm/docs/output/using-npm/dependency-selectors.html b/deps/npm/docs/output/using-npm/dependency-selectors.html index 110ad2f97dc8f5..76917c21379cac 100644 --- a/deps/npm/docs/output/using-npm/dependency-selectors.html +++ b/deps/npm/docs/output/using-npm/dependency-selectors.html @@ -1,6 +1,6 @@ -Dependency Selector Syntax & Querying +Dependency Selectors @@ -141,9 +186,9 @@
          -

          - Dependency Selector Syntax & Querying - @11.9.0 +

          + Dependency Selectors + @11.10.1

          Dependency Selector Syntax & Querying
          diff --git a/deps/npm/docs/output/using-npm/developers.html b/deps/npm/docs/output/using-npm/developers.html index 1c80eedc91856e..16a74d6a0c2c7d 100644 --- a/deps/npm/docs/output/using-npm/developers.html +++ b/deps/npm/docs/output/using-npm/developers.html @@ -1,6 +1,6 @@ -developers +Developers @@ -141,11 +186,11 @@
          -

          - developers - @11.9.0 +

          + Developers + @11.10.1

          -Developer Guide +Developer guide
          diff --git a/deps/npm/docs/output/using-npm/logging.html b/deps/npm/docs/output/using-npm/logging.html index 3fbbf62f4e8597..c8ac0db586f5be 100644 --- a/deps/npm/docs/output/using-npm/logging.html +++ b/deps/npm/docs/output/using-npm/logging.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,11 +186,11 @@
          -

          +

          Logging - @11.9.0 + @11.10.1

          -Why, What & How We Log +Why, What & How we Log
          diff --git a/deps/npm/docs/output/using-npm/orgs.html b/deps/npm/docs/output/using-npm/orgs.html index 074617cd25acd3..e744c91b418b8b 100644 --- a/deps/npm/docs/output/using-npm/orgs.html +++ b/deps/npm/docs/output/using-npm/orgs.html @@ -1,6 +1,6 @@ -orgs +Organizations @@ -141,11 +186,11 @@
          -

          - orgs - @11.9.0 +

          + Organizations + @11.10.1

          -Working with Teams & Orgs +Working with teams & organizations
          diff --git a/deps/npm/docs/output/using-npm/package-spec.html b/deps/npm/docs/output/using-npm/package-spec.html index 1427e7f0ecc37d..0dfc7a6162e0fd 100644 --- a/deps/npm/docs/output/using-npm/package-spec.html +++ b/deps/npm/docs/output/using-npm/package-spec.html @@ -1,6 +1,6 @@ -package-spec +Package spec @@ -141,9 +186,9 @@
          -

          - package-spec - @11.9.0 +

          + Package spec + @11.10.1

          Package name specifier
          diff --git a/deps/npm/docs/output/using-npm/registry.html b/deps/npm/docs/output/using-npm/registry.html index 398a1a72ba0c07..9a755f513e5fb7 100644 --- a/deps/npm/docs/output/using-npm/registry.html +++ b/deps/npm/docs/output/using-npm/registry.html @@ -1,6 +1,6 @@ -registry +Registry @@ -141,9 +186,9 @@
          -

          - registry - @11.9.0 +

          + Registry + @11.10.1

          The JavaScript Package Registry
          diff --git a/deps/npm/docs/output/using-npm/removal.html b/deps/npm/docs/output/using-npm/removal.html index 88329fcc203e59..63ffc04bda59e5 100644 --- a/deps/npm/docs/output/using-npm/removal.html +++ b/deps/npm/docs/output/using-npm/removal.html @@ -1,6 +1,6 @@ -removal +Removal @@ -141,11 +186,11 @@
          -

          - removal - @11.9.0 +

          + Removal + @11.10.1

          -Cleaning the Slate +Cleaning the slate
          diff --git a/deps/npm/docs/output/using-npm/scope.html b/deps/npm/docs/output/using-npm/scope.html index 3cab822c180f36..5b27891d71c7b7 100644 --- a/deps/npm/docs/output/using-npm/scope.html +++ b/deps/npm/docs/output/using-npm/scope.html @@ -1,6 +1,6 @@ -scope +Scope @@ -141,9 +186,9 @@
          -

          - scope - @11.9.0 +

          + Scope + @11.10.1

          Scoped packages
          diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html index e47dfd682231de..e3acc1b439dbeb 100644 --- a/deps/npm/docs/output/using-npm/scripts.html +++ b/deps/npm/docs/output/using-npm/scripts.html @@ -1,6 +1,6 @@ -scripts +Scripts @@ -141,9 +186,9 @@
          -

          - scripts - @11.9.0 +

          + Scripts + @11.10.1

          How npm handles the "scripts" field
          diff --git a/deps/npm/docs/output/using-npm/workspaces.html b/deps/npm/docs/output/using-npm/workspaces.html index a6cb16a60173a0..e1a0cc58593471 100644 --- a/deps/npm/docs/output/using-npm/workspaces.html +++ b/deps/npm/docs/output/using-npm/workspaces.html @@ -1,6 +1,6 @@ -workspaces +Workspaces @@ -141,9 +186,9 @@
          -

          - workspaces - @11.9.0 +

          + Workspaces + @11.10.1

          Working with workspaces
          diff --git a/deps/npm/lib/base-cmd.js b/deps/npm/lib/base-cmd.js index 3e6c4758cbd587..8b846316a4b96f 100644 --- a/deps/npm/lib/base-cmd.js +++ b/deps/npm/lib/base-cmd.js @@ -1,4 +1,6 @@ const { log } = require('proc-log') +const { definitions, shorthands } = require('@npmcli/config/lib/definitions') +const nopt = require('nopt') class BaseCommand { // these defaults can be overridden by individual commands @@ -10,39 +12,76 @@ class BaseCommand { static name = null static description = null static params = null + static definitions = null + static subcommands = null + // Number of expected positional arguments (null = unlimited/unchecked) + static positionals = null // this is a static so that we can read from it without instantiating a command // which would require loading the config static get describeUsage () { - const { definitions } = require('@npmcli/config/lib/definitions') + return this.getUsage() + } + + static getUsage (parentName = null, includeDescriptions = true) { const { aliases: cmdAliases } = require('./utils/cmd-list') const seenExclusive = new Set() const wrapWidth = 80 - const { description, usage = [''], name, params } = this + const { description, usage = [''], name } = this + + // Resolve to a definitions array: if the command has its own definitions, use + // those directly; otherwise resolve params from the global definitions pool. + let cmdDefs + if (this.definitions) { + cmdDefs = this.definitions + } else if (this.params) { + cmdDefs = this.params.map(p => definitions[p]).filter(Boolean) + } + + // If this is a subcommand, prepend parent name + const fullCommandName = parentName ? `${parentName} ${name}` : name const fullUsage = [ `${description}`, '', 'Usage:', - ...usage.map(u => `npm ${name} ${u}`.trim()), + ...usage.map(u => `npm ${fullCommandName} ${u}`.trim()), ] - if (params) { + if (this.subcommands) { + fullUsage.push('') + fullUsage.push('Subcommands:') + const subcommandEntries = Object.entries(this.subcommands) + for (let i = 0; i < subcommandEntries.length; i++) { + const [subName, SubCommand] = subcommandEntries[i] + fullUsage.push(` ${subName}`) + if (SubCommand.description) { + fullUsage.push(` ${SubCommand.description}`) + } + // Add space between subcommands except after the last one + if (i < subcommandEntries.length - 1) { + fullUsage.push('') + } + } + fullUsage.push('') + fullUsage.push(`Run "npm ${name} --help" for more info on a subcommand.`) + } + + if (cmdDefs) { let results = '' let line = '' - for (const param of params) { + for (const def of cmdDefs) { /* istanbul ignore next */ - if (seenExclusive.has(param)) { + if (seenExclusive.has(def.key)) { continue } - const { exclusive } = definitions[param] - let paramUsage = `${definitions[param].usage}` - if (exclusive) { + let paramUsage = def.usage + if (def.exclusive) { const exclusiveParams = [paramUsage] - seenExclusive.add(param) - for (const e of exclusive) { + for (const e of def.exclusive) { seenExclusive.add(e) - exclusiveParams.push(definitions[e].usage) + const eDef = cmdDefs.find(d => d.key === e) || definitions[e] + exclusiveParams.push(eDef?.usage) } paramUsage = `${exclusiveParams.join('|')}` } @@ -56,6 +95,24 @@ class BaseCommand { fullUsage.push('') fullUsage.push('Options:') fullUsage.push([results, line].filter(Boolean).join('\n')) + + // Add flag descriptions + if (cmdDefs.length > 0 && includeDescriptions) { + fullUsage.push('') + for (const def of cmdDefs) { + if (def.description) { + const desc = def.description.trim().split('\n')[0] + const shortcuts = def.short ? `-${def.short}` : '' + const aliases = (def.alias || []).map(v => `--${v}`).join('|') + const mainFlag = `--${def.key}` + const flagName = [shortcuts, mainFlag, aliases].filter(Boolean).join('|') + const requiredNote = def.required ? ' (required)' : '' + fullUsage.push(` ${flagName}${requiredNote}`) + fullUsage.push(` ${desc}`) + fullUsage.push('') + } + } + } } const aliases = Object.entries(cmdAliases).reduce((p, [k, v]) => { @@ -76,8 +133,9 @@ class BaseCommand { constructor (npm) { this.npm = npm + this.commandArgs = null - const { config } = this.npm + const { config } = this if (!this.constructor.skipConfigValidation) { config.validate() @@ -88,6 +146,11 @@ class BaseCommand { } } + get config () { + // Return command-specific config if it exists, otherwise use npm's config + return this.npm.config + } + get name () { return this.constructor.name } @@ -209,6 +272,163 @@ class BaseCommand { this.workspaceNames = [...ws.keys()] this.workspacePaths = [...ws.values()] } + + flags (depth = 1) { + const commandDefinitions = this.constructor.definitions || [] + + // Build types, shorthands, and defaults from definitions + const types = {} + const defaults = {} + const cmdShorthands = {} + const aliasMap = {} // Track which aliases map to which main keys + + for (const def of commandDefinitions) { + defaults[def.key] = def.default + types[def.key] = def.type + + // Handle aliases defined in the definition + if (def.alias && Array.isArray(def.alias)) { + for (const aliasKey of def.alias) { + types[aliasKey] = def.type // Needed for nopt to parse aliases + if (!aliasMap[def.key]) { + aliasMap[def.key] = [] + } + aliasMap[def.key].push(aliasKey) + } + } + + // Handle short options + if (def.short) { + const shorts = Array.isArray(def.short) ? def.short : [def.short] + for (const short of shorts) { + cmdShorthands[short] = [`--${def.key}`] + } + } + } + + // Parse args + let parsed = {} + let remains = [] + const argv = this.config.argv + if (argv && argv.length > 0) { + // config.argv contains the full command line including node, npm, and command names + // Format: ['node', 'npm', 'command', 'subcommand', 'positional', '--flags'] + // depth tells us how many command names to skip (1 for top-level, 2 for subcommand, etc.) + const offset = 2 + depth // Skip 'node', 'npm', and all command/subcommand names + parsed = nopt(types, cmdShorthands, argv, offset) + remains = parsed.argv.remain + delete parsed.argv + } + + // Validate flags - only if command has definitions (new system) + if (this.constructor.definitions && this.constructor.definitions.length > 0) { + this.#validateFlags(parsed, commandDefinitions, remains) + } + + // Check for conflicts between main flags and their aliases + // Also map aliases back to their main keys + for (const [mainKey, aliases] of Object.entries(aliasMap)) { + const providedKeys = [] + if (mainKey in parsed) { + providedKeys.push(mainKey) + } + for (const alias of aliases) { + if (alias in parsed) { + providedKeys.push(alias) + } + } + if (providedKeys.length > 1) { + const flagList = providedKeys.map(k => `--${k}`).join(' or ') + throw new Error(`Please provide only one of ${flagList}`) + } + + // If an alias was provided, map it to the main key + if (providedKeys.length === 1 && providedKeys[0] !== mainKey) { + const aliasKey = providedKeys[0] + parsed[mainKey] = parsed[aliasKey] + delete parsed[aliasKey] + } + } + + // Only include keys that are defined in commandDefinitions (main keys only) + const filtered = {} + for (const def of commandDefinitions) { + if (def.key in parsed) { + filtered[def.key] = parsed[def.key] + } + } + return [{ ...defaults, ...filtered }, remains] + } + + // Validate flags and throw errors for unknown flags or unexpected positionals + #validateFlags (parsed, commandDefinitions, remains) { + // Build a set of all valid flag names (global + command-specific + shorthands) + const validFlags = new Set([ + ...Object.keys(definitions), + ...commandDefinitions.map(d => d.key), + ...Object.keys(shorthands), // Add global shorthands like 'verbose', 'dd', etc. + ]) + + // Add aliases to valid flags + for (const def of commandDefinitions) { + if (def.alias && Array.isArray(def.alias)) { + for (const alias of def.alias) { + validFlags.add(alias) + } + } + } + + // Check parsed flags against valid flags + const unknownFlags = [] + for (const key of Object.keys(parsed)) { + if (!validFlags.has(key)) { + unknownFlags.push(key) + } + } + + // Throw error if unknown flags were found + if (unknownFlags.length > 0) { + const flagList = unknownFlags.map(f => `--${f}`).join(', ') + throw this.usageError(`Unknown flag${unknownFlags.length > 1 ? 's' : ''}: ${flagList}`) + } + + // Remove warnings for command-specific definitions that npm's global config + // doesn't know about (these were queued as "unknown" during config.load()) + for (const def of commandDefinitions) { + this.npm.config.removeWarning(def.key) + if (def.alias && Array.isArray(def.alias)) { + for (const alias of def.alias) { + this.npm.config.removeWarning(alias) + } + } + } + + // Remove warnings for unknown positionals that were actually consumed as flag values + // by command-specific definitions (e.g., --id where --id is command-specific) + const remainsSet = new Set(remains) + for (const unknownPos of this.npm.config.getUnknownPositionals()) { + if (!remainsSet.has(unknownPos)) { + // This value was consumed as a flag value, not truly a positional + this.npm.config.removeUnknownPositional(unknownPos) + } + } + + // Warn about extra positional arguments beyond what the command expects + const expectedPositionals = this.constructor.positionals + if (expectedPositionals !== null && remains.length > expectedPositionals) { + const extraPositionals = remains.slice(expectedPositionals) + for (const extra of extraPositionals) { + throw new Error(`Unknown positional argument: ${extra}`) + } + } + + this.npm.config.logWarnings() + } + + async exec () { + // This method should be overridden by commands + // Subcommand routing is handled in npm.js #exec + } } module.exports = BaseCommand diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index 7aaf3564cb9fc7..580997b66c6f71 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -363,7 +363,7 @@ class Cache extends BaseCommand { if (valid) { output.standard(results.join('\n')) } - output.standard('') + output.standard() } } } diff --git a/deps/npm/lib/commands/completion.js b/deps/npm/lib/commands/completion.js index ae459aaaf31ce5..bfb01b8d08843b 100644 --- a/deps/npm/lib/commands/completion.js +++ b/deps/npm/lib/commands/completion.js @@ -40,13 +40,13 @@ const BaseCommand = require('../base-cmd.js') const fileExists = (file) => fs.stat(file).then(s => s.isFile()).catch(() => false) -const configNames = Object.keys(definitions) -const shorthandNames = Object.keys(shorthands) -const allConfs = configNames.concat(shorthandNames) - class Completion extends BaseCommand { static description = 'Tab Completion for npm' static name = 'completion' + // Completion command uses args differently - they represent the command line + // being completed, not actual arguments to this command, so we use an empty + // definitions object to prevent flag validation + static definitions = [] // completion for the completion command static async completion (opts) { @@ -90,15 +90,17 @@ class Completion extends BaseCommand { // if the point isn't at the end. // ie, tabbing at: npm foo b|ar const w = +COMP_CWORD - const words = args.map(unescape) - const word = words[w] const line = COMP_LINE + // Use COMP_LINE to get words if args doesn't include flags (e.g., in tests) + const hasFlags = line.includes(' -') && !args.some(arg => arg.startsWith('-')) + const words = (hasFlags ? line.split(/\s+/) : args).map(unescape) + const word = words[w] || '' const point = +COMP_POINT const partialLine = line.slice(0, point) const partialWords = words.slice(0, w) // figure out where in that last word the point is. - const partialWordRaw = args[w] + const partialWordRaw = args[w] || '' let i = partialWordRaw.length while (partialWordRaw.slice(0, i) !== partialLine.slice(-1 * i) && i > 0) { i-- @@ -121,33 +123,32 @@ class Completion extends BaseCommand { raw: args, } + // try to find the npm command and subcommand early for flag completion + // this helps with custom command definitions from subcommands + const types = Object.entries(definitions).reduce((acc, [key, def]) => { + acc[key] = def.type + return acc + }, {}) + const parsed = opts.conf = + nopt(types, shorthands, partialWords.slice(0, -1), 0) + const cmd = parsed.argv.remain[1] + const subCmd = parsed.argv.remain[2] + if (partialWords.slice(0, -1).indexOf('--') === -1) { - if (word.charAt(0) === '-') { - return this.wrap(opts, configCompl(opts)) + if (word && word.charAt(0) === '-') { + return this.wrap(opts, configCompl(opts, cmd, subCmd, this.npm)) } if (words[w - 1] && words[w - 1].charAt(0) === '-' && - !isFlag(words[w - 1])) { + !isFlag(words[w - 1], cmd, subCmd, this.npm)) { // awaiting a value for a non-bool config. // don't even try to do this for now return this.wrap(opts, configValueCompl(opts)) } } - // try to find the npm command. - // it's the first thing after all the configs. - // take a little shortcut and use npm's arg parsing logic. - // don't have to worry about the last arg being implicitly - // boolean'ed, since the last block will catch that. - const types = Object.entries(definitions).reduce((acc, [key, def]) => { - acc[key] = def.type - return acc - }, {}) - const parsed = opts.conf = - nopt(types, shorthands, partialWords.slice(0, -1), 0) // check if there's a command already. - const cmd = parsed.argv.remain[1] if (!cmd) { return this.wrap(opts, cmdCompl(opts, this.npm)) } @@ -234,16 +235,66 @@ const dumpScript = async (p) => { const unescape = w => w.charAt(0) === '\'' ? w.replace(/^'|'$/g, '') : w.replace(/\\ /g, ' ') +// Helper to get custom definitions from a command/subcommand +const getCustomDefinitions = (cmd, subCmd) => { + if (!cmd) { + return [] + } + + try { + const command = Npm.cmd(cmd) + + // Check if the command has subcommands + if (subCmd && command.subcommands && command.subcommands[subCmd]) { + const subcommand = command.subcommands[subCmd] + // All subcommands have definitions + return subcommand.definitions + } + + // Check if the command itself has definitions + if (command.definitions) { + return command.definitions + } + } catch { + // Command not found or no definitions + } + + return [] +} + +// Helper to get all config names including aliases from custom definitions +const getCustomConfigNames = (customDefs) => { + const names = new Set() + for (const def of customDefs) { + names.add(def.key) + if (def.alias && Array.isArray(def.alias)) { + def.alias.forEach(a => names.add(a)) + } + } + return [...names] +} + // the current word has a dash. Return the config names, // with the same number of dashes as the current word has. -const configCompl = opts => { +const configCompl = (opts, cmd, subCmd, npm) => { const word = opts.word const split = word.match(/^(-+)((?:no-)*)(.*)$/) const dashes = split[1] const no = split[2] - const flags = configNames.filter(isFlag) - return allConfs.map(c => dashes + c) - .concat(flags.map(f => dashes + (no || 'no-') + f)) + + // Get custom definitions from the command/subcommand + const customDefs = getCustomDefinitions(cmd, subCmd, npm) + const customNames = getCustomConfigNames(customDefs) + + // If there are custom definitions, return only those (new feature) + // Otherwise, return empty array (historical behavior - no global flag completion) + if (customNames.length > 0) { + const flags = customNames.filter(name => isFlag(name, cmd, subCmd, npm)) + return customNames.map(c => dashes + c) + .concat(flags.map(f => dashes + (no || 'no-') + f)) + } + + return [] } // expand with the valid values of various config values. @@ -251,16 +302,37 @@ const configCompl = opts => { const configValueCompl = () => [] // check if the thing is a flag or not. -const isFlag = word => { +const isFlag = (word, cmd, subCmd, npm) => { // shorthands never take args. const split = word.match(/^(-*)((?:no-)+)?(.*)$/) const no = split[2] const conf = split[3] - const { type } = definitions[conf] - return no || - type === Boolean || - (Array.isArray(type) && type.includes(Boolean)) || - shorthands[conf] + + // Check custom definitions first + const customDefs = getCustomDefinitions(cmd, subCmd, npm) + + // Check if conf is in custom definitions or is an alias + let customDef = customDefs.find(d => d.key === conf) + if (!customDef) { + // Check if conf is an alias for any of the custom definitions + for (const def of customDefs) { + if (def.alias && Array.isArray(def.alias) && def.alias.includes(conf)) { + customDef = def + break + } + } + } + + if (customDef) { + const { type } = customDef + return no || + type === Boolean || + (Array.isArray(type) && type.includes(Boolean)) + } + + // No custom definitions found, should not reach here in normal flow + // since configCompl returns empty array when no custom defs exist + return false } // complete against the npm commands diff --git a/deps/npm/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js index a537478bee3fe1..0d948da231187b 100644 --- a/deps/npm/lib/commands/doctor.js +++ b/deps/npm/lib/commands/doctor.js @@ -27,7 +27,7 @@ const maskLabel = mask => { return label.join(', ') } -const subcommands = [ +const checks = [ { // Ping is left in as a legacy command but is listed as "connection" to // make more sense to more people @@ -100,12 +100,10 @@ class Doctor extends BaseCommand { static name = 'doctor' static params = ['registry'] static ignoreImplicitWorkspace = false - static usage = [`[${subcommands.flatMap(s => s.groups) + static usage = [`[${checks.flatMap(s => s.groups) .filter((value, index, self) => self.indexOf(value) === index && value !== 'ping') .join('] [')}]`] - static subcommands = subcommands - async exec (args) { log.info('doctor', 'Running checkup') let allOk = true @@ -331,7 +329,7 @@ class Doctor extends BaseCommand { } actions (params) { - return this.constructor.subcommands.filter(subcmd => { + return checks.filter(subcmd => { if (process.platform === 'win32' && subcmd.windows === false) { return false } diff --git a/deps/npm/lib/commands/edit.js b/deps/npm/lib/commands/edit.js index b2c2ec8d2a39a0..1140c59efa3e40 100644 --- a/deps/npm/lib/commands/edit.js +++ b/deps/npm/lib/commands/edit.js @@ -33,8 +33,6 @@ class Edit extends BaseCommand { static params = ['editor'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/explain.js b/deps/npm/lib/commands/explain.js index 5f37ba9925f410..3b843e3bbff6c9 100644 --- a/deps/npm/lib/commands/explain.js +++ b/deps/npm/lib/commands/explain.js @@ -17,8 +17,6 @@ class Explain extends ArboristWorkspaceCmd { static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/explore.js b/deps/npm/lib/commands/explore.js index 184af2bdc5a161..d0d2e5c3ef8912 100644 --- a/deps/npm/lib/commands/explore.js +++ b/deps/npm/lib/commands/explore.js @@ -14,8 +14,6 @@ class Explore extends BaseCommand { static params = ['shell'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/fund.js b/deps/npm/lib/commands/fund.js index 8c194dac80b49b..a281912d77b326 100644 --- a/deps/npm/lib/commands/fund.js +++ b/deps/npm/lib/commands/fund.js @@ -34,8 +34,6 @@ class Fund extends ArboristWorkspaceCmd { return `${msg}\`` } - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/get.js b/deps/npm/lib/commands/get.js index 4191f2c973e7d3..e111d7f2f54c84 100644 --- a/deps/npm/lib/commands/get.js +++ b/deps/npm/lib/commands/get.js @@ -8,8 +8,6 @@ class Get extends BaseCommand { static params = ['long'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts) { const Config = Npm.cmd('config') return Config.completion(opts) diff --git a/deps/npm/lib/commands/install.js b/deps/npm/lib/commands/install.js index 707848a43d48f8..43647c6bf7e88d 100644 --- a/deps/npm/lib/commands/install.js +++ b/deps/npm/lib/commands/install.js @@ -31,6 +31,7 @@ class Install extends ArboristWorkspaceCmd { 'allow-git', 'audit', 'before', + 'min-release-age', 'bin-links', 'fund', 'dry-run', diff --git a/deps/npm/lib/commands/ls.js b/deps/npm/lib/commands/ls.js index bc8beb007e8093..0ea8704a50573a 100644 --- a/deps/npm/lib/commands/ls.js +++ b/deps/npm/lib/commands/ls.js @@ -39,8 +39,6 @@ class LS extends ArboristWorkspaceCmd { ...super.params, ] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/rebuild.js b/deps/npm/lib/commands/rebuild.js index 1c19836106e063..a23df39f1560be 100644 --- a/deps/npm/lib/commands/rebuild.js +++ b/deps/npm/lib/commands/rebuild.js @@ -17,8 +17,6 @@ class Rebuild extends ArboristWorkspaceCmd { static usage = ['[] ...]'] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/run.js b/deps/npm/lib/commands/run.js index d89cb4d93bb7fa..bed82a6a08701b 100644 --- a/deps/npm/lib/commands/run.js +++ b/deps/npm/lib/commands/run.js @@ -57,7 +57,7 @@ class RunScript extends BaseCommand { if (!args.length) { const newline = await this.#list(path, { workspace }) if (newline && !last) { - output.standard('') + output.standard() } continue } diff --git a/deps/npm/lib/commands/set.js b/deps/npm/lib/commands/set.js index 2e61762ba9dcd4..9a90e2a50ea1e6 100644 --- a/deps/npm/lib/commands/set.js +++ b/deps/npm/lib/commands/set.js @@ -8,8 +8,6 @@ class Set extends BaseCommand { static params = ['global', 'location'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts) { const Config = Npm.cmd('config') return Config.completion(opts) diff --git a/deps/npm/lib/commands/team.js b/deps/npm/lib/commands/team.js index 089e917909d10a..98f5d2d16b0084 100644 --- a/deps/npm/lib/commands/team.js +++ b/deps/npm/lib/commands/team.js @@ -1,4 +1,3 @@ -const columns = require('cli-columns') const libteam = require('libnpmteam') const { output } = require('proc-log') const { otplease } = require('../utils/auth.js') @@ -131,9 +130,11 @@ class Team extends BaseCommand { output.standard(users.join('\n')) } else if (!this.npm.silent) { const plural = users.length === 1 ? '' : 's' - const more = users.length === 0 ? '' : ':\n' - output.standard(`\n@${entity} has ${users.length} user${plural}${more}`) - output.standard(columns(users, { padding: 1 })) + const more = users.length === 0 ? '' : ':' + output.standard(`@${entity} has ${users.length} user${plural}${more}`) + for (const user of users) { + output.standard(user) + } } } @@ -145,9 +146,11 @@ class Team extends BaseCommand { output.standard(teams.join('\n')) } else if (!this.npm.silent) { const plural = teams.length === 1 ? '' : 's' - const more = teams.length === 0 ? '' : ':\n' - output.standard(`\n@${entity} has ${teams.length} team${plural}${more}`) - output.standard(columns(teams.map(t => `@${t}`), { padding: 1 })) + const more = teams.length === 0 ? '' : ':' + output.standard(`@${entity} has ${teams.length} team${plural}${more}`) + for (const team of teams) { + output.standard(`@${team}`) + } } } } diff --git a/deps/npm/lib/commands/trust/github.js b/deps/npm/lib/commands/trust/github.js new file mode 100644 index 00000000000000..870314b717a759 --- /dev/null +++ b/deps/npm/lib/commands/trust/github.js @@ -0,0 +1,104 @@ +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const TrustCommand = require('../../trust-cmd.js') +const path = require('node:path') + +class TrustGitHub extends TrustCommand { + static description = 'Create a trusted relationship between a package and GitHub Actions' + static name = 'github' + static positionals = 1 // expects at most 1 positional (package name) + static providerName = 'GitHub Actions' + static providerEntity = 'GitHub repository' + static providerFile = 'GitHub Actions Workflow' + static providerHostname = 'https://github.com' + + // entity means project / repository + static entityKey = 'repository' + + static usage = [ + '[package] --file [--repo|--repository] [--env|--environment] [-y|--yes]', + ] + + static definitions = [ + new Definition('file', { + default: null, + type: String, + required: true, + description: 'Name of workflow file within a repositories .GitHub folder (must end in yaml, yml)', + }), + new Definition('repository', { + default: null, + type: String, + description: 'Name of the repository in the format owner/repo', + alias: ['repo'], + }), + new Definition('environment', { + default: null, + type: String, + description: 'CI environment name', + alias: ['env'], + }), + // globals are alphabetical + globalDefinitions['dry-run'], + globalDefinitions.json, + globalDefinitions.registry, + globalDefinitions.yes, + ] + + getEntityUrl ({ providerHostname, file, entity }) { + if (file) { + return new URL(`${entity}/blob/HEAD/.github/workflows/${file}`, providerHostname).toString() + } + return new URL(entity, providerHostname).toString() + } + + validateEntity (entity) { + if (entity.split('/').length !== 2) { + throw new Error(`${this.constructor.providerEntity} must be specified in the format owner/repository`) + } + } + + validateFile (file) { + if (file !== path.basename(file)) { + throw new Error('GitHub Actions workflow must be just a file not a path') + } + } + + static optionsToBody (options) { + const { file, repository, environment } = options + const trustConfig = { + type: 'github', + claims: { + repository, + workflow_ref: { + file, + }, + ...(environment) && { environment }, + }, + } + return trustConfig + } + + // Convert API response body to options + static bodyToOptions (body) { + const file = body.claims?.workflow_ref?.file + const repository = body.claims?.repository + const environment = body.claims?.environment + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + ...(file) && { file }, + ...(repository) && { repository }, + ...(environment) && { environment }, + } + } + + async exec (positionalArgs, flags) { + await this.createConfigCommand({ + positionalArgs, + flags, + }) + } +} + +module.exports = TrustGitHub diff --git a/deps/npm/lib/commands/trust/gitlab.js b/deps/npm/lib/commands/trust/gitlab.js new file mode 100644 index 00000000000000..e6456244ea1850 --- /dev/null +++ b/deps/npm/lib/commands/trust/gitlab.js @@ -0,0 +1,105 @@ +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const TrustCommand = require('../../trust-cmd.js') +const path = require('node:path') + +class TrustGitLab extends TrustCommand { + static description = 'Create a trusted relationship between a package and GitLab CI/CD' + static name = 'gitlab' + static positionals = 1 // expects at most 1 positional (package name) + static providerName = 'GitLab CI/CD' + static providerEntity = 'GitLab project' + static providerFile = 'GitLab CI/CD Pipeline' + static providerHostname = 'https://gitlab.com' + + // entity means project / repository + static entityKey = 'project' + + static usage = [ + '[package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]', + ] + + static definitions = [ + new Definition('file', { + default: null, + type: String, + required: true, + description: 'Name of pipeline file (e.g., .gitlab-ci.yml)', + }), + new Definition('project', { + default: null, + type: String, + description: 'Name of the project in the format group/project or group/subgroup/project', + }), + new Definition('environment', { + default: null, + type: String, + description: 'CI environment name', + alias: ['env'], + }), + // globals are alphabetical + globalDefinitions['dry-run'], + globalDefinitions.json, + globalDefinitions.registry, + globalDefinitions.yes, + ] + + getEntityUrl ({ providerHostname, file, entity }) { + if (file) { + return new URL(`${entity}/-/blob/HEAD/${file}`, providerHostname).toString() + } + return new URL(entity, providerHostname).toString() + } + + validateEntity (entity) { + if (entity.split('/').length < 2) { + throw new Error(`${this.constructor.providerEntity} must be specified in the format group/project or group/subgroup/project`) + } + } + + validateFile (file) { + if (file !== path.basename(file)) { + throw new Error('GitLab CI/CD pipeline file must be just a file not a path') + } + } + + static optionsToBody (options) { + const { file, project, environment } = options + const trustConfig = { + type: 'gitlab', + claims: { + project_path: project, + // this looks off, but this is correct + /** The ref path to the top-level pipeline definition, for example, gitlab.example.com/my-group/my-project//.gitlab-ci.yml@refs/heads/main. Introduced in GitLab 16.2. This claim is null unless the pipeline definition is located in the same project. */ + ci_config_ref_uri: { + file, + }, + ...(environment) && { environment }, + }, + } + return trustConfig + } + + // Convert API response body to options + static bodyToOptions (body) { + const file = body.claims?.ci_config_ref_uri?.file + const project = body.claims?.project_path + const environment = body.claims?.environment + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + ...(file) && { file }, + ...(project) && { project }, + ...(environment) && { environment }, + } + } + + async exec (positionalArgs, flags) { + await this.createConfigCommand({ + positionalArgs, + flags, + }) + } +} + +module.exports = TrustGitLab diff --git a/deps/npm/lib/commands/trust/index.js b/deps/npm/lib/commands/trust/index.js new file mode 100644 index 00000000000000..cabcfa7c34cb80 --- /dev/null +++ b/deps/npm/lib/commands/trust/index.js @@ -0,0 +1,23 @@ +const BaseCommand = require('../../base-cmd.js') + +class Trust extends BaseCommand { + static description = 'Create a trusted relationship between a package and a OIDC provider' + static name = 'trust' + + static subcommands = { + github: require('./github.js'), + gitlab: require('./gitlab.js'), + list: require('./list.js'), + revoke: require('./revoke.js'), + } + + static async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) { + return Object.keys(Trust.subcommands) + } + return [] + } +} + +module.exports = Trust diff --git a/deps/npm/lib/commands/trust/list.js b/deps/npm/lib/commands/trust/list.js new file mode 100644 index 00000000000000..8e1147566b056b --- /dev/null +++ b/deps/npm/lib/commands/trust/list.js @@ -0,0 +1,47 @@ +const { otplease } = require('../../utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const TrustGithub = require('./github.js') +const TrustGitlab = require('./gitlab.js') +const TrustCommand = require('../../trust-cmd.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') + +class TrustList extends TrustCommand { + static description = 'List trusted relationships for a package' + static name = 'list' + static positionals = 1 // expects at most 1 positional (package name) + + static usage = [ + '[package]', + ] + + static definitions = [ + globalDefinitions.json, + globalDefinitions.registry, + ] + + static bodyToOptions (body) { + if (body.type === 'github') { + return TrustGithub.bodyToOptions(body) + } else if (body.type === 'gitlab') { + return TrustGitlab.bodyToOptions(body) + } + return TrustCommand.bodyToOptions(body) + } + + async exec (positionalArgs) { + const packageName = positionalArgs[0] || (await this.optionalPkgJson()).name + if (!packageName) { + throw new Error('Package name must be specified either as an argument or in the package.json file') + } + const spec = npa(packageName) + const uri = `/-/package/${spec.escapedName}/trust` + const body = await otplease(this.npm, this.npm.flatOptions, opts => npmFetch.json(uri, { + ...opts, + method: 'GET', + })) + this.displayResponseBody({ body, packageName }) + } +} + +module.exports = TrustList diff --git a/deps/npm/lib/commands/trust/revoke.js b/deps/npm/lib/commands/trust/revoke.js new file mode 100644 index 00000000000000..0f555c0386bc05 --- /dev/null +++ b/deps/npm/lib/commands/trust/revoke.js @@ -0,0 +1,52 @@ +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const { otplease } = require('../../utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const TrustCommand = require('../../trust-cmd.js') + +class TrustRevoke extends TrustCommand { + static description = 'Revoke a trusted relationship for a package' + static name = 'revoke' + static positionals = 1 // expects at most 1 positional (package name) + + static usage = [ + '[package] --id=', + ] + + static definitions = [ + new Definition('id', { + default: null, + type: String, + description: 'ID of the trusted relationship to revoke', + required: true, + }), + globalDefinitions['dry-run'], + globalDefinitions.registry, + ] + + async exec (positionalArgs, flags) { + const dryRun = this.config.get('dry-run') + const pkgName = positionalArgs[0] || (await this.optionalPkgJson()).name + if (!pkgName) { + throw new Error('Package name must be specified either as an argument or in the package.json file') + } + const { id } = flags + if (!id) { + throw new Error('ID of the trusted relationship to revoke must be specified with the --id option') + } + this.dialogue`Attempting to revoke trusted configuration for package ${pkgName} with id ${id}` + if (dryRun) { + return + } + const spec = npa(pkgName) + const uri = `/-/package/${spec.escapedName}/trust/${encodeURIComponent(id)}` + await otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + method: 'DELETE', + })) + this.dialogue`Revoked trusted configuration for package ${pkgName} with id ${id}` + } +} + +module.exports = TrustRevoke diff --git a/deps/npm/lib/commands/uninstall.js b/deps/npm/lib/commands/uninstall.js index f9baebe3bc2e28..a369158d99c524 100644 --- a/deps/npm/lib/commands/uninstall.js +++ b/deps/npm/lib/commands/uninstall.js @@ -11,8 +11,6 @@ class Uninstall extends ArboristWorkspaceCmd { static usage = ['[<@scope>/]...'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/update.js b/deps/npm/lib/commands/update.js index 0d2fc324d92453..38e83f3f6bb953 100644 --- a/deps/npm/lib/commands/update.js +++ b/deps/npm/lib/commands/update.js @@ -29,8 +29,6 @@ class Update extends ArboristWorkspaceCmd { static usage = ['[...]'] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/view.js b/deps/npm/lib/commands/view.js index dd563cb2d52b9a..44b94dfccb05a6 100644 --- a/deps/npm/lib/commands/view.js +++ b/deps/npm/lib/commands/view.js @@ -1,4 +1,3 @@ -const columns = require('cli-columns') const { readFile } = require('node:fs/promises') const jsonParse = require('json-parse-even-better-errors') const { log, output, META } = require('proc-log') @@ -333,7 +332,7 @@ class View extends BaseCommand { if (deps.length) { const maxDeps = 24 res.push('\ndependencies:') - res.push(columns(deps.slice(0, maxDeps), { padding: 1 })) + res.push(deps.slice(0, maxDeps).join(', ')) if (deps.length > maxDeps) { res.push(chalk.dim(`(...and ${deps.length - maxDeps} more.)`)) } @@ -349,8 +348,8 @@ class View extends BaseCommand { } res.push('\ndist-tags:') - const maxTags = 12 - res.push(columns(distTags.slice(0, maxTags), { padding: 1, sort: false })) + const maxTags = 5 + res.push(distTags.slice(0, maxTags).join('\n')) if (distTags.length > maxTags) { res.push(chalk.dim(`(...and ${distTags.length - maxTags} more.)`)) } diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index c635f3e05a7b3a..d30554d400f07f 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -26,7 +26,7 @@ class Npm { command: c, }) } - return require(`./commands/${command}.js`) + return require(`./commands/${command}`) } unrefPromises = [] @@ -72,6 +72,7 @@ class Npm { shorthands, argv: [...process.argv, ...argv], excludeNpmCwd, + warn: false, }) } @@ -227,8 +228,64 @@ class Npm { process.env.npm_command = this.command } + // Only log warnings for legacy commands without definitions or subcommands + // Commands with definitions will handle warnings in base-cmd flags() + // Commands with subcommands will delegate to the subcommand to handle warnings + if (!Command.definitions && !Command.subcommands) { + this.config.logWarnings() + } + + // this needs to be rest after because some commands run + // this.npm.config.checkUnknown('publishConfig', key) + this.config.warn = true + + return this.execCommandClass(command, args, [cmd]) + } + + // Unified command execution for both top-level commands and subcommands + // Supports n-depth subcommands, workspaces, and definitions + async execCommandClass (commandInstance, args, commandPath = []) { + const Command = commandInstance.constructor + const commandName = commandPath.join(':') + + // Handle subcommands if present + if (Command.subcommands) { + const subcommandName = args[0] + + // If help is requested without a subcommand, show main command help + if (this.config.get('usage') && !subcommandName) { + return output.standard(commandInstance.usage) + } + + // If no subcommand provided, show usage error + if (!subcommandName) { + throw commandInstance.usageError() + } + + // Check if the subcommand exists + const SubCommand = Command.subcommands[subcommandName] + if (!SubCommand) { + throw commandInstance.usageError(`Unknown subcommand: ${subcommandName}`) + } + + // Check if help is requested for the subcommand + if (this.config.get('usage')) { + const parentName = commandPath[0] + return output.standard(SubCommand.getUsage(parentName)) + } + + // Create subcommand instance and recurse + const subcommandInstance = new SubCommand(this) + const subcommandArgs = args.slice(1) // Remove subcommand name from args + const subcommandPath = [...commandPath, subcommandName] + + return time.start(`command:${subcommandPath.join(':')}`, () => + this.execCommandClass(subcommandInstance, subcommandArgs, subcommandPath)) + } + + // No subcommands - execute this command if (this.config.get('usage')) { - return output.standard(command.usage) + return output.standard(commandInstance.usage) } let execWorkspaces = false @@ -248,12 +305,26 @@ class Npm { execWorkspaces = true } - if (command.checkDevEngines && !this.global) { - await command.checkDevEngines() + // Check dev engines if needed + if (commandInstance.checkDevEngines && !this.global) { + await commandInstance.checkDevEngines() } - return time.start(`command:${cmd}`, () => - execWorkspaces ? command.execWorkspaces(args) : command.exec(args)) + // Execute command with or without definitions + if (Command.definitions) { + // config.argv contains the full argv with flags (set by Config in production, by MockNpm in tests) + // Pass depth so flags() knows how many command names to skip + const [flags, positionalArgs] = commandInstance.flags(commandPath.length) + return time.start(`command:${commandName}`, () => + execWorkspaces + ? commandInstance.execWorkspaces(positionalArgs, flags) + : commandInstance.exec(positionalArgs, flags)) + } else { + // Legacy commands without definitions + this.config.logWarnings() + return time.start(`command:${commandName}`, () => + execWorkspaces ? commandInstance.execWorkspaces(args) : commandInstance.exec(args)) + } } // This gets called at the end of the exit handler and diff --git a/deps/npm/lib/trust-cmd.js b/deps/npm/lib/trust-cmd.js new file mode 100644 index 00000000000000..c267c1373e91c1 --- /dev/null +++ b/deps/npm/lib/trust-cmd.js @@ -0,0 +1,283 @@ +const BaseCommand = require('./base-cmd.js') +const { otplease } = require('./utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const { read: _read } = require('read') +const { input, output, log, META } = require('proc-log') +const gitinfo = require('hosted-git-info') +const pkgJson = require('@npmcli/package-json') + +const NPM_FRONTEND = 'https://www.npmjs.com' + +class TrustCommand extends BaseCommand { + // Helper to format template strings with color + // Blue text with reset color for interpolated values + warnString (strings, ...values) { + const chalk = this.npm.chalk + const message = strings.reduce((result, str, i) => { + return result + chalk.blue(str) + (values[i] ? chalk.reset(values[i]) : '') + }, '') + return message + } + + // Log a warning message with blue formatting + warn (strings, ...values) { + log.warn('trust', this.warnString(strings, ...values)) + } + + // dialogue is non-log text that is different from our usual npm prefix logging + // it should always show to the user unless --json is specified + // it's not controled by log levels + dialogue (strings, ...values) { + const json = this.config.get('json') + if (!json) { + output.standard(this.warnString(strings, ...values)) + } + } + + createConfig (pkg, body) { + const spec = npa(pkg) + const uri = `/-/package/${spec.escapedName}/trust` + return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + method: 'POST', + body: body, + })) + } + + logOptions (options, pad = true) { + const { values, warnings, fromPackageJson, urls } = { warnings: [], ...options } + if (warnings && warnings.length > 0) { + for (const warningMsg of warnings) { + log.warn('trust', warningMsg) + } + } + + const json = this.config.get('json') + if (json) { + output.standard(JSON.stringify(options.values, null, 2), { [META]: true, redact: false }) + return + } + + const chalk = this.npm.chalk + const { type, id, ...rest } = values || {} + + if (values) { + const lines = [] + if (type) { + lines.push(`type: ${chalk.green(type)}`) + } + if (id) { + lines.push(`id: ${chalk.green(id)}`) + } + for (const [key, value] of Object.entries(rest)) { + if (value !== null && value !== undefined) { + const parts = [ + `${chalk.reset(key)}: ${chalk.green(value)}`, + ] + if (fromPackageJson && fromPackageJson[key]) { + parts.push(`(${chalk.yellow(`from package.json`)})`) + } + lines.push(parts.join(' ')) + } + } + if (pad) { + output.standard() + } + output.standard(lines.join('\n'), { [META]: true, redact: false }) + // Print URLs on their own lines after config, following the same order as rest keys + if (urls) { + const urlLines = [] + for (const key of Object.keys(rest)) { + if (urls[key]) { + urlLines.push(chalk.blue(urls[key])) + } + } + if (urlLines.length > 0) { + output.standard() + output.standard(urlLines.join('\n')) + } + } + if (pad) { + output.standard() + } + } + } + + async confirmOperation (yes) { + // Ask for confirmation unless --yes flag is set + if (yes === true) { + return + } + if (yes === false) { + throw new Error('User cancelled operation') + } + const confirm = await input.read( + () => _read({ prompt: 'Do you want to proceed? (y/N) ', default: 'n' }) + ) + const normalized = confirm.toLowerCase() + if (['y', 'yes'].includes(normalized)) { + return + } + throw new Error('User cancelled operation') + } + + getFrontendUrl ({ pkgName }) { + if (this.registryIsDefault) { + return new URL(`/package/${pkgName}`, NPM_FRONTEND).toString() + } + return null + } + + getRepositoryFromPackageJson (pkg) { + const info = gitinfo.fromUrl(pkg.repository?.url || pkg?.repository) + if (!info) { + return null + } + const repository = info.user + '/' + info.project + const type = info.type + return { repository, type } + } + + async optionalPkgJson () { + try { + const { content } = await pkgJson.normalize(this.npm.prefix) + return content + } catch (err) { + return {} + } + } + + get registryIsDefault () { + return this.npm.config.defaults.registry === this.npm.config.get('registry') + } + + // generic + static bodyToOptions (body) { + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + } + } + + async createConfigCommand ({ positionalArgs, flags }) { + const { providerName, providerEntity, providerHostname } = this.constructor + const dryRun = this.config.get('dry-run') + const yes = this.config.get('yes') // deep-lore this allows for --no-yes + const options = await this.flagsToOptions({ positionalArgs, flags, providerHostname }) + this.dialogue`Establishing trust between ${options.values.package} package and ${providerName}` + this.dialogue`Anyone with ${providerEntity} write access can publish to ${options.values.package}` + this.dialogue`Two-factor authentication is required for this operation` + if (!this.registryIsDefault) { + this.warn`Registry ${this.npm.config.get('registry')} may not support trusted publishing` + } + this.logOptions(options) + if (dryRun) { + return + } + await this.confirmOperation(yes) + const trustConfig = this.constructor.optionsToBody(options.values) + const response = await this.createConfig(options.values.package, [trustConfig]) + const body = await response.json() + this.dialogue`Trust configuration created successfully for ${options.values.package} with the following settings:` + this.displayResponseBody({ body, packageName: options.values.package }) + } + + async flagsToOptions ({ positionalArgs, flags, providerHostname }) { + const { entityKey, name, providerEntity, providerFile } = this.constructor + const content = await this.optionalPkgJson() + const pkgPositional = positionalArgs[0] + const pkgJsonName = content.name + const git = this.getRepositoryFromPackageJson(content) + // the provided positional matches package.json name or no positional provided + const matchPkg = (!pkgPositional || pkgPositional === pkgJsonName) + const pkgName = pkgPositional || pkgJsonName + const usedPkgNameFromPkgJson = !pkgPositional && Boolean(pkgJsonName) + const invalidPkgJsonProviderType = matchPkg && git && git?.type !== name + + let entity + let entitySource + + if (flags[entityKey]) { + entity = flags[entityKey] + entitySource = 'flag' + } else if (!invalidPkgJsonProviderType && git?.repository) { + entity = git.repository + entitySource = 'package.json' + } + const mismatchPkgJsonRepository = matchPkg && git && entity !== git.repository + const usedRepositoryInPkgJson = entitySource === 'package.json' + + const warnings = [] + if (!pkgName) { + throw new Error('Package name must be specified either as an argument or in package.json file') + } + + if (!flags.file) { + throw new Error(`${providerFile} must be specified with the file option`) + } + if (!flags.file.endsWith('.yml') && !flags.file.endsWith('.yaml')) { + throw new Error(`${providerFile} must end in .yml or .yaml`) + } + + this.validateFile?.(flags.file) + + if (invalidPkgJsonProviderType) { + const message = this.warnString`Repository in package.json is not a ${providerEntity}` + if (!flags[entityKey]) { + throw new Error(message) + } else { + warnings.push(message) + } + } else { + if (mismatchPkgJsonRepository) { + warnings.push(this.warnString`Repository in package.json (${git.repository}) differs from provided ${providerEntity} (${entity})`) + } + } + + if (!entity && matchPkg) { + throw new Error(`${providerEntity} must be specified with ${entityKey} option or inferred from the package.json repository field`) + } + if (!entity) { + throw new Error(`${providerEntity} must be specified with ${entityKey} option`) + } + + this.validateEntity(entity) + + return { + values: { + package: pkgName, + file: flags.file, + [entityKey]: entity, + ...(flags.environment && { environment: flags.environment }), + }, + fromPackageJson: { + [entityKey]: usedRepositoryInPkgJson, + package: usedPkgNameFromPkgJson, + }, + warnings: warnings, + urls: { + package: this.getFrontendUrl({ pkgName }), + [entityKey]: this.getEntityUrl({ providerHostname, entity }), + file: this.getEntityUrl({ providerHostname, entity, file: flags.file }), + }, + } + } + + displayResponseBody ({ body, packageName }) { + if (!body || body.length === 0) { + this.dialogue`No trust configurations found for package (${packageName})` + return + } + const items = Array.isArray(body) ? body : [body] + for (const config of items) { + const values = this.constructor.bodyToOptions(config) + output.standard() + this.logOptions({ values }, false) + } + output.standard() + } +} + +module.exports = TrustCommand +module.exports.NPM_FRONTEND = NPM_FRONTEND diff --git a/deps/npm/lib/utils/cmd-list.js b/deps/npm/lib/utils/cmd-list.js index 61f64f77678e2c..ec1d50dcc0c560 100644 --- a/deps/npm/lib/utils/cmd-list.js +++ b/deps/npm/lib/utils/cmd-list.js @@ -62,6 +62,7 @@ const commands = [ 'team', 'test', 'token', + 'trust', 'undeprecate', 'uninstall', 'unpublish', diff --git a/deps/npm/lib/utils/display.js b/deps/npm/lib/utils/display.js index dff16ceebef6fd..122a7f6e8c577a 100644 --- a/deps/npm/lib/utils/display.js +++ b/deps/npm/lib/utils/display.js @@ -337,7 +337,7 @@ class Display { log.resume() // For silent prompts (like password), add newline to preserve output if (meta?.silent) { - output.standard('') + output.standard() } output.flush() this.#progress.resume() @@ -360,7 +360,7 @@ class Display { }) .catch((error) => { // If user hits ctrl+c, add newline to preserve output. - output.standard('') + output.standard() input.end() rej(error) }) diff --git a/deps/npm/lib/utils/npm-usage.js b/deps/npm/lib/utils/npm-usage.js index 1bd790ca601bcd..e01a1956e10545 100644 --- a/deps/npm/lib/utils/npm-usage.js +++ b/deps/npm/lib/utils/npm-usage.js @@ -62,7 +62,7 @@ const cmdUsages = (Npm) => { let maxLen = 0 const set = [] for (const c of commands) { - set.push([c, Npm.cmd(c).describeUsage.split('\n')]) + set.push([c, Npm.cmd(c).getUsage(null, false).split('\n')]) maxLen = Math.max(maxLen, c.length) } diff --git a/deps/npm/lib/utils/reify-output.js b/deps/npm/lib/utils/reify-output.js index f4a8442e9427ff..48a5525d87f802 100644 --- a/deps/npm/lib/utils/reify-output.js +++ b/deps/npm/lib/utils/reify-output.js @@ -215,7 +215,7 @@ const packagesFundingMessage = (npm, { funding }) => { return } - output.standard('') + output.standard() const pkg = funding === 1 ? 'package' : 'packages' const is = funding === 1 ? 'is' : 'are' output.standard(`${funding} ${pkg} ${is} looking for funding`) diff --git a/deps/npm/lib/utils/verify-signatures.js b/deps/npm/lib/utils/verify-signatures.js index baadb2b1227d94..2130c847b60ec4 100644 --- a/deps/npm/lib/utils/verify-signatures.js +++ b/deps/npm/lib/utils/verify-signatures.js @@ -70,7 +70,7 @@ class VerifySignatures { const timing = `audited ${this.auditedWithKeysCount} package${auditedPlural} in ` + `${Math.floor(Number(elapsed) / 1e9)}s` output.standard(timing) - output.standard('') + output.standard() const verifiedBold = this.npm.chalk.bold('verified') if (this.verifiedSignatureCount) { @@ -79,7 +79,7 @@ class VerifySignatures { } else { output.standard(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) } - output.standard('') + output.standard() } if (this.verifiedAttestationCount) { @@ -88,7 +88,7 @@ class VerifySignatures { } else { output.standard(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) } - output.standard('') + output.standard() } if (missing.length) { @@ -98,7 +98,7 @@ class VerifySignatures { } else { output.standard(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) } - output.standard('') + output.standard() missing.map(m => output.standard(`${this.npm.chalk.red(`${m.name}@${m.version}`)} (${m.registry})`) ) @@ -106,7 +106,7 @@ class VerifySignatures { if (invalid.length) { if (missing.length) { - output.standard('') + output.standard() } const invalidClr = this.npm.chalk.redBright('invalid') // We can have either invalid signatures or invalid provenance @@ -117,11 +117,11 @@ class VerifySignatures { } else { output.standard(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) } - output.standard('') + output.standard() invalidSignatures.map(i => output.standard(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) ) - output.standard('') + output.standard() } const invalidAttestations = this.invalid.filter(i => i.code === 'EATTESTATIONVERIFY') @@ -131,11 +131,11 @@ class VerifySignatures { } else { output.standard(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) } - output.standard('') + output.standard() invalidAttestations.map(i => output.standard(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) ) - output.standard('') + output.standard() } if (invalid.length === 1) { @@ -143,7 +143,7 @@ class VerifySignatures { } else { output.standard(`Someone might have tampered with these packages since they were published on the registry!`) } - output.standard('') + output.standard() } } diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 5362d690bb960f..9f9d409d7258d1 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM-ACCESS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ACCESS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 1b51494c83ff8b..f9585f17655a19 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM-ADDUSER" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ADDUSER" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-adduser\fR - Add a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index 6ca08ffeb00041..831e58c2523c04 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM-AUDIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-AUDIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 98d937f58a5f7f..e35fabe3baf58d 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM-BUGS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-BUGS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-bugs\fR - Report bugs for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 2773d51316952b..80a1616948371b 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM-CACHE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CACHE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index e359d05a149681..4b1bcc8d05136b 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM-CI" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CI" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 3eb22ba152f04c..705689eb4c2101 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM-COMPLETION" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-COMPLETION" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-completion\fR - Tab Completion for npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index ca22066fde3dfc..2ccf69bb3aa2b1 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM-CONFIG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CONFIG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-config\fR - Manage the npm configuration files .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 68097b27eee691..c44d3aed759860 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEDUPE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DEDUPE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index a0138a3ffad78a..4fe54b1dc0f310 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEPRECATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DEPRECATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-deprecate\fR - Deprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 987e048df17132..3de2926a0ec3eb 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIFF" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DIFF" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-diff\fR - The registry diff command .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 0ff3d44fefd2ec..7a3c1ca973b21f 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIST-TAG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DIST-TAG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index fa081d88184438..4a6ba9406cc93e 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DOCS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-docs\fR - Open documentation for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 9c71d876643ec0..302ab1b63aceba 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCTOR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DOCTOR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-doctor\fR - Check the health of your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 8bd8cf3b1138d4..40fffba1996f56 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM-EDIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EDIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-edit\fR - Edit an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index 172b94faa2619a..0365cc68ee8a5e 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXEC" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXEC" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-exec\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1 index 16e0f5c2f649a7..45930af8f7e1a8 100644 --- a/deps/npm/man/man1/npm-explain.1 +++ b/deps/npm/man/man1/npm-explain.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLAIN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXPLAIN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-explain\fR - Explain installed packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 024095265ba87f..e63896088fd354 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLORE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXPLORE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-explore\fR - Browse an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index e3642618ebdfcc..19521aab95c618 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM-FIND-DUPES" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-FIND-DUPES" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index b22112a8ce1113..63707de3419526 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM-FUND" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-FUND" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-fund\fR - Retrieve funding information .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-get.1 b/deps/npm/man/man1/npm-get.1 new file mode 100644 index 00000000000000..85a6b12cc25477 --- /dev/null +++ b/deps/npm/man/man1/npm-get.1 @@ -0,0 +1,31 @@ +.TH "NPM-GET" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-get\fR - Get a value from the npm configuration +.SS "Synopsis" +.P +.RS 2 +.nf +npm get \[lB] ...\[rB] (See `npm config`) +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Description" +.P +Get a value from the npm configuration +.SS "Configuration" +.SS "\fBlong\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 4e84d4fc4a89cc..3952cf04f49199 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP-SEARCH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-HELP-SEARCH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-help-search\fR - Search npm help documentation .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index fbcfcc69c36a59..da2d67e6904980 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-HELP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 14c91671e8650d..1863be5d4f7e6d 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM-INIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 0542364079f461..f5e11905595ec3 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL-CI-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index f348a3cfeeecbe..4a3eed7844315b 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" @@ -227,6 +227,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 390a1f7a60d67e..4cf689b5cc905a 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" @@ -617,6 +617,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index d5cef0abde1b45..579f3170f3d041 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM-LINK" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LINK" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ll.1 b/deps/npm/man/man1/npm-ll.1 new file mode 100644 index 00000000000000..aaf6f044c7f03b --- /dev/null +++ b/deps/npm/man/man1/npm-ll.1 @@ -0,0 +1,231 @@ +.TH "NPM-LL" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-ll\fR - List installed packages +.SS "Synopsis" +.P +.RS 2 +.nf +npm ll \[lB]\[lB]<@scope>/\[rB] ...\[rB] + +alias: la +.fi +.RE +.SS "Description" +.P +List installed packages +.SS "Configuration" +.SS "\fBall\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project. +.SS "\fBjson\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Whether or not to output JSON data, rather than the normal output. +.RS 0 +.IP \(bu 4 +In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. +.RE 0 + +.P +Not supported by all npm commands. +.SS "\fBlong\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. +.SS "\fBparseable\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "\fBdepth\fR" +.RS 0 +.IP \(bu 4 +Default: \fBInfinity\fR if \fB--all\fR is set; otherwise, \fB0\fR +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +The depth to go when recursing packages for \fBnpm ls\fR. +.P +If not set, \fBnpm ls\fR will show only the immediate dependencies of the root project. If \fB--all\fR is set, then npm will show all dependencies by default. +.SS "\fBomit\fR" +.RS 0 +.IP \(bu 4 +Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production'; otherwise, empty. +.IP \(bu 4 +Type: "dev", "optional", or "peer" (can be set multiple times) +.RE 0 + +.P +Dependency types to omit from the installation tree on disk. +.P +Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. +.P +If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. +.P +If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. +.SS "\fBinclude\fR" +.RS 0 +.IP \(bu 4 +Default: +.IP \(bu 4 +Type: "prod", "dev", "optional", or "peer" (can be set multiple times) +.RE 0 + +.P +Option that allows for defining which types of dependencies to install. +.P +This is the inverse of \fB--omit=\fR. +.P +Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. +.SS "\fBlink\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Used with \fBnpm ls\fR, limiting output to only those packages that are linked. +.SS "\fBpackage-lock-only\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. +.P +For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. +.P +For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. +.SS "\fBunicode\fR" +.RS 0 +.IP \(bu 4 +Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. +.SS "\fBworkspace\fR" +.RS 0 +.IP \(bu 4 +Default: +.IP \(bu 4 +Type: String (can be set multiple times) +.RE 0 + +.P +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. +.P +Valid values for the \fBworkspace\fR config are either: +.RS 0 +.IP \(bu 4 +Workspace names +.IP \(bu 4 +Path to a workspace directory +.IP \(bu 4 +Path to a parent workspace directory (will result in selecting all workspaces within that folder) +.RE 0 + +.P +When set for the \fBnpm init\fR 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. +.P +This value is not exported to the environment for child processes. +.SS "\fBworkspaces\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Boolean +.RE 0 + +.P +Set to true to run the command in the context of \fBall\fR configured workspaces. +.P +Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: +.RS 0 +.IP \(bu 4 +Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. +.RE 0 + +.P +This value is not exported to the environment for child processes. +.SS "\fBinclude-workspace-root\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Include the workspace root when workspaces are enabled for a command. +.P +When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. +.P +This value is not exported to the environment for child processes. +.SS "\fBinstall-links\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +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. +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index e2586baee4b997..ae067523ebdf3e 100644 --- a/deps/npm/man/man1/npm-login.1 +++ b/deps/npm/man/man1/npm-login.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGIN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LOGIN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-login\fR - Login to a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 170f89f7524871..e2420f25d7cde8 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGOUT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LOGOUT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-logout\fR - Log out of the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index c1e323ae19cd76..3388810b7ee4b4 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM-LS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ls\fR - List installed packages .SS "Synopsis" @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@11.9.0 /path/to/npm +npm@11.10.1 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index 0d8bb3255d6fb7..7d5748586c318e 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM-ORG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ORG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-org\fR - Manage orgs .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 5fc2ef4a0d1cf0..bcb384d11ce6ed 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM-OUTDATED" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-OUTDATED" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-outdated\fR - Check for outdated packages .SS "Synopsis" @@ -179,6 +179,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "See Also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 7a8f50a73b9624..38e5b7f83a79fd 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM-OWNER" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-OWNER" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 848f68a220ec26..103aabb0f92ce5 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM-PACK" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PACK" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-pack\fR - Create a tarball from a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 0c52252a6bb335..f61708debbd3e2 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM-PING" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PING" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ping\fR - Ping npm registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index 48e1e16ab0f265..faee84f1733fcf 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM-PKG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PKG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-pkg\fR - Manages your package.json .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index c7437b27f60907..a6f07c3087709a 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM-PREFIX" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PREFIX" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-prefix\fR - Display prefix .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index bee2dcfd4f5b9f..ecf4f55d07194c 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM-PROFILE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PROFILE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-profile\fR - Change settings on your registry profile .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 0c6bfda9c62fd4..f5c526f937f85b 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM-PRUNE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PRUNE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 3aa7010746ec0e..93347d35059d44 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM-PUBLISH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PUBLISH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index d2ec010c735cf8..8d48a3680c06f8 100644 --- a/deps/npm/man/man1/npm-query.1 +++ b/deps/npm/man/man1/npm-query.1 @@ -1,4 +1,4 @@ -.TH "NPM-QUERY" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-QUERY" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-query\fR - Dependency selector query .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 35d34945cbde1d..55e347a8480ba6 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM-REBUILD" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-REBUILD" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 3b0061f59c7728..e19fe8149bcf5e 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM-REPO" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-REPO" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-repo\fR - Open package repository page in the browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 0bdd96dfe7ff97..0c121135136d29 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM-RESTART" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-RESTART" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-restart\fR - Restart a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 9a925000cf2686..17176bbae2f868 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM-ROOT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ROOT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-root\fR - Display npm root .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-run.1 b/deps/npm/man/man1/npm-run.1 index 1584521bbe7008..4d3a9a5bb85dab 100644 --- a/deps/npm/man/man1/npm-run.1 +++ b/deps/npm/man/man1/npm-run.1 @@ -1,4 +1,4 @@ -.TH "NPM-RUN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-RUN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-run\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-sbom.1 b/deps/npm/man/man1/npm-sbom.1 index f30ab1dd916749..3745977f3c3a26 100644 --- a/deps/npm/man/man1/npm-sbom.1 +++ b/deps/npm/man/man1/npm-sbom.1 @@ -1,4 +1,4 @@ -.TH "NPM-SBOM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SBOM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM) .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index d267f1383f1e4f..0ed57d0df778e7 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-SEARCH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SEARCH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-search\fR - Search for packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-set.1 b/deps/npm/man/man1/npm-set.1 new file mode 100644 index 00000000000000..d40bf8be42161d --- /dev/null +++ b/deps/npm/man/man1/npm-set.1 @@ -0,0 +1,61 @@ +.TH "NPM-SET" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-set\fR - Set a value in the npm configuration +.SS "Synopsis" +.P +.RS 2 +.nf +npm set = \[lB]= ...\[rB] (See `npm config`) +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Description" +.P +Set a value in the npm configuration +.SS "Configuration" +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "\fBlocation\fR" +.RS 0 +.IP \(bu 4 +Default: "user" unless \fB--global\fR is passed, which will also set this value to "global" +.IP \(bu 4 +Type: "global", "user", or "project" +.RE 0 + +.P +When passed to \fBnpm config\fR this refers to which config file to use. +.P +When set to "global" mode, packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index fdcae4f7d35b79..d90167af72cf0e 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SHRINKWRAP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-shrinkwrap\fR - Lock down dependency versions for publication .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 89c6c5bf908ffe..7d18a9b387f8f5 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM-STAR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STAR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-star\fR - Mark your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index f03099894f8f69..a01f377a511ba9 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM-STARS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STARS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-stars\fR - View packages marked as favorites .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 6451a45c812829..12ef36db1de48b 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM-START" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-START" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-start\fR - Start a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index f7e164c779da55..b9d48a28ddb148 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM-STOP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STOP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-stop\fR - Stop a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 753f6f24d3dcd9..e95577f1ca9708 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEAM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TEAM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 8633adfb9c6c3f..287c3c3751b204 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-test\fR - Test a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 7f02acf3763021..597c13472529dd 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM-TOKEN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TOKEN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-trust.1 b/deps/npm/man/man1/npm-trust.1 new file mode 100644 index 00000000000000..3383444e491d2c --- /dev/null +++ b/deps/npm/man/man1/npm-trust.1 @@ -0,0 +1,123 @@ +.TH "NPM-TRUST" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-trust\fR - Manage trusted publishing relationships between packages and CI/CD providers +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Prerequisites" +.P +Before using npm trust commands, ensure the following requirements are met: +.RS 0 +.IP \(bu 4 +\fBnpm version\fR: \fBnpm@11.10.0\fR or above is required. Use \fBnpm install -g npm@^11.10.0\fR to update if needed. +.IP \(bu 4 +\fBWrite permissions on the package\fR: You must have write access to the package you're configuring. +.IP \(bu 4 +\fB2FA enabled on account\fR: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands. +.IP \(bu 4 +\fBSupported authentication methods\fR: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints. +.IP \(bu 4 +\fBPackage must exist\fR: The package you're configuring must already exist on the npm registry. +.RE 0 + +.SS "Description" +.P +Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website. +.P +For a comprehensive overview of trusted publishing, see the \fBnpm trusted publishers documentation\fR \fI\(lahttps://docs.npmjs.com/trusted-publishers\(ra\fR. +.P +The \fB\[lB]package\[rB]\fR argument specifies the package name. If omitted, npm will use the name from the \fBpackage.json\fR in the current directory. +.P +Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal\[em]npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use \fBnpm trust --help\fR. +.P +The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the \fBmanaging trusted publisher configurations\fR \fI\(lahttps://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations\(ra\fR section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the \fBrepository.url\fR field from your \fBpackage.json\fR, if available. +.P +Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration: +.RS 0 +.IP 1. 4 +Use \fBnpm trust list \[lB]package\[rB]\fR to view the ID of the existing trusted publisher +.IP 2. 4 +Use \fBnpm trust revoke --id \[lB]package\[rB]\fR to remove the existing configuration +.IP 3. 4 +Then create your new trust relationship +.RE 0 + +.SS "Bulk Usage" +.P +For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the \fBnpm trust \fR command with the \fB--yes\fR flag for each package. +.P +The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent \fBnpm trust \fR commands to proceed without two-factor authentication, streamlining the bulk configuration process. +.P +We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window. +.SS "Configuration" +.SS "\fBnpm trust github\fR" +.P +Create a trusted relationship between a package and GitHub Actions +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust github \[lB]package\[rB] --file \[lB]--repo|--repository\[rB] \[lB]--env|--environment\[rB] \[lB]-y|--yes\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--file\fR | null | String (required) | Name of workflow file within a repositories .GitHub folder (must end in yaml, yml) | | \fB--repository\fR, \fB--repo\fR | null | String | Name of the repository in the format owner/repo | | \fB--environment\fR, \fB--env\fR | null | String | CI environment name | | \fB--dry-run\fR | false | 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, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | | \fB--yes\fR, \fB-y\fR | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | +.SS "\fBnpm trust gitlab\fR" +.P +Create a trusted relationship between a package and GitLab CI/CD +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust gitlab \[lB]package\[rB] --file \[lB]--project|--repo|--repository\[rB] \[lB]--env|--environment\[rB] \[lB]-y|--yes\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--file\fR | null | String (required) | Name of pipeline file (e.g., .gitlab-ci.yml) | | \fB--project\fR | null | String | Name of the project in the format group/project or group/subgroup/project | | \fB--environment\fR, \fB--env\fR | null | String | CI environment name | | \fB--dry-run\fR | false | 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, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | | \fB--yes\fR, \fB-y\fR | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | +.SS "\fBnpm trust list\fR" +.P +List trusted relationships for a package +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust list \[lB]package\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +.SS "\fBnpm trust revoke\fR" +.P +Revoke a trusted relationship for a package +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust revoke \[lB]package\[rB] --id= +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--id\fR | null | String (required) | ID of the trusted relationship to revoke | | \fB--dry-run\fR | false | 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, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help publish +.IP \(bu 4 +npm help token +.IP \(bu 4 +npm help access +.IP \(bu 4 +npm help config +.IP \(bu 4 +npm help registry +.RE 0 diff --git a/deps/npm/man/man1/npm-undeprecate.1 b/deps/npm/man/man1/npm-undeprecate.1 index eece58dcaa5451..e71e2ff9663af3 100644 --- a/deps/npm/man/man1/npm-undeprecate.1 +++ b/deps/npm/man/man1/npm-undeprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNDEPRECATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNDEPRECATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-undeprecate\fR - Undeprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index d51f4f757640f3..e43b96e4961843 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNINSTALL" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNINSTALL" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 4a4df7ca4ceb1f..47bc7ea639f25e 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNPUBLISH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNPUBLISH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-unpublish\fR - Remove a package from the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1 index 78a1fe792cc718..b3e432256ab763 100644 --- a/deps/npm/man/man1/npm-unstar.1 +++ b/deps/npm/man/man1/npm-unstar.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNSTAR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNSTAR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-unstar\fR - Remove an item from your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index b8e1f2c00a6057..f9d32446333e90 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM-UPDATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UPDATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" @@ -299,6 +299,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 98facf40835a7a..487479ef954713 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM-VERSION" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-VERSION" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-version\fR - Bump a package version .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 1c4def17b18941..fc528772d09e76 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM-VIEW" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-VIEW" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-view\fR - View registry info .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index e150e300f18f8a..6100a8d5e7a789 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM-WHOAMI" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-WHOAMI" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-whoami\fR - Display npm username .SS "Synopsis" diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 5d5d24a0917c41..06c8262446e887 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -11.9.0 +11.10.1 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index 6857e549b7993c..2f9a523277dd2c 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPX" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpx\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 98825654a7ec7e..c234d1c9a9a723 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,6 +1,6 @@ -.TH "FOLDERS" "5" "February 2026" "NPM@11.9.0" "" +.TH "FOLDERS" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBfolders\fR - Folder Structures Used by npm +\fBFolders\fR - Folder structures used by npm .SS "Description" .P npm puts various things on your computer. That's its job. diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index 19e268dc14c86c..d93e54825dcf64 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,6 +1,6 @@ -.TH "INSTALL" "5" "February 2026" "NPM@11.9.0" "" +.TH "INSTALL" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBinstall\fR - Download and install node and npm +\fBInstall\fR - Download and install node and npm .SS "Description" .P To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. \fBWe strongly recommend using a Node version manager to install Node.js and npm.\fR We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally. diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 98825654a7ec7e..c234d1c9a9a723 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,6 +1,6 @@ -.TH "FOLDERS" "5" "February 2026" "NPM@11.9.0" "" +.TH "FOLDERS" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBfolders\fR - Folder Structures Used by npm +\fBFolders\fR - Folder structures used by npm .SS "Description" .P npm puts various things on your computer. That's its job. diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index cc78b4c28906d1..9bc25a4dcc7989 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index 1410d2d58b57a8..112353df02a54c 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR - A publishable lockfile .SS "Description" diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 27ea3965d5b5c8..bc4ded58c3cee6 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,6 +1,6 @@ -.TH "NPMRC" "5" "February 2026" "NPM@11.9.0" "" +.TH ".NPMRC" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBnpmrc\fR - The npm config files +\fB.npmrc\fR - The npm config files .SS "Description" .P npm gets its config settings from the command line, environment variables, and \fBnpmrc\fR files. @@ -99,6 +99,43 @@ The full list is: .P 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 \fB//registry.npmjs.org/:\fR. If it must be scoped to a specific path on the host that path may also be provided, such as \fB//my-custom-registry.org/unique/path:\fR. +.SS "Unsupported Custom Configuration Keys" +.P +Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in \fB.npmrc\fR. In a future major version of npm, these unknown keys may no longer be accepted. +.P +Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, \fBelectron-builder\fR) should not be placed in \fB.npmrc\fR. +.P +If you need package-level configuration for use in scripts, use the \fBconfig\fR field in your \fBpackage.json\fR instead: +.P +.RS 2 +.nf +{ + "name": "my-package", + "config": { + "mirror": "https://example.com/" + } +} + +.fi +.RE +.P +Values defined in \fBpackage.json#config\fR are exposed to scripts as environment variables prefixed with \fBnpm_package_config_\fR. For example: +.P +.RS 2 +.nf +npm_package_config_mirror +.fi +.RE +.P +If you need to pass arguments to a script command, use \fB--\fR to separate npm arguments from script arguments: +.P +.RS 2 +.nf +npm run build -- --customFlag +.fi +.RE +.P +Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in \fB.npmrc\fR. .P .RS 2 .nf @@ -120,6 +157,29 @@ _authToken=MYTOKEN //somewhere-else.com/another/:_authToken=MYTOKEN2 .fi .RE +.SS "Custom / third-party config keys" +.P +npm only recognizes its own npm help "configuration options". If your \fB.npmrc\fR contains keys that are not part of npm's config definitions (for example, \fBelectron_mirror\fR or \fBsass_binary_site\fR), npm will emit a warning: +.P +.RS 2 +.nf +warn Unknown user config "electron_mirror". +This will stop working in the next major version of npm. +.fi +.RE +.P +These keys were historically tolerated but are not officially supported. A future major version of npm will treat unknown top-level keys as errors. +.P +Some tools (such as \fB@electron/get\fR or \fBnode-sass\fR) read their own configuration from environment variables or from \fB.npmrc\fR by convention. You can set these values as environment variables instead: +.P +.RS 2 +.nf +export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/" +export ELECTRON_CUSTOM_DIR="{{ version }}" +.fi +.RE +.P +Environment variables are the most portable approach and work regardless of \fB.npmrc\fR format. .SS "See also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index cc78b4c28906d1..9bc25a4dcc7989 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index cac4c31904017a..0d28b1d5b66a9d 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE-LOCK.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE-LOCK.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage-lock.json\fR - A manifestation of the manifest .SS "Description" diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index 4bb01187c4bd98..dd6762e3e9298a 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,6 +1,6 @@ -.TH "CONFIG" "7" "February 2026" "NPM@11.9.0" "" +.TH "CONFIG" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBconfig\fR - More than you probably want to know about npm configuration +\fBConfig\fR - About npm configuration .SS "Description" .P This article details npm configuration in general. To learn about the \fBconfig\fR command, see npm help config. @@ -258,6 +258,8 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 @@ -1093,6 +1095,20 @@ Type: String Commit message which is used by \fBnpm version\fR when creating version commit. .P Any "%s" in the message will be replaced with the version number. +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBname\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7 index 911720c8096a6e..dd3e7a6ef34f38 100644 --- a/deps/npm/man/man7/dependency-selectors.7 +++ b/deps/npm/man/man7/dependency-selectors.7 @@ -1,6 +1,6 @@ -.TH "QUERYING" "7" "February 2026" "NPM@11.9.0" "" +.TH "SELECTORS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBQuerying\fR - Dependency Selector Syntax & Querying +\fBSelectors\fR - Dependency Selector Syntax & Querying .SS "Description" .P The npm help query command exposes a new dependency selector syntax (informed by & respecting many aspects of the \fBCSS Selectors 4 Spec\fR \fI\(lahttps://dev.w3.org/csswg/selectors4/#relational\(ra\fR) which: diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index 183d99855d3a44..0ab014e6e9a101 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,6 +1,6 @@ -.TH "DEVELOPERS" "7" "February 2026" "NPM@11.9.0" "" +.TH "DEVELOPERS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBdevelopers\fR - Developer Guide +\fBDevelopers\fR - Developer guide .SS "Description" .P So, you've decided to use npm to develop (and maybe publish/deploy) your project. diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7 index 90b8f5a4d0e81f..9a908aba36f6a5 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,6 +1,6 @@ -.TH "LOGGING" "7" "February 2026" "NPM@11.9.0" "" +.TH "LOGGING" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBLogging\fR - Why, What & How We Log +\fBLogging\fR - Why, What & How we Log .SS "Description" .P The \fBnpm\fR CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments. diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index bd9ad434ebfc7f..8fd783364ac41f 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,6 +1,6 @@ -.TH "ORGS" "7" "February 2026" "NPM@11.9.0" "" +.TH "ORGANIZATIONS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBorgs\fR - Working with Teams & Orgs +\fBOrganizations\fR - Working with teams & organizations .SS "Description" .P There are three levels of org users: diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7 index a781d999dbf9da..cb3dea0cdf1313 100644 --- a/deps/npm/man/man7/package-spec.7 +++ b/deps/npm/man/man7/package-spec.7 @@ -1,6 +1,6 @@ -.TH "PACKAGE-SPEC" "7" "February 2026" "NPM@11.9.0" "" +.TH "SPEC" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBpackage-spec\fR - Package name specifier +\fBspec\fR - Package name specifier .SS "Description" .P Commands like \fBnpm install\fR and the dependency sections in the \fBpackage.json\fR use a package name specifier. This can be many different things that all refer to a "package". Examples include a package name, git url, tarball, or local directory. These will generally be referred to as \fB\fR in the help output for the npm commands that use this package name specifier. diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index 73e1a90337b58a..6804fce0cd3063 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,6 +1,6 @@ -.TH "REGISTRY" "7" "February 2026" "NPM@11.9.0" "" +.TH "REGISTRY" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBregistry\fR - The JavaScript Package Registry +\fBRegistry\fR - The JavaScript Package Registry .SS "Description" .P To resolve packages by name and version, npm talks to a registry website that implements the CommonJS Package Registry specification for reading package info. diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index f36cc64049494e..f043dbf8a91e3c 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,6 +1,6 @@ -.TH "REMOVAL" "7" "February 2026" "NPM@11.9.0" "" +.TH "REMOVAL" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBremoval\fR - Cleaning the Slate +\fBRemoval\fR - Cleaning the slate .SS "Synopsis" .P So sad to see you go. diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index 7512e6f2c86c9d..dad4fff844b650 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,6 +1,6 @@ -.TH "SCOPE" "7" "February 2026" "NPM@11.9.0" "" +.TH "SCOPE" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBscope\fR - Scoped packages +\fBScope\fR - Scoped packages .SS "Description" .P All npm packages have a name. Some package names also have a scope. A scope follows the usual rules for package names (URL-safe characters, no leading dots or underscores). When used in package names, scopes are preceded by an \fB@\fR symbol and followed by a slash, e.g. diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index 188e535be58fdb..bc351acb227627 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,6 +1,6 @@ -.TH "SCRIPTS" "7" "February 2026" "NPM@11.9.0" "" +.TH "SCRIPTS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBscripts\fR - How npm handles the "scripts" field +\fBScripts\fR - How npm handles the "scripts" field .SS "Description" .P The \fB"scripts"\fR property of your \fBpackage.json\fR file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running \fBnpm run \fR. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e.g. \fBpremyscript\fR, \fBmyscript\fR, \fBpostmyscript\fR). Scripts from dependencies can be run with \fBnpm explore -- npm run \fR. diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index b719ae79d6fd2f..8f734cbccb54e5 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,6 +1,6 @@ -.TH "WORKSPACES" "7" "February 2026" "NPM@11.9.0" "" +.TH "WORKSPACES" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBworkspaces\fR - Working with workspaces +\fBWorkspaces\fR - Working with workspaces .SS "Description" .P \fBWorkspaces\fR is a generic term that refers to the set of features in the npm cli that provides support for managing multiple packages from your local file system from within a singular top-level, root package. diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js index b4319fab6bd37c..a256b79049eba6 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js @@ -339,7 +339,8 @@ module.exports = cls => class IdealTreeBuilder extends cls { filter: node => node, visit: node => { for (const edge of node.edgesOut.values()) { - if ((!edge.to && edge.type !== 'peerOptional') || !edge.valid) { + const skipPeerOptional = edge.type === 'peerOptional' && this.options.save === false + if (!skipPeerOptional && (!edge.to || !edge.valid)) { this.#depsQueue.push(node) break // no need to continue the loop after the first hit } @@ -966,9 +967,17 @@ This is a one-time fix-up, please be patient... continue } const { from, valid, peerConflicted } = edgeIn - if (!peerConflicted && !valid && !this.#depsSeen.has(from)) { - this.addTracker('idealTree', from.name, from.location) - this.#depsQueue.push(edgeIn.from) + if (!peerConflicted && !valid) { + if (this.#depsSeen.has(from) && this.options.save) { + // Re-queue already-processed nodes when a newly placed dep creates an invalid edge during npm install (save=true). + // This handles the case where a peerOptional dep was valid (missing) when the node was first processed, but becomes invalid when the dep is later placed by another path with a version that doesn't satisfy the peer spec. + // See npm/cli#8726. + this.#depsSeen.delete(from) + this.#depsQueue.push(from) + } else if (!this.#depsSeen.has(from)) { + this.addTracker('idealTree', from.name, from.location) + this.#depsQueue.push(from) + } } } } else { @@ -1165,9 +1174,13 @@ This is a one-time fix-up, please be patient... continue } - // If the edge has an error, there's a problem. + // If the edge has an error, there's a problem, unless it's peerOptional and we're not saving (e.g. npm ci), in which case we trust the lockfile and skip re-resolution. + // When saving (npm install), peerOptional invalid edges ARE treated as problems so the lockfile gets fixed. + // See npm/cli#8726. if (!edge.valid) { - problems.push(edge) + if (edge.type !== 'peerOptional' || this.options.save !== false) { + problems.push(edge) + } continue } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js index 6571c0b5fae6c9..bee7ce2768c4d9 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js @@ -82,7 +82,7 @@ const depValid = (child, requested, requestor) => { const resRepo = npa(child.resolved || '') const resHost = resRepo.hosted const reqHost = requested.hosted - const reqCommit = /^[a-fA-F0-9]{40}$/.test(requested.gitCommittish || '') + const reqCommit = /^[a-fA-F0-9]{40,64}$/.test(requested.gitCommittish || '') const nc = { noCommittish: !reqCommit } if (!resHost) { if (resRepo.fetchSpec !== requested.fetchSpec) { diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index 4f4df390ffedd0..b00071df9186fa 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "9.2.0", + "version": "9.3.1", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -40,7 +40,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "benchmark": "^2.1.4", "minify-registry-metadata": "^4.0.0", "nock": "^13.3.3", @@ -92,7 +92,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js index 26ba0c0bc14b9a..c151506b244763 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js @@ -22,6 +22,8 @@ const allowed = [ 'typeDescription', 'usage', 'envExport', + 'alias', + 'required', ] const { diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js index 5f86c3e94fed48..0de8142d3ca77b 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js @@ -246,6 +246,7 @@ const definitions = { default: null, hint: '', type: [null, Date], + exclusive: ['min-release-age'], description: ` If passed to \`npm install\`, will rebuild the npm tree such that only versions that were available **on or before** the given date are @@ -1347,6 +1348,28 @@ const definitions = { `, flatten, }), + 'min-release-age': new Definition('min-release-age', { + default: null, + hint: '', + type: [null, Number], + exclusive: ['before'], + description: ` + If set, npm will build the npm tree such that only versions that were + available more than the given number of days ago will be installed. If + there are no versions available for the current set of dependencies, the + command will error. + + This flag is a complement to \`before\`, which accepts an exact date + instead of a relative number of days. + `, + flatten: (key, obj, flatOptions) => { + if (obj['min-release-age'] !== null) { + flatOptions.before = new Date(Date.now() - (86400000 * obj['min-release-age'])) + obj.before = flatOptions.before + delete obj['min-release-age'] + } + }, + }), 'node-gyp': new Definition('node-gyp', { default: (() => { try { diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index 0ad716ccb069ff..8520a02b6ed77c 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -59,6 +59,7 @@ class Config { #flatten // populated the first time we flatten the object #flatOptions = null + #warnings = [] static get typeDefs () { return typeDefs @@ -78,20 +79,13 @@ class Config { execPath = process.execPath, cwd = process.cwd(), excludeNpmCwd = false, + warn = true, }) { this.nerfDarts = nerfDarts this.definitions = definitions // turn the definitions into nopt's weirdo syntax - const types = {} - const defaults = {} - this.deprecated = {} - for (const [key, def] of Object.entries(definitions)) { - defaults[key] = def.default - types[key] = def.type - if (def.deprecated) { - this.deprecated[key] = def.deprecated.trim().replace(/\n +/, '\n') - } - } + const { types, defaults, deprecated } = getTypesFromDefinitions(definitions) + this.deprecated = deprecated this.#flatten = flatten this.types = types @@ -137,6 +131,7 @@ class Config { } this.#loaded = false + this.warn = warn } get list () { @@ -369,7 +364,7 @@ class Config { } nopt.invalidHandler = (k, val, type) => this.invalidHandler(k, val, type, 'command line options', 'cli') - nopt.unknownHandler = this.unknownHandler + nopt.unknownHandler = (k, next) => this.unknownHandler(k, next) nopt.abbrevHandler = this.abbrevHandler const conf = nopt(this.types, this.shorthands, this.argv) nopt.invalidHandler = null @@ -545,7 +540,7 @@ class Config { unknownHandler (key, next) { if (next) { - log.warn(`"${next}" is being parsed as a normal command line argument.`) + this.queueWarning(`unknown:${next}`, `"${next}" is being parsed as a normal command line argument.`) } } @@ -613,13 +608,16 @@ class Config { if (internalEnv.includes(key)) { return } + const hint = where !== 'cli' + ? ' See `npm help npmrc` for supported config options.' + : '' if (!key.includes(':')) { - log.warn(`Unknown ${where} config "${where === 'cli' ? '--' : ''}${key}". This will stop working in the next major version of npm.`) + this.queueWarning(key, `Unknown ${where} config "${where === 'cli' ? '--' : ''}${key}". This will stop working in the next major version of npm.${hint}`) return } const baseKey = key.split(':').pop() if (!this.definitions[baseKey] && !this.nerfDarts.includes(baseKey)) { - log.warn(`Unknown ${where} config "${baseKey}" (${key}). This will stop working in the next major version of npm.`) + this.queueWarning(baseKey, `Unknown ${where} config "${baseKey}" (${key}). This will stop working in the next major version of npm.${hint}`) } } } @@ -923,6 +921,35 @@ class Config { setEnvs () { setEnvs(this) } + + removeWarning (key) { + this.#warnings = this.#warnings.filter(w => w.type !== key) + } + + getUnknownPositionals () { + return this.#warnings + .filter(w => w.type.startsWith('unknown:')) + .map(w => w.type.slice('unknown:'.length)) + } + + removeUnknownPositional (value) { + this.removeWarning(`unknown:${value}`) + } + + queueWarning (type, ...args) { + if (!this.warn) { + this.#warnings.push({ type, args }) + } else { + log.warn(...args) + } + } + + logWarnings () { + for (const warning of this.#warnings) { + log.warn(...warning.args) + } + this.#warnings = [] + } } const _loadError = Symbol('loadError') @@ -980,4 +1007,21 @@ class ConfigData { } } +const getTypesFromDefinitions = (definitions) => { + const types = {} + const defaults = {} + const deprecated = {} + + for (const [key, def] of Object.entries(definitions)) { + defaults[key] = def.default + types[key] = def.type + if (def.deprecated) { + deprecated[key] = def.deprecated.trim().replace(/\n +/, '\n') + } + } + + return { types, defaults, deprecated } +} + module.exports = Config +module.exports.getTypesFromDefinitions = getTypesFromDefinitions diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index b11a01a8ba8137..980a53d738b48d 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.6.0", + "version": "10.7.1", "files": [ "bin/", "lib/" @@ -33,7 +33,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-globals": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { @@ -51,7 +51,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/license.js b/deps/npm/node_modules/@npmcli/package-json/lib/license.js new file mode 100644 index 00000000000000..6428e83730550e --- /dev/null +++ b/deps/npm/node_modules/@npmcli/package-json/lib/license.js @@ -0,0 +1,27 @@ +// This is an implementation of the validForNewPackage flag in validate-npm-package-license, which is no longer maintained + +const parse = require('spdx-expression-parse') + +function usesLicenseRef (ast) { + if (Object.hasOwn(ast, 'license')) { + return ast.license.startsWith('LicenseRef') || ast.license.startsWith('DocumentRef') + } else { + return usesLicenseRef(ast.left) || usesLicenseRef(ast.right) + } +} + +// license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN " +module.exports = function licenseValidForNewPackage (argument) { + if (argument === 'UNLICENSED' || argument === 'UNLICENCED') { + return true + } + if (/^SEE LICEN[CS]E IN ./.test(argument)) { + return true + } + try { + const ast = parse(argument) + return !usesLicenseRef(ast) + } catch { + return false + } +} diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js index 1c1a36984c5e9b..7bd86b5f5bb64c 100644 --- a/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js +++ b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js @@ -2,7 +2,7 @@ const { URL } = require('node:url') const hostedGitInfo = require('hosted-git-info') -const validateLicense = require('validate-npm-package-license') +const validateLicense = require('./license.js') const typos = { dependancies: 'dependencies', @@ -230,7 +230,7 @@ function normalizeData (data, changes) { changes?.push('No license field.') } else if (typeof (license) !== 'string' || license.length < 1 || license.trim() === '') { changes?.push('license should be a valid SPDX license expression') - } else if (!validateLicense(license).validForNewPackages) { + } else if (!validateLicense(license)) { changes?.push('license should be a valid SPDX license expression') } // fixPeople diff --git a/deps/npm/node_modules/@npmcli/package-json/package.json b/deps/npm/node_modules/@npmcli/package-json/package.json index 31aa68a6654dce..fe46d77edcb4d5 100644 --- a/deps/npm/node_modules/@npmcli/package-json/package.json +++ b/deps/npm/node_modules/@npmcli/package-json/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/package-json", - "version": "7.0.4", + "version": "7.0.5", "description": "Programmatic API to update package.json", "keywords": [ "npm", @@ -35,11 +35,11 @@ "json-parse-even-better-errors": "^5.0.0", "proc-log": "^6.0.0", "semver": "^7.5.3", - "validate-npm-package-license": "^3.0.4" + "spdx-expression-parse": "^4.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^6.0.0", - "@npmcli/template-oss": "4.28.0", + "@npmcli/template-oss": "4.28.1", "tap": "^16.0.1" }, "engines": { @@ -47,7 +47,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.28.0", + "version": "4.28.1", "publish": "true" }, "tap": { diff --git a/deps/npm/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff837d3ff01..00000000000000 --- a/deps/npm/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.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/deps/npm/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f53116a9e28..00000000000000 --- a/deps/npm/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/deps/npm/node_modules/@isaacs/balanced-match/LICENSE.md b/deps/npm/node_modules/balanced-match/LICENSE.md similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/LICENSE.md rename to deps/npm/node_modules/balanced-match/LICENSE.md diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/index.js b/deps/npm/node_modules/balanced-match/dist/commonjs/index.js similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/index.js rename to deps/npm/node_modules/balanced-match/dist/commonjs/index.js diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/package.json b/deps/npm/node_modules/balanced-match/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/package.json rename to deps/npm/node_modules/balanced-match/dist/commonjs/package.json diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/esm/index.js b/deps/npm/node_modules/balanced-match/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/esm/index.js rename to deps/npm/node_modules/balanced-match/dist/esm/index.js diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/esm/package.json b/deps/npm/node_modules/balanced-match/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/esm/package.json rename to deps/npm/node_modules/balanced-match/dist/esm/package.json diff --git a/deps/npm/node_modules/@isaacs/balanced-match/package.json b/deps/npm/node_modules/balanced-match/package.json similarity index 76% rename from deps/npm/node_modules/@isaacs/balanced-match/package.json rename to deps/npm/node_modules/balanced-match/package.json index 49296e6af443c4..9ed26bf64e24b5 100644 --- a/deps/npm/node_modules/@isaacs/balanced-match/package.json +++ b/deps/npm/node_modules/balanced-match/package.json @@ -1,13 +1,13 @@ { - "name": "@isaacs/balanced-match", + "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "4.0.1", + "version": "4.0.3", "files": [ "dist" ], "repository": { "type": "git", - "url": "git://github.com/isaacs/balanced-match.git" + "url": "git://github.com/juliangruber/balanced-match.git" }, "exports": { "./package.json": "./package.json", @@ -32,24 +32,13 @@ "presnap": "npm run prepare", "test": "tap", "snap": "tap", - "format": "prettier --write . --loglevel warn", + "format": "prettier --write .", "benchmark": "node benchmark/index.js", "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, - "prettier": { - "semi": false, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, "devDependencies": { "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", + "@types/node": "^25.2.1", "mkdirp": "^3.0.1", "prettier": "^3.3.2", "tap": "^21.1.0", diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/LICENSE b/deps/npm/node_modules/brace-expansion/LICENSE similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/LICENSE rename to deps/npm/node_modules/brace-expansion/LICENSE diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js similarity index 99% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js rename to deps/npm/node_modules/brace-expansion/dist/commonjs/index.js index fafdb4b9bf5c43..2caa572c59de67 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +++ b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.EXPANSION_MAX = void 0; exports.expand = expand; -const balanced_match_1 = require("@isaacs/balanced-match"); +const balanced_match_1 = require("balanced-match"); const escSlash = '\0SLASH' + Math.random() + '\0'; const escOpen = '\0OPEN' + Math.random() + '\0'; const escClose = '\0CLOSE' + Math.random() + '\0'; diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json b/deps/npm/node_modules/brace-expansion/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json rename to deps/npm/node_modules/brace-expansion/dist/commonjs/package.json diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js b/deps/npm/node_modules/brace-expansion/dist/esm/index.js similarity index 99% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js rename to deps/npm/node_modules/brace-expansion/dist/esm/index.js index 5c67f519e594ab..ec682796e358b2 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js +++ b/deps/npm/node_modules/brace-expansion/dist/esm/index.js @@ -1,4 +1,4 @@ -import { balanced } from '@isaacs/balanced-match'; +import { balanced } from 'balanced-match'; const escSlash = '\0SLASH' + Math.random() + '\0'; const escOpen = '\0OPEN' + Math.random() + '\0'; const escClose = '\0CLOSE' + Math.random() + '\0'; diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/package.json b/deps/npm/node_modules/brace-expansion/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/package.json rename to deps/npm/node_modules/brace-expansion/dist/esm/package.json diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/package.json b/deps/npm/node_modules/brace-expansion/package.json similarity index 83% rename from deps/npm/node_modules/@isaacs/brace-expansion/package.json rename to deps/npm/node_modules/brace-expansion/package.json index 0356a292d62474..a8c205a33db2ce 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/package.json +++ b/deps/npm/node_modules/brace-expansion/package.json @@ -1,7 +1,7 @@ { - "name": "@isaacs/brace-expansion", + "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "5.0.1", + "version": "5.0.2", "files": [ "dist" ], @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", + "@types/node": "^25.2.1", "mkdirp": "^3.0.1", "prettier": "^3.3.2", "tap": "^21.5.0", @@ -42,7 +42,7 @@ "typedoc": "^0.28.5" }, "dependencies": { - "@isaacs/balanced-match": "^4.0.1" + "balanced-match": "^4.0.2" }, "license": "MIT", "engines": { @@ -56,5 +56,9 @@ }, "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/juliangruber/brace-expansion.git" + } } diff --git a/deps/npm/node_modules/cidr-regex/dist/index.js b/deps/npm/node_modules/cidr-regex/dist/index.js index 2817f65eeb3cb8..bb2d3133a7dc5b 100644 --- a/deps/npm/node_modules/cidr-regex/dist/index.js +++ b/deps/npm/node_modules/cidr-regex/dist/index.js @@ -1,13 +1,20 @@ -import ipRegex from "ip-regex"; const defaultOpts = { exact: false }; -const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; -const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; -const v4exact = new RegExp(`^${v4str}$`); -const v6exact = new RegExp(`^${v6str}$`); -const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); -const cidrRegex = ({ exact } = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); -const v4 = cidrRegex.v4 = ({ exact } = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); -const v6 = cidrRegex.v6 = ({ exact } = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); +const v4src = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}\\/(3[0-2]|[12]?[0-9])"; +const v6src = "(?:(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4})?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|[a-fA-F\\d]{1,4}:(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|:(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))(?:%[0-9a-zA-Z]+)?\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])"; +const v46src = `${v4src}|${v6src}`; +const v4exact = new RegExp(`^${v4src}$`); +const v6exact = new RegExp(`^${v6src}$`); +const v46exact = new RegExp(`^${v4src}$|^${v6src}$`); +const v4global = new RegExp(v4src, "g"); +const v6global = new RegExp(v6src, "g"); +const v46global = new RegExp(v46src, "g"); +function resetRegex(re) { + re.lastIndex = 0; + return re; +} +const cidrRegex = ({ exact } = defaultOpts) => exact ? v46exact : resetRegex(v46global); +const v4 = cidrRegex.v4 = ({ exact } = defaultOpts) => exact ? v4exact : resetRegex(v4global); +const v6 = cidrRegex.v6 = ({ exact } = defaultOpts) => exact ? v6exact : resetRegex(v6global); export { cidrRegex as default, v4, diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json index 662f89261b01c6..a76a158d6169dc 100644 --- a/deps/npm/node_modules/cidr-regex/package.json +++ b/deps/npm/node_modules/cidr-regex/package.json @@ -1,6 +1,6 @@ { "name": "cidr-regex", - "version": "5.0.1", + "version": "5.0.3", "description": "Regular expression for matching IP addresses in CIDR notation", "author": "silverwind ", "contributors": [ @@ -19,20 +19,20 @@ "engines": { "node": ">=20" }, - "dependencies": { - "ip-regex": "5.0.0" - }, "devDependencies": { - "@types/node": "24.5.2", - "eslint": "9.36.0", - "eslint-config-silverwind": "105.1.0", - "typescript": "5.9.2", - "typescript-config-silverwind": "10.0.1", - "updates": "16.7.2", - "versions": "13.1.2", - "vite": "7.1.7", - "vite-config-silverwind": "6.0.2", - "vitest": "3.2.4", - "vitest-config-silverwind": "10.2.0" + "@types/node": "25.0.10", + "@typescript/native-preview": "7.0.0-dev.20260212.1", + "eslint": "9.39.2", + "eslint-config-silverwind": "120.1.2", + "jest-extended": "7.0.0", + "typescript": "5.9.3", + "typescript-config-silverwind": "14.0.0", + "updates": "17.0.8", + "updates-config-silverwind": "1.0.3", + "versions": "14.0.3", + "vite": "7.3.1", + "vite-config-silverwind": "6.0.9", + "vitest": "4.0.18", + "vitest-config-silverwind": "10.6.1" } -} +} \ No newline at end of file diff --git a/deps/npm/node_modules/cli-columns/color.js b/deps/npm/node_modules/cli-columns/color.js deleted file mode 100644 index 11027047f24fe6..00000000000000 --- a/deps/npm/node_modules/cli-columns/color.js +++ /dev/null @@ -1,16 +0,0 @@ -const chalk = require('chalk'); -const columns = require('.'); - -// prettier-ignore -const values = [ - 'blue' + chalk.bgBlue('berry'), - '笔菠萝' + chalk.yellow('苹果笔'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'パイナップル', 'apricot', 'banana', - 'pineapple', chalk.bgRed.yellow('orange') -]; - -console.log(''); -console.log(columns(values)); -console.log(''); diff --git a/deps/npm/node_modules/cli-columns/index.js b/deps/npm/node_modules/cli-columns/index.js deleted file mode 100644 index 1090aa21c2bdf2..00000000000000 --- a/deps/npm/node_modules/cli-columns/index.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); - -const concat = Array.prototype.concat; -const defaults = { - character: ' ', - newline: '\n', - padding: 2, - sort: true, - width: 0, -}; - -function byPlainText(a, b) { - const plainA = stripAnsi(a); - const plainB = stripAnsi(b); - - if (plainA === plainB) { - return 0; - } - - if (plainA > plainB) { - return 1; - } - - return -1; -} - -function makeArray() { - return []; -} - -function makeList(count) { - return Array.apply(null, Array(count)); -} - -function padCell(fullWidth, character, value) { - const valueWidth = stringWidth(value); - const filler = makeList(fullWidth - valueWidth + 1); - - return value + filler.join(character); -} - -function toRows(rows, cell, i) { - rows[i % rows.length].push(cell); - - return rows; -} - -function toString(arr) { - return arr.join(''); -} - -function columns(values, options) { - values = concat.apply([], values); - options = Object.assign({}, defaults, options); - - let cells = values.filter(Boolean).map(String); - - if (options.sort !== false) { - cells = cells.sort(byPlainText); - } - - const termWidth = options.width || process.stdout.columns; - const cellWidth = - Math.max.apply(null, cells.map(stringWidth)) + options.padding; - const columnCount = Math.floor(termWidth / cellWidth) || 1; - const rowCount = Math.ceil(cells.length / columnCount) || 1; - - if (columnCount === 1) { - return cells.join(options.newline); - } - - return cells - .map(padCell.bind(null, cellWidth, options.character)) - .reduce(toRows, makeList(rowCount).map(makeArray)) - .map(toString) - .join(options.newline); -} - -module.exports = columns; diff --git a/deps/npm/node_modules/cli-columns/license b/deps/npm/node_modules/cli-columns/license deleted file mode 100644 index 67147a987ea19b..00000000000000 --- a/deps/npm/node_modules/cli-columns/license +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Shannon Moeller (shannonmoeller.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/deps/npm/node_modules/cli-columns/package.json b/deps/npm/node_modules/cli-columns/package.json deleted file mode 100644 index 129f2c1316d2f0..00000000000000 --- a/deps/npm/node_modules/cli-columns/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "cli-columns", - "version": "4.0.0", - "description": "Columnated lists for the CLI.", - "scripts": { - "lint": "npx eslint --fix '*.js' && npx prettier --write '*.js'", - "test": "node test.js && node color.js" - }, - "keywords": [ - "ansi", - "cli", - "column", - "columnate", - "columns", - "grid", - "list", - "log", - "ls", - "row", - "rows", - "unicode", - "unix" - ], - "author": "Shannon Moeller (http://shannonmoeller.com)", - "homepage": "https://github.com/shannonmoeller/cli-columns#readme", - "repository": "shannonmoeller/cli-columns", - "license": "MIT", - "main": "index.js", - "files": [ - "*.js" - ], - "dependencies": { - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 10" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true - }, - "parserOptions": { - "ecmaVersion": 8 - } - }, - "prettier": { - "singleQuote": true - } -} diff --git a/deps/npm/node_modules/cli-columns/test.js b/deps/npm/node_modules/cli-columns/test.js deleted file mode 100644 index 4d95e7cf073230..00000000000000 --- a/deps/npm/node_modules/cli-columns/test.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const chalk = require('chalk'); -const stripAnsi = require('strip-ansi'); -const columns = require('./index.js'); -const tests = []; - -function test(msg, fn) { - tests.push([msg, fn]); -} - -process.nextTick(async function run() { - for (const [msg, fn] of tests) { - try { - await fn(assert); - console.log(`pass - ${msg}`); - } catch (error) { - console.error(`fail - ${msg}`, error); - process.exit(1); - } - } -}); - -// prettier-ignore -test('should print one column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bar', 'qux']], { - width: 1 - }); - - const expected = - 'bar\n' + - 'bar\n' + - 'baz\n' + - 'foo\n' + - 'qux'; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print three column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bat', 'qux']], { - width: 16 - }); - - const expected = - 'bar baz qux \n' + - 'bat foo '; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print complex list', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - width: 80 - } - ); - - const expected = - 'apple bar durian star fruit \n' + - 'apricot baz foo 嶜憃撊 噾噿嚁 \n' + - 'banana pineapple blueberry pomegranate '; - - t.equal(stripAnsi(cols), expected); -}); - -// prettier-ignore -test('should optionally not sort', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - sort: false, - width: 80 - } - ); - - const expected = - 'foo 嶜憃撊 噾噿嚁 pomegranate apricot \n' + - 'bar blueberry durian banana pineapple \n' + - 'baz apple star fruit '; - - t.equal(stripAnsi(cols), expected); -}); diff --git a/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt b/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7ef970ec..00000000000000 --- a/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/deps/npm/node_modules/emoji-regex/es2015/index.js b/deps/npm/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dcd389935..00000000000000 --- a/deps/npm/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/deps/npm/node_modules/emoji-regex/es2015/text.js b/deps/npm/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309df58f1a2..00000000000000 --- a/deps/npm/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/deps/npm/node_modules/emoji-regex/index.js b/deps/npm/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a99cb95a..00000000000000 --- a/deps/npm/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/deps/npm/node_modules/emoji-regex/package.json b/deps/npm/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d323528292b00..00000000000000 --- a/deps/npm/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/deps/npm/node_modules/emoji-regex/text.js b/deps/npm/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2f2308ad..00000000000000 --- a/deps/npm/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/deps/npm/node_modules/glob/dist/commonjs/glob.js b/deps/npm/node_modules/glob/dist/commonjs/glob.js index e1339bbbcf57f3..2dcbd8a1d867cd 100644 --- a/deps/npm/node_modules/glob/dist/commonjs/glob.js +++ b/deps/npm/node_modules/glob/dist/commonjs/glob.js @@ -140,11 +140,12 @@ class Glob { // for the file `AbC` for example. const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; const mmo = { - // default nocase based on platform + braceExpandMax: 10_000, ...opts, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, + // default nocase based on platform nocase: this.nocase, nocaseMagicOnly, nocomment: true, diff --git a/deps/npm/node_modules/glob/dist/commonjs/index.min.js b/deps/npm/node_modules/glob/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..4828ba07860bdc --- /dev/null +++ b/deps/npm/node_modules/glob/dist/commonjs/index.min.js @@ -0,0 +1,4 @@ +"use strict";var R=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ge=R(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.range=Y.balanced=void 0;var Gs=(n,t,e)=>{let s=n instanceof RegExp?Ie(n,e):n,i=t instanceof RegExp?Ie(t,e):t,r=s!==null&&i!=null&&(0,Y.range)(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}};Y.balanced=Gs;var Ie=(n,t)=>{let e=t.match(n);return e?e[0]:null},zs=(n,t,e)=>{let s,i,r,h,o,a=e.indexOf(n),l=e.indexOf(t,a+1),f=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;f>=0&&!o;){if(f===a)s.push(f),a=e.indexOf(n,f+1);else if(s.length===1){let c=s.pop();c!==void 0&&(o=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&h!==void 0&&(o=[r,h])}return o};Y.range=zs});var Ke=R(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.EXPANSION_MAX=void 0;it.expand=ei;var ze=Ge(),Ue="\0SLASH"+Math.random()+"\0",$e="\0OPEN"+Math.random()+"\0",ue="\0CLOSE"+Math.random()+"\0",qe="\0COMMA"+Math.random()+"\0",He="\0PERIOD"+Math.random()+"\0",Us=new RegExp(Ue,"g"),$s=new RegExp($e,"g"),qs=new RegExp(ue,"g"),Hs=new RegExp(qe,"g"),Vs=new RegExp(He,"g"),Ks=/\\\\/g,Xs=/\\{/g,Ys=/\\}/g,Js=/\\,/g,Zs=/\\./g;it.EXPANSION_MAX=1e5;function ce(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Qs(n){return n.replace(Ks,Ue).replace(Xs,$e).replace(Ys,ue).replace(Js,qe).replace(Zs,He)}function ti(n){return n.replace(Us,"\\").replace($s,"{").replace(qs,"}").replace(Hs,",").replace(Vs,".")}function Ve(n){if(!n)return[""];let t=[],e=(0,ze.balanced)("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,h=s.split(",");h[h.length-1]+="{"+i+"}";let o=Ve(r);return r.length&&(h[h.length-1]+=o.shift(),h.push.apply(h,o)),t.push.apply(t,h),t}function ei(n,t={}){if(!n)return[];let{max:e=it.EXPANSION_MAX}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(Qs(n),e,!0).map(ti)}function si(n){return"{"+n+"}"}function ii(n){return/^-?0\d/.test(n)}function ri(n,t){return n<=t}function ni(n,t){return n>=t}function ht(n,t,e){let s=[],i=(0,ze.balanced)("{","}",n);if(!i)return[n];let r=i.pre,h=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+ue+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=Ve(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(si),c.length===1))return h.map(u=>i.pre+c[0]+u);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=ce(c[0]),m=ce(c[1]),p=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ce(c[2])):1,w=ri;m0){let U=new Array(B+1).join("0");y<0?S="-"+U+S.slice(1):S=U+S}}d.push(S)}}else{d=[];for(let u=0;u{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.assertValidPattern=void 0;var hi=1024*64,oi=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>hi)throw new TypeError("pattern is too long")};Ct.assertValidPattern=oi});var Je=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.parseClass=void 0;var ai={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=n=>n.replace(/[[\]\\-]/g,"\\$&"),li=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ye=n=>n.join(""),ci=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,h=!1,o=!1,a=!1,l=!1,f=e,c="";t:for(;rc?s.push(ot(c)+"-"+ot(p)):p===c&&s.push(ot(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(ot(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(ot(p)),r++}if(f{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.unescape=void 0;var ui=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");At.unescape=ui});var pe=R(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.AST=void 0;var fi=Je(),Mt=kt(),di=new Set(["!","?","+","*","@"]),Ze=n=>di.has(n),pi="(?!(?:^|/)\\.\\.?(?:$|/))",Pt="(?!\\.)",mi=new Set(["[","."]),gi=new Set(["..","."]),wi=new Set("().*{}+?[]^$\\!"),bi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de="[^/]",Qe=de+"*?",ts=de+"+?",fe=class n{type;#t;#s;#n=!1;#r=[];#h;#S;#w;#c=!1;#o;#f;#u=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#h=e,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?s:this.#t.#o,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#h?this.#h.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#f=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#h;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#h?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#S===0)return!0;let t=this.#h;for(let e=0;etypeof u!="string"),l=this.#r.map(u=>{let[m,p,b,w]=typeof u=="string"?n.#v(u,this.#s,a):u.toRegExpSource(t);return this.#s=this.#s||b,this.#n=this.#n||w,m}).join(""),f="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&gi.has(this.#r[0]))){let m=mi,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),b=!e&&!t&&m.has(l.charAt(0));f=p?pi:b?Pt:""}let c="";return this.isEnd()&&this.#t.#c&&this.#h?.type==="!"&&(c="(?:$|\\/)"),[f+l+c,(0,Mt.unescape)(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,(0,Mt.unescape)(this.toString()),!1,!1]}let h=!s||t||e||!Pt?"":this.#d(!0);h===r&&(h=""),h&&(r=`(?:${r})(?:${h})*?`);let o="";if(this.type==="!"&&this.#u)o=(this.isStart()&&!e?Pt:"")+ts;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Pt:"")+Qe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?")?":`)${this.type}`;o=i+r+a}return[o,(0,Mt.unescape)(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,h]=e.toRegExpSource(t);return this.#n=this.#n||h,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#v(t,e,s=!1){let i=!1,r="",h=!1,o=!1;for(let a=0;a{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.escape=void 0;var yi=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");Ft.escape=yi});var H=R(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unescape=g.escape=g.AST=g.Minimatch=g.match=g.makeRe=g.braceExpand=g.defaults=g.filter=g.GLOBSTAR=g.sep=g.minimatch=void 0;var Si=Ke(),jt=Xe(),is=pe(),vi=me(),Ei=kt(),_i=(n,t,e={})=>((0,jt.assertValidPattern)(t),!e.nocomment&&t.charAt(0)==="#"?!1:new J(t,e).match(n));g.minimatch=_i;var Oi=/^\*+([^+@!?\*\[\(]*)$/,xi=n=>t=>!t.startsWith(".")&&t.endsWith(n),Ti=n=>t=>t.endsWith(n),Ci=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ri=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ai=/^\*+\.\*+$/,ki=n=>!n.startsWith(".")&&n.includes("."),Mi=n=>n!=="."&&n!==".."&&n.includes("."),Pi=/^\.\*+$/,Di=n=>n!=="."&&n!==".."&&n.startsWith("."),Fi=/^\*+$/,ji=n=>n.length!==0&&!n.startsWith("."),Ni=n=>n.length!==0&&n!=="."&&n!=="..",Li=/^\?+([^+@!?\*\[\(]*)?$/,Wi=([n,t=""])=>{let e=rs([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Bi=([n,t=""])=>{let e=ns([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Ii=([n,t=""])=>{let e=ns([n]);return t?s=>e(s)&&s.endsWith(t):e},Gi=([n,t=""])=>{let e=rs([n]);return t?s=>e(s)&&s.endsWith(t):e},rs=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},ns=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},hs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",es={win32:{sep:"\\"},posix:{sep:"/"}};g.sep=hs==="win32"?es.win32.sep:es.posix.sep;g.minimatch.sep=g.sep;g.GLOBSTAR=Symbol("globstar **");g.minimatch.GLOBSTAR=g.GLOBSTAR;var zi="[^/]",Ui=zi+"*?",$i="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qi="(?:(?!(?:\\/|^)\\.).)*?",Hi=(n,t={})=>e=>(0,g.minimatch)(e,n,t);g.filter=Hi;g.minimatch.filter=g.filter;var F=(n,t={})=>Object.assign({},n,t),Vi=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return g.minimatch;let t=g.minimatch;return Object.assign((s,i,r={})=>t(s,i,F(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,F(n,r))}static defaults(i){return t.defaults(F(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,h={}){super(i,r,F(n,h))}static fromGlob(i,r={}){return t.AST.fromGlob(i,F(n,r))}},unescape:(s,i={})=>t.unescape(s,F(n,i)),escape:(s,i={})=>t.escape(s,F(n,i)),filter:(s,i={})=>t.filter(s,F(n,i)),defaults:s=>t.defaults(F(n,s)),makeRe:(s,i={})=>t.makeRe(s,F(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,F(n,i)),match:(s,i,r={})=>t.match(s,i,F(n,r)),sep:t.sep,GLOBSTAR:g.GLOBSTAR})};g.defaults=Vi;g.minimatch.defaults=g.defaults;var Ki=(n,t={})=>((0,jt.assertValidPattern)(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Si.expand)(n,{max:t.braceExpandMax}));g.braceExpand=Ki;g.minimatch.braceExpand=g.braceExpand;var Xi=(n,t={})=>new J(n,t).makeRe();g.makeRe=Xi;g.minimatch.makeRe=g.makeRe;var Yi=(n,t,e={})=>{let s=new J(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};g.match=Yi;g.minimatch.match=g.match;var ss=/[?*]|[+@!]\(.*?\)|\[|\]/,Ji=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,jt.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hs,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,h,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ss.test(r[2]))&&!ss.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(f=>this.parse(f))];if(l)return[r[0],...r.slice(1).map(f=>this.parse(f))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,h-i);let o=s[i+1],a=s[i+2],l=s[i+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let f=s.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let h=1;he.length)}partsMatch(t,e,s=!1){let i=0,r=0,h=[],o="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var h=0,o=0,a=t.length,l=e.length;h>> no match, partial?`,t,d,e,u),d===a))}let p;if(typeof f=="string"?(p=c===f,this.debug("string match",f,c,p)):(p=f.test(c),this.debug("pattern match",f,c,p)),!p)return!1}if(h===a&&o===l)return!0;if(h===a)return s;if(o===l)return h===a-1&&t[h]==="";throw new Error("wtf?")}braceExpand(){return(0,g.braceExpand)(this.pattern,this.options)}parse(t){(0,jt.assertValidPattern)(t);let e=this.options;if(t==="**")return g.GLOBSTAR;if(t==="")return"";let s,i=null;(s=t.match(Fi))?i=e.dot?Ni:ji:(s=t.match(Oi))?i=(e.nocase?e.dot?Ri:Ci:e.dot?Ti:xi)(s[1]):(s=t.match(Li))?i=(e.nocase?e.dot?Bi:Wi:e.dot?Ii:Gi)(s):(s=t.match(Ai))?i=e.dot?Mi:ki:(s=t.match(Pi))&&(i=Di);let r=is.AST.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Ui:e.dot?$i:qi,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?Ji(c):c===g.GLOBSTAR?g.GLOBSTAR:c._src});l.forEach((c,d)=>{let u=l[d+1],m=l[d-1];c!==g.GLOBSTAR||m===g.GLOBSTAR||(m===void 0?u!==void 0&&u!==g.GLOBSTAR?l[d+1]="(?:\\/|"+s+"\\/)?"+u:l[d]=s:u===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":u!==g.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+u,l[d+1]=g.GLOBSTAR))});let f=l.filter(c=>c!==g.GLOBSTAR);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[h,o]=t.length>1?["(?:",")"]:["",""];r="^"+h+r+o+"$",this.partial&&(r="^(?:\\/|"+h+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let h=i[i.length-1];if(!h)for(let o=i.length-2;!h&&o>=0;o--)h=i[o];for(let o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=void 0;var er=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,as=new Set,ge=typeof process=="object"&&process?process:{},ls=(n,t,e,s)=>{typeof ge.emitWarning=="function"?ge.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Lt=globalThis.AbortController,os=globalThis.AbortSignal;if(typeof Lt>"u"){os=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},Lt=class{constructor(){t()}signal=new os;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=ge.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var sr=n=>!as.has(n),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),cs=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Nt:null:null,Nt=class extends Array{constructor(n){super(n),this.fill(0)}},ir=class at{heap;length;static#t=!1;static create(t){let e=cs(t);if(!e)return[];at.#t=!0;let s=new at(t,e);return at.#t=!1,s}constructor(t,e){if(!at.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},rr=class us{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#g,autopurgeTimers:t.#b,sizes:t.#O,keyMap:t.#u,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#v,get head(){return t.#y},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#z(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#k(e),rindexes:e=>t.#M(e),isStale:e=>t.#_(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:a,dispose:l,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:u,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:b,fetchMethod:w,memoMethod:v,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:B,ignoreFetchAbort:U,perf:et}=t;if(et!==void 0&&typeof et?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=et??er,e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let st=e?cs(e):Array;if(!st)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=b,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=v,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new st(e),this.#v=new st(e),this.#y=0,this.#p=0,this.#R=ir.create(e),this.#o=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"&&(this.#r=f),typeof c=="function"?(this.#h=c,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let le="LRU_CACHE_UNBOUNDED";sr(le)&&(as.add(le),ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",le,us))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#P(){let t=new Nt(this.#t),e=new Nt(this.#t);this.#g=t,this.#x=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#b=s,this.#W=(h,o,a=this.#c.now())=>{if(e[h]=o!==0?a:0,t[h]=o,s?.[h]&&(clearTimeout(s[h]),s[h]=void 0),o!==0&&s){let l=setTimeout(()=>{this.#_(h)&&this.#A(this.#a[h],"expire")},o+1);l.unref&&l.unref(),s[h]=l}},this.#C=h=>{e[h]=t[h]!==0?this.#c.now():0},this.#D=(h,o)=>{if(t[o]){let a=t[o],l=e[o];if(!a||!l)return;h.ttl=a,h.start=l,h.now=i||r();let f=h.now-l;h.remainingTTL=a-f}};let i=0,r=()=>{let h=this.#c.now();if(this.ttlResolution>0){i=h;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return h};this.getRemainingTTL=h=>{let o=this.#u.get(h);if(o===void 0)return 0;let a=t[o],l=e[o];if(!a||!l)return 1/0;let f=(i||r())-l;return a-f},this.#_=h=>{let o=e[h],a=t[h];return!!a&&!!o&&(i||r())-o>a}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let t=new Nt(this.#t);this.#f=0,this.#O=t,this.#L=e=>{this.#f-=t[e],t[e]=0},this.#B=(e,s,i,r)=>{if(this.#l(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#j=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#G(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#L=t=>{};#j=(t,e,s)=>{};#B=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#p;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#y));)e=this.#v[e]}*#M({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#y;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#p));)e=this.#d[e]}#I(t){return t!==void 0&&this.#u.get(this.#a[t])===t}*entries(){for(let t of this.#k())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#M())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#k()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#M()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#k())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#M())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#M()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#M({allowStale:!0}))this.#_(e)&&(this.#A(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#u.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#x){let h=this.#g[e],o=this.#x[e];if(h&&o){let a=h-(this.#c.now()-o);r.ttl=a,r.start=Date.now()}}return this.#O&&(r.size=this.#O[e]),r}dump(){let t=[];for(let e of this.#k({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let h={value:r};if(this.#g&&this.#x){h.ttl=this.#g[e];let o=this.#c.now()-this.#x[e];h.start=Math.floor(Date.now()-o)}this.#O&&(h.size=this.#O[e]),t.unshift([s,h])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,f=this.#B(t,e,s.size||0,o);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#A(t,"set"),this;let c=this.#o===0?void 0:this.#u.get(t);if(c===void 0)c=this.#o===0?this.#p:this.#R.length!==0?this.#R.pop():this.#o===this.#t?this.#G(!1):this.#o,this.#a[c]=t,this.#i[c]=e,this.#u.set(t,c),this.#d[this.#p]=c,this.#v[c]=this.#p,this.#p=c,this.#o++,this.#j(c,f,a),a&&(a.set="add"),l=!1,this.#F&&this.#r?.(e,t,"add");else{this.#N(c);let d=this.#i[c];if(e!==d){if(this.#T&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=d;u!==void 0&&!h&&(this.#E&&this.#n?.(u,t,"set"),this.#e&&this.#m?.push([u,t,"set"]))}else h||(this.#E&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#L(c),this.#j(c,f,a),this.#i[c]=e,a){a.set="replace";let u=d&&this.#l(d)?d.__staleWhileFetching:d;u!==void 0&&(a.oldValue=u)}}else a&&(a.set="update");this.#F&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#P(),this.#g&&(l||this.#W(c,i,r),a&&this.#D(a,c)),!h&&this.#e&&this.#m){let d=this.#m,u;for(;u=d?.shift();)this.#h?.(...u)}return this}pop(){try{for(;this.#o;){let t=this.#i[this.#y];if(this.#G(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#h?.(...e)}}}#G(t){let e=this.#y,s=this.#a[e],i=this.#i[e];return this.#T&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#L(e),this.#b?.[e]&&(clearTimeout(this.#b[e]),this.#b[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[e],this.#u.delete(s),this.#o--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#u.get(t);if(r!==void 0){let h=this.#i[r];if(this.#l(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#_(r))i&&(i.has="stale",this.#D(i,r));else return s&&this.#C(r),i&&(i.has="hit",this.#D(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#u.get(t);if(i===void 0||!s&&this.#_(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#z(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let h=new Lt,{signal:o}=s;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let a={signal:h.signal,options:s,context:i},l=(p,b=!1)=>{let{aborted:w}=h.signal,v=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(w&&!b?(s.status.fetchAborted=!0,s.status.fetchError=h.signal.reason,v&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),w&&!v&&!b)return c(h.signal.reason,E);let y=u,S=this.#i[e];return(S===u||v&&b&&S===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#A(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},f=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,b)=>{let{aborted:w}=h.signal,v=w&&s.allowStaleOnFetchAbort,E=v||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,S=u;if(this.#i[e]===u&&(!y||!b&&S.__staleWhileFetching===void 0?this.#A(t,"fetch"):v||(this.#i[e]=S.__staleWhileFetching)),E)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw p},d=(p,b)=>{let w=this.#S?.(t,r,a);w&&w instanceof Promise&&w.then(v=>p(v===void 0?void 0:v),b),h.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=v=>l(v,!0)))})};s.status&&(s.status.fetchDispatched=!0);let u=new Promise(d).then(l,f),m=Object.assign(u,{__abortController:h,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#u.get(t)):this.#i[e]=m,m}#l(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Lt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:w,signal:v}=e;if(!this.#T)return w&&(w.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:w});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:h,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:u,status:w,signal:v},y=this.#u.get(t);if(y===void 0){w&&(w.fetch="miss");let S=this.#z(t,y,E,p);return S.__returned=S}else{let S=this.#i[y];if(this.#l(S)){let st=s&&S.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",st&&(w.returnedStale=!0)),st?S.__staleWhileFetching:S.__returned=S}let B=this.#_(y);if(!b&&!B)return w&&(w.fetch="hit"),this.#N(y),i&&this.#C(y),w&&this.#D(w,y),S;let U=this.#z(t,y,E,p),et=U.__staleWhileFetching!==void 0&&s;return w&&(w.fetch=B?"stale":"refresh",et&&B&&(w.returnedStale=!0)),et?U.__staleWhileFetching:U.__returned=U}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...h}=e,o=this.get(t,h);if(!r&&o!==void 0)return o;let a=s(t,o,{options:h,context:i});return this.set(t,a,h),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:h}=e,o=this.#u.get(t);if(o!==void 0){let a=this.#i[o],l=this.#l(a);return h&&this.#D(h,o),this.#_(o)?(h&&(h.get="stale"),l?(h&&s&&a.__staleWhileFetching!==void 0&&(h.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#A(t,"expire"),h&&s&&(h.returnedStale=!0),s?a:void 0)):(h&&(h.get="hit"),l?a.__staleWhileFetching:(this.#N(o),i&&this.#C(o),a))}else h&&(h.get="miss")}#U(t,e){this.#v[e]=t,this.#d[t]=e}#N(t){t!==this.#p&&(t===this.#y?this.#y=this.#d[t]:this.#U(this.#v[t],this.#d[t]),this.#U(this.#p,t),this.#p=t)}delete(t){return this.#A(t,"delete")}#A(t,e){let s=!1;if(this.#o!==0){let i=this.#u.get(t);if(i!==void 0)if(this.#b?.[i]&&(clearTimeout(this.#b?.[i]),this.#b[i]=void 0),s=!0,this.#o===1)this.#q(e);else{this.#L(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#u.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#v[i];else if(i===this.#y)this.#y=this.#d[i];else{let h=this.#v[i];this.#d[h]=this.#d[i];let o=this.#d[i];this.#v[o]=this.#v[i]}this.#o--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#h?.(...r)}return s}clear(){return this.#q("delete")}#q(t){for(let e of this.#M({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#E&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#h?.(...s)}}};Wt.LRUCache=rr});var Oe=R(P=>{"use strict";var nr=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(P,"__esModule",{value:!0});P.Minipass=P.isWritable=P.isReadable=P.isStream=void 0;var ds=typeof process=="object"&&process?process:{stdout:null,stderr:null},_e=require("node:events"),ws=nr(require("node:stream")),hr=require("node:string_decoder"),or=n=>!!n&&typeof n=="object"&&(n instanceof qt||n instanceof ws.default||(0,P.isReadable)(n)||(0,P.isWritable)(n));P.isStream=or;var ar=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.pipe=="function"&&n.pipe!==ws.default.Writable.prototype.pipe;P.isReadable=ar;var lr=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.write=="function"&&typeof n.end=="function";P.isWritable=lr;var $=Symbol("EOF"),q=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),Bt=Symbol("emittingEnd"),lt=Symbol("emittedError"),It=Symbol("closed"),ps=Symbol("read"),Gt=Symbol("flush"),ms=Symbol("flushChunk"),L=Symbol("encoding"),rt=Symbol("decoder"),x=Symbol("flowing"),ct=Symbol("paused"),nt=Symbol("resume"),T=Symbol("buffer"),M=Symbol("pipes"),C=Symbol("bufferLength"),we=Symbol("bufferPush"),zt=Symbol("bufferShift"),k=Symbol("objectMode"),O=Symbol("destroyed"),be=Symbol("error"),ye=Symbol("emitData"),gs=Symbol("emitEnd"),Se=Symbol("emitEnd2"),I=Symbol("async"),ve=Symbol("abort"),Ut=Symbol("aborted"),ut=Symbol("signal"),Z=Symbol("dataListeners"),D=Symbol("discarded"),ft=n=>Promise.resolve().then(n),cr=n=>n(),ur=n=>n==="end"||n==="finish"||n==="prefinish",fr=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,dr=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),$t=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[nt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ee=class extends $t{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},pr=n=>!!n.objectMode,mr=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",qt=class extends _e.EventEmitter{[x]=!1;[ct]=!1;[M]=[];[T]=[];[k];[L];[I];[rt];[$]=!1;[K]=!1;[Bt]=!1;[It]=!1;[lt]=null;[C]=0;[O]=!1;[ut];[Ut]=!1;[Z]=0;[D]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pr(e)?(this[k]=!0,this[L]=null):mr(e)?(this[L]=e.encoding,this[k]=!1):(this[k]=!1,this[L]=null),this[I]=!!e.async,this[rt]=this[L]?new hr.StringDecoder(this[L]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[ut]=s,s.aborted?this[ve]():s.addEventListener("abort",()=>this[ve]()))}get bufferLength(){return this[C]}get encoding(){return this[L]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[I]}set async(t){this[I]=this[I]||!!t}[ve](){this[Ut]=!0,this.emit("abort",this[ut]?.reason),this.destroy(this[ut]?.reason)}get aborted(){return this[Ut]}set aborted(t){}write(t,e,s){if(this[Ut])return!1;if(this[$])throw new Error("write after end");if(this[O])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[I]?ft:cr;if(!this[k]&&!Buffer.isBuffer(t)){if(dr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fr(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):t.length?(typeof t=="string"&&!(e===this[L]&&!this[rt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[L]&&(t=this[rt].write(t)),this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):(this[C]!==0&&this.emit("readable"),s&&i(s),this[x])}read(t){if(this[O])return null;if(this[D]=!1,this[C]===0||t===0||t&&t>this[C])return this[q](),null;this[k]&&(t=null),this[T].length>1&&!this[k]&&(this[T]=[this[L]?this[T].join(""):Buffer.concat(this[T],this[C])]);let e=this[ps](t||null,this[T][0]);return this[q](),e}[ps](t,e){if(this[k])this[zt]();else{let s=e;t===s.length||t===null?this[zt]():typeof s=="string"?(this[T][0]=s.slice(t),e=s.slice(0,t),this[C]-=t):(this[T][0]=s.subarray(t),e=s.subarray(0,t),this[C]-=t)}return this.emit("data",e),!this[T].length&&!this[$]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[$]=!0,this.writable=!1,(this[x]||!this[ct])&&this[q](),this}[nt](){this[O]||(!this[Z]&&!this[M].length&&(this[D]=!0),this[ct]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[Gt]():this[$]?this[q]():this.emit("drain"))}resume(){return this[nt]()}pause(){this[x]=!1,this[ct]=!0,this[D]=!1}get destroyed(){return this[O]}get flowing(){return this[x]}get paused(){return this[ct]}[we](t){this[k]?this[C]+=1:this[C]+=t.length,this[T].push(t)}[zt](){return this[k]?this[C]-=1:this[C]-=this[T][0].length,this[T].shift()}[Gt](t=!1){do;while(this[ms](this[zt]())&&this[T].length);!t&&!this[T].length&&!this[$]&&this.emit("drain")}[ms](t){return this.emit("data",t),this[x]}pipe(t,e){if(this[O])return t;this[D]=!1;let s=this[K];return e=e||{},t===ds.stdout||t===ds.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new Ee(this,t,e):new $t(this,t,e)),this[I]?ft(()=>this[nt]()):this[nt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[x]&&this[Z]===0&&(this[x]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[D]=!1,this[Z]++,!this[M].length&&!this[x]&&this[nt]();else if(t==="readable"&&this[C]!==0)super.emit("readable");else if(ur(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[lt]){let i=e;this[I]?ft(()=>i.call(this,this[lt])):i.call(this,this[lt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[D]&&!this[M].length&&(this[x]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[D]&&!this[M].length&&(this[x]=!1)),e}get emittedEnd(){return this[K]}[q](){!this[Bt]&&!this[K]&&!this[O]&&this[T].length===0&&this[$]&&(this[Bt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[It]&&this.emit("close"),this[Bt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==O&&this[O])return!1;if(t==="data")return!this[k]&&!s?!1:this[I]?(ft(()=>this[ye](s)),!0):this[ye](s);if(t==="end")return this[gs]();if(t==="close"){if(this[It]=!0,!this[K]&&!this[O])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[lt]=s,super.emit(be,s);let r=!this[ut]||this.listeners("error").length?super.emit("error",s):!1;return this[q](),r}else if(t==="resume"){let r=super.emit("resume");return this[q](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[q](),i}[ye](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[D]?!1:super.emit("data",t);return this[q](),e}[gs](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[I]?(ft(()=>this[Se]()),!0):this[Se]())}[Se](){if(this[rt]){let e=this[rt].end();if(e){for(let s of this[M])s.dest.write(e);this[D]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[L]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(O,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[D]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[$])return e();let r,h,o=c=>{this.off("data",a),this.off("end",l),this.off(O,f),e(),h(c)},a=c=>{this.off("error",o),this.off("end",l),this.off(O,f),this.pause(),r({value:c,done:!!this[$]})},l=()=>{this.off("error",o),this.off("data",a),this.off(O,f),e(),r({done:!0,value:void 0})},f=()=>o(new Error("stream destroyed"));return new Promise((c,d)=>{h=d,r=c,this.once(O,f),this.once("error",o),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[D]=!1;let t=!1,e=()=>(this.pause(),this.off(be,e),this.off(O,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(be,e),this.once(O,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[O])return t?this.emit("error",t):this.emit(O),this;this[O]=!0,this[D]=!0,this[T].length=0,this[C]=0;let e=this;return typeof e.close=="function"&&!this[It]&&e.close(),t?this.emit("error",t):this.emit(O),this}static get isStream(){return P.isStream}};P.Minipass=qt});var Ms=R(_=>{"use strict";var gr=_&&_.__createBinding||(Object.create?(function(n,t,e,s){s===void 0&&(s=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,s,i)}):(function(n,t,e,s){s===void 0&&(s=e),n[s]=t[e]})),wr=_&&_.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),br=_&&_.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&gr(t,n,e);return wr(t,n),t};Object.defineProperty(_,"__esModule",{value:!0});_.PathScurry=_.Path=_.PathScurryDarwin=_.PathScurryPosix=_.PathScurryWin32=_.PathScurryBase=_.PathPosix=_.PathWin32=_.PathBase=_.ChildrenCache=_.ResolveCache=void 0;var Qt=fs(),Yt=require("node:path"),yr=require("node:url"),pt=require("fs"),Sr=br(require("node:fs")),vr=pt.realpathSync.native,Ht=require("node:fs/promises"),bs=Oe(),mt={lstatSync:pt.lstatSync,readdir:pt.readdir,readdirSync:pt.readdirSync,readlinkSync:pt.readlinkSync,realpathSync:vr,promises:{lstat:Ht.lstat,readdir:Ht.readdir,readlink:Ht.readlink,realpath:Ht.realpath}},_s=n=>!n||n===mt||n===Sr?mt:{...mt,...n,promises:{...mt.promises,...n.promises||{}}},Os=/^\\\\\?\\([a-z]:)\\?$/i,Er=n=>n.replace(/\//g,"\\").replace(Os,"$1\\"),_r=/[\\\/]/,N=0,xs=1,Ts=2,G=4,Cs=6,Rs=8,Q=10,As=12,j=15,dt=~j,xe=16,ys=32,gt=64,W=128,Vt=256,Xt=512,Ss=gt|W|Xt,Or=1023,Te=n=>n.isFile()?Rs:n.isDirectory()?G:n.isSymbolicLink()?Q:n.isCharacterDevice()?Ts:n.isBlockDevice()?Cs:n.isSocket()?As:n.isFIFO()?xs:N,vs=new Qt.LRUCache({max:2**12}),wt=n=>{let t=vs.get(n);if(t)return t;let e=n.normalize("NFKD");return vs.set(n,e),e},Es=new Qt.LRUCache({max:2**12}),Kt=n=>{let t=Es.get(n);if(t)return t;let e=wt(n.toLowerCase());return Es.set(n,e),e},bt=class extends Qt.LRUCache{constructor(){super({max:256})}};_.ResolveCache=bt;var Jt=class extends Qt.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}};_.ChildrenCache=Jt;var ks=Symbol("PathScurry setAsCwd"),A=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=N,s,i,r,h,o){this.name=t,this.#O=r?Kt(t):wt(t),this.#e=e&Or,this.nocase=r,this.roots=i,this.root=s||this,this.#F=h,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=_s(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#F}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#D(i):this.#D(i)}#D(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#F.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#F.set(this,e),this.#e&=~xe,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Kt(t):wt(t);for(let a of s)if(a.#O===i)return a;let r=this.parent?this.sep:"",h=this.#g?this.#g+r+t:void 0,o=this.newChild(t,N,{...e,parent:this,fullpath:h});return this.canReaddir()||(o.#e|=W),s.push(o),o}relative(){if(this.isCWD)return"";if(this.#E!==void 0)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let t=this.name,e=this.parent;if(!e)return this.#T=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#b=s}isUnknown(){return(this.#e&j)===N}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&j)===Rs}isDirectory(){return(this.#e&j)===G}isCharacterDevice(){return(this.#e&j)===Ts}isBlockDevice(){return(this.#e&j)===Cs}isFIFO(){return(this.#e&j)===xs}isSocket(){return(this.#e&j)===As}isSymbolicLink(){return(this.#e&Q)===Q}lstatCached(){return this.#e&ys?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let t=this.#e&j;return!(t!==N&&t!==Q||this.#e&Vt||this.#e&W)}calledReaddir(){return!!(this.#e&xe)}isENOENT(){return!!(this.#e&W)}isNamed(t){return this.nocase?this.#O===Kt(t):this.#O===wt(t)}async readlink(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}readlinkSync(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}#W(t){this.#e|=xe;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#N.push(t),this.#A)return;this.#A=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,h)=>{if(r)this.#B(r.code),s.provisional=0;else{for(let o of h)this.#I(o,s);this.#W(s)}this.#q(s.slice(0,s.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#H)await this.#H;else{let s=()=>{};this.#H=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#I(i,t);this.#W(t)}catch(i){this.#B(i.code),t.provisional=0}this.#H=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#I(s,t);this.#W(t)}catch(s){this.#B(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ss)return!1;let t=j&this.#e;return t===N||t===G||t===Q}shouldWalk(t,e){return(this.#e&G)===G&&!(this.#e&Ss)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}[ks](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#E=s.join(this.sep),i.#T=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#E=void 0,i.#T=void 0,i=i.parent}};_.PathBase=A;var yt=class n extends A{sep="\\";splitSep=_r;constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return Yt.win32.parse(t).root}getRoot(t){if(t=Er(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new Et(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(Os,"$1\\"),t===e}};_.PathWin32=yt;var St=class n extends A{splitSep="/";sep="/";constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}};_.PathPosix=St;var vt=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:h=mt}={}){this.#r=_s(h),(t instanceof URL||t.startsWith("file://"))&&(t=(0,yr.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new bt,this.#s=new bt,this.#n=new Jt(r);let a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,f=a.length-1,c=e.sep,d=this.rootPath,u=!1;for(let m of a){let p=f--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(u?"":c)+m}),u=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((u,m)=>{if(u)return d(u);let p=m.length;if(!p)return d();let b=()=>{--p===0&&d()};for(let w of m)(!r||r(w))&&o.push(s?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(a,h)?l(v,b):b()):w.shouldWalk(a,h)?l(w,b):b()},!0)},f=t;return new Promise((c,d)=>{l(f,u=>{if(u)return d(u);c(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let f=l.readdirSync();for(let c of f){(!r||r(c))&&o.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,h)&&a.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e;(!r||r(t))&&(yield s?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let f of l){(!r||r(f))&&(yield s?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(o,h)&&o.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0});(!r||r(t))&&o.write(s?t:t.fullpath());let a=new Set,l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=(b,w,v=!1)=>{if(b)return o.emit("error",b);if(i&&!v){let E=[];for(let y of w)y.isSymbolicLink()&&E.push(y.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(E.length){Promise.all(E).then(()=>m(null,w,!0));return}}for(let E of w)E&&(!r||r(E))&&(o.write(s?E:E.fullpath())||(d=!0));f--;for(let E of w){let y=E.realpathCached()||E;y.shouldWalk(a,h)&&l.push(y)}d&&!o.flowing?o.once("drain",c):p||c()},p=!0;u.readdirCB(m,!0),p=!1}};return c(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0}),a=new Set;(!r||r(t))&&o.write(s?t:t.fullpath());let l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=u.readdirSync();for(let p of m)(!r||r(p))&&(o.write(s?p:p.fullpath())||(d=!0));f--;for(let p of m){let b=p;if(p.isSymbolicLink()){if(!(i&&(b=p.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,h)&&l.push(b)}}d&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ks](e)}};_.PathScurryBase=vt;var Et=class extends vt{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,Yt.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return Yt.win32.parse(t).root.toUpperCase()}newRoot(t){return new yt(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};_.PathScurryWin32=Et;var _t=class extends vt{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Yt.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new St(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};_.PathScurryPosix=_t;var Zt=class extends _t{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}};_.PathScurryDarwin=Zt;_.Path=process.platform==="win32"?yt:St;_.PathScurry=process.platform==="win32"?Et:process.platform==="darwin"?Zt:_t});var Re=R(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.Pattern=void 0;var xr=H(),Tr=n=>n.length>=1,Cr=n=>n.length>=1,Rr=Symbol.for("nodejs.util.inspect.custom"),Ce=class n{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(t,e,s,i){if(!Tr(t))throw new TypeError("empty pattern list");if(!Cr(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,h,o,a,...l]=this.#t,[f,c,d,u,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,h,o,a,""].join("/"),b=[f,c,d,u,""].join("/");this.#t=[p,...l],this.#s=[b,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...h]=this.#t,[o,...a]=this.#s;h[0]===""&&(h.shift(),a.shift());let l=r+"/",f=o+"/";this.#t=[l,...h],this.#s=[f,...a],this.length=this.#t.length}}}[Rr](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===xr.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}};te.Pattern=Ce});var ke=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.Ignore=void 0;var Ps=H(),Ar=Re(),kr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ae=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:h=kr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=h,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:h,nocomment:!0,nonegate:!0};for(let o of t)this.add(o)}add(t){let e=new Ps.Minimatch(t,this.mmopts);for(let s=0;s{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.Processor=z.SubWalks=z.MatchRecord=z.HasWalkedCache=void 0;var Ds=H(),se=class n{store;constructor(t=new Map){this.store=t}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}};z.HasWalkedCache=se;var ie=class{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}};z.MatchRecord=ie;var re=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};z.SubWalks=re;var Me=class n{hasWalkedCache;matches=new ie;subwalks=new re;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new se}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let h=r.root(),o=r.isAbsolute()&&this.opts.absolute!==!1;if(h){i=i.resolve(h==="/"&&this.opts.root!==void 0?this.opts.root:h);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,f=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,f=!0;if(a=r.pattern(),l=r.rest(),f){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),o,c);continue}else if(a===Ds.GLOBSTAR){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,o,c===""||c===".");else if(c===".."){let u=i.parent||i;d?this.hasWalkedCache.hasWalked(u,d)||this.subwalks.add(u,d):this.matches.add(u,o,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let h of s){let o=h.isAbsolute(),a=h.pattern(),l=h.rest();a===Ds.GLOBSTAR?i.testGlobstar(r,h,l,o):a instanceof RegExp?i.testRegExp(r,a,l,o):i.testString(r,a,l,o)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let h=t.parent||t;this.subwalks.add(h,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};z.Processor=Me});var Ls=R(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.GlobStream=X.GlobWalker=X.GlobUtil=void 0;var Mr=Oe(),js=ke(),Ns=Fs(),Pr=(n,t)=>typeof n=="string"?new js.Ignore([n],t):Array.isArray(n)?new js.Ignore(n,t):n,Ot=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Pr(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=await r.realpath();h&&(h.isUnknown()||this.opts.stat)&&await h.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=r.realpathSync();h&&(h?.isUnknown()||this.opts.stat)&&h.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),h=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?h+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Ns.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,s,h):o.readdirCB((l,f)=>this.walkCB3(o,f,s,h),!0)}h()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let[o,a]of s.subwalks.entries())r++,this.walkCB2(o,a,s.child(),h);h()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Ns.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirSync();this.walkCB3Sync(o,a,s,h)}h()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let[o,a]of s.subwalks.entries())r++,this.walkCB2Sync(o,a,s.child(),h);h()}};X.GlobUtil=Ot;var Pe=class extends Ot{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};X.GlobWalker=Pe;var De=class extends Ot{results;constructor(t,e,s){super(t,e,s),this.results=new Mr.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};X.GlobStream=De});var je=R(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Glob=void 0;var Dr=H(),Fr=require("node:url"),ne=Ms(),jr=Re(),he=Ls(),Nr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Fe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Fr.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Nr,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ne.PathScurryWin32:e.platform==="darwin"?ne.PathScurryDarwin:e.platform?ne.PathScurryPosix:ne.PathScurry;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new Dr.Minimatch(a,i)),[h,o]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=h.map((a,l)=>{let f=o[l];if(!f)throw new Error("invalid pattern object");return new jr.Pattern(a,f,0,this.platform)})}async walk(){return[...await new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};oe.Glob=Fe});var Ne=R(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.hasMagic=void 0;var Lr=H(),Wr=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new Lr.Minimatch(e,t).hasMagic())return!0;return!1};ae.hasMagic=Wr});Object.defineProperty(exports,"__esModule",{value:!0});exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0;exports.globStreamSync=xt;exports.globStream=Le;exports.globSync=We;exports.globIterateSync=Tt;exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports,"escape",{enumerable:!0,get:function(){return Is.escape}});Object.defineProperty(exports,"unescape",{enumerable:!0,get:function(){return Is.unescape}});var Ir=je();Object.defineProperty(exports,"Glob",{enumerable:!0,get:function(){return Ir.Glob}});var Gr=Ne();Object.defineProperty(exports,"hasMagic",{enumerable:!0,get:function(){return Gr.hasMagic}});var zr=ke();Object.defineProperty(exports,"Ignore",{enumerable:!0,get:function(){return zr.Ignore}});function xt(n,t={}){return new tt.Glob(n,t).streamSync()}function Le(n,t={}){return new tt.Glob(n,t).stream()}function We(n,t={}){return new tt.Glob(n,t).walkSync()}async function Bs(n,t={}){return new tt.Glob(n,t).walk()}function Tt(n,t={}){return new tt.Glob(n,t).iterateSync()}function Be(n,t={}){return new tt.Glob(n,t).iterate()}exports.streamSync=xt;exports.stream=Object.assign(Le,{sync:xt});exports.iterateSync=Tt;exports.iterate=Object.assign(Be,{sync:Tt});exports.sync=Object.assign(We,{stream:xt,iterate:Tt});exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape});exports.glob.glob=exports.glob; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/glob/dist/commonjs/pattern.js b/deps/npm/node_modules/glob/dist/commonjs/pattern.js index f0de35fb5bed9d..95f9075c5bfcb5 100644 --- a/deps/npm/node_modules/glob/dist/commonjs/pattern.js +++ b/deps/npm/node_modules/glob/dist/commonjs/pattern.js @@ -5,6 +5,7 @@ exports.Pattern = void 0; const minimatch_1 = require("minimatch"); const isPatternList = (pl) => pl.length >= 1; const isGlobList = (gl) => gl.length >= 1; +const customInspect = Symbol.for('nodejs.util.inspect.custom'); /** * An immutable-ish view on an array of glob parts and their parsed * results @@ -80,6 +81,9 @@ class Pattern { } } } + [customInspect]() { + return 'Pattern <' + this.#globList.slice(this.#index).join('/') + '>'; + } /** * The first entry in the parsed list of patterns */ diff --git a/deps/npm/node_modules/glob/dist/esm/glob.js b/deps/npm/node_modules/glob/dist/esm/glob.js index c9ff3b0036d945..d89c3dad90daa8 100644 --- a/deps/npm/node_modules/glob/dist/esm/glob.js +++ b/deps/npm/node_modules/glob/dist/esm/glob.js @@ -137,11 +137,12 @@ export class Glob { // for the file `AbC` for example. const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; const mmo = { - // default nocase based on platform + braceExpandMax: 10_000, ...opts, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, + // default nocase based on platform nocase: this.nocase, nocaseMagicOnly, nocomment: true, diff --git a/deps/npm/node_modules/glob/dist/esm/index.min.js b/deps/npm/node_modules/glob/dist/esm/index.min.js new file mode 100644 index 00000000000000..e6ea7cc1bc8311 --- /dev/null +++ b/deps/npm/node_modules/glob/dist/esm/index.min.js @@ -0,0 +1,4 @@ +var Gt=(n,t,e)=>{let s=n instanceof RegExp?ce(n,e):n,i=t instanceof RegExp?ce(t,e):t,r=s!==null&&i!=null&&ss(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}},ce=(n,t)=>{let e=t.match(n);return e?e[0]:null},ss=(n,t,e)=>{let s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),u=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;u>=0&&!h;){if(u===a)s.push(u),a=e.indexOf(n,u+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&o!==void 0&&(h=[r,o])}return h};var fe="\0SLASH"+Math.random()+"\0",ue="\0OPEN"+Math.random()+"\0",qt="\0CLOSE"+Math.random()+"\0",de="\0COMMA"+Math.random()+"\0",pe="\0PERIOD"+Math.random()+"\0",is=new RegExp(fe,"g"),rs=new RegExp(ue,"g"),ns=new RegExp(qt,"g"),os=new RegExp(de,"g"),hs=new RegExp(pe,"g"),as=/\\\\/g,ls=/\\{/g,cs=/\\}/g,fs=/\\,/g,us=/\\./g,ds=1e5;function Ht(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function ps(n){return n.replace(as,fe).replace(ls,ue).replace(cs,qt).replace(fs,de).replace(us,pe)}function ms(n){return n.replace(is,"\\").replace(rs,"{").replace(ns,"}").replace(os,",").replace(hs,".")}function me(n){if(!n)return[""];let t=[],e=Gt("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,o=s.split(",");o[o.length-1]+="{"+i+"}";let h=me(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function ge(n,t={}){if(!n)return[];let{max:e=ds}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(ps(n),e,!0).map(ms)}function gs(n){return"{"+n+"}"}function ws(n){return/^-?0\d/.test(n)}function ys(n,t){return n<=t}function bs(n,t){return n>=t}function ht(n,t,e){let s=[],i=Gt("{","}",n);if(!i)return[n];let r=i.pre,o=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let h=0;h=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+qt+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=me(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(gs),c.length===1))return o.map(f=>i.pre+c[0]+f);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let f=Ht(c[0]),m=Ht(c[1]),p=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Ht(c[2])):1,g=ys;m0){let $=new Array(z+1).join("0");y<0?b="-"+$+b.slice(1):b=$+b}}d.push(b)}}else{d=[];for(let f=0;f{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ss={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},lt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Es=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we=n=>n.join(""),ye=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=!1,h=!1,a=!1,l=!1,u=e,c="";t:for(;rc?s.push(lt(c)+"-"+lt(p)):p===c&&s.push(lt(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(lt(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(lt(p)),r++}if(ue?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var xs=new Set(["!","?","+","*","@"]),be=n=>xs.has(n),vs="(?!(?:^|/)\\.\\.?(?:$|/))",Ct="(?!\\.)",Cs=new Set(["[","."]),Ts=new Set(["..","."]),As=new Set("().*{}+?[]^$\\!"),ks=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kt="[^/]",Se=Kt+"*?",Ee=Kt+"+?",Q=class n{type;#t;#s;#n=!1;#r=[];#o;#S;#w;#c=!1;#h;#u;#f=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let t=this.#o;for(let e=0;etypeof f!="string"),l=this.#r.map(f=>{let[m,p,w,g]=typeof f=="string"?n.#E(f,this.#s,a):f.toRegExpSource(t);return this.#s=this.#s||w,this.#n=this.#n||g,m}).join(""),u="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Ts.has(this.#r[0]))){let m=Cs,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),w=!e&&!t&&m.has(l.charAt(0));u=p?vs:w?Ct:""}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[u+l+c,W(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,W(this.toString()),!1,!1]}let o=!s||t||e||!Ct?"":this.#d(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#f)h=(this.isStart()&&!e?Ct:"")+Ee;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ct:"")+Se+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a}return[h,W(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#E(t,e,s=!1){let i=!1,r="",o=!1,h=!1;for(let a=0;ae?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O=(n,t,e={})=>(at(t),!e.nocomment&&t.charAt(0)==="#"?!1:new D(t,e).match(n)),Rs=/^\*+([^+@!?\*\[\(]*)$/,Os=n=>t=>!t.startsWith(".")&&t.endsWith(n),Fs=n=>t=>t.endsWith(n),Ds=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ms=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ns=/^\*+\.\*+$/,_s=n=>!n.startsWith(".")&&n.includes("."),Ls=n=>n!=="."&&n!==".."&&n.includes("."),Ws=/^\.\*+$/,Ps=n=>n!=="."&&n!==".."&&n.startsWith("."),js=/^\*+$/,Is=n=>n.length!==0&&!n.startsWith("."),zs=n=>n.length!==0&&n!=="."&&n!=="..",Bs=/^\?+([^+@!?\*\[\(]*)?$/,Us=([n,t=""])=>{let e=Ce([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},$s=([n,t=""])=>{let e=Te([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Gs=([n,t=""])=>{let e=Te([n]);return t?s=>e(s)&&s.endsWith(t):e},Hs=([n,t=""])=>{let e=Ce([n]);return t?s=>e(s)&&s.endsWith(t):e},Ce=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Te=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ae=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xe={win32:{sep:"\\"},posix:{sep:"/"}},qs=Ae==="win32"?xe.win32.sep:xe.posix.sep;O.sep=qs;var A=Symbol("globstar **");O.GLOBSTAR=A;var Ks="[^/]",Vs=Ks+"*?",Ys="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Xs="(?:(?!(?:\\/|^)\\.).)*?",Js=(n,t={})=>e=>O(e,n,t);O.filter=Js;var N=(n,t={})=>Object.assign({},n,t),Zs=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O;let t=O;return Object.assign((s,i,r={})=>t(s,i,N(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,N(n,r))}static defaults(i){return t.defaults(N(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,N(n,o))}static fromGlob(i,r={}){return t.AST.fromGlob(i,N(n,r))}},unescape:(s,i={})=>t.unescape(s,N(n,i)),escape:(s,i={})=>t.escape(s,N(n,i)),filter:(s,i={})=>t.filter(s,N(n,i)),defaults:s=>t.defaults(N(n,s)),makeRe:(s,i={})=>t.makeRe(s,N(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,N(n,i)),match:(s,i,r={})=>t.match(s,i,N(n,r)),sep:t.sep,GLOBSTAR:A})};O.defaults=Zs;var ke=(n,t={})=>(at(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ge(n,{max:t.braceExpandMax}));O.braceExpand=ke;var Qs=(n,t={})=>new D(n,t).makeRe();O.makeRe=Qs;var ti=(n,t,e={})=>{let s=new D(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O.match=ti;var ve=/[?*]|[+@!]\(.*?\)|\[|\]/,ei=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ae,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ve.test(r[2]))&&!ve.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(l)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let u=s.slice(0);u[i]="**",t.push(u),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length)}partsMatch(t,e,s=!1){let i=0,r=0,o=[],h="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o>> no match, partial?`,t,d,e,f),d===a))}let p;if(typeof u=="string"?(p=c===u,this.debug("string match",u,c,p)):(p=u.test(c),this.debug("pattern match",u,c,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke(this.pattern,this.options)}parse(t){at(t);let e=this.options;if(t==="**")return A;if(t==="")return"";let s,i=null;(s=t.match(js))?i=e.dot?zs:Is:(s=t.match(Rs))?i=(e.nocase?e.dot?Ms:Ds:e.dot?Fs:Os)(s[1]):(s=t.match(Bs))?i=(e.nocase?e.dot?$s:Us:e.dot?Gs:Hs)(s):(s=t.match(Ns))?i=e.dot?Ls:_s:(s=t.match(Ws))&&(i=Ps);let r=Q.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Vs:e.dot?Ys:Xs,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei(c):c===A?A:c._src});l.forEach((c,d)=>{let f=l[d+1],m=l[d-1];c!==A||m===A||(m===void 0?f!==void 0&&f!==A?l[d+1]="(?:\\/|"+s+"\\/)?"+f:l[d]=s:f===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":f!==A&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+f,l[d+1]=A))});let u=l.filter(c=>c!==A);if(this.partial&&u.length>=1){let c=[];for(let d=1;d<=u.length;d++)c.push(u.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return u.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof Vt.emitWarning=="function"?Vt.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},At=globalThis.AbortController,Re=globalThis.AbortSignal;if(typeof At>"u"){Re=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},At=class{constructor(){t()}signal=new Re;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=Vt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,Fe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var ii=n=>!Oe.has(n);var q=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De=n=>q(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt:null:null,Tt=class extends Array{constructor(n){super(n),this.fill(0)}},ri=class ct{heap;length;static#t=!1;static create(t){let e=De(t);if(!e)return[];ct.#t=!0;let s=new ct(t,e);return ct.#t=!1,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},ft=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return{starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si,e!==0&&!q(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof u=="function"&&(this.#r=u),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii($t)&&(Oe.add($t),Fe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me))}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt(this.#t),e=new Tt(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire")},h+1);l.unref&&l.unref(),s[o]=l}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let u=o.now-l;o.remainingTTL=a-u}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let u=(i||r())-l;return a-u},this.#v=o=>{let h=e[o],a=t[o];return!!a&&!!h&&(i||r())-h>a}}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>!1;#G(){let t=new Tt(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(!0)}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u)}}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e]}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e]}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#D({allowStale:!0}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now()}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h)}this.#C&&(o.size=this.#C[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,u=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(!1):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,u,a),a&&(a.set="add"),l=!1,this.#_&&this.#r?.(e,t,"add");else{this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#x&&this.#n?.(f,t,"set"),this.#e&&this.#m?.push([f,t,"set"]))}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,u,a),this.#i[c]=e,a){a.set="replace";let f=d&&this.#l(d)?d.__staleWhileFetching:d;f!==void 0&&(a.oldValue=f)}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#o?.(...f)}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e)}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!S&&!w)return c(o.signal.reason,E);let y=f,b=this.#i[e];return(b===f||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},u=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=f;if(this.#i[e]===f&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let f=new Promise(d).then(l,u),m=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else{let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=!0)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=!0)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss")}#$(t,e){this.#E[e]=t,this.#d[t]=e}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let s=!1;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=!0,this.#h===1)this.#H(e);else{this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else{let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i]}this.#h--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r)}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0)}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s)}}};import{posix as mi,win32 as re}from"node:path";import{fileURLToPath as gi}from"node:url";import{lstatSync as wi,readdir as yi,readdirSync as bi,readlinkSync as Si,realpathSync as Ei}from"fs";import*as xi from"node:fs";import{lstat as Ci,readdir as Ti,readlink as Ai,realpath as ki}from"node:fs/promises";import{EventEmitter as ee}from"node:events";import Pe from"node:stream";import{StringDecoder as ni}from"node:string_decoder";var Ne=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi=n=>!!n&&typeof n=="object"&&(n instanceof V||n instanceof Pe||hi(n)||ai(n)),hi=n=>!!n&&typeof n=="object"&&n instanceof ee&&typeof n.pipe=="function"&&n.pipe!==Pe.Writable.prototype.pipe,ai=n=>!!n&&typeof n=="object"&&n instanceof ee&&typeof n.write=="function"&&typeof n.end=="function",G=Symbol("EOF"),H=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),kt=Symbol("emittingEnd"),ut=Symbol("emittedError"),Rt=Symbol("closed"),_e=Symbol("read"),Ot=Symbol("flush"),Le=Symbol("flushChunk"),P=Symbol("encoding"),et=Symbol("decoder"),v=Symbol("flowing"),dt=Symbol("paused"),st=Symbol("resume"),C=Symbol("buffer"),F=Symbol("pipes"),T=Symbol("bufferLength"),Yt=Symbol("bufferPush"),Ft=Symbol("bufferShift"),k=Symbol("objectMode"),x=Symbol("destroyed"),Xt=Symbol("error"),Jt=Symbol("emitData"),We=Symbol("emitEnd"),Zt=Symbol("emitEnd2"),B=Symbol("async"),Qt=Symbol("abort"),Dt=Symbol("aborted"),pt=Symbol("signal"),Y=Symbol("dataListeners"),M=Symbol("discarded"),mt=n=>Promise.resolve().then(n),li=n=>n(),ci=n=>n==="end"||n==="finish"||n==="prefinish",fi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},te=class extends Mt{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},di=n=>!!n.objectMode,pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V=class extends ee{[v]=!1;[dt]=!1;[F]=[];[C]=[];[k];[P];[B];[et];[G]=!1;[K]=!1;[kt]=!1;[Rt]=!1;[ut]=null;[T]=0;[x]=!1;[pt];[Dt]=!1;[Y]=0;[M]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di(e)?(this[k]=!0,this[P]=null):pi(e)?(this[P]=e.encoding,this[k]=!1):(this[k]=!1,this[P]=null),this[B]=!!e.async,this[et]=this[P]?new ni(this[P]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[F]});let{signal:s}=e;s&&(this[pt]=s,s.aborted?this[Qt]():s.addEventListener("abort",()=>this[Qt]()))}get bufferLength(){return this[T]}get encoding(){return this[P]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B]}set async(t){this[B]=this[B]||!!t}[Qt](){this[Dt]=!0,this.emit("abort",this[pt]?.reason),this.destroy(this[pt]?.reason)}get aborted(){return this[Dt]}set aborted(t){}write(t,e,s){if(this[Dt])return!1;if(this[G])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B]?mt:li;if(!this[k]&&!Buffer.isBuffer(t)){if(ui(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):t.length?(typeof t=="string"&&!(e===this[P]&&!this[et]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P]&&(t=this[et].write(t)),this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):(this[T]!==0&&this.emit("readable"),s&&i(s),this[v])}read(t){if(this[x])return null;if(this[M]=!1,this[T]===0||t===0||t&&t>this[T])return this[H](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[P]?this[C].join(""):Buffer.concat(this[C],this[T])]);let e=this[_e](t||null,this[C][0]);return this[H](),e}[_e](t,e){if(this[k])this[Ft]();else{let s=e;t===s.length||t===null?this[Ft]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[T]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[T]-=t)}return this.emit("data",e),!this[C].length&&!this[G]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G]=!0,this.writable=!1,(this[v]||!this[dt])&&this[H](),this}[st](){this[x]||(!this[Y]&&!this[F].length&&(this[M]=!0),this[dt]=!1,this[v]=!0,this.emit("resume"),this[C].length?this[Ot]():this[G]?this[H]():this.emit("drain"))}resume(){return this[st]()}pause(){this[v]=!1,this[dt]=!0,this[M]=!1}get destroyed(){return this[x]}get flowing(){return this[v]}get paused(){return this[dt]}[Yt](t){this[k]?this[T]+=1:this[T]+=t.length,this[C].push(t)}[Ft](){return this[k]?this[T]-=1:this[T]-=this[C][0].length,this[C].shift()}[Ot](t=!1){do;while(this[Le](this[Ft]())&&this[C].length);!t&&!this[C].length&&!this[G]&&this.emit("drain")}[Le](t){return this.emit("data",t),this[v]}pipe(t,e){if(this[x])return t;this[M]=!1;let s=this[K];return e=e||{},t===Ne.stdout||t===Ne.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F].push(e.proxyErrors?new te(this,t,e):new Mt(this,t,e)),this[B]?mt(()=>this[st]()):this[st]()),t}unpipe(t){let e=this[F].find(s=>s.dest===t);e&&(this[F].length===1?(this[v]&&this[Y]===0&&(this[v]=!1),this[F]=[]):this[F].splice(this[F].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M]=!1,this[Y]++,!this[F].length&&!this[v]&&this[st]();else if(t==="readable"&&this[T]!==0)super.emit("readable");else if(ci(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut]){let i=e;this[B]?mt(()=>i.call(this,this[ut])):i.call(this,this[ut])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y]=this.listeners("data").length,this[Y]===0&&!this[M]&&!this[F].length&&(this[v]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Y]=0,!this[M]&&!this[F].length&&(this[v]=!1)),e}get emittedEnd(){return this[K]}[H](){!this[kt]&&!this[K]&&!this[x]&&this[C].length===0&&this[G]&&(this[kt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt]&&this.emit("close"),this[kt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x&&this[x])return!1;if(t==="data")return!this[k]&&!s?!1:this[B]?(mt(()=>this[Jt](s)),!0):this[Jt](s);if(t==="end")return this[We]();if(t==="close"){if(this[Rt]=!0,!this[K]&&!this[x])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut]=s,super.emit(Xt,s);let r=!this[pt]||this.listeners("error").length?super.emit("error",s):!1;return this[H](),r}else if(t==="resume"){let r=super.emit("resume");return this[H](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H](),i}[Jt](t){for(let s of this[F])s.dest.write(t)===!1&&this.pause();let e=this[M]?!1:super.emit("data",t);return this[H](),e}[We](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[B]?(mt(()=>this[Zt]()),!0):this[Zt]())}[Zt](){if(this[et]){let e=this[et].end();if(e){for(let s of this[F])s.dest.write(e);this[M]||super.emit("data",e)}}for(let e of this[F])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[M]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[G])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x,u),e(),o(c)},a=c=>{this.off("error",h),this.off("end",l),this.off(x,u),this.pause(),r({value:c,done:!!this[G]})},l=()=>{this.off("error",h),this.off("data",a),this.off(x,u),e(),r({done:!0,value:void 0})},u=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x,u),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[M]=!1;let t=!1,e=()=>(this.pause(),this.off(Xt,e),this.off(x,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(Xt,e),this.once(x,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[x])return t?this.emit("error",t):this.emit(x),this;this[x]=!0,this[M]=!0,this[C].length=0,this[T]=0;let e=this;return typeof e.close=="function"&&!this[Rt]&&e.close(),t?this.emit("error",t):this.emit(x),this}static get isStream(){return oi}};var vi=Ei.native,wt={lstatSync:wi,readdir:yi,readdirSync:bi,readlinkSync:Si,realpathSync:vi,promises:{lstat:Ci,readdir:Ti,readlink:Ai,realpath:ki}},Ue=n=>!n||n===wt||n===xi?wt:{...wt,...n,promises:{...wt.promises,...n.promises||{}}},$e=/^\\\\\?\\([a-z]:)\\?$/i,Ri=n=>n.replace(/\//g,"\\").replace($e,"$1\\"),Oi=/[\\\/]/,L=0,Ge=1,He=2,U=4,qe=6,Ke=8,X=10,Ve=12,_=15,gt=~_,se=16,je=32,yt=64,j=128,Nt=256,Lt=512,Ie=yt|j|Lt,Fi=1023,ie=n=>n.isFile()?Ke:n.isDirectory()?U:n.isSymbolicLink()?X:n.isCharacterDevice()?He:n.isBlockDevice()?qe:n.isSocket()?Ve:n.isFIFO()?Ge:L,ze=new ft({max:2**12}),bt=n=>{let t=ze.get(n);if(t)return t;let e=n.normalize("NFKD");return ze.set(n,e),e},Be=new ft({max:2**12}),_t=n=>{let t=Be.get(n);if(t)return t;let e=bt(n.toLowerCase());return Be.set(n,e),e},Wt=class extends ft{constructor(){super({max:256})}},ne=class extends ft{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},Ye=Symbol("PathScurry setAsCwd"),R=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L,s,i,r,o,h){this.name=t,this.#C=r?_t(t):bt(t),this.#e=e&Fi,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue(h.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t(t):bt(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return(this.#e&_)===L}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&_)===Ke}isDirectory(){return(this.#e&_)===U}isCharacterDevice(){return(this.#e&_)===He}isBlockDevice(){return(this.#e&_)===qe}isFIFO(){return(this.#e&_)===Ge}isSocket(){return(this.#e&_)===Ve}isSymbolicLink(){return(this.#e&X)===X}lstatCached(){return this.#e&je?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let t=this.#e&_;return!(t!==L&&t!==X||this.#e&Nt||this.#e&j)}calledReaddir(){return!!(this.#e&se)}isENOENT(){return!!(this.#e&j)}isNamed(t){return this.nocase?this.#C===_t(t):this.#C===bt(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else{for(let h of o)this.#z(h,s);this.#j(s)}this.#H(s.slice(0,s.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else{let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t)}catch(i){this.#I(i.code),t.provisional=0}this.#q=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t)}catch(s){this.#I(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie)return!1;let t=_&this.#e;return t===L||t===U||t===X}shouldWalk(t,e){return(this.#e&U)===U&&!(this.#e&Ie)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}realpathSync(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}[Ye](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent}},Pt=class n extends R{sep="\\";splitSep=Oi;constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return re.parse(t).root}getRoot(t){if(t=Ri(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e,"$1\\"),t===e}},jt=class n extends R{splitSep="/";sep="/";constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt}={}){this.#r=Ue(o),(t instanceof URL||t.startsWith("file://"))&&(t=gi(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt,this.#s=new Wt,this.#n=new ne(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,c=e.sep,d=this.rootPath,f=!1;for(let m of a){let p=u--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(f?"":c)+m}),f=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((f,m)=>{if(f)return d(f);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d()};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w()},!0)},u=t;return new Promise((c,d)=>{l(u,f=>{if(f)return d(f);c(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let u=l.readdirSync();for(let c of u){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let u of l){(!r||r(u))&&(yield s?u:u.fullpath());let c=u;if(u.isSymbolicLink()){if(!(i&&(c=u.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,o)&&h.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=(w,g,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,!0));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=!0));u--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y)}d&&!h.flowing?h.once("drain",c):p||c()},p=!0;f.readdirCB(m,!0),p=!1}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=f.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=!0));u--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}d&&!h.flowing&&h.once("drain",c)};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye](e)}},it=class extends It{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,re,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return re.parse(t).root.toUpperCase()}newRoot(t){return new Pt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt=class extends It{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,mi,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new jt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St=class extends rt{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},Cr=process.platform==="win32"?Pt:jt,Xe=process.platform==="win32"?it:process.platform==="darwin"?St:rt;var Di=n=>n.length>=1,Mi=n=>n.length>=1,Ni=Symbol.for("nodejs.util.inspect.custom"),nt=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=!0;constructor(t,e,s,i){if(!Di(t))throw new TypeError("empty pattern list");if(!Mi(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[u,c,d,f,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[u,c,d,f,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",u=h+"/";this.#t=[l,...o],this.#s=[u,...a],this.length=this.#t.length}}}[Ni](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var _i=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=_i}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ae=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Et=class n{hasWalkedCache;matches=new he;subwalks=new ae;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,u=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,u=!0;if(a=r.pattern(),l=r.rest(),u){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let f=i.parent||i;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var Li=(n,t)=>typeof n=="string"?new ot([n],t):Array.isArray(n)?new ot(n,t):n,zt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Li(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et(this.opts),s)}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,u)=>this.walkCB3(h,u,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},xt=class extends zt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt=class extends zt{results;constructor(t,e,s){super(t,e,s),this.results=new V({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Pi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=Wi(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Pi,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?it:e.platform==="darwin"?St:e.platform?rt:Xe;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let u=h[l];if(!u)throw new Error("invalid pattern object");return new nt(a,u,0,this.platform)})}async walk(){return[...await new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var le=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Bt(n,t={}){return new I(n,t).streamSync()}function Qe(n,t={}){return new I(n,t).stream()}function ts(n,t={}){return new I(n,t).walkSync()}async function Je(n,t={}){return new I(n,t).walk()}function Ut(n,t={}){return new I(n,t).iterateSync()}function es(n,t={}){return new I(n,t).iterate()}var ji=Bt,Ii=Object.assign(Qe,{sync:Bt}),zi=Ut,Bi=Object.assign(es,{sync:Ut}),Ui=Object.assign(ts,{stream:Bt,iterate:Ut}),Ze=Object.assign(Je,{glob:Je,globSync:ts,sync:Ui,globStream:Qe,stream:Ii,globStreamSync:Bt,streamSync:ji,globIterate:es,iterate:Bi,globIterateSync:Ut,iterateSync:zi,Glob:I,hasMagic:le,escape:tt,unescape:W});Ze.glob=Ze;export{I as Glob,ot as Ignore,tt as escape,Ze as glob,es as globIterate,Ut as globIterateSync,Qe as globStream,Bt as globStreamSync,ts as globSync,le as hasMagic,Bi as iterate,zi as iterateSync,Ii as stream,ji as streamSync,Ui as sync,W as unescape}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/glob/dist/esm/pattern.js b/deps/npm/node_modules/glob/dist/esm/pattern.js index b41defa10c6a3a..2f733da5bf4f90 100644 --- a/deps/npm/node_modules/glob/dist/esm/pattern.js +++ b/deps/npm/node_modules/glob/dist/esm/pattern.js @@ -2,6 +2,7 @@ import { GLOBSTAR } from 'minimatch'; const isPatternList = (pl) => pl.length >= 1; const isGlobList = (gl) => gl.length >= 1; +const customInspect = Symbol.for('nodejs.util.inspect.custom'); /** * An immutable-ish view on an array of glob parts and their parsed * results @@ -77,6 +78,9 @@ export class Pattern { } } } + [customInspect]() { + return 'Pattern <' + this.#globList.slice(this.#index).join('/') + '>'; + } /** * The first entry in the parsed list of patterns */ diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index b99bb5fb38f8fc..03ed19143e0c56 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -2,20 +2,30 @@ "author": "Isaac Z. Schlueter (https://blog.izs.me/)", "name": "glob", "description": "the most correct and second fastest glob implementation in JavaScript", - "version": "13.0.1", + "version": "13.0.6", "type": "module", "tshy": { - "main": true, "exports": { "./package.json": "./package.json", - ".": "./src/index.ts" + "./raw": "./src/index.ts", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + } } }, - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", + "module": "./dist/esm/index.min.js", "types": "./dist/commonjs/index.d.ts", "exports": { "./package.json": "./package.json", - ".": { + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -24,6 +34,16 @@ "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } + }, + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } }, "repository": { @@ -37,7 +57,7 @@ "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "npm run benchclean; git push origin --follow-tags", - "prepare": "tshy", + "prepare": "tshy && bash scripts/build.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", "test": "tap", @@ -53,29 +73,26 @@ "benchclean": "node benchclean.cjs" }, "dependencies": { - "minimatch": "^10.1.2", - "minipass": "^7.1.2", - "path-scurry": "^2.0.0" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "devDependencies": { - "@types/node": "^24.10.0", + "@types/node": "^25.3.0", + "esbuild": "^0.27.3", "memfs": "^4.50.0", "mkdirp": "^3.0.1", "prettier": "^3.6.2", - "rimraf": "^6.1.0", - "tap": "^21.1.3", - "tshy": "^3.0.3", - "typedoc": "^0.28.14" - }, - "tap": { - "before": "test/00-setup.ts" + "rimraf": "^6.1.3", + "tap": "^21.6.1", + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "license": "BlueOak-1.0.0", "funding": { "url": "https://github.com/sponsors/isaacs" }, "engines": { - "node": "20 || >=22" - }, - "module": "./dist/esm/index.js" + "node": "18 || 20 || >=22" + } } diff --git a/deps/npm/node_modules/init-package-json/lib/default-input.js b/deps/npm/node_modules/init-package-json/lib/default-input.js index d72feee7f44d3b..7b9c8f440e0dee 100644 --- a/deps/npm/node_modules/init-package-json/lib/default-input.js +++ b/deps/npm/node_modules/init-package-json/lib/default-input.js @@ -2,7 +2,7 @@ const fs = require('fs/promises') const path = require('path') -const validateLicense = require('validate-npm-package-license') +const validateLicense = require('@npmcli/package-json/lib/license') const validateName = require('validate-npm-package-name') const npa = require('npm-package-arg') const semver = require('semver') @@ -264,12 +264,10 @@ if (!package.author) { const license = package.license || getConfig('license') || 'ISC' exports.license = yes ? license : prompt('license', license, (data) => { - const its = validateLicense(data) - if (its.validForNewPackages) { + if (validateLicense(data)) { return data } - const errors = (its.errors || []).concat(its.warnings || []) - return invalid(`Sorry, ${errors.join(' and ')}.`) + return invalid('Sorry, license should be a valid SPDX license expression') }) const type = package.type || getConfig('type') || 'commonjs' diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index f41bb69f756ff2..a6c8213cf53790 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,6 +1,6 @@ { "name": "init-package-json", - "version": "8.2.4", + "version": "8.2.5", "main": "lib/init-package-json.js", "scripts": { "test": "tap", @@ -25,13 +25,12 @@ "promzard": "^3.0.1", "read": "^5.0.1", "semver": "^7.7.2", - "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "^7.0.0" }, "devDependencies": { "@npmcli/config": "^10.0.0", "@npmcli/eslint-config": "^6.0.1", - "@npmcli/template-oss": "4.23.4", + "@npmcli/template-oss": "4.29.0", "tap": "^16.0.1" }, "engines": { @@ -61,7 +60,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.4", + "version": "4.29.0", "publish": true } } diff --git a/deps/npm/node_modules/ip-regex/index.js b/deps/npm/node_modules/ip-regex/index.js deleted file mode 100644 index 1fe723cb7f5a9f..00000000000000 --- a/deps/npm/node_modules/ip-regex/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const word = '[a-fA-F\\d:]'; - -const boundry = options => options && options.includeBoundaries - ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` - : ''; - -const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; - -const v6segment = '[a-fA-F\\d]{1,4}'; - -const v6 = ` -(?: -(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 -)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); - -// Pre-compile only the exact regexes because adding a global flag make regexes stateful -const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`); -const v4exact = new RegExp(`^${v4}$`); -const v6exact = new RegExp(`^${v6}$`); - -const ipRegex = options => options && options.exact - ? v46Exact - : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g'); - -ipRegex.v4 = options => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'); -ipRegex.v6 = options => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'); - -export default ipRegex; diff --git a/deps/npm/node_modules/ip-regex/license b/deps/npm/node_modules/ip-regex/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/ip-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.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/deps/npm/node_modules/ip-regex/package.json b/deps/npm/node_modules/ip-regex/package.json deleted file mode 100644 index 1f82fd5947262b..00000000000000 --- a/deps/npm/node_modules/ip-regex/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ip-regex", - "version": "5.0.0", - "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", - "license": "MIT", - "repository": "sindresorhus/ip-regex", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ip", - "ipv6", - "ipv4", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "text", - "pattern", - "internet", - "protocol", - "address", - "validate" - ], - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.19.1", - "xo": "^0.47.0" - } -} diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json index 413a6ddf4b70a3..ac27bc877aecb5 100644 --- a/deps/npm/node_modules/is-cidr/package.json +++ b/deps/npm/node_modules/is-cidr/package.json @@ -1,6 +1,6 @@ { "name": "is-cidr", - "version": "6.0.2", + "version": "6.0.3", "description": "Check if a string is an IP address in CIDR notation", "author": "silverwind ", "contributors": [ @@ -25,7 +25,8 @@ "devDependencies": { "@types/node": "25.0.10", "eslint": "9.39.2", - "eslint-config-silverwind": "118.0.0", + "eslint-config-silverwind": "120.1.2", + "jest-extended": "7.0.0", "typescript": "5.9.3", "typescript-config-silverwind": "14.0.0", "updates": "17.0.8", @@ -35,4 +36,4 @@ "vitest": "4.0.18", "vitest-config-silverwind": "10.6.1" } -} +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index 671f97f7607790..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable yoda */ -'use strict'; - -const isFullwidthCodePoint = codePoint => { - if (Number.isNaN(codePoint)) { - return false; - } - - // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if ( - codePoint >= 0x1100 && ( - codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= codePoint && codePoint <= 0x4DBF) || - // CJK Unified Ideographs .. Yi Radicals - (0x4E00 <= codePoint && codePoint <= 0xA4C6) || - // Hangul Jamo Extended-A - (0xA960 <= codePoint && codePoint <= 0xA97C) || - // Hangul Syllables - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - // CJK Compatibility Ideographs - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - // Vertical Forms - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - // CJK Compatibility Forms .. Small Form Variants - (0xFE30 <= codePoint && codePoint <= 0xFE6B) || - // Halfwidth and Fullwidth Forms - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || - // Kana Supplement - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - // Enclosed Ideographic Supplement - (0x1F200 <= codePoint && codePoint <= 0x1F251) || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= codePoint && codePoint <= 0x3FFFD) - ) - ) { - return true; - } - - return false; -}; - -module.exports = isFullwidthCodePoint; -module.exports.default = isFullwidthCodePoint; diff --git a/deps/npm/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.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/deps/npm/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 2137e888fa503d..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "is-fullwidth-code-point", - "version": "3.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "string", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/deps/npm/node_modules/isexe/LICENSE.md b/deps/npm/node_modules/isexe/LICENSE.md new file mode 100644 index 00000000000000..c5402b9577a8cd --- /dev/null +++ b/deps/npm/node_modules/isexe/LICENSE.md @@ -0,0 +1,55 @@ +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/deps/npm/node_modules/isexe/dist/cjs/index.js b/deps/npm/node_modules/isexe/dist/commonjs/index.js similarity index 70% rename from deps/npm/node_modules/isexe/dist/cjs/index.js rename to deps/npm/node_modules/isexe/dist/commonjs/index.js index cefcb66b5c5434..71882e7b4d518e 100644 --- a/deps/npm/node_modules/isexe/dist/cjs/index.js +++ b/deps/npm/node_modules/isexe/dist/commonjs/index.js @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; diff --git a/deps/npm/node_modules/isexe/dist/commonjs/index.min.js b/deps/npm/node_modules/isexe/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..7cb0271bca0962 --- /dev/null +++ b/deps/npm/node_modules/isexe/dist/commonjs/index.min.js @@ -0,0 +1,2 @@ +"use strict";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.sync=i.isexe=void 0;var M=require("node:fs"),x=require("node:fs/promises"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt("100",8),l=parseInt("010",8),j=parseInt("001",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.sync=o.isexe=void 0;var T=require("node:fs"),I=require("node:fs/promises"),D=require("node:path"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||""}=e,s=r.split(D.delimiter);if(s.indexOf("")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n { const { ignoreErrors = false } = options; try { - return checkStat((0, fs_1.statSync)(path), options); + return checkStat((0, node_fs_1.statSync)(path), options); } catch (e) { const er = e; diff --git a/deps/npm/node_modules/isexe/dist/cjs/win32.js b/deps/npm/node_modules/isexe/dist/commonjs/win32.js similarity index 83% rename from deps/npm/node_modules/isexe/dist/cjs/win32.js rename to deps/npm/node_modules/isexe/dist/commonjs/win32.js index fa7a4d2f7d240d..c1524a1d533481 100644 --- a/deps/npm/node_modules/isexe/dist/cjs/win32.js +++ b/deps/npm/node_modules/isexe/dist/commonjs/win32.js @@ -7,8 +7,9 @@ */ Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = exports.isexe = void 0; -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); +const node_fs_1 = require("node:fs"); +const promises_1 = require("node:fs/promises"); +const node_path_1 = require("node:path"); /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) @@ -33,7 +34,7 @@ exports.isexe = isexe; const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { - return checkStat((0, fs_1.statSync)(path), path, options); + return checkStat((0, node_fs_1.statSync)(path), path, options); } catch (e) { const er = e; @@ -45,12 +46,12 @@ const sync = (path, options = {}) => { exports.sync = sync; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); + const peSplit = pathExt.split(node_path_1.delimiter); if (peSplit.indexOf('') !== -1) { return true; } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); + for (const pes of peSplit) { + const p = pes.toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; diff --git a/deps/npm/node_modules/isexe/dist/mjs/index.js b/deps/npm/node_modules/isexe/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/index.js rename to deps/npm/node_modules/isexe/dist/esm/index.js diff --git a/deps/npm/node_modules/isexe/dist/esm/index.min.js b/deps/npm/node_modules/isexe/dist/esm/index.min.js new file mode 100644 index 00000000000000..f3a6fc37d6c669 --- /dev/null +++ b/deps/npm/node_modules/isexe/dist/esm/index.min.js @@ -0,0 +1,2 @@ +var y=Object.defineProperty;var u=(t,r)=>{for(var e in r)y(t,e,{get:r[e],enumerable:!0})};var i={};u(i,{isexe:()=>C,sync:()=>A});import{statSync as w}from"node:fs";import{stat as S}from"node:fs/promises";var C=async(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return d(await S(t),r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},A=(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return d(w(t),r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},d=(t,r)=>t.isFile()&&T(t,r),T=(t,r)=>{let e=r.uid??process.getuid?.(),s=r.groups??process.getgroups?.()??[],o=r.gid??process.getgid?.()??s[0];if(e===void 0||o===void 0)throw new Error("cannot get uid or gid");let c=new Set([o,...s]),n=t.mode,l=t.uid,E=t.gid,f=parseInt("100",8),p=parseInt("010",8),x=parseInt("001",8),h=f|p;return!!(n&x||n&p&&c.has(E)||n&f&&l===e||n&h&&e===0)};var a={};u(a,{isexe:()=>F,sync:()=>L});import{statSync as k}from"node:fs";import{stat as I}from"node:fs/promises";import{delimiter as _}from"node:path";var F=async(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return m(await I(t),t,r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},L=(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return m(k(t),t,r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},P=(t,r)=>{let{pathExt:e=process.env.PATHEXT||""}=r,s=e.split(_);if(s.indexOf("")!==-1)return!0;for(let o of s){let c=o.toLowerCase(),n=t.substring(t.length-c.length).toLowerCase();if(c&&n===c)return!0}return!1},m=(t,r,e)=>t.isFile()&&P(r,e);var v=process.env._ISEXE_TEST_PLATFORM_||process.platform,g=v==="win32"?a:i,R=g.isexe,U=g.sync;export{R as isexe,i as posix,U as sync,a as win32}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/isexe/dist/mjs/options.js b/deps/npm/node_modules/isexe/dist/esm/options.js similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/options.js rename to deps/npm/node_modules/isexe/dist/esm/options.js diff --git a/deps/npm/node_modules/isexe/dist/mjs/package.json b/deps/npm/node_modules/isexe/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/package.json rename to deps/npm/node_modules/isexe/dist/esm/package.json diff --git a/deps/npm/node_modules/isexe/dist/mjs/posix.js b/deps/npm/node_modules/isexe/dist/esm/posix.js similarity index 95% rename from deps/npm/node_modules/isexe/dist/mjs/posix.js rename to deps/npm/node_modules/isexe/dist/esm/posix.js index c453776c0452f7..f1af6d51a402da 100644 --- a/deps/npm/node_modules/isexe/dist/mjs/posix.js +++ b/deps/npm/node_modules/isexe/dist/esm/posix.js @@ -4,8 +4,8 @@ * * @module */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; +import { statSync } from 'node:fs'; +import { stat } from 'node:fs/promises'; /** * Determine whether a path is executable according to the mode and * current (or specified) user and group IDs. diff --git a/deps/npm/node_modules/isexe/dist/mjs/win32.js b/deps/npm/node_modules/isexe/dist/esm/win32.js similarity index 86% rename from deps/npm/node_modules/isexe/dist/mjs/win32.js rename to deps/npm/node_modules/isexe/dist/esm/win32.js index a354ee2a5115c7..2c75e67cdfaa2f 100644 --- a/deps/npm/node_modules/isexe/dist/mjs/win32.js +++ b/deps/npm/node_modules/isexe/dist/esm/win32.js @@ -4,8 +4,9 @@ * * @module */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; +import { statSync } from 'node:fs'; +import { stat } from 'node:fs/promises'; +import { delimiter } from 'node:path'; /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) @@ -40,12 +41,12 @@ export const sync = (path, options = {}) => { }; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); + const peSplit = pathExt.split(delimiter); if (peSplit.indexOf('') !== -1) { return true; } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); + for (const pes of peSplit) { + const p = pes.toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; diff --git a/deps/npm/node_modules/isexe/package.json b/deps/npm/node_modules/isexe/package.json index a0e2cd04bfdbfe..31c05fa303078e 100644 --- a/deps/npm/node_modules/isexe/package.json +++ b/deps/npm/node_modules/isexe/package.json @@ -1,96 +1,78 @@ { "name": "isexe", - "version": "3.1.1", + "version": "4.0.0", "description": "Minimal module to check if a file is executable.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/cjs/index.js", + "main": "./dist/commonjs/index.min.js", + "module": "./dist/esm/index.min.js", + "types": "./dist/commonjs/index.d.ts", "files": [ "dist" ], - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" + "tshy": { + "selfLink": false, + "exports": { + "./raw": "./src/index.ts", + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } - }, - "./posix": { + } + }, + "exports": { + "./raw": { "import": { - "types": "./dist/mjs/posix.d.ts", - "default": "./dist/mjs/posix.js" + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" }, "require": { - "types": "./dist/cjs/posix.d.ts", - "default": "./dist/cjs/posix.js" + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" } }, - "./win32": { + "./package.json": "./package.json", + ".": { "import": { - "types": "./dist/mjs/win32.d.ts", - "default": "./dist/mjs/win32.js" + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" }, "require": { - "types": "./dist/cjs/win32.d.ts", - "default": "./dist/cjs/win32.js" + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" } - }, - "./package.json": "./package.json" + } }, "devDependencies": { - "@types/node": "^20.4.5", - "@types/tap": "^15.0.8", - "c8": "^8.0.1", - "mkdirp": "^0.5.1", - "prettier": "^2.8.8", - "rimraf": "^2.5.0", - "sync-content": "^1.0.2", - "tap": "^16.3.8", - "ts-node": "^10.9.1", - "typedoc": "^0.24.8", - "typescript": "^5.1.6" + "@types/node": "^25.2.1", + "esbuild": "^0.27.3", + "prettier": "^3.8.1", + "tap": "^21.5.1", + "tshy": "^3.1.3", + "typedoc": "^0.28.16" }, "scripts": { "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh", + "prepare": "tshy && bash build.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", - "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts" + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "typedoc": "typedoc" }, "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "tap": { - "coverage": false, - "node-arg": [ - "--enable-source-maps", - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, + "license": "BlueOak-1.0.0", "repository": "https://github.com/isaacs/isexe", "engines": { - "node": ">=16" - } + "node": ">=20" + }, + "type": "module" } diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json index b9ef72d8384606..6b250a69ede19d 100644 --- a/deps/npm/node_modules/libnpmaccess/package.json +++ b/deps/npm/node_modules/libnpmaccess/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "repository": { @@ -41,7 +41,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json index 08437c6b874a66..f36856d41fccae 100644 --- a/deps/npm/node_modules/libnpmdiff/package.json +++ b/deps/npm/node_modules/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "8.1.0", + "version": "8.1.2", "description": "The registry diff", "repository": { "type": "git", @@ -43,11 +43,11 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/installed-package-contents": "^4.0.0", "binary-extensions": "^3.0.0", "diff": "^8.0.2", @@ -58,7 +58,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index f868e129482fcf..08c47ec67cc269 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "10.2.0", + "version": "10.2.2", "files": [ "bin/", "lib/" @@ -52,7 +52,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "bin-links": "^6.0.0", "chalk": "^5.2.0", "just-extend": "^6.2.0", @@ -60,7 +60,7 @@ "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/package-json": "^7.0.0", "@npmcli/run-script": "^10.0.0", "ci-info": "^4.0.0", @@ -75,7 +75,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index a5c3305fb7cc6c..1a66e330c2eaef 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "7.0.14", + "version": "7.0.16", "main": "lib/index.js", "files": [ "bin/", @@ -42,18 +42,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0" + "@npmcli/arborist": "^9.3.1" }, "engines": { "node": "^20.17.0 || >=22.9.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json index 9a20ccaf4196fe..0df17f3c1a1322 100644 --- a/deps/npm/node_modules/libnpmorg/package.json +++ b/deps/npm/node_modules/libnpmorg/package.json @@ -29,7 +29,7 @@ ], "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "minipass": "^7.1.1", "nock": "^13.3.3", "tap": "^16.3.8" @@ -50,7 +50,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json index efd125aed5db8e..d0f257cea2b6f1 100644 --- a/deps/npm/node_modules/libnpmpack/package.json +++ b/deps/npm/node_modules/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "9.1.0", + "version": "9.1.2", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -24,7 +24,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "spawk": "^1.7.1", "tap": "^16.3.8" @@ -37,7 +37,7 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/run-script": "^10.0.0", "npm-package-arg": "^13.0.0", "pacote": "^21.0.2" @@ -47,7 +47,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index 65a4ae3c11d0ce..f90a6bf4506ecd 100644 --- a/deps/npm/node_modules/libnpmpublish/package.json +++ b/deps/npm/node_modules/libnpmpublish/package.json @@ -27,7 +27,7 @@ "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "repository": { @@ -52,7 +52,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json index 375025e70e29b2..e17ac5ab98f682 100644 --- a/deps/npm/node_modules/libnpmsearch/package.json +++ b/deps/npm/node_modules/libnpmsearch/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "tap": "^16.3.8" }, @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json index 6f1f0661b3857d..0531259b3e766b 100644 --- a/deps/npm/node_modules/libnpmteam/package.json +++ b/deps/npm/node_modules/libnpmteam/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "tap": "^16.3.8" }, @@ -40,7 +40,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json index e80966b6aeeb8c..cac11cc36bd385 100644 --- a/deps/npm/node_modules/libnpmversion/package.json +++ b/deps/npm/node_modules/libnpmversion/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "require-inject": "^1.4.4", "tap": "^16.3.8" }, @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index 5b271f0dda7aee..1554184f053da4 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "11.2.5", + "version": "11.2.6", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -27,12 +27,12 @@ "preprofile": "npm run prepare", "profile": "make -C benchmark profile" }, - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", "types": "./dist/commonjs/index.d.ts", "tshy": { "exports": { - ".": "./src/index.ts", - "./min": { + "./raw": "./src/index.ts", + ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.min.js" @@ -75,7 +75,7 @@ ] }, "exports": { - ".": { + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -85,7 +85,7 @@ "default": "./dist/commonjs/index.js" } }, - "./min": { + ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.min.js" @@ -97,5 +97,5 @@ } }, "type": "module", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.min.js" } diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/ast.js b/deps/npm/node_modules/minimatch/dist/commonjs/ast.js index 997343fbd1eab1..909b2daa0517dc 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/ast.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/ast.js @@ -122,7 +122,8 @@ class AST { if (p === '') continue; /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + if (typeof p !== 'string' && + !(p instanceof AST && p.#parent === this)) { throw new Error('invalid part: ' + p); } /* c8 ignore stop */ @@ -130,8 +131,10 @@ class AST { } } toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) : [this.type, ...this.#parts.map(p => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); @@ -420,8 +423,8 @@ class AST { !this.#parts.some(s => typeof s !== 'string'); const src = this.#parts .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); this.#hasMagic = this.#hasMagic || hasMagic; this.#uflag = this.#uflag || uflag; @@ -450,7 +453,10 @@ class AST { // no need to prevent dots if it can't match a dot, or if a // sub-pattern will be preventing it anyway. const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; } } } @@ -486,8 +492,8 @@ class AST { return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; } // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ''; @@ -501,20 +507,16 @@ class AST { final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` : `)${this.type}`; final = start + body + close; } @@ -546,6 +548,8 @@ class AST { let escaping = false; let re = ''; let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; for (let i = 0; i < glob.length; i++) { const c = glob.charAt(i); if (escaping) { @@ -553,6 +557,17 @@ class AST { re += (reSpecials.has(c) ? '\\' : '') + c; continue; } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } if (c === '\\') { if (i === glob.length - 1) { re += '\\\\'; @@ -572,11 +587,6 @@ class AST { continue; } } - if (c === '*') { - re += noEmpty && glob === '*' ? starNoEmpty : star; - hasMagic = true; - continue; - } if (c === '?') { re += qmark; hasMagic = true; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js b/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js index 0e13eefc4cfee2..2b7b03712b874e 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -141,10 +141,8 @@ const parseClass = (glob, position) => { } const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; }; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/escape.js b/deps/npm/node_modules/minimatch/dist/commonjs/escape.js index 6fb634fb41033c..83a713a2550770 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/escape.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/escape.js @@ -18,12 +18,12 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {} // that make those magic, and escaping ! as [!] isn't valid, // because [!]] is a valid glob class meaning not ']'. if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/[?*()[\]{}]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&'); } - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&'); }; exports.escape = escape; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/index.js b/deps/npm/node_modules/minimatch/dist/commonjs/index.js index 966dc9b8bb2165..5a0ba2a87fb036 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/index.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/index.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = require("@isaacs/brace-expansion"); +const brace_expansion_1 = require("brace-expansion"); const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); const ast_js_1 = require("./ast.js"); const escape_js_1 = require("./escape.js"); @@ -67,8 +67,8 @@ const qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== '.' && f !== '..'; }; /* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__) || process.platform @@ -154,7 +154,7 @@ const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return (0, brace_expansion_1.expand)(pattern); + return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax }); }; exports.braceExpand = braceExpand; exports.minimatch.braceExpand = exports.braceExpand; @@ -210,8 +210,10 @@ class Minimatch { this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + !!options.windowsPathsNoEscape || options[awe] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, '/'); } @@ -224,8 +226,8 @@ class Minimatch { this.partial = !!options.partial; this.nocase = !!this.options.nocase; this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); this.globSet = []; this.globParts = []; @@ -288,7 +290,10 @@ class Minimatch { !globMagic.test(s[3]); const isDrive = /^[a-z]:/i.test(s[0]); if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; } else if (isDrive) { return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; @@ -320,7 +325,7 @@ class Minimatch { // to the right as possible, even if it increases the number // of patterns that we have to process. preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * + // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { for (let i = 0; i < globParts.length; i++) { for (let j = 0; j < globParts[i].length; j++) { @@ -624,10 +629,17 @@ class Minimatch { pattern[2] === '?' && typeof pattern[3] === 'string' && /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + const fdi = fileUNC ? 3 + : fileDrive ? 0 + : undefined; + const pdi = patternUNC ? 3 + : patternDrive ? 0 + : undefined; if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; + const [fd, pd] = [ + file[fdi], + pattern[pdi], + ]; if (fd.toLowerCase() === pd.toLowerCase()) { pattern[pdi] = fd; if (pdi > fdi) { @@ -808,21 +820,19 @@ class Minimatch { fastTest = options.dot ? starTestDot : starTest; } else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + starDotExtTestNocaseDot : starDotExtTestNocase - : options.dot - ? starDotExtTestDot + : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]); } else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + qmarksTestNocaseDot : qmarksTestNocase - : options.dot - ? qmarksTestDot + : options.dot ? qmarksTestDot : qmarksTest)(m); } else if ((m = pattern.match(starDotStarRE))) { @@ -853,10 +863,8 @@ class Minimatch { return this.regexp; } const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot : twoStarNoDot; const flags = new Set(options.nocase ? ['i'] : []); // regexpify non-globstar patterns @@ -872,11 +880,9 @@ class Minimatch { for (const f of p.flags.split('')) flags.add(f); } - return typeof p === 'string' - ? regExpEscape(p) - : p === exports.GLOBSTAR - ? exports.GLOBSTAR - : p._src; + return (typeof p === 'string' ? regExpEscape(p) + : p === exports.GLOBSTAR ? exports.GLOBSTAR + : p._src); }); pp.forEach((p, i) => { const next = pp[i + 1]; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js b/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js index 171098d8a4ceb5..db8d0c847d21b1 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js @@ -22,14 +22,14 @@ exports.unescape = void 0; */ const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => { if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2') .replace(/\\([^\/])/g, '$1'); } - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\{}])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\{}])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2') .replace(/\\([^\/{}])/g, '$1'); diff --git a/deps/npm/node_modules/minimatch/dist/esm/ast.js b/deps/npm/node_modules/minimatch/dist/esm/ast.js index 0ae609ad10d519..bcc9d72b0f9cc0 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/ast.js +++ b/deps/npm/node_modules/minimatch/dist/esm/ast.js @@ -119,7 +119,8 @@ export class AST { if (p === '') continue; /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + if (typeof p !== 'string' && + !(p instanceof AST && p.#parent === this)) { throw new Error('invalid part: ' + p); } /* c8 ignore stop */ @@ -127,8 +128,10 @@ export class AST { } } toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) : [this.type, ...this.#parts.map(p => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); @@ -417,8 +420,8 @@ export class AST { !this.#parts.some(s => typeof s !== 'string'); const src = this.#parts .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); this.#hasMagic = this.#hasMagic || hasMagic; this.#uflag = this.#uflag || uflag; @@ -447,7 +450,10 @@ export class AST { // no need to prevent dots if it can't match a dot, or if a // sub-pattern will be preventing it anyway. const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; } } } @@ -483,8 +489,8 @@ export class AST { return [s, unescape(this.toString()), false, false]; } // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ''; @@ -498,20 +504,16 @@ export class AST { final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` : `)${this.type}`; final = start + body + close; } @@ -543,6 +545,8 @@ export class AST { let escaping = false; let re = ''; let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; for (let i = 0; i < glob.length; i++) { const c = glob.charAt(i); if (escaping) { @@ -550,6 +554,17 @@ export class AST { re += (reSpecials.has(c) ? '\\' : '') + c; continue; } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } if (c === '\\') { if (i === glob.length - 1) { re += '\\\\'; @@ -569,11 +584,6 @@ export class AST { continue; } } - if (c === '*') { - re += noEmpty && glob === '*' ? starNoEmpty : star; - hasMagic = true; - continue; - } if (c === '?') { re += qmark; hasMagic = true; diff --git a/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js b/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js index c629d6ae816e27..4b49d40bd74210 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js +++ b/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js @@ -138,10 +138,8 @@ export const parseClass = (glob, position) => { } const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; }; diff --git a/deps/npm/node_modules/minimatch/dist/esm/escape.js b/deps/npm/node_modules/minimatch/dist/esm/escape.js index bab968ff3d83c9..46d0ec8858e5b3 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/escape.js +++ b/deps/npm/node_modules/minimatch/dist/esm/escape.js @@ -15,12 +15,12 @@ export const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, // that make those magic, and escaping ! as [!] isn't valid, // because [!]] is a valid glob class meaning not ']'. if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/[?*()[\]{}]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&'); } - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&'); }; //# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/esm/index.js b/deps/npm/node_modules/minimatch/dist/esm/index.js index e83823fa6e1b55..3175327db5efbf 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/index.js +++ b/deps/npm/node_modules/minimatch/dist/esm/index.js @@ -1,4 +1,4 @@ -import { expand } from '@isaacs/brace-expansion'; +import { expand } from 'brace-expansion'; import { assertValidPattern } from './assert-valid-pattern.js'; import { AST } from './ast.js'; import { escape } from './escape.js'; @@ -63,8 +63,8 @@ const qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== '.' && f !== '..'; }; /* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__) || process.platform @@ -148,7 +148,7 @@ export const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return expand(pattern); + return expand(pattern, { max: options.braceExpandMax }); }; minimatch.braceExpand = braceExpand; // parse a component of the expanded set. @@ -201,8 +201,10 @@ export class Minimatch { this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + !!options.windowsPathsNoEscape || options[awe] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, '/'); } @@ -215,8 +217,8 @@ export class Minimatch { this.partial = !!options.partial; this.nocase = !!this.options.nocase; this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); this.globSet = []; this.globParts = []; @@ -279,7 +281,10 @@ export class Minimatch { !globMagic.test(s[3]); const isDrive = /^[a-z]:/i.test(s[0]); if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; } else if (isDrive) { return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; @@ -311,7 +316,7 @@ export class Minimatch { // to the right as possible, even if it increases the number // of patterns that we have to process. preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * + // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { for (let i = 0; i < globParts.length; i++) { for (let j = 0; j < globParts[i].length; j++) { @@ -615,10 +620,17 @@ export class Minimatch { pattern[2] === '?' && typeof pattern[3] === 'string' && /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + const fdi = fileUNC ? 3 + : fileDrive ? 0 + : undefined; + const pdi = patternUNC ? 3 + : patternDrive ? 0 + : undefined; if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; + const [fd, pd] = [ + file[fdi], + pattern[pdi], + ]; if (fd.toLowerCase() === pd.toLowerCase()) { pattern[pdi] = fd; if (pdi > fdi) { @@ -799,21 +811,19 @@ export class Minimatch { fastTest = options.dot ? starTestDot : starTest; } else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + starDotExtTestNocaseDot : starDotExtTestNocase - : options.dot - ? starDotExtTestDot + : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]); } else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + qmarksTestNocaseDot : qmarksTestNocase - : options.dot - ? qmarksTestDot + : options.dot ? qmarksTestDot : qmarksTest)(m); } else if ((m = pattern.match(starDotStarRE))) { @@ -844,10 +854,8 @@ export class Minimatch { return this.regexp; } const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot : twoStarNoDot; const flags = new Set(options.nocase ? ['i'] : []); // regexpify non-globstar patterns @@ -863,11 +871,9 @@ export class Minimatch { for (const f of p.flags.split('')) flags.add(f); } - return typeof p === 'string' - ? regExpEscape(p) - : p === GLOBSTAR - ? GLOBSTAR - : p._src; + return (typeof p === 'string' ? regExpEscape(p) + : p === GLOBSTAR ? GLOBSTAR + : p._src); }); pp.forEach((p, i) => { const next = pp[i + 1]; diff --git a/deps/npm/node_modules/minimatch/dist/esm/unescape.js b/deps/npm/node_modules/minimatch/dist/esm/unescape.js index dfa408d39853bc..b31bd40a028407 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/unescape.js +++ b/deps/npm/node_modules/minimatch/dist/esm/unescape.js @@ -19,14 +19,14 @@ */ export const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => { if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2') .replace(/\\([^\/])/g, '$1'); } - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\{}])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\{}])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2') .replace(/\\([^\/{}])/g, '$1'); diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 74b945eb60d713..6d4fc25af97a05 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "10.1.2", + "version": "10.2.2", "repository": { "type": "git", "url": "git@github.com:isaacs/minimatch" @@ -34,18 +34,18 @@ "presnap": "npm run prepare", "test": "tap", "snap": "tap", - "format": "prettier --write . --log-level warn", + "format": "prettier --write .", "benchmark": "node benchmark/index.js", "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "devDependencies": { - "@types/node": "^24.0.0", + "@types/node": "^25.3.0", "mkdirp": "^3.0.1", "prettier": "^3.6.2", - "tap": "^21.1.0", + "tap": "^21.6.1", "tshy": "^3.0.2", "typedoc": "^0.28.5" }, @@ -62,6 +62,6 @@ "type": "module", "module": "./dist/esm/index.js", "dependencies": { - "@isaacs/brace-expansion": "^5.0.1" + "brace-expansion": "^5.0.2" } } diff --git a/deps/npm/node_modules/yallist/LICENSE b/deps/npm/node_modules/minipass-flush/node_modules/yallist/LICENSE similarity index 100% rename from deps/npm/node_modules/yallist/LICENSE rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/LICENSE diff --git a/deps/npm/node_modules/yallist/iterator.js b/deps/npm/node_modules/minipass-flush/node_modules/yallist/iterator.js similarity index 100% rename from deps/npm/node_modules/yallist/iterator.js rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/iterator.js diff --git a/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json b/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json new file mode 100644 index 00000000000000..8a083867d72e00 --- /dev/null +++ b/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/deps/npm/node_modules/yallist/yallist.js b/deps/npm/node_modules/minipass-flush/node_modules/yallist/yallist.js similarity index 100% rename from deps/npm/node_modules/yallist/yallist.js rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/yallist.js diff --git a/deps/npm/node_modules/minipass/LICENSE b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE similarity index 90% rename from deps/npm/node_modules/minipass/LICENSE rename to deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE index 97f8e32ed82e4c..19129e315fe593 100644 --- a/deps/npm/node_modules/minipass/LICENSE +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors +Copyright (c) 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/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..d41c97a19f9849 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json new file mode 100644 index 00000000000000..8a083867d72e00 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js new file mode 100644 index 00000000000000..4e83ab1c542a51 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/deps/npm/node_modules/minipass/LICENSE.md b/deps/npm/node_modules/minipass/LICENSE.md new file mode 100644 index 00000000000000..c5402b9577a8cd --- /dev/null +++ b/deps/npm/node_modules/minipass/LICENSE.md @@ -0,0 +1,55 @@ +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/deps/npm/node_modules/minipass/dist/commonjs/index.js b/deps/npm/node_modules/minipass/dist/commonjs/index.js index 068c095b697932..91f3a5cfc7a0b9 100644 --- a/deps/npm/node_modules/minipass/dist/commonjs/index.js +++ b/deps/npm/node_modules/minipass/dist/commonjs/index.js @@ -22,7 +22,11 @@ const isStream = (s) => !!s && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports.isReadable)(s) || - (0, exports.isWritable)(s)); + (0, exports.isWritable)(s)) +/** + * Return true if the argument is a valid {@link Minipass.Readable} + */ +; exports.isStream = isStream; /** * Return true if the argument is a valid {@link Minipass.Readable} @@ -32,7 +36,11 @@ const isReadable = (s) => !!s && s instanceof node_events_1.EventEmitter && typeof s.pipe === 'function' && // node core Writable streams have a pipe() method, but it throws - s.pipe !== node_stream_1.default.Writable.prototype.pipe; + s.pipe !== node_stream_1.default.Writable.prototype.pipe +/** + * Return true if the argument is a valid {@link Minipass.Writable} + */ +; exports.isReadable = isReadable; /** * Return true if the argument is a valid {@link Minipass.Writable} @@ -129,7 +137,7 @@ class PipeProxyErrors extends Pipe { } constructor(src, dest, opts) { super(src, dest, opts); - this.proxyErrors = er => dest.emit('error', er); + this.proxyErrors = (er) => this.dest.emit('error', er); src.on('error', this.proxyErrors); } } @@ -939,6 +947,7 @@ class Minipass extends node_events_1.EventEmitter { [Symbol.asyncIterator]() { return this; }, + [Symbol.asyncDispose]: async () => { }, }; } /** @@ -976,6 +985,7 @@ class Minipass extends node_events_1.EventEmitter { [Symbol.iterator]() { return this; }, + [Symbol.dispose]: () => { }, }; } /** diff --git a/deps/npm/node_modules/minipass/dist/esm/index.js b/deps/npm/node_modules/minipass/dist/esm/index.js index b5fa4513c90838..5df55461e3d491 100644 --- a/deps/npm/node_modules/minipass/dist/esm/index.js +++ b/deps/npm/node_modules/minipass/dist/esm/index.js @@ -120,7 +120,7 @@ class PipeProxyErrors extends Pipe { } constructor(src, dest, opts) { super(src, dest, opts); - this.proxyErrors = er => dest.emit('error', er); + this.proxyErrors = (er) => this.dest.emit('error', er); src.on('error', this.proxyErrors); } } @@ -930,6 +930,7 @@ export class Minipass extends EventEmitter { [Symbol.asyncIterator]() { return this; }, + [Symbol.asyncDispose]: async () => { }, }; } /** @@ -967,6 +968,7 @@ export class Minipass extends EventEmitter { [Symbol.iterator]() { return this; }, + [Symbol.dispose]: () => { }, }; } /** diff --git a/deps/npm/node_modules/minipass/package.json b/deps/npm/node_modules/minipass/package.json index 771969b0285469..800f215cb02c01 100644 --- a/deps/npm/node_modules/minipass/package.json +++ b/deps/npm/node_modules/minipass/package.json @@ -1,13 +1,14 @@ { "name": "minipass", - "version": "7.1.2", + "version": "7.1.3", "description": "minimal implementation of a PassThrough stream", "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", "type": "module", "tshy": { "selfLink": false, - "main": true, + "compiler": "tsgo", "exports": { "./package.json": "./package.json", ".": "./src/index.ts" @@ -54,14 +55,14 @@ }, "devDependencies": { "@types/end-of-stream": "^1.4.2", - "@types/node": "^20.1.2", + "@types/node": "^25.2.3", "end-of-stream": "^1.4.0", "node-abort-controller": "^3.1.1", - "prettier": "^2.6.2", - "tap": "^19.0.0", + "prettier": "^3.8.1", + "tap": "^21.6.1", "through2": "^2.0.3", - "tshy": "^1.14.0", - "typedoc": "^0.25.1" + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "repository": "https://github.com/isaacs/minipass", "keywords": [ @@ -69,14 +70,8 @@ "stream" ], "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" - }, - "tap": { - "typecheck": true, - "include": [ - "test/*.ts" - ] } } diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md index ac0c0fade12f14..8d1d95d82ac99d 100644 --- a/deps/npm/node_modules/pacote/README.md +++ b/deps/npm/node_modules/pacote/README.md @@ -147,15 +147,24 @@ Options object is cloned, and mutated along the way to add integrity, resolved, There must be a configured `_keys` entry in the config that is scoped to the registry the manifest is being fetched from. * `tufCache` Where to store metadata/target files when retrieving the package attestation key material via TUF. Defaults to the same cache directory that npm will use by default, based on platform and environment. -* `allowGit` Whether or not to allow data to be fetched from git. +* `allowGit` Whether or not to allow data to be fetched from a git spec. Possible values are `all`, `none`, or `root`. Defaults to `all`. `all` means git is allowed `none` means git is not allowed `root` means that git is only allowed if fetching from a root context. Context for whether or not the package being fetched is `root` is set via the `_isRoot` option. +* `allowRemote` Whether or not to allow data to be fetched from remote specs. + Possible values and defaults are the same as `allowGit` +* `allowFile` Whether or not to allow data to be fetched from file specs. + Possible values and defaults are the same as `allowGit` +* `allowDirectory` Whether or not to allow data to be fetched from directory specs. + Possible values and defaults are the same as `allowGit` * `_isRoot` Whether or not the package being fetched is in a root context. - For `npm` itself this means a package that is defined in the local project or workspace package.json, or a package that is being fetched for another command like `npm view`. + Defaults to `false`, + For `npm` itself this means a package that is defined in the local project or workspace package.json, or a package that is being fetched for another command like `npm view`. This informs the `allowX` options to let them know the context of the current request. + +For more info on spec types (i.e. git, remote) see [npm-package-arg](npm.im/npm-package-arg) ### Advanced API diff --git a/deps/npm/node_modules/pacote/lib/fetcher.js b/deps/npm/node_modules/pacote/lib/fetcher.js index 8d52d28eefd4d8..0ce7aedb13eda9 100644 --- a/deps/npm/node_modules/pacote/lib/fetcher.js +++ b/deps/npm/node_modules/pacote/lib/fetcher.js @@ -470,14 +470,20 @@ const DirFetcher = require('./dir.js') const RemoteFetcher = require('./remote.js') // possible values for allow: 'all', 'root', 'none' -const canUseGit = (allow = 'all', isRoot = false) => { +const canUse = ({ allow = 'all', isRoot = false, allowType, spec }) => { if (allow === 'all') { return true } if (allow !== 'none' && isRoot) { return true } - return false + throw Object.assign( + new Error(`Fetching${allow === 'root' ? ' non-root' : ''} packages of type "${allowType}" have been disabled`), + { + code: `EALLOW${allowType.toUpperCase()}`, + package: spec.toString(), + } + ) } // Get an appropriate fetcher object from a spec and options @@ -485,18 +491,11 @@ FetcherBase.get = (rawSpec, opts = {}) => { const spec = npa(rawSpec, opts.where) switch (spec.type) { case 'git': - if (!canUseGit(opts.allowGit, opts._isRoot)) { - throw Object.assign( - new Error(`Fetching${opts.allowGit === 'root' ? ' non-root' : ''} packages from git has been disabled`), - { - code: 'EALLOWGIT', - package: spec.toString(), - } - ) - } + canUse({ allow: opts.allowGit, isRoot: opts._isRoot, allowType: 'git', spec }) return new GitFetcher(spec, opts) case 'remote': + canUse({ allow: opts.allowRemote, isRoot: opts._isRoot, allowType: 'remote', spec }) return new RemoteFetcher(spec, opts) case 'version': @@ -506,9 +505,11 @@ FetcherBase.get = (rawSpec, opts = {}) => { return new RegistryFetcher(spec.subSpec || spec, opts) case 'file': + canUse({ allow: opts.allowFile, isRoot: opts._isRoot, allowType: 'file', spec }) return new FileFetcher(spec, opts) case 'directory': + canUse({ allow: opts.allowDirectory, isRoot: opts._isRoot, allowType: 'directory', spec }) return new DirFetcher(spec, opts) default: diff --git a/deps/npm/node_modules/pacote/lib/git.js b/deps/npm/node_modules/pacote/lib/git.js index 077193a86f026f..8faf125c6e5e57 100644 --- a/deps/npm/node_modules/pacote/lib/git.js +++ b/deps/npm/node_modules/pacote/lib/git.js @@ -12,7 +12,7 @@ const _ = require('./util/protected.js') const addGitSha = require('./util/add-git-sha.js') const npm = require('./util/npm.js') -const hashre = /^[a-f0-9]{40}$/ +const hashre = /^[a-f0-9]{40,64}$/ // get the repository url. // prefer https if there's auth, since ssh will drop that. @@ -25,6 +25,14 @@ const repoUrl = (h, opts) => // add git+ to the url, but only one time. const addGitPlus = url => url && `git+${url}`.replace(/^(git\+)+/, 'git+') +const checkoutError = (expected, found) => { + const err = new Error(`Commit mismatch: expected SHA ${expected} and cloned HEAD ${found}`) + err.code = 'EGITCHECKOUT' + err.sha = expected + err.head = found + return err +} + class GitFetcher extends Fetcher { constructor (spec, opts) { super(spec, opts) @@ -245,7 +253,7 @@ class GitFetcher extends Fetcher { pkgid: `git:${nameat}${this.resolved}`, resolved: this.resolved, integrity: null, // it'll always be different, if we have one - }).extract(tmp).then(() => handler(tmp), er => { + }).extract(tmp).then(() => handler(`${tmp}${this.spec.gitSubdir || ''}`), er => { // fall back to ssh download if tarball fails if (er.constructor.name.match(/^Http/)) { return this.#clone(handler, false) @@ -259,11 +267,15 @@ class GitFetcher extends Fetcher { h ? this.#cloneHosted(ref, tmp) : this.#cloneRepo(this.spec.fetchSpec, ref, tmp) ) + // if we already have a resolved sha ensure it doesn't change + if (this.resolvedSha && this.resolvedSha !== sha) { + throw checkoutError(this.resolvedSha, sha) + } this.resolvedSha = sha if (!this.resolved) { await this.#addGitSha(sha) } - return handler(tmp) + return handler(`${tmp}${this.spec.gitSubdir || ''}`) }) } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index b0cef67100abb5..3a1eafd46272a6 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "21.1.0", + "version": "21.3.1", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { diff --git a/deps/npm/node_modules/path-scurry/package.json b/deps/npm/node_modules/path-scurry/package.json index 831f23469b7865..68123fb70f16be 100644 --- a/deps/npm/node_modules/path-scurry/package.json +++ b/deps/npm/node_modules/path-scurry/package.json @@ -1,6 +1,6 @@ { "name": "path-scurry", - "version": "2.0.1", + "version": "2.0.2", "description": "walk paths fast and efficiently", "author": "Isaac Z. Schlueter (https://blog.izs.me)", "main": "./dist/commonjs/index.js", @@ -35,35 +35,19 @@ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", "bench": "bash ./scripts/bench.sh" }, - "prettier": { - "experimentalTernaries": true, - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, "devDependencies": { - "@nodelib/fs.walk": "^2.0.0", - "@types/node": "^20.14.10", + "@nodelib/fs.walk": "^3.0.1", + "@types/node": "^25.3.0", "mkdirp": "^3.0.0", "prettier": "^3.3.2", - "rimraf": "^5.0.8", - "tap": "^20.0.3", + "rimraf": "^6.1.3", + "tap": "^21.6.1", "ts-node": "^10.9.2", - "tshy": "^2.0.1", - "typedoc": "^0.26.3", - "typescript": "^5.5.3" - }, - "tap": { - "typecheck": true + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index 67c311f87ca3cd..f6503bfefd4640 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -110,8 +110,9 @@ Options: -l --loose Interpret versions and ranges loosely --n <0|1> - This is the base to be used for the prerelease identifier. +-n <0|1|false> + Base number for prerelease identifier (default: 0). + Use false to omit the number altogether. -p --include-prerelease Always include prerelease versions in range matching diff --git a/deps/npm/node_modules/semver/bin/semver.js b/deps/npm/node_modules/semver/bin/semver.js index dbb1bf534ec722..d62bfc0ecd5216 100755 --- a/deps/npm/node_modules/semver/bin/semver.js +++ b/deps/npm/node_modules/semver/bin/semver.js @@ -105,7 +105,7 @@ const main = () => { versions = versions.map((v) => { return coerce ? (semver.coerce(v, options) || { version: v }).version : v }).filter((v) => { - return semver.valid(v) + return semver.valid(v, options) }) if (!versions.length) { return fail() diff --git a/deps/npm/node_modules/semver/functions/diff.js b/deps/npm/node_modules/semver/functions/diff.js index 04e064e9196b58..c99ab51cc57169 100644 --- a/deps/npm/node_modules/semver/functions/diff.js +++ b/deps/npm/node_modules/semver/functions/diff.js @@ -53,7 +53,7 @@ const diff = (version1, version2) => { return prefix + 'patch' } - // high and low are preleases + // high and low are prereleases return 'prerelease' } diff --git a/deps/npm/node_modules/semver/internal/re.js b/deps/npm/node_modules/semver/internal/re.js index 4758c58d424a9b..639fca89de8e63 100644 --- a/deps/npm/node_modules/semver/internal/re.js +++ b/deps/npm/node_modules/semver/internal/re.js @@ -78,8 +78,8 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -// Non-numberic identifiers include numberic identifiers but can be longer. -// Therefore non-numberic identifiers must go first. +// Non-numeric identifiers include numeric identifiers but can be longer. +// Therefore non-numeric identifiers must go first. createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] }|${src[t.NUMERICIDENTIFIER]})`) diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index 2b8cadaa2387ed..a84de916085998 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "name": "semver", - "version": "7.7.3", + "version": "7.7.4", "description": "The semantic version parser used by npm.", "main": "index.js", "scripts": { @@ -14,8 +14,8 @@ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.29.0", "benchmark": "^2.1.4", "tap": "^16.0.0" }, @@ -52,7 +52,7 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "engines": ">=10", "distPaths": [ "classes/", diff --git a/deps/npm/node_modules/semver/ranges/subset.js b/deps/npm/node_modules/semver/ranges/subset.js index 2c49aef1be5e87..99f43218075c86 100644 --- a/deps/npm/node_modules/semver/ranges/subset.js +++ b/deps/npm/node_modules/semver/ranges/subset.js @@ -38,7 +38,7 @@ const compare = require('../functions/compare.js') // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode +// - If LT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the LT.semver tuple, return false // - Else return true diff --git a/deps/npm/node_modules/spdx-correct/LICENSE b/deps/npm/node_modules/spdx-correct/LICENSE deleted file mode 100644 index d645695673349e..00000000000000 --- a/deps/npm/node_modules/spdx-correct/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/deps/npm/node_modules/spdx-correct/index.js b/deps/npm/node_modules/spdx-correct/index.js deleted file mode 100644 index 4d9037e0cc4355..00000000000000 --- a/deps/npm/node_modules/spdx-correct/index.js +++ /dev/null @@ -1,386 +0,0 @@ -/* -Copyright spdx-correct.js contributors - -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. -*/ -var parse = require('spdx-expression-parse') -var spdxLicenseIds = require('spdx-license-ids') - -function valid (string) { - try { - parse(string) - return true - } catch (error) { - return false - } -} - -// Sorting function that orders the given array of transpositions such -// that a transposition with the longer pattern comes before a transposition -// with a shorter pattern. This is to prevent e.g. the transposition -// ["General Public License", "GPL"] from matching to "Lesser General Public License" -// before a longer and more accurate transposition ["Lesser General Public License", "LGPL"] -// has a chance to be recognized. -function sortTranspositions(a, b) { - var length = b[0].length - a[0].length - if (length !== 0) return length - return a[0].toUpperCase().localeCompare(b[0].toUpperCase()) -} - -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU LGPL', 'LGPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL'], - ['GNU Lesser General Public License', 'LGPL'], - ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], - ['GNU Lesser General Public License', 'LGPL-2.1'], - ['LESSER GENERAL PUBLIC LICENSE', 'LGPL'], - ['Lesser General Public License', 'LGPL'], - ['LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], - ['Lesser General Public License', 'LGPL-2.1'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['Universal Permissive License', 'UPL'], - ['WTH', 'WTF'], - ['WTFGPL', 'WTFPL'], - ['-License', ''] -].sort(sortTranspositions) - -var TRANSPOSED = 0 -var CORRECT = 1 - -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function (argument) { - return argument.toUpperCase() - }, - // e.g. 'MIT ' - function (argument) { - return argument.trim() - }, - // e.g. 'M.I.T.' - function (argument) { - return argument.replace(/\./g, '') - }, - // e.g. 'Apache- 2.0' - function (argument) { - return argument.replace(/\s+/g, '') - }, - // e.g. 'CC BY 4.0'' - function (argument) { - return argument.replace(/\s+/g, '-') - }, - // e.g. 'LGPLv2.1' - function (argument) { - return argument.replace('v', '-') - }, - // e.g. 'Apache 2.0' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1') - }, - // e.g. 'GPL 2' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0') - }, - // e.g. 'Apache Version 2.0' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2') - }, - // e.g. 'Apache Version 2' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0') - }, - // e.g. 'ZLIB' - function (argument) { - return argument[0].toUpperCase() + argument.slice(1) - }, - // e.g. 'MPL/2.0' - function (argument) { - return argument.replace('/', '-') - }, - // e.g. 'Apache 2' - function (argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0') - }, - // e.g. 'GPL-2.0', 'GPL-3.0' - function (argument) { - if (argument.indexOf('3.0') !== -1) { - return argument + '-or-later' - } else { - return argument + '-only' - } - }, - // e.g. 'GPL-2.0-' - function (argument) { - return argument + 'only' - }, - // e.g. 'GPL2' - function (argument) { - return argument.replace(/(\d)$/, '-$1.0') - }, - // e.g. 'BSD 3' - function (argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause') - }, - // e.g. 'BSD clause 3' - function (argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') - }, - // e.g. 'New BSD license' - function (argument) { - return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause') - }, - // e.g. 'Simplified BSD license' - function (argument) { - return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause') - }, - // e.g. 'Free BSD license' - function (argument) { - return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD') - }, - // e.g. 'Clear BSD license' - function (argument) { - return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear') - }, - // e.g. 'Old BSD License' - function (argument) { - return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-Clause') - }, - // e.g. 'BY-NC-4.0' - function (argument) { - return 'CC-' + argument - }, - // e.g. 'BY-NC' - function (argument) { - return 'CC-' + argument + '-4.0' - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0' - } -] - -var licensesWithVersions = spdxLicenseIds - .map(function (id) { - var match = /^(.*)-\d+\.\d+$/.exec(id) - return match - ? [match[0], match[1]] - : [id, null] - }) - .reduce(function (objectMap, item) { - var key = item[1] - objectMap[key] = objectMap[key] || [] - objectMap[key].push(item[0]) - return objectMap - }, {}) - -var licensesWithOneVersion = Object.keys(licensesWithVersions) - .map(function makeEntries (key) { - return [key, licensesWithVersions[key]] - }) - .filter(function identifySoleVersions (item) { - return ( - // Licenses has just one valid version suffix. - item[1].length === 1 && - item[0] !== null && - // APL will be considered Apache, rather than APL-1.0 - item[0] !== 'APL' - ) - }) - .map(function createLastResorts (item) { - return [item[0], item[1][0]] - }) - -licensesWithVersions = undefined - -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0-or-later'], - ['AGPL', 'AGPL-3.0-or-later'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0-or-later'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['CDDL', 'CDDL-1.1'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0-or-later'], - ['LGPL', 'LGPL-3.0-or-later'], - ['GPLV1', 'GPL-1.0-only'], - ['GPL-1', 'GPL-1.0-only'], - ['GPLV2', 'GPL-2.0-only'], - ['GPL-2', 'GPL-2.0-only'], - ['GPL', 'GPL-3.0-or-later'], - ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -].concat(licensesWithOneVersion).sort(sortTranspositions) - -var SUBSTRING = 0 -var IDENTIFIER = 1 - -var validTransformation = function (identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier).trim() - if (transformed !== identifier && valid(transformed)) { - return transformed - } - } - return null -} - -var validLastResort = function (identifier) { - var upperCased = identifier.toUpperCase() - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i] - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER] - } - } - return null -} - -var anyCorrection = function (identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i] - var transposed = transposition[TRANSPOSED] - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ) - var checked = check(corrected) - if (checked !== null) { - return checked - } - } - } - return null -} - -module.exports = function (identifier, options) { - options = options || {} - var upgrade = options.upgrade === undefined ? true : !!options.upgrade - function postprocess (value) { - return upgrade ? upgradeGPLs(value) : value - } - var validArugment = ( - typeof identifier === 'string' && - identifier.trim().length !== 0 - ) - if (!validArugment) { - throw Error('Invalid argument. Expected non-empty string.') - } - identifier = identifier.trim() - if (valid(identifier)) { - return postprocess(identifier) - } - var noPlus = identifier.replace(/\+$/, '').trim() - if (valid(noPlus)) { - return postprocess(noPlus) - } - var transformed = validTransformation(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, function (argument) { - if (valid(argument)) { - return argument - } - return validTransformation(argument) - }) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = validLastResort(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, validLastResort) - if (transformed !== null) { - return postprocess(transformed) - } - return null -} - -function upgradeGPLs (value) { - if ([ - 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0', - 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0', - 'LGPL-2.1' - ].indexOf(value) !== -1) { - return value + '-only' - } else if ([ - 'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+', - 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+', - 'AGPL-1.0+', 'AGPL-3.0+' - ].indexOf(value) !== -1) { - return value.replace(/\+$/, '-or-later') - } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) { - return value + '-or-later' - } else { - return value - } -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 257a76b9484c12..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe -Antoine Motet diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618eaba6c89..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -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/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 52fab560aea707..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -var scan = require('./scan') -var parse = require('./parse') - -module.exports = function (source) { - return parse(scan(source)) -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index c9edc9f939cdf6..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-expression-parse", - "description": "parse SPDX license expressions", - "version": "3.0.1", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "files": [ - "AUTHORS", - "index.js", - "parse.js", - "scan.js" - ], - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.1.0" - }, - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "MIT", - "repository": "jslicense/spdx-expression-parse.js", - "scripts": { - "lint": "standard", - "test:readme": "defence -i javascript README.md | replace-require-self | node", - "test:suite": "node test.js", - "test": "npm run test:suite && npm run test:readme" - } -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js deleted file mode 100644 index 5a00b45c5799c4..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -// The ABNF grammar in the spec is totally ambiguous. -// -// This parser follows the operator precedence defined in the -// `Order of Precedence and Parentheses` section. - -module.exports = function (tokens) { - var index = 0 - - function hasMore () { - return index < tokens.length - } - - function token () { - return hasMore() ? tokens[index] : null - } - - function next () { - if (!hasMore()) { - throw new Error() - } - index++ - } - - function parseOperator (operator) { - var t = token() - if (t && t.type === 'OPERATOR' && operator === t.string) { - next() - return t.string - } - } - - function parseWith () { - if (parseOperator('WITH')) { - var t = token() - if (t && t.type === 'EXCEPTION') { - next() - return t.string - } - throw new Error('Expected exception after `WITH`') - } - } - - function parseLicenseRef () { - // TODO: Actually, everything is concatenated into one string - // for backward-compatibility but it could be better to return - // a nice structure. - var begin = index - var string = '' - var t = token() - if (t.type === 'DOCUMENTREF') { - next() - string += 'DocumentRef-' + t.string + ':' - if (!parseOperator(':')) { - throw new Error('Expected `:` after `DocumentRef-...`') - } - } - t = token() - if (t.type === 'LICENSEREF') { - next() - string += 'LicenseRef-' + t.string - return { license: string } - } - index = begin - } - - function parseLicense () { - var t = token() - if (t && t.type === 'LICENSE') { - next() - var node = { license: t.string } - if (parseOperator('+')) { - node.plus = true - } - var exception = parseWith() - if (exception) { - node.exception = exception - } - return node - } - } - - function parseParenthesizedExpression () { - var left = parseOperator('(') - if (!left) { - return - } - - var expr = parseExpression() - - if (!parseOperator(')')) { - throw new Error('Expected `)`') - } - - return expr - } - - function parseAtom () { - return ( - parseParenthesizedExpression() || - parseLicenseRef() || - parseLicense() - ) - } - - function makeBinaryOpParser (operator, nextParser) { - return function parseBinaryOp () { - var left = nextParser() - if (!left) { - return - } - - if (!parseOperator(operator)) { - return left - } - - var right = parseBinaryOp() - if (!right) { - throw new Error('Expected expression') - } - return { - left: left, - conjunction: operator.toLowerCase(), - right: right - } - } - } - - var parseAnd = makeBinaryOpParser('AND', parseAtom) - var parseExpression = makeBinaryOpParser('OR', parseAnd) - - var node = parseExpression() - if (!node || hasMore()) { - throw new Error('Syntax error') - } - return node -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js deleted file mode 100644 index b74fce2e2c6632..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var licenses = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) -var exceptions = require('spdx-exceptions') - -module.exports = function (source) { - var index = 0 - - function hasMore () { - return index < source.length - } - - // `value` can be a regexp or a string. - // If it is recognized, the matching source string is returned and - // the index is incremented. Otherwise `undefined` is returned. - function read (value) { - if (value instanceof RegExp) { - var chars = source.slice(index) - var match = chars.match(value) - if (match) { - index += match[0].length - return match[0] - } - } else { - if (source.indexOf(value, index) === index) { - index += value.length - return value - } - } - } - - function skipWhitespace () { - read(/[ ]*/) - } - - function operator () { - var string - var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] - for (var i = 0; i < possibilities.length; i++) { - string = read(possibilities[i]) - if (string) { - break - } - } - - if (string === '+' && index > 1 && source[index - 2] === ' ') { - throw new Error('Space before `+`') - } - - return string && { - type: 'OPERATOR', - string: string - } - } - - function idstring () { - return read(/[A-Za-z0-9-.]+/) - } - - function expectIdstring () { - var string = idstring() - if (!string) { - throw new Error('Expected idstring at offset ' + index) - } - return string - } - - function documentRef () { - if (read('DocumentRef-')) { - var string = expectIdstring() - return { type: 'DOCUMENTREF', string: string } - } - } - - function licenseRef () { - if (read('LicenseRef-')) { - var string = expectIdstring() - return { type: 'LICENSEREF', string: string } - } - } - - function identifier () { - var begin = index - var string = idstring() - - if (licenses.indexOf(string) !== -1) { - return { - type: 'LICENSE', - string: string - } - } else if (exceptions.indexOf(string) !== -1) { - return { - type: 'EXCEPTION', - string: string - } - } - - index = begin - } - - // Tries to read the next token. Returns `undefined` if no token is - // recognized. - function parseToken () { - // Ordering matters - return ( - operator() || - documentRef() || - licenseRef() || - identifier() - ) - } - - var tokens = [] - while (hasMore()) { - skipWhitespace() - if (!hasMore()) { - break - } - - var token = parseToken() - if (!token) { - throw new Error('Unexpected `' + source[index] + - '` at offset ' + index) - } - - tokens.push(token) - } - return tokens -} diff --git a/deps/npm/node_modules/spdx-correct/package.json b/deps/npm/node_modules/spdx-correct/package.json deleted file mode 100644 index d77615638be66d..00000000000000 --- a/deps/npm/node_modules/spdx-correct/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "spdx-correct", - "description": "correct invalid SPDX expressions", - "version": "3.2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.3.4", - "standard-markdown": "^6.0.0", - "tape": "^5.0.1" - }, - "files": [ - "index.js" - ], - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata" - ], - "license": "Apache-2.0", - "repository": "jslicense/spdx-correct.js", - "scripts": { - "lint": "standard && standard-markdown README.md", - "test": "defence README.md | replace-require-self | node && node test.js" - } -} diff --git a/deps/npm/node_modules/ssri/lib/index.js b/deps/npm/node_modules/ssri/lib/index.js index 9acc4322612483..00102d65472463 100644 --- a/deps/npm/node_modules/ssri/lib/index.js +++ b/deps/npm/node_modules/ssri/lib/index.js @@ -5,14 +5,21 @@ const { Minipass } = require('minipass') const SPEC_ALGORITHMS = ['sha512', 'sha384', 'sha256'] const DEFAULT_ALGORITHMS = ['sha512'] +const NODE_HASHES = crypto.getHashes() -// TODO: this should really be a hardcoded list of algorithms we support, -// rather than [a-z0-9]. +// 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]+$/ +// 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.includes(algo)) + const getOptString = options => options?.length ? `?${options.join('?')}` : '' class IntegrityStream extends Minipass { @@ -99,7 +106,6 @@ class IntegrityStream extends Minipass { // 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 @@ -107,7 +113,6 @@ class IntegrityStream extends Minipass { 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 @@ -137,8 +142,7 @@ class Hash { const strict = opts?.strict this.source = hash.trim() - // set default values so that we make V8 happy to - // always see a familiar object template. + // set default values so that we make V8 happy to always see a familiar object template. this.digest = '' this.algorithm = '' this.options = [] @@ -156,6 +160,9 @@ class Hash { if (strict && !SPEC_ALGORITHMS.includes(match[1])) { return } + if (!NODE_HASHES.includes(match[1])) { + return + } this.algorithm = match[1] this.digest = match[2] @@ -198,15 +205,12 @@ class Hash { toString (opts) { if (opts?.strict) { - // Strict mode enforces the standard as close to the foot of the - // letter as it can. + // 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.includes(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. + // Usually, if someone insists on using a "different" base64, we leave it as-is, since there are 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. @@ -300,8 +304,7 @@ class Integrity { return parse(this, { single: true }).hexDigest() } - // add additional hashes to an integrity value, but prevent - // *changing* an existing integrity hash. + // add additional hashes to an integrity value, but prevent *changing* an existing integrity hash. merge (integrity, opts) { const other = parse(integrity, opts) for (const algo in other) { @@ -323,33 +326,25 @@ class Integrity { return false } const algo = other.pickAlgorithm(opts, Object.keys(this)) - return ( - !!algo && - this[algo] && - other[algo] && - this[algo].find(hash => - other[algo].find(otherhash => - hash.digest === otherhash.digest - ) + return !!algo && this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest ) ) || false } - // Pick the highest priority algorithm present, optionally also limited to a - // set of hashes found in another integrity. When limiting it may return - // nothing. + // Pick the highest priority algorithm present, optionally also limited to a set of hashes found in another integrity. + // When limiting it may return nothing. pickAlgorithm (opts, hashes) { const pickAlgorithm = opts?.pickAlgorithm || getPrioritizedHash - const keys = Object.keys(this).filter(k => { - if (hashes?.length) { - return hashes.includes(k) - } - return true - }) + let keys = Object.keys(this) + if (hashes?.length) { + keys = keys.filter(k => hashes.includes(k)) + } if (keys.length) { return keys.reduce((acc, algo) => pickAlgorithm(acc, algo) || acc) } - // no intersection between this and hashes, + // no intersection between this and hashes return null } } @@ -380,7 +375,7 @@ function _parse (integrity, opts) { const hash = new Hash(string, opts) if (hash.algorithm && hash.digest) { const algo = hash.algorithm - if (!acc[algo]) { + if (!Object.keys(acc).includes(algo)) { acc[algo] = [] } acc[algo].push(hash) @@ -421,9 +416,7 @@ function fromData (data, opts) { `${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. - */ + // 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]) { @@ -473,7 +466,6 @@ function checkData (data, 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 @@ -481,7 +473,6 @@ function checkData (data, sri, opts) { 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 @@ -538,20 +529,11 @@ function createIntegrity (opts) { digest: function () { 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) + const hash = new Hash(`${algo}-${digest}${optString}`, opts) + if (!acc[hash.algorithm]) { + acc[hash.algorithm] = [] } + acc[hash.algorithm].push(hash) return acc }, new Integrity()) @@ -560,18 +542,6 @@ function createIntegrity (opts) { } } -const NODE_HASHES = 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.includes(algo)) - function getPrioritizedHash (algo1, algo2) { /* eslint-disable-next-line max-len */ return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) diff --git a/deps/npm/node_modules/ssri/package.json b/deps/npm/node_modules/ssri/package.json index 8781bdf5f80c01..d4769fc2907594 100644 --- a/deps/npm/node_modules/ssri/package.json +++ b/deps/npm/node_modules/ssri/package.json @@ -1,6 +1,6 @@ { "name": "ssri", - "version": "13.0.0", + "version": "13.0.1", "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "main": "lib/index.js", "files": [ @@ -11,21 +11,16 @@ "prerelease": "npm t", "postrelease": "npm publish", "posttest": "npm run lint", - "test": "tap", + "test": "node --test './test/**/*.js'", "coverage": "tap", "lint": "npm run eslint", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run eslint -- --fix", - "snap": "tap", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] + "snap": "node --test --test-update-snapshots './test/**/*.js'", + "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", + "test:node20": "node --test test", + "test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js'" }, "repository": { "type": "git", @@ -51,16 +46,21 @@ "minipass": "^7.0.3" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.27.1", - "tap": "^16.0.1" + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.28.1", + "benchmark": "^2.1.4" }, "engines": { "node": "^20.17.0 || >=22.9.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.27.1", - "publish": "true" + "version": "4.28.1", + "publish": "true", + "allowPaths": [ + "benchmarks/" + ], + "testRunner": "node:test", + "latestVersion": 24 } } diff --git a/deps/npm/node_modules/string-width/index.js b/deps/npm/node_modules/string-width/index.js deleted file mode 100644 index f4d261a96a099e..00000000000000 --- a/deps/npm/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/deps/npm/node_modules/string-width/license b/deps/npm/node_modules/string-width/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.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/deps/npm/node_modules/string-width/package.json b/deps/npm/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4cae9bf9..00000000000000 --- a/deps/npm/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/deps/npm/node_modules/strip-ansi/index.js b/deps/npm/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593dfcd1fd5c..00000000000000 --- a/deps/npm/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/strip-ansi/license b/deps/npm/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.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/deps/npm/node_modules/strip-ansi/package.json b/deps/npm/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108d42831c..00000000000000 --- a/deps/npm/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/deps/npm/node_modules/tar/dist/commonjs/index.min.js b/deps/npm/node_modules/tar/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..4ae8fa0dbc3e38 --- /dev/null +++ b/deps/npm/node_modules/tar/dist/commonjs/index.min.js @@ -0,0 +1,4 @@ +"use strict";var d=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var We=d(C=>{"use strict";var yo=C&&C.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(C,"__esModule",{value:!0});C.Minipass=C.isWritable=C.isReadable=C.isStream=void 0;var Br=typeof process=="object"&&process?process:{stdout:null,stderr:null},es=require("node:events"),xr=yo(require("node:stream")),Eo=require("node:string_decoder"),bo=s=>!!s&&typeof s=="object"&&(s instanceof Wt||s instanceof xr.default||(0,C.isReadable)(s)||(0,C.isWritable)(s));C.isStream=bo;var So=s=>!!s&&typeof s=="object"&&s instanceof es.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==xr.default.Writable.prototype.pipe;C.isReadable=So;var go=s=>!!s&&typeof s=="object"&&s instanceof es.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function";C.isWritable=go;var le=Symbol("EOF"),ue=Symbol("maybeEmitEnd"),_e=Symbol("emittedEnd"),zt=Symbol("emittingEnd"),ft=Symbol("emittedError"),kt=Symbol("closed"),zr=Symbol("read"),jt=Symbol("flush"),kr=Symbol("flushChunk"),K=Symbol("encoding"),Ue=Symbol("decoder"),R=Symbol("flowing"),dt=Symbol("paused"),qe=Symbol("resume"),O=Symbol("buffer"),I=Symbol("pipes"),v=Symbol("bufferLength"),Ki=Symbol("bufferPush"),xt=Symbol("bufferShift"),N=Symbol("objectMode"),y=Symbol("destroyed"),Vi=Symbol("error"),$i=Symbol("emitData"),jr=Symbol("emitEnd"),Xi=Symbol("emitEnd2"),J=Symbol("async"),Qi=Symbol("abort"),Ut=Symbol("aborted"),mt=Symbol("signal"),Pe=Symbol("dataListeners"),k=Symbol("discarded"),pt=s=>Promise.resolve().then(s),Ro=s=>s(),Oo=s=>s==="end"||s==="finish"||s==="prefinish",vo=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,To=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),qt=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[qe](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ji=class extends qt{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},Do=s=>!!s.objectMode,Po=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",Wt=class extends es.EventEmitter{[R]=!1;[dt]=!1;[I]=[];[O]=[];[N];[K];[J];[Ue];[le]=!1;[_e]=!1;[zt]=!1;[kt]=!1;[ft]=null;[v]=0;[y]=!1;[mt];[Ut]=!1;[Pe]=0;[k]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Do(t)?(this[N]=!0,this[K]=null):Po(t)?(this[K]=t.encoding,this[N]=!1):(this[N]=!1,this[K]=null),this[J]=!!t.async,this[Ue]=this[K]?new Eo.StringDecoder(this[K]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[O]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[I]});let{signal:i}=t;i&&(this[mt]=i,i.aborted?this[Qi]():i.addEventListener("abort",()=>this[Qi]()))}get bufferLength(){return this[v]}get encoding(){return this[K]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[N]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[J]}set async(e){this[J]=this[J]||!!e}[Qi](){this[Ut]=!0,this.emit("abort",this[mt]?.reason),this.destroy(this[mt]?.reason)}get aborted(){return this[Ut]}set aborted(e){}write(e,t,i){if(this[Ut])return!1;if(this[le])throw new Error("write after end");if(this[y])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let r=this[J]?pt:Ro;if(!this[N]&&!Buffer.isBuffer(e)){if(To(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(vo(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[N]?(this[R]&&this[v]!==0&&this[jt](!0),this[R]?this.emit("data",e):this[Ki](e),this[v]!==0&&this.emit("readable"),i&&r(i),this[R]):e.length?(typeof e=="string"&&!(t===this[K]&&!this[Ue]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[K]&&(e=this[Ue].write(e)),this[R]&&this[v]!==0&&this[jt](!0),this[R]?this.emit("data",e):this[Ki](e),this[v]!==0&&this.emit("readable"),i&&r(i),this[R]):(this[v]!==0&&this.emit("readable"),i&&r(i),this[R])}read(e){if(this[y])return null;if(this[k]=!1,this[v]===0||e===0||e&&e>this[v])return this[ue](),null;this[N]&&(e=null),this[O].length>1&&!this[N]&&(this[O]=[this[K]?this[O].join(""):Buffer.concat(this[O],this[v])]);let t=this[zr](e||null,this[O][0]);return this[ue](),t}[zr](e,t){if(this[N])this[xt]();else{let i=t;e===i.length||e===null?this[xt]():typeof i=="string"?(this[O][0]=i.slice(e),t=i.slice(0,e),this[v]-=e):(this[O][0]=i.subarray(e),t=i.subarray(0,e),this[v]-=e)}return this.emit("data",t),!this[O].length&&!this[le]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[le]=!0,this.writable=!1,(this[R]||!this[dt])&&this[ue](),this}[qe](){this[y]||(!this[Pe]&&!this[I].length&&(this[k]=!0),this[dt]=!1,this[R]=!0,this.emit("resume"),this[O].length?this[jt]():this[le]?this[ue]():this.emit("drain"))}resume(){return this[qe]()}pause(){this[R]=!1,this[dt]=!0,this[k]=!1}get destroyed(){return this[y]}get flowing(){return this[R]}get paused(){return this[dt]}[Ki](e){this[N]?this[v]+=1:this[v]+=e.length,this[O].push(e)}[xt](){return this[N]?this[v]-=1:this[v]-=this[O][0].length,this[O].shift()}[jt](e=!1){do;while(this[kr](this[xt]())&&this[O].length);!e&&!this[O].length&&!this[le]&&this.emit("drain")}[kr](e){return this.emit("data",e),this[R]}pipe(e,t){if(this[y])return e;this[k]=!1;let i=this[_e];return t=t||{},e===Br.stdout||e===Br.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[I].push(t.proxyErrors?new Ji(this,e,t):new qt(this,e,t)),this[J]?pt(()=>this[qe]()):this[qe]()),e}unpipe(e){let t=this[I].find(i=>i.dest===e);t&&(this[I].length===1?(this[R]&&this[Pe]===0&&(this[R]=!1),this[I]=[]):this[I].splice(this[I].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[k]=!1,this[Pe]++,!this[I].length&&!this[R]&&this[qe]();else if(e==="readable"&&this[v]!==0)super.emit("readable");else if(Oo(e)&&this[_e])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ft]){let r=t;this[J]?pt(()=>r.call(this,this[ft])):r.call(this,this[ft])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Pe]=this.listeners("data").length,this[Pe]===0&&!this[k]&&!this[I].length&&(this[R]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Pe]=0,!this[k]&&!this[I].length&&(this[R]=!1)),t}get emittedEnd(){return this[_e]}[ue](){!this[zt]&&!this[_e]&&!this[y]&&this[O].length===0&&this[le]&&(this[zt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[kt]&&this.emit("close"),this[zt]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==y&&this[y])return!1;if(e==="data")return!this[N]&&!i?!1:this[J]?(pt(()=>this[$i](i)),!0):this[$i](i);if(e==="end")return this[jr]();if(e==="close"){if(this[kt]=!0,!this[_e]&&!this[y])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[ft]=i,super.emit(Vi,i);let n=!this[mt]||this.listeners("error").length?super.emit("error",i):!1;return this[ue](),n}else if(e==="resume"){let n=super.emit("resume");return this[ue](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let r=super.emit(e,...t);return this[ue](),r}[$i](e){for(let i of this[I])i.dest.write(e)===!1&&this.pause();let t=this[k]?!1:super.emit("data",e);return this[ue](),t}[jr](){return this[_e]?!1:(this[_e]=!0,this.readable=!1,this[J]?(pt(()=>this[Xi]()),!0):this[Xi]())}[Xi](){if(this[Ue]){let t=this[Ue].end();if(t){for(let i of this[I])i.dest.write(t);this[k]||super.emit("data",t)}}for(let t of this[I])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[N]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[N]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[N])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[K]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(y,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[k]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[le])return t();let n,o,a=c=>{this.off("data",h),this.off("end",l),this.off(y,u),t(),o(c)},h=c=>{this.off("error",a),this.off("end",l),this.off(y,u),this.pause(),n({value:c,done:!!this[le]})},l=()=>{this.off("error",a),this.off("data",h),this.off(y,u),t(),n({done:!0,value:void 0})},u=()=>a(new Error("stream destroyed"));return new Promise((c,E)=>{o=E,n=c,this.once(y,u),this.once("error",a),this.once("end",l),this.once("data",h)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[k]=!1;let e=!1,t=()=>(this.pause(),this.off(Vi,t),this.off(y,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(Vi,t),this.once(y,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[y])return e?this.emit("error",e):this.emit(y),this;this[y]=!0,this[k]=!0,this[O].length=0,this[v]=0;let t=this;return typeof t.close=="function"&&!this[kt]&&t.close(),e?this.emit("error",e):this.emit(y),this}static get isStream(){return C.isStream}};C.Minipass=Wt});var Ke=d(W=>{"use strict";var Ur=W&&W.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(W,"__esModule",{value:!0});W.WriteStreamSync=W.WriteStream=W.ReadStreamSync=W.ReadStream=void 0;var No=Ur(require("events")),B=Ur(require("fs")),Mo=We(),Lo=B.default.writev,ye=Symbol("_autoClose"),$=Symbol("_close"),_t=Symbol("_ended"),p=Symbol("_fd"),ts=Symbol("_finished"),fe=Symbol("_flags"),is=Symbol("_flush"),os=Symbol("_handleChunk"),as=Symbol("_makeBuf"),yt=Symbol("_mode"),Ht=Symbol("_needDrain"),Ge=Symbol("_onerror"),Ye=Symbol("_onopen"),ss=Symbol("_onread"),He=Symbol("_onwrite"),Ee=Symbol("_open"),V=Symbol("_path"),we=Symbol("_pos"),ee=Symbol("_queue"),Ze=Symbol("_read"),rs=Symbol("_readSize"),ce=Symbol("_reading"),wt=Symbol("_remain"),ns=Symbol("_size"),Zt=Symbol("_write"),Ne=Symbol("_writing"),Gt=Symbol("_defaultFlag"),Me=Symbol("_errored"),Yt=class extends Mo.Minipass{[Me]=!1;[p];[V];[rs];[ce]=!1;[ns];[wt];[ye];constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Me]=!1,this[p]=typeof t.fd=="number"?t.fd:void 0,this[V]=e,this[rs]=t.readSize||16*1024*1024,this[ce]=!1,this[ns]=typeof t.size=="number"?t.size:1/0,this[wt]=this[ns],this[ye]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[p]=="number"?this[Ze]():this[Ee]()}get fd(){return this[p]}get path(){return this[V]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ee](){B.default.open(this[V],"r",(e,t)=>this[Ye](e,t))}[Ye](e,t){e?this[Ge](e):(this[p]=t,this.emit("open",t),this[Ze]())}[as](){return Buffer.allocUnsafe(Math.min(this[rs],this[wt]))}[Ze](){if(!this[ce]){this[ce]=!0;let e=this[as]();if(e.length===0)return process.nextTick(()=>this[ss](null,0,e));B.default.read(this[p],e,0,e.length,null,(t,i,r)=>this[ss](t,i,r))}}[ss](e,t,i){this[ce]=!1,e?this[Ge](e):this[os](t,i)&&this[Ze]()}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Ge](e){this[ce]=!0,this[$](),this.emit("error",e)}[os](e,t){let i=!1;return this[wt]-=e,e>0&&(i=super.write(ethis[Ye](e,t))}[Ye](e,t){this[Gt]&&this[fe]==="r+"&&e&&e.code==="ENOENT"?(this[fe]="w",this[Ee]()):e?this[Ge](e):(this[p]=t,this.emit("open",t),this[Ne]||this[is]())}end(e,t){return e&&this.write(e,t),this[_t]=!0,!this[Ne]&&!this[ee].length&&typeof this[p]=="number"&&this[He](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[_t]?(this.emit("error",new Error("write() after end()")),!1):this[p]===void 0||this[Ne]||this[ee].length?(this[ee].push(e),this[Ht]=!0,!1):(this[Ne]=!0,this[Zt](e),!0)}[Zt](e){B.default.write(this[p],e,0,e.length,this[we],(t,i)=>this[He](t,i))}[He](e,t){e?this[Ge](e):(this[we]!==void 0&&typeof t=="number"&&(this[we]+=t),this[ee].length?this[is]():(this[Ne]=!1,this[_t]&&!this[ts]?(this[ts]=!0,this[$](),this.emit("finish")):this[Ht]&&(this[Ht]=!1,this.emit("drain"))))}[is](){if(this[ee].length===0)this[_t]&&this[He](null,0);else if(this[ee].length===1)this[Zt](this[ee].pop());else{let e=this[ee];this[ee]=[],Lo(this[p],e,this[we],(t,i)=>this[He](t,i))}}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}};W.WriteStream=Kt;var ls=class extends Kt{[Ee](){let e;if(this[Gt]&&this[fe]==="r+")try{e=B.default.openSync(this[V],this[fe],this[yt])}catch(t){if(t?.code==="ENOENT")return this[fe]="w",this[Ee]();throw t}else e=B.default.openSync(this[V],this[fe],this[yt]);this[Ye](null,e)}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.closeSync(e),this.emit("close")}}[Zt](e){let t=!0;try{this[He](null,B.default.writeSync(this[p],e,0,e.length,this[we])),t=!1}finally{if(t)try{this[$]()}catch{}}}};W.WriteStreamSync=ls});var Vt=d(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.dealias=b.isNoFile=b.isFile=b.isAsync=b.isSync=b.isAsyncNoFile=b.isSyncNoFile=b.isAsyncFile=b.isSyncFile=void 0;var Ao=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),Io=s=>!!s.sync&&!!s.file;b.isSyncFile=Io;var Co=s=>!s.sync&&!!s.file;b.isAsyncFile=Co;var Fo=s=>!!s.sync&&!s.file;b.isSyncNoFile=Fo;var Bo=s=>!s.sync&&!s.file;b.isAsyncNoFile=Bo;var zo=s=>!!s.sync;b.isSync=zo;var ko=s=>!s.sync;b.isAsync=ko;var jo=s=>!!s.file;b.isFile=jo;var xo=s=>!s.file;b.isNoFile=xo;var Uo=s=>{let e=Ao.get(s);return e||s},qo=(s={})=>{if(!s)return{};let e={};for(let[t,i]of Object.entries(s)){let r=Uo(t);e[r]=i}return e.chmod===void 0&&e.noChmod===!1&&(e.chmod=!0),delete e.noChmod,e};b.dealias=qo});var Ve=d($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.makeCommand=void 0;var Et=Vt(),Wo=(s,e,t,i,r)=>Object.assign((n=[],o,a)=>{Array.isArray(n)&&(o=n,n={}),typeof o=="function"&&(a=o,o=void 0),o?o=Array.from(o):o=[];let h=(0,Et.dealias)(n);if(r?.(h,o),(0,Et.isSyncFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return s(h,o)}else if((0,Et.isAsyncFile)(h)){let l=e(h,o),u=a||void 0;return u?l.then(()=>u(),u):l}else if((0,Et.isSyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return t(h,o)}else if((0,Et.isAsyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback only supported with file option");return i(h,o)}else throw new Error("impossible options??")},{syncFile:s,asyncFile:e,syncNoFile:t,asyncNoFile:i,validate:r});$t.makeCommand=Wo});var us=d($e=>{"use strict";var Ho=$e&&$e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty($e,"__esModule",{value:!0});$e.constants=void 0;var Zo=Ho(require("zlib")),Go=Zo.default.constants||{ZLIB_VERNUM:4736};$e.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Go))});var vs=d(f=>{"use strict";var Yo=f&&f.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Ko=f&&f.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Vo=f&&f.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;rs,cs=Wr?.writable===!0||Wr?.set!==void 0?s=>{Le.Buffer.concat=s?ea:Jo}:s=>{},Ae=Symbol("_superWrite"),Ie=class extends Error{code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};f.ZlibError=Ie;var fs=Symbol("flushFlag"),bt=class extends Xo.Minipass{#e=!1;#i=!1;#s;#n;#r;#t;#o;get sawError(){return this.#e}get handle(){return this.#t}get flushFlag(){return this.#s}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#s=e.flush??0,this.#n=e.finishFlush??0,this.#r=e.fullFlushFlag??0,typeof qr[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#t=new qr[t](e)}catch(i){throw new Ie(i,this.constructor)}this.#o=i=>{this.#e||(this.#e=!0,this.close(),this.emit("error",i))},this.#t?.on("error",i=>this.#o(new Ie(i))),this.once("end",()=>this.close)}close(){this.#t&&(this.#t.close(),this.#t=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,ds.default)(this.#t,"zlib binding closed"),this.#t.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#r),this.write(Object.assign(Le.Buffer.alloc(0),{[fs]:e})))}end(e,t,i){return typeof e=="function"&&(i=e,t=void 0,e=void 0),typeof t=="function"&&(i=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#n),this.#i=!0,super.end(i)}get ended(){return this.#i}[Ae](e){return super.write(e)}write(e,t,i){if(typeof t=="function"&&(i=t,t="utf8"),typeof e=="string"&&(e=Le.Buffer.from(e,t)),this.#e)return;(0,ds.default)(this.#t,"zlib binding closed");let r=this.#t._handle,n=r.close;r.close=()=>{};let o=this.#t.close;this.#t.close=()=>{},cs(!0);let a;try{let l=typeof e[fs]=="number"?e[fs]:this.#s;a=this.#t._processChunk(e,l),cs(!1)}catch(l){cs(!1),this.#o(new Ie(l,this.write))}finally{this.#t&&(this.#t._handle=r,r.close=n,this.#t.close=o,this.#t.removeAllListeners("error"))}this.#t&&this.#t.on("error",l=>this.#o(new Ie(l,this.write)));let h;if(a)if(Array.isArray(a)&&a.length>0){let l=a[0];h=this[Ae](Le.Buffer.from(l));for(let u=1;u{typeof r=="function"&&(n=r,r=this.flushFlag),this.flush(r),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=i}this.handle&&(this.#e=e,this.#i=t)}}}};f.Zlib=ie;var ms=class extends ie{constructor(e){super(e,"Deflate")}};f.Deflate=ms;var ps=class extends ie{constructor(e){super(e,"Inflate")}};f.Inflate=ps;var _s=class extends ie{#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Ae](e){return this.#e?(this.#e=!1,e[9]=255,super[Ae](e)):super[Ae](e)}};f.Gzip=_s;var ws=class extends ie{constructor(e){super(e,"Gunzip")}};f.Gunzip=ws;var ys=class extends ie{constructor(e){super(e,"DeflateRaw")}};f.DeflateRaw=ys;var Es=class extends ie{constructor(e){super(e,"InflateRaw")}};f.InflateRaw=Es;var bs=class extends ie{constructor(e){super(e,"Unzip")}};f.Unzip=bs;var Xt=class extends bt{constructor(e,t){e=e||{},e.flush=e.flush||te.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||te.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=te.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},Ss=class extends Xt{constructor(e){super(e,"BrotliCompress")}};f.BrotliCompress=Ss;var gs=class extends Xt{constructor(e){super(e,"BrotliDecompress")}};f.BrotliDecompress=gs;var Qt=class extends bt{constructor(e,t){e=e||{},e.flush=e.flush||te.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||te.constants.ZSTD_e_end,e.fullFlushFlag=te.constants.ZSTD_e_flush,super(e,t)}},Rs=class extends Qt{constructor(e){super(e,"ZstdCompress")}};f.ZstdCompress=Rs;var Os=class extends Qt{constructor(e){super(e,"ZstdDecompress")}};f.ZstdDecompress=Os});var Gr=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.parse=Xe.encode=void 0;var ta=(s,e)=>{if(Number.isSafeInteger(s))s<0?sa(s,e):ia(s,e);else throw Error("cannot encode number outside of javascript safe integer range");return e};Xe.encode=ta;var ia=(s,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=s&255,s=Math.floor(s/256)},sa=(s,e)=>{e[0]=255;var t=!1;s=s*-1;for(var i=e.length;i>1;i--){var r=s&255;s=Math.floor(s/256),t?e[i-1]=Hr(r):r===0?e[i-1]=0:(t=!0,e[i-1]=Zr(r))}},ra=s=>{let e=s[0],t=e===128?oa(s.subarray(1,s.length)):e===255?na(s):null;if(t===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(t))throw Error("parsed number outside of javascript safe integer range");return t};Xe.parse=ra;var na=s=>{for(var e=s.length,t=0,i=!1,r=e-1;r>-1;r--){var n=Number(s[r]),o;i?o=Hr(n):n===0?o=n:(i=!0,o=Zr(n)),o!==0&&(t-=o*Math.pow(256,e-r-1))}return t},oa=s=>{for(var e=s.length,t=0,i=e-1;i>-1;i--){var r=Number(s[i]);r!==0&&(t+=r*Math.pow(256,e-i-1))}return t},Hr=s=>(255^s)&255,Zr=s=>(255^s)+1&255});var Ts=d(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.code=j.name=j.isName=j.isCode=void 0;var aa=s=>j.name.has(s);j.isCode=aa;var ha=s=>j.code.has(s);j.isName=ha;j.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);j.code=new Map(Array.from(j.name).map(s=>[s[1],s[0]]))});var Je=d(se=>{"use strict";var la=se&&se.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),ua=se&&se.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Yr=se&&se.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r=t+512))throw new Error("need 512 bytes for header");this.path=i?.path??Ce(e,t,100),this.mode=i?.mode??r?.mode??be(e,t+100,8),this.uid=i?.uid??r?.uid??be(e,t+108,8),this.gid=i?.gid??r?.gid??be(e,t+116,8),this.size=i?.size??r?.size??be(e,t+124,12),this.mtime=i?.mtime??r?.mtime??Ds(e,t+136,12),this.cksum=be(e,t+148,12),r&&this.#i(r,!0),i&&this.#i(i);let n=Ce(e,t+156,1);if(St.isCode(n)&&(this.#e=n||"0"),this.#e==="0"&&this.path.slice(-1)==="/"&&(this.#e="5"),this.#e==="5"&&(this.size=0),this.linkpath=Ce(e,t+157,100),e.subarray(t+257,t+265).toString()==="ustar\x0000")if(this.uname=i?.uname??r?.uname??Ce(e,t+265,32),this.gname=i?.gname??r?.gname??Ce(e,t+297,32),this.devmaj=i?.devmaj??r?.devmaj??be(e,t+329,8)??0,this.devmin=i?.devmin??r?.devmin??be(e,t+337,8)??0,e[t+475]!==0){let a=Ce(e,t+345,155);this.path=a+"/"+this.path}else{let a=Ce(e,t+345,130);a&&(this.path=a+"/"+this.path),this.atime=i?.atime??r?.atime??Ds(e,t+476,12),this.ctime=i?.ctime??r?.ctime??Ds(e,t+488,12)}let o=256;for(let a=t;a!(r==null||i==="path"&&t||i==="linkpath"&&t||i==="global"))))}encode(e,t=0){if(e||(e=this.block=Buffer.alloc(512)),this.#e==="Unsupported"&&(this.#e="0"),!(e.length>=t+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=ca(this.path||"",i),n=r[0],o=r[1];this.needPax=!!r[2],this.needPax=Fe(e,t,100,n)||this.needPax,this.needPax=Se(e,t+100,8,this.mode)||this.needPax,this.needPax=Se(e,t+108,8,this.uid)||this.needPax,this.needPax=Se(e,t+116,8,this.gid)||this.needPax,this.needPax=Se(e,t+124,12,this.size)||this.needPax,this.needPax=Ps(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this.#e.charCodeAt(0),this.needPax=Fe(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Fe(e,t+265,32,this.uname)||this.needPax,this.needPax=Fe(e,t+297,32,this.gname)||this.needPax,this.needPax=Se(e,t+329,8,this.devmaj)||this.needPax,this.needPax=Se(e,t+337,8,this.devmin)||this.needPax,this.needPax=Fe(e,t+345,i,o)||this.needPax,e[t+475]!==0?this.needPax=Fe(e,t+345,155,o)||this.needPax:(this.needPax=Fe(e,t+345,130,o)||this.needPax,this.needPax=Ps(e,t+476,12,this.atime)||this.needPax,this.needPax=Ps(e,t+488,12,this.ctime)||this.needPax);let a=256;for(let h=t;h{let i=s,r="",n,o=Qe.posix.parse(s).root||".";if(Buffer.byteLength(i)<100)n=[i,r,!1];else{r=Qe.posix.dirname(i),i=Qe.posix.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=e?n=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=e?n=[i.slice(0,99),r,!0]:(i=Qe.posix.join(Qe.posix.basename(r),i),r=Qe.posix.dirname(r));while(r!==o&&n===void 0);n||(n=[s.slice(0,99),"",!0])}return n},Ce=(s,e,t)=>s.subarray(e,e+t).toString("utf8").replace(/\0.*/,""),Ds=(s,e,t)=>fa(be(s,e,t)),fa=s=>s===void 0?void 0:new Date(s*1e3),be=(s,e,t)=>Number(s[e])&128?Kr.parse(s.subarray(e,e+t)):ma(s,e,t),da=s=>isNaN(s)?void 0:s,ma=(s,e,t)=>da(parseInt(s.subarray(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),pa={12:8589934591,8:2097151},Se=(s,e,t,i)=>i===void 0?!1:i>pa[t]||i<0?(Kr.encode(i,s.subarray(e,e+t)),!0):(_a(s,e,t,i),!1),_a=(s,e,t,i)=>s.write(wa(i,t),e,t,"ascii"),wa=(s,e)=>ya(Math.floor(s).toString(8),e),ya=(s,e)=>(s.length===e-1?s:new Array(e-s.length-1).join("0")+s+" ")+"\0",Ps=(s,e,t,i)=>i===void 0?!1:Se(s,e,t,i.getTime()/1e3),Ea=new Array(156).join("\0"),Fe=(s,e,t,i)=>i===void 0?!1:(s.write(i+Ea,e,t,"utf8"),i.length!==Buffer.byteLength(i)||i.length>t)});var ei=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.Pax=void 0;var ba=require("node:path"),Sa=Je(),Ms=class s{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(e,t=!1){this.atime=e.atime,this.charset=e.charset,this.comment=e.comment,this.ctime=e.ctime,this.dev=e.dev,this.gid=e.gid,this.global=t,this.gname=e.gname,this.ino=e.ino,this.linkpath=e.linkpath,this.mtime=e.mtime,this.nlink=e.nlink,this.path=e.path,this.size=e.size,this.uid=e.uid,this.uname=e.uname}encode(){let e=this.encodeBody();if(e==="")return Buffer.allocUnsafe(0);let t=Buffer.byteLength(e),i=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(i);for(let n=0;n<512;n++)r[n]=0;new Sa.Header({path:("PaxHeader/"+(0,ba.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:t,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(e,512,t,"utf8");for(let n=t+512;n=Math.pow(10,o)&&(o+=1),o+n+r}static parse(e,t,i=!1){return new s(ga(Ra(e),t),i)}};Jt.Pax=Ms;var ga=(s,e)=>e?Object.assign({},e,s):s,Ra=s=>s.replace(/\n$/,"").split(` +`).reduce(Oa,Object.create(null)),Oa=(s,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return s;e=e.slice((t+" ").length);let i=e.split("="),r=i.shift();if(!r)return s;let n=r.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),o=i.join("=");return s[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(o)*1e3):/^[0-9]+$/.test(o)?+o:o,s}});var et=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.normalizeWindowsPath=void 0;var va=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;ti.normalizeWindowsPath=va!=="win32"?s=>s:s=>s&&s.replace(/\\/g,"/")});var ri=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ReadEntry=void 0;var Ta=We(),ii=et(),Ls=class extends Ta.Minipass{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,i){switch(super({}),this.pause(),this.extended=t,this.globalExtended=i,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=(0,ii.normalizeWindowsPath)(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?(0,ii.normalizeWindowsPath)(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#e(t),i&&this.#e(i,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-t),this.blockRemain=Math.max(0,r-t),this.ignore?!0:i>=t?super.write(e):super.write(e.subarray(0,i))}#e(e,t=!1){e.path&&(e.path=(0,ii.normalizeWindowsPath)(e.path)),e.linkpath&&(e.linkpath=(0,ii.normalizeWindowsPath)(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([i,r])=>!(r==null||i==="path"&&t))))}};si.ReadEntry=Ls});var oi=d(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.warnMethod=void 0;var Da=(s,e,t,i={})=>{s.file&&(i.file=s.file),s.cwd&&(i.cwd=s.cwd),i.code=t instanceof Error&&t.code||e,i.tarCode=e,!s.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),s.emit("warn",e,t,i)):t instanceof Error?s.emit("error",Object.assign(t,i)):s.emit("error",Object.assign(new Error(`${e}: ${t}`),i))};ni.warnMethod=Da});var mi=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Parser=void 0;var Pa=require("events"),As=vs(),Vr=Je(),$r=ei(),Na=ri(),Ma=oi(),La=1024*1024,zs=Buffer.from([31,139]),ks=Buffer.from([40,181,47,253]),Aa=Math.max(zs.length,ks.length),H=Symbol("state"),Be=Symbol("writeEntry"),de=Symbol("readEntry"),Is=Symbol("nextEntry"),Xr=Symbol("processEntry"),re=Symbol("extendedHeader"),gt=Symbol("globalExtendedHeader"),ge=Symbol("meta"),Qr=Symbol("emitMeta"),_=Symbol("buffer"),me=Symbol("queue"),Re=Symbol("ended"),Cs=Symbol("emittedEnd"),ze=Symbol("emit"),S=Symbol("unzip"),ai=Symbol("consumeChunk"),hi=Symbol("consumeChunkSub"),Fs=Symbol("consumeBody"),Jr=Symbol("consumeMeta"),en=Symbol("consumeHeader"),Rt=Symbol("consuming"),Bs=Symbol("bufferConcat"),li=Symbol("maybeEnd"),tt=Symbol("writing"),Oe=Symbol("aborted"),ui=Symbol("onDone"),ke=Symbol("sawValidEntry"),ci=Symbol("sawNullBlock"),fi=Symbol("sawEOF"),tn=Symbol("closeStream"),Ia=()=>!0,js=class extends Pa.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[me]=[];[_];[de];[Be];[H]="begin";[ge]="";[re];[gt];[Re]=!1;[S];[Oe]=!1;[ke];[ci]=!1;[fi]=!1;[tt]=!1;[Rt]=!1;[Cs]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(ui,()=>{(this[H]==="begin"||this[ke]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(ui,e.ondone):this.on(ui,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||La,this.filter=typeof e.filter=="function"?e.filter:Ia;let t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!(e.gzip||e.zstd)&&e.brotli!==void 0?e.brotli:t?void 0:!1;let i=e.file&&(e.file.endsWith(".tar.zst")||e.file.endsWith(".tzst"));this.zstd=!(e.gzip||e.brotli)&&e.zstd!==void 0?e.zstd:i?!0:void 0,this.on("end",()=>this[tn]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onReadEntry=="function"&&this.on("entry",e.onReadEntry)}warn(e,t,i={}){(0,Ma.warnMethod)(this,e,t,i)}[en](e,t){this[ke]===void 0&&(this[ke]=!1);let i;try{i=new Vr.Header(e,t,this[re],this[gt])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[ci]?(this[fi]=!0,this[H]==="begin"&&(this[H]="header"),this[ze]("eof")):(this[ci]=!0,this[ze]("nullBlock"));else if(this[ci]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&!/^(Global)?ExtendedHeader$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let n=this[Be]=new Na.ReadEntry(i,this[re],this[gt]);if(!this[ke])if(n.remain){let o=()=>{n.invalid||(this[ke]=!0)};n.on("end",o)}else this[ke]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[ze]("ignoredEntry",n),this[H]="ignore",n.resume()):n.size>0&&(this[ge]="",n.on("data",o=>this[ge]+=o),this[H]="meta"):(this[re]=void 0,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[ze]("ignoredEntry",n),this[H]=n.remain?"ignore":"header",n.resume()):(n.remain?this[H]="body":(this[H]="header",n.end()),this[de]?this[me].push(n):(this[me].push(n),this[Is]())))}}}[tn](){queueMicrotask(()=>this.emit("close"))}[Xr](e){let t=!0;if(!e)this[de]=void 0,t=!1;else if(Array.isArray(e)){let[i,...r]=e;this.emit(i,...r)}else this[de]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",()=>this[Is]()),t=!1);return t}[Is](){do;while(this[Xr](this[me].shift()));if(!this[me].length){let e=this[de];!e||e.flowing||e.size===e.remain?this[tt]||this.emit("drain"):e.once("drain",()=>this.emit("drain"))}}[Fs](e,t){let i=this[Be];if(!i)throw new Error("attempt to consume body without entry??");let r=i.blockRemain??0,n=r>=e.length&&t===0?e:e.subarray(t,t+r);return i.write(n),i.blockRemain||(this[H]="header",this[Be]=void 0,i.end()),n.length}[Jr](e,t){let i=this[Be],r=this[Fs](e,t);return!this[Be]&&i&&this[Qr](i),r}[ze](e,t,i){!this[me].length&&!this[de]?this.emit(e,t,i):this[me].push([e,t,i])}[Qr](e){switch(this[ze]("meta",this[ge]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[re]=$r.Pax.parse(this[ge],this[re],!1);break;case"GlobalExtendedHeader":this[gt]=$r.Pax.parse(this[ge],this[gt],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let t=this[re]??Object.create(null);this[re]=t,t.path=this[ge].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let t=this[re]||Object.create(null);this[re]=t,t.linkpath=this[ge].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Oe]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e,t,i){if(typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this[Oe])return i?.(),!1;if((this[S]===void 0||this.brotli===void 0&&this[S]===!1)&&e){if(this[_]&&(e=Buffer.concat([this[_],e]),this[_]=void 0),e.lengththis[ai](u)),this[S].on("error",u=>this.abort(u)),this[S].on("end",()=>{this[Re]=!0,this[ai]()}),this[tt]=!0;let l=!!this[S][h?"end":"write"](e);return this[tt]=!1,i?.(),l}}this[tt]=!0,this[S]?this[S].write(e):this[ai](e),this[tt]=!1;let n=this[me].length?!1:this[de]?this[de].flowing:!0;return!n&&!this[me].length&&this[de]?.once("drain",()=>this.emit("drain")),i?.(),n}[Bs](e){e&&!this[Oe]&&(this[_]=this[_]?Buffer.concat([this[_],e]):e)}[li](){if(this[Re]&&!this[Cs]&&!this[Oe]&&!this[Rt]){this[Cs]=!0;let e=this[Be];if(e&&e.blockRemain){let t=this[_]?this[_].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[_]&&e.write(this[_]),e.end()}this[ze](ui)}}[ai](e){if(this[Rt]&&e)this[Bs](e);else if(!e&&!this[_])this[li]();else if(e){if(this[Rt]=!0,this[_]){this[Bs](e);let t=this[_];this[_]=void 0,this[hi](t)}else this[hi](e);for(;this[_]&&this[_]?.length>=512&&!this[Oe]&&!this[fi];){let t=this[_];this[_]=void 0,this[hi](t)}this[Rt]=!1}(!this[_]||this[Re])&&this[li]()}[hi](e){let t=0,i=e.length;for(;t+512<=i&&!this[Oe]&&!this[fi];)switch(this[H]){case"begin":case"header":this[en](e,t),t+=512;break;case"ignore":case"body":t+=this[Fs](e,t);break;case"meta":t+=this[Jr](e,t);break;default:throw new Error("invalid state: "+this[H])}t{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.stripTrailingSlashes=void 0;var Ca=s=>{let e=s.length-1,t=-1;for(;e>-1&&s.charAt(e)==="/";)t=e,e--;return t===-1?s:s.slice(0,t)};pi.stripTrailingSlashes=Ca});var st=d(F=>{"use strict";var Fa=F&&F.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Ba=F&&F.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),za=F&&F.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{let e=s.onReadEntry;s.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()},qa=(s,e)=>{let t=new Map(e.map(n=>[(0,xs.stripTrailingSlashes)(n),!0])),i=s.filter,r=(n,o="")=>{let a=o||(0,sn.parse)(n).root||".",h;if(n===a)h=!1;else{let l=t.get(n);l!==void 0?h=l:h=r((0,sn.dirname)(n),a)}return t.set(n,h),h};s.filter=i?(n,o)=>i(n,o)&&r((0,xs.stripTrailingSlashes)(n)):n=>r((0,xs.stripTrailingSlashes)(n))};F.filesFilter=qa;var Wa=s=>{let e=new wi.Parser(s),t=s.file,i;try{i=it.default.openSync(t,"r");let r=it.default.fstatSync(i),n=s.maxReadSize||16*1024*1024;if(r.size{let t=new wi.Parser(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,a)=>{t.on("error",a),t.on("end",o),it.default.stat(r,(h,l)=>{if(h)a(h);else{let u=new ja.ReadStream(r,{readSize:i,size:l.size});u.on("error",a),u.pipe(t)}})})};F.list=(0,xa.makeCommand)(Wa,Ha,s=>new wi.Parser(s),s=>new wi.Parser(s),(s,e)=>{e?.length&&(0,F.filesFilter)(s,e),s.noResume||Ua(s)})});var rn=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.modeFix=void 0;var Za=(s,e,t)=>(s&=4095,t&&(s=(s|384)&-19),e&&(s&256&&(s|=64),s&32&&(s|=8),s&4&&(s|=1)),s);yi.modeFix=Za});var Us=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.stripAbsolutePath=void 0;var Ga=require("node:path"),{isAbsolute:Ya,parse:nn}=Ga.win32,Ka=s=>{let e="",t=nn(s);for(;Ya(s)||t.root;){let i=s.charAt(0)==="/"&&s.slice(0,4)!=="//?/"?"/":t.root;s=s.slice(i.length),e+=i,t=nn(s)}return[e,s]};Ei.stripAbsolutePath=Ka});var Ws=d(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.decode=rt.encode=void 0;var bi=["|","<",">","?",":"],qs=bi.map(s=>String.fromCharCode(61440+s.charCodeAt(0))),Va=new Map(bi.map((s,e)=>[s,qs[e]])),$a=new Map(qs.map((s,e)=>[s,bi[e]])),Xa=s=>bi.reduce((e,t)=>e.split(t).join(Va.get(t)),s);rt.encode=Xa;var Qa=s=>qs.reduce((e,t)=>e.split(t).join($a.get(t)),s);rt.decode=Qa});var er=d(M=>{"use strict";var Ja=M&&M.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),eh=M&&M.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),th=M&&M.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;re?(s=(0,ne.normalizeWindowsPath)(s).replace(/^\.(\/|$)/,""),(0,ih.stripTrailingSlashes)(e)+"/"+s):(0,ne.normalizeWindowsPath)(s),rh=16*1024*1024,an=Symbol("process"),hn=Symbol("file"),ln=Symbol("directory"),Zs=Symbol("symlink"),un=Symbol("hardlink"),Ot=Symbol("header"),Si=Symbol("read"),Gs=Symbol("lstat"),gi=Symbol("onlstat"),Ys=Symbol("onread"),Ks=Symbol("onreadlink"),Vs=Symbol("openfile"),$s=Symbol("onopenfile"),ve=Symbol("close"),Ri=Symbol("mode"),Xs=Symbol("awaitDrain"),Hs=Symbol("ondrain"),ae=Symbol("prefix"),Oi=class extends fn.Minipass{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#e=!1;constructor(e,t={}){let i=(0,pn.dealias)(t);super(),this.path=(0,ne.normalizeWindowsPath)(e),this.portable=!!i.portable,this.maxReadSize=i.maxReadSize||rh,this.linkCache=i.linkCache||new Map,this.statCache=i.statCache||new Map,this.preservePaths=!!i.preservePaths,this.cwd=(0,ne.normalizeWindowsPath)(i.cwd||process.cwd()),this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.mtime=i.mtime,this.prefix=i.prefix?(0,ne.normalizeWindowsPath)(i.prefix):void 0,this.onWriteEntry=i.onWriteEntry,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let r=!1;if(!this.preservePaths){let[o,a]=(0,wn.stripAbsolutePath)(this.path);o&&typeof a=="string"&&(this.path=a,r=o)}this.win32=!!i.win32||process.platform==="win32",this.win32&&(this.path=sh.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=(0,ne.normalizeWindowsPath)(i.absolute||on.default.resolve(this.cwd,e)),this.path===""&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});let n=this.statCache.get(this.absolute);n?this[gi](n):this[Gs]()}warn(e,t,i={}){return(0,yn.warnMethod)(this,e,t,i)}emit(e,...t){return e==="error"&&(this.#e=!0),super.emit(e,...t)}[Gs](){oe.default.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[gi](t)})}[gi](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=nh(e),this.emit("stat",e),this[an]()}[an](){switch(this.type){case"File":return this[hn]();case"Directory":return this[ln]();case"SymbolicLink":return this[Zs]();default:return this.end()}}[Ri](e){return(0,mn.modeFix)(e,this.type==="Directory",this.portable)}[ae](e){return En(e,this.prefix)}[Ot](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new dn.Header({path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,mode:this[Ri](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new _n.Pax({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let e=this.header?.block;if(!e)throw new Error("failed to encode header");super.write(e)}[ln](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Ot](),this.end()}[Zs](){oe.default.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[Ks](t)})}[Ks](e){this.linkpath=(0,ne.normalizeWindowsPath)(e),this[Ot](),this.end()}[un](e){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=(0,ne.normalizeWindowsPath)(on.default.relative(this.cwd,e)),this.stat.size=0,this[Ot](),this.end()}[hn](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let e=`${this.stat.dev}:${this.stat.ino}`,t=this.linkCache.get(e);if(t?.indexOf(this.cwd)===0)return this[un](t);this.linkCache.set(e,this.absolute)}if(this[Ot](),this.stat.size===0)return this.end();this[Vs]()}[Vs](){oe.default.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[$s](t)})}[$s](e){if(this.fd=e,this.#e)return this[ve]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Si]()}[Si](){let{fd:e,buf:t,offset:i,length:r,pos:n}=this;if(e===void 0||t===void 0)throw new Error("cannot read file without first opening");oe.default.read(e,t,i,r,n,(o,a)=>{if(o)return this[ve](()=>this.emit("error",o));this[Ys](a)})}[ve](e=()=>{}){this.fd!==void 0&&oe.default.close(this.fd,e)}[Ys](e){if(e<=0&&this.remain>0){let r=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[ve](()=>this.emit("error",r))}if(e>this.remain){let r=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[ve](()=>this.emit("error",r))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(e===this.remain)for(let r=e;rthis[Hs]())}[Xs](e){this.once("drain",e)}write(e,t,i){if(typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this.blockRemaine?this.emit("error",e):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Si]()}};M.WriteEntry=Oi;var Qs=class extends Oi{sync=!0;[Gs](){this[gi](oe.default.lstatSync(this.absolute))}[Zs](){this[Ks](oe.default.readlinkSync(this.absolute))}[Vs](){this[$s](oe.default.openSync(this.absolute,"r"))}[Si](){let e=!0;try{let{fd:t,buf:i,offset:r,length:n,pos:o}=this;if(t===void 0||i===void 0)throw new Error("fd and buf must be set in READ method");let a=oe.default.readSync(t,i,r,n,o);this[Ys](a),e=!1}finally{if(e)try{this[ve](()=>{})}catch{}}}[Xs](e){e()}[ve](e=()=>{}){this.fd!==void 0&&oe.default.closeSync(this.fd),e()}};M.WriteEntrySync=Qs;var Js=class extends fn.Minipass{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(e,t,i={}){return(0,yn.warnMethod)(this,e,t,i)}constructor(e,t={}){let i=(0,pn.dealias)(t);super(),this.preservePaths=!!i.preservePaths,this.portable=!!i.portable,this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.onWriteEntry=i.onWriteEntry,this.readEntry=e;let{type:r}=e;if(r==="Unsupported")throw new Error("writing entry that should be ignored");this.type=r,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=i.prefix,this.path=(0,ne.normalizeWindowsPath)(e.path),this.mode=e.mode!==void 0?this[Ri](e.mode):void 0,this.uid=this.portable?void 0:e.uid,this.gid=this.portable?void 0:e.gid,this.uname=this.portable?void 0:e.uname,this.gname=this.portable?void 0:e.gname,this.size=e.size,this.mtime=this.noMtime?void 0:i.mtime||e.mtime,this.atime=this.portable?void 0:e.atime,this.ctime=this.portable?void 0:e.ctime,this.linkpath=e.linkpath!==void 0?(0,ne.normalizeWindowsPath)(e.linkpath):void 0,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let n=!1;if(!this.preservePaths){let[a,h]=(0,wn.stripAbsolutePath)(this.path);a&&typeof h=="string"&&(this.path=h,n=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.onWriteEntry?.(this),this.header=new dn.Header({path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new _n.Pax({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),e.pipe(this)}[ae](e){return En(e,this.prefix)}[Ri](e){return(0,mn.modeFix)(e,this.type==="Directory",this.portable)}write(e,t,i){typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8"));let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e,i)}end(e,t,i){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof e=="function"&&(i=e,t=void 0,e=void 0),typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,t??"utf8")),i&&this.once("finish",i),e?super.end(e,i):super.end(i),this}};M.WriteEntryTar=Js;var nh=s=>s.isFile()?"File":s.isDirectory()?"Directory":s.isSymbolicLink()?"SymbolicLink":"Unsupported"});var bn=d(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.Node=ot.Yallist=void 0;var tr=class s{tail;head;length=0;static create(e=[]){return new s(e)}constructor(e=[]){for(let t of e)this.push(t)}*[Symbol.iterator](){for(let e=this.head;e;e=e.next)yield e.value}removeNode(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");let t=e.next,i=e.prev;return t&&(t.prev=i),i&&(i.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=i),this.length--,e.next=void 0,e.prev=void 0,e.list=void 0,t}unshiftNode(e){if(e===this.head)return;e.list&&e.list.removeNode(e);let t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}pushNode(e){if(e===this.tail)return;e.list&&e.list.removeNode(e);let t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}push(...e){for(let t=0,i=e.length;t1)i=t;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;r;n++)i=e(i,r.value,n),r=r.next;return i}reduceReverse(e,t){let i,r=this.tail;if(arguments.length>1)i=t;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let n=this.length-1;r;n--)i=e(i,r.value,n),r=r.prev;return i}toArray(){let e=new Array(this.length);for(let t=0,i=this.head;i;t++)e[t]=i.value,i=i.next;return e}toArrayReverse(){let e=new Array(this.length);for(let t=0,i=this.tail;i;t++)e[t]=i.value,i=i.prev;return e}slice(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);let i=new s;if(tthis.length&&(t=this.length);let r=this.head,n=0;for(n=0;r&&nthis.length&&(t=this.length);let r=this.length,n=this.tail;for(;n&&r>t;r--)n=n.prev;for(;n&&r>e;r--,n=n.prev)i.push(n.value);return i}splice(e,t=0,...i){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);let r=this.head;for(let o=0;r&&o{"use strict";var lh=L&&L.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),uh=L&&L.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),ch=L&&L.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(e.gzip&&(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new ir.Gzip(e.gzip)),e.brotli&&(typeof e.brotli!="object"&&(e.brotli={}),this.zip=new ir.BrotliCompress(e.brotli)),e.zstd&&(typeof e.zstd!="object"&&(e.zstd={}),this.zip=new ir.ZstdCompress(e.zstd)),!this.zip)throw new Error("impossible");let t=this.zip;t.on("data",i=>super.write(i)),t.on("end",()=>super.end()),t.on("drain",()=>this[or]()),this.on("resume",()=>t.resume())}else this.on("drain",this[or]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,e.mtime&&(this.mtime=e.mtime),this.filter=typeof e.filter=="function"?e.filter:()=>!0,this[X]=new dh.Yallist,this[Q]=0,this.jobs=Number(e.jobs)||4,this[Tt]=!1,this[vt]=!1}[Tn](e){return super.write(e)}add(e){return this.write(e),this}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e&&this.add(e),this[vt]=!0,this[xe](),i&&i(),this}write(e){if(this[vt])throw new Error("write after end");return e instanceof mh.ReadEntry?this[gn](e):this[Ti](e),this.flowing}[gn](e){let t=(0,ar.normalizeWindowsPath)(On.default.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new Dt(e.path,t);i.entry=new hr.WriteEntryTar(e,this[nr](i)),i.entry.on("end",()=>this[rr](i)),this[Q]+=1,this[X].push(i)}this[xe]()}[Ti](e){let t=(0,ar.normalizeWindowsPath)(On.default.resolve(this.cwd,e));this[X].push(new Dt(e,t)),this[xe]()}[lr](e){e.pending=!0,this[Q]+=1;let t=this.follow?"stat":"lstat";Mi.default[t](e.absolute,(i,r)=>{e.pending=!1,this[Q]-=1,i?this.emit("error",i):this[vi](e,r)})}[vi](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)?t.isFile()&&t.nlink>1&&e===this[je]&&!this.linkCache.get(`${t.dev}:${t.ino}`)&&!this.sync&&this[sr](e):e.ignore=!0,this[xe]()}[ur](e){e.pending=!0,this[Q]+=1,Mi.default.readdir(e.absolute,(t,i)=>{if(e.pending=!1,this[Q]-=1,t)return this.emit("error",t);this[Di](e,i)})}[Di](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[xe]()}[xe](){if(!this[Tt]){this[Tt]=!0;for(let e=this[X].head;e&&this[Q]this.warn(t,i,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[Rn](e){this[Q]+=1;try{return new this[Ni](e.path,this[nr](e)).on("end",()=>this[rr](e)).on("error",i=>this.emit("error",i))}catch(t){this.emit("error",t)}}[or](){this[je]&&this[je].entry&&this[je].entry.resume()}[Pi](e){e.piped=!0,e.readdir&&e.readdir.forEach(r=>{let n=e.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[Ti](o+r)});let t=e.entry,i=this.zip;if(!t)throw new Error("cannot pipe without source");i?t.on("data",r=>{i.write(r)||t.pause()}):t.on("data",r=>{super.write(r)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(e,t,i={}){(0,ph.warnMethod)(this,e,t,i)}};L.Pack=Li;var cr=class extends Li{sync=!0;constructor(e){super(e),this[Ni]=hr.WriteEntrySync}pause(){}resume(){}[lr](e){let t=this.follow?"statSync":"lstatSync";this[vi](e,Mi.default[t](e.absolute))}[ur](e){this[Di](e,Mi.default.readdirSync(e.absolute))}[Pi](e){let t=e.entry,i=this.zip;if(e.readdir&&e.readdir.forEach(r=>{let n=e.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[Ti](o+r)}),!t)throw new Error("Cannot pipe without source");i?t.on("data",r=>{i.write(r)}):t.on("data",r=>{super[Tn](r)})}};L.PackSync=cr});var fr=d(at=>{"use strict";var _h=at&&at.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(at,"__esModule",{value:!0});at.create=void 0;var Dn=Ke(),Pn=_h(require("node:path")),Nn=st(),wh=Ve(),Ii=Ai(),yh=(s,e)=>{let t=new Ii.PackSync(s),i=new Dn.WriteStreamSync(s.file,{mode:s.mode||438});t.pipe(i),Mn(t,e)},Eh=(s,e)=>{let t=new Ii.Pack(s),i=new Dn.WriteStream(s.file,{mode:s.mode||438});t.pipe(i);let r=new Promise((n,o)=>{i.on("error",o),i.on("close",n),t.on("error",o)});return Ln(t,e),r},Mn=(s,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,Nn.list)({file:Pn.default.resolve(s.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(t)}),s.end()},Ln=async(s,e)=>{for(let t=0;t{s.add(r)}}):s.add(i)}s.end()},bh=(s,e)=>{let t=new Ii.PackSync(s);return Mn(t,e),t},Sh=(s,e)=>{let t=new Ii.Pack(s);return Ln(t,e),t};at.create=(0,wh.makeCommand)(yh,Eh,bh,Sh,(s,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})});var Cn=d(ht=>{"use strict";var gh=ht&&ht.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ht,"__esModule",{value:!0});ht.getWriteFlag=void 0;var An=gh(require("fs")),Rh=process.env.__FAKE_PLATFORM__||process.platform,Oh=Rh==="win32",{O_CREAT:vh,O_TRUNC:Th,O_WRONLY:Dh}=An.default.constants,In=Number(process.env.__FAKE_FS_O_FILENAME__)||An.default.constants.UV_FS_O_FILEMAP||0,Ph=Oh&&!!In,Nh=512*1024,Mh=In|Th|vh|Dh;ht.getWriteFlag=Ph?s=>s"w"});var Bn=d(he=>{"use strict";var Fn=he&&he.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(he,"__esModule",{value:!0});he.chownrSync=he.chownr=void 0;var Fi=Fn(require("node:fs")),Pt=Fn(require("node:path")),dr=(s,e,t)=>{try{return Fi.default.lchownSync(s,e,t)}catch(i){if(i?.code!=="ENOENT")throw i}},Ci=(s,e,t,i)=>{Fi.default.lchown(s,e,t,r=>{i(r&&r?.code!=="ENOENT"?r:null)})},Lh=(s,e,t,i,r)=>{if(e.isDirectory())(0,he.chownr)(Pt.default.resolve(s,e.name),t,i,n=>{if(n)return r(n);let o=Pt.default.resolve(s,e.name);Ci(o,t,i,r)});else{let n=Pt.default.resolve(s,e.name);Ci(n,t,i,r)}},Ah=(s,e,t,i)=>{Fi.default.readdir(s,{withFileTypes:!0},(r,n)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!n.length)return Ci(s,e,t,i);let o=n.length,a=null,h=l=>{if(!a){if(l)return i(a=l);if(--o===0)return Ci(s,e,t,i)}};for(let l of n)Lh(s,l,e,t,h)})};he.chownr=Ah;var Ih=(s,e,t,i)=>{e.isDirectory()&&(0,he.chownrSync)(Pt.default.resolve(s,e.name),t,i),dr(Pt.default.resolve(s,e.name),t,i)},Ch=(s,e,t)=>{let i;try{i=Fi.default.readdirSync(s,{withFileTypes:!0})}catch(r){let n=r;if(n?.code==="ENOENT")return;if(n?.code==="ENOTDIR"||n?.code==="ENOTSUP")return dr(s,e,t);throw n}for(let r of i)Ih(s,r,e,t);return dr(s,e,t)};he.chownrSync=Ch});var zn=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.CwdError=void 0;var mr=class extends Error{path;code;syscall="chdir";constructor(e,t){super(`${t}: Cannot cd into '${e}'`),this.path=e,this.code=t}get name(){return"CwdError"}};Bi.CwdError=mr});var _r=d(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.SymlinkError=void 0;var pr=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(e,t){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=e,this.path=t}get name(){return"SymlinkError"}};zi.SymlinkError=pr});var qn=d(Te=>{"use strict";var yr=Te&&Te.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Te,"__esModule",{value:!0});Te.mkdirSync=Te.mkdir=void 0;var kn=Bn(),x=yr(require("node:fs")),Fh=yr(require("node:fs/promises")),ki=yr(require("node:path")),jn=zn(),pe=et(),xn=_r(),Bh=(s,e)=>{x.default.stat(s,(t,i)=>{(t||!i.isDirectory())&&(t=new jn.CwdError(s,t?.code||"ENOTDIR")),e(t)})},zh=(s,e,t)=>{s=(0,pe.normalizeWindowsPath)(s);let i=e.umask??18,r=e.mode|448,n=(r&i)!==0,o=e.uid,a=e.gid,h=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),l=e.preserve,u=e.unlink,c=(0,pe.normalizeWindowsPath)(e.cwd),E=(w,P)=>{w?t(w):P&&h?(0,kn.chownr)(P,o,a,Cr=>E(Cr)):n?x.default.chmod(s,r,t):t()};if(s===c)return Bh(s,E);if(l)return Fh.default.mkdir(s,{mode:r,recursive:!0}).then(w=>E(null,w??void 0),E);let A=(0,pe.normalizeWindowsPath)(ki.default.relative(c,s)).split("/");wr(c,A,r,u,c,void 0,E)};Te.mkdir=zh;var wr=(s,e,t,i,r,n,o)=>{if(!e.length)return o(null,n);let a=e.shift(),h=(0,pe.normalizeWindowsPath)(ki.default.resolve(s+"/"+a));x.default.mkdir(h,t,Un(h,e,t,i,r,n,o))},Un=(s,e,t,i,r,n,o)=>a=>{a?x.default.lstat(s,(h,l)=>{if(h)h.path=h.path&&(0,pe.normalizeWindowsPath)(h.path),o(h);else if(l.isDirectory())wr(s,e,t,i,r,n,o);else if(i)x.default.unlink(s,u=>{if(u)return o(u);x.default.mkdir(s,t,Un(s,e,t,i,r,n,o))});else{if(l.isSymbolicLink())return o(new xn.SymlinkError(s,s+"/"+e.join("/")));o(a)}}):(n=n||s,wr(s,e,t,i,r,n,o))},kh=s=>{let e=!1,t;try{e=x.default.statSync(s).isDirectory()}catch(i){t=i?.code}finally{if(!e)throw new jn.CwdError(s,t??"ENOTDIR")}},jh=(s,e)=>{s=(0,pe.normalizeWindowsPath)(s);let t=e.umask??18,i=e.mode|448,r=(i&t)!==0,n=e.uid,o=e.gid,a=typeof n=="number"&&typeof o=="number"&&(n!==e.processUid||o!==e.processGid),h=e.preserve,l=e.unlink,u=(0,pe.normalizeWindowsPath)(e.cwd),c=w=>{w&&a&&(0,kn.chownrSync)(w,n,o),r&&x.default.chmodSync(s,i)};if(s===u)return kh(u),c();if(h)return c(x.default.mkdirSync(s,{mode:i,recursive:!0})??void 0);let D=(0,pe.normalizeWindowsPath)(ki.default.relative(u,s)).split("/"),A;for(let w=D.shift(),P=u;w&&(P+="/"+w);w=D.shift()){P=(0,pe.normalizeWindowsPath)(ki.default.resolve(P));try{x.default.mkdirSync(P,i),A=A||P}catch{let Fr=x.default.lstatSync(P);if(Fr.isDirectory())continue;if(l){x.default.unlinkSync(P),x.default.mkdirSync(P,i),A=A||P;continue}else if(Fr.isSymbolicLink())return new xn.SymlinkError(P,P+"/"+D.join("/"))}}return c(A)};Te.mkdirSync=jh});var Hn=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.normalizeUnicode=void 0;var Er=Object.create(null),Wn=1e4,lt=new Set,xh=s=>{lt.has(s)?lt.delete(s):Er[s]=s.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),lt.add(s);let e=Er[s],t=lt.size-Wn;if(t>Wn/10){for(let i of lt)if(lt.delete(i),delete Er[i],--t<=0)break}return e};ji.normalizeUnicode=xh});var Gn=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.PathReservations=void 0;var Zn=require("node:path"),Uh=Hn(),qh=_i(),Wh=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Hh=Wh==="win32",Zh=s=>s.split("/").slice(0,-1).reduce((t,i)=>{let r=t[t.length-1];return r!==void 0&&(i=(0,Zn.join)(r,i)),t.push(i||"/"),t},[]),br=class{#e=new Map;#i=new Map;#s=new Set;reserve(e,t){e=Hh?["win32 parallelization disabled"]:e.map(r=>(0,qh.stripTrailingSlashes)((0,Zn.join)((0,Uh.normalizeUnicode)(r))));let i=new Set(e.map(r=>Zh(r)).reduce((r,n)=>r.concat(n)));this.#i.set(t,{dirs:i,paths:e});for(let r of e){let n=this.#e.get(r);n?n.push(t):this.#e.set(r,[t])}for(let r of i){let n=this.#e.get(r);if(!n)this.#e.set(r,[new Set([t])]);else{let o=n[n.length-1];o instanceof Set?o.add(t):n.push(new Set([t]))}}return this.#r(t)}#n(e){let t=this.#i.get(e);if(!t)throw new Error("function does not have any path reservations");return{paths:t.paths.map(i=>this.#e.get(i)),dirs:[...t.dirs].map(i=>this.#e.get(i))}}check(e){let{paths:t,dirs:i}=this.#n(e);return t.every(r=>r&&r[0]===e)&&i.every(r=>r&&r[0]instanceof Set&&r[0].has(e))}#r(e){return this.#s.has(e)||!this.check(e)?!1:(this.#s.add(e),e(()=>this.#t(e)),!0)}#t(e){if(!this.#s.has(e))return!1;let t=this.#i.get(e);if(!t)throw new Error("invalid reservation");let{paths:i,dirs:r}=t,n=new Set;for(let o of i){let a=this.#e.get(o);if(!a||a?.[0]!==e)continue;let h=a[1];if(!h){this.#e.delete(o);continue}if(a.shift(),typeof h=="function")n.add(h);else for(let l of h)n.add(l)}for(let o of r){let a=this.#e.get(o),h=a?.[0];if(!(!a||!(h instanceof Set)))if(h.size===1&&a.length===1){this.#e.delete(o);continue}else if(h.size===1){a.shift();let l=a[0];typeof l=="function"&&n.add(l)}else h.delete(e)}return this.#s.delete(e),n.forEach(o=>this.#r(o)),!0}};xi.PathReservations=br});var Yn=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.umask=void 0;var Gh=()=>process.umask();Ui.umask=Gh});var Lr=d(z=>{"use strict";var Yh=z&&z.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Kh=z&&z.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),so=z&&z.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{if(!Ft)return m.default.unlink(s,e);let t=s+".DELETE."+(0,ro.randomBytes)(16).toString("hex");m.default.rename(s,t,i=>{if(i)return e(i);m.default.unlink(t,e)})},rl=s=>{if(!Ft)return m.default.unlinkSync(s);let e=s+".DELETE."+(0,ro.randomBytes)(16).toString("hex");m.default.renameSync(s,e),m.default.unlinkSync(e)},io=(s,e,t)=>s!==void 0&&s===s>>>0?s:e!==void 0&&e===e>>>0?e:t,Hi=class extends Xh.Parser{[gr]=!1;[Ct]=!1;[qi]=0;reservations=new Jh.PathReservations;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(e={}){if(e.ondone=()=>{this[gr]=!0,this[Rr]()},super(e),this.transform=e.transform,this.chmod=!!e.chmod,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:il,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Ft,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=(0,U.normalizeWindowsPath)(g.default.resolve(e.cwd||process.cwd())),this.strip=Number(e.strip)||0,this.processUmask=this.chmod?typeof e.processUmask=="number"?e.processUmask:(0,el.umask)():0,this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[Vn](t))}warn(e,t,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,t,i)}[Rr](){this[gr]&&this[qi]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Sr](e,t){let i=e[t],{type:r}=e;if(!i||this.preservePaths)return!0;let n=i.split("/");if(n.includes("..")||Ft&&/^[a-z]:\.\.$/i.test(n[0]??"")){if(t==="path"||r==="Link")return this.warn("TAR_ENTRY_ERROR",`${t} contains '..'`,{entry:e,[t]:i}),!1;{let h=g.default.posix.dirname(e.path),l=g.default.posix.normalize(g.default.posix.join(h,i));if(l.startsWith("../")||l==="..")return this.warn("TAR_ENTRY_ERROR",`${t} escapes extraction directory`,{entry:e,[t]:i}),!1}}let[o,a]=(0,Qh.stripAbsolutePath)(i);return o&&(e[t]=String(a),this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute ${t}`,{entry:e,[t]:i})),!0}[eo](e){let t=(0,U.normalizeWindowsPath)(e.path),i=t.split("/");if(this.strip){if(i.length=this.strip)e.linkpath=r.slice(this.strip).join("/");else return!1}i.splice(0,this.strip),e.path=i.join("/")}if(isFinite(this.maxDepth)&&i.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:i.length,maxDepth:this.maxDepth}),!1;if(!this[Sr](e,"path")||!this[Sr](e,"linkpath"))return!1;if(g.default.isAbsolute(e.path)?e.absolute=(0,U.normalizeWindowsPath)(g.default.resolve(e.path)):e.absolute=(0,U.normalizeWindowsPath)(g.default.resolve(this.cwd,e.path)),!this.preservePaths&&typeof e.absolute=="string"&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:(0,U.normalizeWindowsPath)(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=g.default.win32.parse(String(e.absolute));e.absolute=r+Kn.encode(String(e.absolute).slice(r.length));let{root:n}=g.default.win32.parse(e.path);e.path=n+Kn.encode(e.path.slice(n.length))}return!0}[Vn](e){if(!this[eo](e))return e.resume();switch($h.default.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Or](e);default:return this[Jn](e)}}[T](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[ut](),t.resume())}[De](e,t,i){(0,oo.mkdir)((0,U.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t},i)}[Lt](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[At](e){return io(this.uid,e.uid,this.processUid)}[It](e){return io(this.gid,e.gid,this.processGid)}[Tr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.fmode,r=new Vh.WriteStream(String(e.absolute),{flags:(0,no.getWriteFlag)(e.size),mode:i,autoClose:!1});r.on("error",h=>{r.fd&&m.default.close(r.fd,()=>{}),r.write=()=>!0,this[T](h,e),t()});let n=1,o=h=>{if(h){r.fd&&m.default.close(r.fd,()=>{}),this[T](h,e),t();return}--n===0&&r.fd!==void 0&&m.default.close(r.fd,l=>{l?this[T](l,e):this[ut](),t()})};r.on("finish",()=>{let h=String(e.absolute),l=r.fd;if(typeof l=="number"&&e.mtime&&!this.noMtime){n++;let u=e.atime||new Date,c=e.mtime;m.default.futimes(l,u,c,E=>E?m.default.utimes(h,u,c,D=>o(D&&E)):o())}if(typeof l=="number"&&this[Lt](e)){n++;let u=this[At](e),c=this[It](e);typeof u=="number"&&typeof c=="number"&&m.default.fchown(l,u,c,E=>E?m.default.chown(h,u,c,D=>o(D&&E)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",h=>{this[T](h,e),t()}),e.pipe(a)),a.pipe(r)}[Dr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.dmode;this[De](String(e.absolute),i,r=>{if(r){this[T](r,e),t();return}let n=1,o=()=>{--n===0&&(t(),this[ut](),e.resume())};e.mtime&&!this.noMtime&&(n++,m.default.utimes(String(e.absolute),e.atime||new Date,e.mtime,o)),this[Lt](e)&&(n++,m.default.chown(String(e.absolute),Number(this[At](e)),Number(this[It](e)),o)),o()})}[Jn](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Xn](e,t){let i=(0,U.normalizeWindowsPath)(g.default.relative(this.cwd,g.default.resolve(g.default.dirname(String(e.absolute)),String(e.linkpath)))).split("/");this[Mt](e,this.cwd,i,()=>this[Wi](e,String(e.linkpath),"symlink",t),r=>{this[T](r,e),t()})}[Qn](e,t){let i=(0,U.normalizeWindowsPath)(g.default.resolve(this.cwd,String(e.linkpath))),r=(0,U.normalizeWindowsPath)(String(e.linkpath)).split("/");this[Mt](e,this.cwd,r,()=>this[Wi](e,i,"link",t),n=>{this[T](n,e),t()})}[Mt](e,t,i,r,n){let o=i.shift();if(this.preservePaths||o===void 0)return r();let a=g.default.resolve(t,o);m.default.lstat(a,(h,l)=>{if(h)return r();if(l?.isSymbolicLink())return n(new ao.SymlinkError(a,g.default.resolve(a,i.join("/"))));this[Mt](e,a,i,r,n)})}[to](){this[qi]++}[ut](){this[qi]--,this[Rr]()}[Pr](e){this[ut](),e.resume()}[vr](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!Ft}[Or](e){this[to]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,i=>this[$n](e,i))}[$n](e,t){let i=a=>{t(a)},r=()=>{this[De](this.cwd,this.dmode,a=>{if(a){this[T](a,e),i();return}this[Ct]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let a=(0,U.normalizeWindowsPath)(g.default.dirname(String(e.absolute)));if(a!==this.cwd)return this[De](a,this.dmode,h=>{if(h){this[T](h,e),i();return}o()})}o()},o=()=>{m.default.lstat(String(e.absolute),(a,h)=>{if(h&&(this.keep||this.newer&&h.mtime>(e.mtime??h.mtime))){this[Pr](e),i();return}if(a||this[vr](e,h))return this[Z](null,e,i);if(h.isDirectory()){if(e.type==="Directory"){let l=this.chmod&&e.mode&&(h.mode&4095)!==e.mode,u=c=>this[Z](c??null,e,i);return l?m.default.chmod(String(e.absolute),Number(e.mode),u):u()}if(e.absolute!==this.cwd)return m.default.rmdir(String(e.absolute),l=>this[Z](l??null,e,i))}if(e.absolute===this.cwd)return this[Z](null,e,i);sl(String(e.absolute),l=>this[Z](l??null,e,i))})};this[Ct]?n():r()}[Z](e,t,i){if(e){this[T](e,t),i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[Tr](t,i);case"Link":return this[Qn](t,i);case"SymbolicLink":return this[Xn](t,i);case"Directory":case"GNUDumpDir":return this[Dr](t,i)}}[Wi](e,t,i,r){m.default[i](t,String(e.absolute),n=>{n?this[T](n,e):(this[ut](),e.resume()),r()})}};z.Unpack=Hi;var Nt=s=>{try{return[null,s()]}catch(e){return[e,null]}},Nr=class extends Hi{sync=!0;[Z](e,t){return super[Z](e,t,()=>{})}[Or](e){if(!this[Ct]){let n=this[De](this.cwd,this.dmode);if(n)return this[T](n,e);this[Ct]=!0}if(e.absolute!==this.cwd){let n=(0,U.normalizeWindowsPath)(g.default.dirname(String(e.absolute)));if(n!==this.cwd){let o=this[De](n,this.dmode);if(o)return this[T](o,e)}}let[t,i]=Nt(()=>m.default.lstatSync(String(e.absolute)));if(i&&(this.keep||this.newer&&i.mtime>(e.mtime??i.mtime)))return this[Pr](e);if(t||this[vr](e,i))return this[Z](null,e);if(i.isDirectory()){if(e.type==="Directory"){let o=this.chmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=o?Nt(()=>{m.default.chmodSync(String(e.absolute),Number(e.mode))}):[];return this[Z](a,e)}let[n]=Nt(()=>m.default.rmdirSync(String(e.absolute)));this[Z](n,e)}let[r]=e.absolute===this.cwd?[]:Nt(()=>rl(String(e.absolute)));this[Z](r,e)}[Tr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.fmode,r=a=>{let h;try{m.default.closeSync(n)}catch(l){h=l}(a||h)&&this[T](a||h,e),t()},n;try{n=m.default.openSync(String(e.absolute),(0,no.getWriteFlag)(e.size),i)}catch(a){return r(a)}let o=this.transform&&this.transform(e)||e;o!==e&&(o.on("error",a=>this[T](a,e)),e.pipe(o)),o.on("data",a=>{try{m.default.writeSync(n,a,0,a.length)}catch(h){r(h)}}),o.on("end",()=>{let a=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,l=e.mtime;try{m.default.futimesSync(n,h,l)}catch(u){try{m.default.utimesSync(String(e.absolute),h,l)}catch{a=u}}}if(this[Lt](e)){let h=this[At](e),l=this[It](e);try{m.default.fchownSync(n,Number(h),Number(l))}catch(u){try{m.default.chownSync(String(e.absolute),Number(h),Number(l))}catch{a=a||u}}}r(a)})}[Dr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.dmode,r=this[De](String(e.absolute),i);if(r){this[T](r,e),t();return}if(e.mtime&&!this.noMtime)try{m.default.utimesSync(String(e.absolute),e.atime||new Date,e.mtime)}catch{}if(this[Lt](e))try{m.default.chownSync(String(e.absolute),Number(this[At](e)),Number(this[It](e)))}catch{}t(),e.resume()}[De](e,t){try{return(0,oo.mkdirSync)((0,U.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t})}catch(i){return i}}[Mt](e,t,i,r,n){if(this.preservePaths||!i.length)return r();let o=t;for(let a of i){o=g.default.resolve(o,a);let[h,l]=Nt(()=>m.default.lstatSync(o));if(h)return r();if(l.isSymbolicLink())return n(new ao.SymlinkError(o,g.default.resolve(t,i.join("/"))))}r()}[Wi](e,t,i,r){let n=`${i}Sync`;try{m.default[n](t,String(e.absolute)),r(),e.resume()}catch(o){return this[T](o,e)}}};z.UnpackSync=Nr});var Ar=d(G=>{"use strict";var nl=G&&G.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),ol=G&&G.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),al=G&&G.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{let e=new Zi.UnpackSync(s),t=s.file,i=lo.default.statSync(t),r=s.maxReadSize||16*1024*1024;new ho.ReadStreamSync(t,{readSize:r,size:i.size}).pipe(e)},fl=(s,e)=>{let t=new Zi.Unpack(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,a)=>{t.on("error",a),t.on("close",o),lo.default.stat(r,(h,l)=>{if(h)a(h);else{let u=new ho.ReadStream(r,{readSize:i,size:l.size});u.on("error",a),u.pipe(t)}})})};G.extract=(0,ul.makeCommand)(cl,fl,s=>new Zi.UnpackSync(s),s=>new Zi.Unpack(s),(s,e)=>{e?.length&&(0,ll.filesFilter)(s,e)})});var Gi=d(ct=>{"use strict";var uo=ct&&ct.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ct,"__esModule",{value:!0});ct.replace=void 0;var co=Ke(),q=uo(require("node:fs")),fo=uo(require("node:path")),mo=Je(),po=st(),dl=Ve(),ml=Vt(),_o=Ai(),pl=(s,e)=>{let t=new _o.PackSync(s),i=!0,r,n;try{try{r=q.default.openSync(s.file,"r+")}catch(h){if(h?.code==="ENOENT")r=q.default.openSync(s.file,"w+");else throw h}let o=q.default.fstatSync(r),a=Buffer.alloc(512);e:for(n=0;no.size)break;n+=l,s.mtimeCache&&h.mtime&&s.mtimeCache.set(String(h.path),h.mtime)}i=!1,_l(s,t,n,r,e)}finally{if(i)try{q.default.closeSync(r)}catch{}}},_l=(s,e,t,i,r)=>{let n=new co.WriteStreamSync(s.file,{fd:i,start:t});e.pipe(n),yl(e,r)},wl=(s,e)=>{e=Array.from(e);let t=new _o.Pack(s),i=(n,o,a)=>{let h=(D,A)=>{D?q.default.close(n,w=>a(D)):a(null,A)},l=0;if(o===0)return h(null,0);let u=0,c=Buffer.alloc(512),E=(D,A)=>{if(D||typeof A>"u")return h(D);if(u+=A,u<512&&A)return q.default.read(n,c,u,c.length-u,l+u,E);if(l===0&&c[0]===31&&c[1]===139)return h(new Error("cannot append to compressed archives"));if(u<512)return h(null,l);let w=new mo.Header(c);if(!w.cksumValid)return h(null,l);let P=512*Math.ceil((w.size??0)/512);if(l+P+512>o||(l+=P+512,l>=o))return h(null,l);s.mtimeCache&&w.mtime&&s.mtimeCache.set(String(w.path),w.mtime),u=0,q.default.read(n,c,0,512,l,E)};q.default.read(n,c,0,512,l,E)};return new Promise((n,o)=>{t.on("error",o);let a="r+",h=(l,u)=>{if(l&&l.code==="ENOENT"&&a==="r+")return a="w+",q.default.open(s.file,a,h);if(l||!u)return o(l);q.default.fstat(u,(c,E)=>{if(c)return q.default.close(u,()=>o(c));i(u,E.size,(D,A)=>{if(D)return o(D);let w=new co.WriteStream(s.file,{fd:u,start:A});t.pipe(w),w.on("error",o),w.on("close",n),El(t,e)})})};q.default.open(s.file,a,h)})},yl=(s,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,po.list)({file:fo.default.resolve(s.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(t)}),s.end()},El=async(s,e)=>{for(let t=0;ts.add(r)}):s.add(i)}s.end()};ct.replace=(0,dl.makeCommand)(pl,wl,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(s,e)=>{if(!(0,ml.isFile)(s))throw new TypeError("file is required");if(s.gzip||s.brotli||s.zstd||s.file.endsWith(".br")||s.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")})});var Ir=d(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.update=void 0;var bl=Ve(),Bt=Gi();Yi.update=(0,bl.makeCommand)(Bt.replace.syncFile,Bt.replace.asyncFile,Bt.replace.syncNoFile,Bt.replace.asyncNoFile,(s,e=[])=>{Bt.replace.validate?.(s,e),Sl(s)});var Sl=s=>{let e=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=e?(t,i)=>e(t,i)&&!((s.mtimeCache?.get(t)??i.mtime??0)>(i.mtime??0)):(t,i)=>!((s.mtimeCache?.get(t)??i.mtime??0)>(i.mtime??0))}});var wo=exports&&exports.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),gl=exports&&exports.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Y=exports&&exports.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&wo(e,s,t)},Rl=exports&&exports.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r process.umask(); +exports.umask = umask; +//# sourceMappingURL=process-umask.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/tar/dist/commonjs/unpack.js b/deps/npm/node_modules/tar/dist/commonjs/unpack.js index 73ad5f9be55408..dce465312bc7e6 100644 --- a/deps/npm/node_modules/tar/dist/commonjs/unpack.js +++ b/deps/npm/node_modules/tar/dist/commonjs/unpack.js @@ -54,6 +54,8 @@ const parse_js_1 = require("./parse.js"); const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); const wc = __importStar(require("./winchars.js")); const path_reservations_js_1 = require("./path-reservations.js"); +const symlink_error_js_1 = require("./symlink-error.js"); +const process_umask_js_1 = require("./process-umask.js"); const ONENTRY = Symbol('onEntry'); const CHECKFS = Symbol('checkFs'); const CHECKFS2 = Symbol('checkFs2'); @@ -64,6 +66,7 @@ const DIRECTORY = Symbol('directory'); const LINK = Symbol('link'); const SYMLINK = Symbol('symlink'); const HARDLINK = Symbol('hardlink'); +const ENSURE_NO_SYMLINK = Symbol('ensureNoSymlink'); const UNSUPPORTED = Symbol('unsupported'); const CHECKPATH = Symbol('checkPath'); const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath'); @@ -226,7 +229,7 @@ class Unpack extends parse_js_1.Parser { this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === 'number' ? opt.processUmask - : process.umask(); + : (0, process_umask_js_1.umask)(); this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask; // default mode for dirs created as parents @@ -301,6 +304,7 @@ class Unpack extends parse_js_1.Parser { } return true; } + // no IO, just string checking for absolute indicators [CHECKPATH](entry) { const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path); const parts = p.split('/'); @@ -561,11 +565,33 @@ class Unpack extends parse_js_1.Parser { entry.resume(); } [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), 'symlink', done); + const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(this.cwd, node_path_1.default.resolve(node_path_1.default.dirname(String(entry.absolute)), String(entry.linkpath)))).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, String(entry.linkpath), 'symlink', done), er => { + this[ONERROR](er, entry); + done(); + }); } [HARDLINK](entry, done) { const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, 'link', done); + const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, linkpath, 'link', done), er => { + this[ONERROR](er, entry); + done(); + }); + } + [ENSURE_NO_SYMLINK](entry, cwd, parts, done, onError) { + const p = parts.shift(); + if (this.preservePaths || p === undefined) + return done(); + const t = node_path_1.default.resolve(cwd, p); + node_fs_1.default.lstat(t, (er, st) => { + if (er) + return done(); + if (st?.isSymbolicLink()) { + return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(t, parts.join('/')))); + } + this[ENSURE_NO_SYMLINK](entry, t, parts, done, onError); + }); } [PEND]() { this[PENDING]++; @@ -699,7 +725,6 @@ class Unpack extends parse_js_1.Parser { } } [LINK](entry, linkpath, link, done) { - // XXX: get the type ('symlink' or 'junction') for windows node_fs_1.default[link](linkpath, String(entry.absolute), er => { if (er) { this[ONERROR](er, entry); @@ -901,10 +926,25 @@ class UnpackSync extends Unpack { return er; } } + [ENSURE_NO_SYMLINK](_entry, cwd, parts, done, onError) { + if (this.preservePaths || !parts.length) + return done(); + let t = cwd; + for (const p of parts) { + t = node_path_1.default.resolve(t, p); + const [er, st] = callSync(() => node_fs_1.default.lstatSync(t)); + if (er) + return done(); + if (st.isSymbolicLink()) { + return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(cwd, parts.join('/')))); + } + } + done(); + } [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; + const linkSync = `${link}Sync`; try { - node_fs_1.default[ls](linkpath, String(entry.absolute)); + node_fs_1.default[linkSync](linkpath, String(entry.absolute)); done(); entry.resume(); } diff --git a/deps/npm/node_modules/tar/dist/esm/index.min.js b/deps/npm/node_modules/tar/dist/esm/index.min.js new file mode 100644 index 00000000000000..4e06ce82dfbdef --- /dev/null +++ b/deps/npm/node_modules/tar/dist/esm/index.min.js @@ -0,0 +1,4 @@ +var Dr=Object.defineProperty;var Ar=(s,t)=>{for(var e in t)Dr(s,e,{get:t[e],enumerable:!0})};import Hr from"events";import I from"fs";import{EventEmitter as Oi}from"node:events";import Ds from"node:stream";import{StringDecoder as Ir}from"node:string_decoder";var Ts=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cr=s=>!!s&&typeof s=="object"&&(s instanceof A||s instanceof Ds||Fr(s)||kr(s)),Fr=s=>!!s&&typeof s=="object"&&s instanceof Oi&&typeof s.pipe=="function"&&s.pipe!==Ds.Writable.prototype.pipe,kr=s=>!!s&&typeof s=="object"&&s instanceof Oi&&typeof s.write=="function"&&typeof s.end=="function",q=Symbol("EOF"),j=Symbol("maybeEmitEnd"),rt=Symbol("emittedEnd"),xe=Symbol("emittingEnd"),jt=Symbol("emittedError"),Le=Symbol("closed"),xs=Symbol("read"),Ne=Symbol("flush"),Ls=Symbol("flushChunk"),z=Symbol("encoding"),Mt=Symbol("decoder"),b=Symbol("flowing"),Qt=Symbol("paused"),Bt=Symbol("resume"),g=Symbol("buffer"),D=Symbol("pipes"),_=Symbol("bufferLength"),Si=Symbol("bufferPush"),De=Symbol("bufferShift"),L=Symbol("objectMode"),w=Symbol("destroyed"),yi=Symbol("error"),Ri=Symbol("emitData"),Ns=Symbol("emitEnd"),bi=Symbol("emitEnd2"),Z=Symbol("async"),gi=Symbol("abort"),Ae=Symbol("aborted"),Jt=Symbol("signal"),yt=Symbol("dataListeners"),C=Symbol("discarded"),te=s=>Promise.resolve().then(s),vr=s=>s(),Mr=s=>s==="end"||s==="finish"||s==="prefinish",Br=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,Pr=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),Ie=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[Bt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},_i=class extends Ie{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=r=>e.emit("error",r),t.on("error",this.proxyErrors)}},zr=s=>!!s.objectMode,Ur=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",A=class extends Oi{[b]=!1;[Qt]=!1;[D]=[];[g]=[];[L];[z];[Z];[Mt];[q]=!1;[rt]=!1;[xe]=!1;[Le]=!1;[jt]=null;[_]=0;[w]=!1;[Jt];[Ae]=!1;[yt]=0;[C]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");zr(e)?(this[L]=!0,this[z]=null):Ur(e)?(this[z]=e.encoding,this[L]=!1):(this[L]=!1,this[z]=null),this[Z]=!!e.async,this[Mt]=this[z]?new Ir(this[z]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[g]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[D]});let{signal:i}=e;i&&(this[Jt]=i,i.aborted?this[gi]():i.addEventListener("abort",()=>this[gi]()))}get bufferLength(){return this[_]}get encoding(){return this[z]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[L]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Z]}set async(t){this[Z]=this[Z]||!!t}[gi](){this[Ae]=!0,this.emit("abort",this[Jt]?.reason),this.destroy(this[Jt]?.reason)}get aborted(){return this[Ae]}set aborted(t){}write(t,e,i){if(this[Ae])return!1;if(this[q])throw new Error("write after end");if(this[w])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(i=e,e="utf8"),e||(e="utf8");let r=this[Z]?te:vr;if(!this[L]&&!Buffer.isBuffer(t)){if(Pr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Br(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[L]?(this[b]&&this[_]!==0&&this[Ne](!0),this[b]?this.emit("data",t):this[Si](t),this[_]!==0&&this.emit("readable"),i&&r(i),this[b]):t.length?(typeof t=="string"&&!(e===this[z]&&!this[Mt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[z]&&(t=this[Mt].write(t)),this[b]&&this[_]!==0&&this[Ne](!0),this[b]?this.emit("data",t):this[Si](t),this[_]!==0&&this.emit("readable"),i&&r(i),this[b]):(this[_]!==0&&this.emit("readable"),i&&r(i),this[b])}read(t){if(this[w])return null;if(this[C]=!1,this[_]===0||t===0||t&&t>this[_])return this[j](),null;this[L]&&(t=null),this[g].length>1&&!this[L]&&(this[g]=[this[z]?this[g].join(""):Buffer.concat(this[g],this[_])]);let e=this[xs](t||null,this[g][0]);return this[j](),e}[xs](t,e){if(this[L])this[De]();else{let i=e;t===i.length||t===null?this[De]():typeof i=="string"?(this[g][0]=i.slice(t),e=i.slice(0,t),this[_]-=t):(this[g][0]=i.subarray(t),e=i.subarray(0,t),this[_]-=t)}return this.emit("data",e),!this[g].length&&!this[q]&&this.emit("drain"),e}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e="utf8"),t!==void 0&&this.write(t,e),i&&this.once("end",i),this[q]=!0,this.writable=!1,(this[b]||!this[Qt])&&this[j](),this}[Bt](){this[w]||(!this[yt]&&!this[D].length&&(this[C]=!0),this[Qt]=!1,this[b]=!0,this.emit("resume"),this[g].length?this[Ne]():this[q]?this[j]():this.emit("drain"))}resume(){return this[Bt]()}pause(){this[b]=!1,this[Qt]=!0,this[C]=!1}get destroyed(){return this[w]}get flowing(){return this[b]}get paused(){return this[Qt]}[Si](t){this[L]?this[_]+=1:this[_]+=t.length,this[g].push(t)}[De](){return this[L]?this[_]-=1:this[_]-=this[g][0].length,this[g].shift()}[Ne](t=!1){do;while(this[Ls](this[De]())&&this[g].length);!t&&!this[g].length&&!this[q]&&this.emit("drain")}[Ls](t){return this.emit("data",t),this[b]}pipe(t,e){if(this[w])return t;this[C]=!1;let i=this[rt];return e=e||{},t===Ts.stdout||t===Ts.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[D].push(e.proxyErrors?new _i(this,t,e):new Ie(this,t,e)),this[Z]?te(()=>this[Bt]()):this[Bt]()),t}unpipe(t){let e=this[D].find(i=>i.dest===t);e&&(this[D].length===1?(this[b]&&this[yt]===0&&(this[b]=!1),this[D]=[]):this[D].splice(this[D].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if(t==="data")this[C]=!1,this[yt]++,!this[D].length&&!this[b]&&this[Bt]();else if(t==="readable"&&this[_]!==0)super.emit("readable");else if(Mr(t)&&this[rt])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[jt]){let r=e;this[Z]?te(()=>r.call(this,this[jt])):r.call(this,this[jt])}return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return t==="data"&&(this[yt]=this.listeners("data").length,this[yt]===0&&!this[C]&&!this[D].length&&(this[b]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[yt]=0,!this[C]&&!this[D].length&&(this[b]=!1)),e}get emittedEnd(){return this[rt]}[j](){!this[xe]&&!this[rt]&&!this[w]&&this[g].length===0&&this[q]&&(this[xe]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Le]&&this.emit("close"),this[xe]=!1)}emit(t,...e){let i=e[0];if(t!=="error"&&t!=="close"&&t!==w&&this[w])return!1;if(t==="data")return!this[L]&&!i?!1:this[Z]?(te(()=>this[Ri](i)),!0):this[Ri](i);if(t==="end")return this[Ns]();if(t==="close"){if(this[Le]=!0,!this[rt]&&!this[w])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(t==="error"){this[jt]=i,super.emit(yi,i);let n=!this[Jt]||this.listeners("error").length?super.emit("error",i):!1;return this[j](),n}else if(t==="resume"){let n=super.emit("resume");return this[j](),n}else if(t==="finish"||t==="prefinish"){let n=super.emit(t);return this.removeAllListeners(t),n}let r=super.emit(t,...e);return this[j](),r}[Ri](t){for(let i of this[D])i.dest.write(t)===!1&&this.pause();let e=this[C]?!1:super.emit("data",t);return this[j](),e}[Ns](){return this[rt]?!1:(this[rt]=!0,this.readable=!1,this[Z]?(te(()=>this[bi]()),!0):this[bi]())}[bi](){if(this[Mt]){let e=this[Mt].end();if(e){for(let i of this[D])i.dest.write(e);this[C]||super.emit("data",e)}}for(let e of this[D])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[L]||(t.dataLength=0);let e=this.promise();return this.on("data",i=>{t.push(i),this[L]||(t.dataLength+=i.length)}),await e,t}async concat(){if(this[L])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[z]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(w,()=>e(new Error("stream destroyed"))),this.on("error",i=>e(i)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[C]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[q])return e();let n,o,h=d=>{this.off("data",a),this.off("end",l),this.off(w,c),e(),o(d)},a=d=>{this.off("error",h),this.off("end",l),this.off(w,c),this.pause(),n({value:d,done:!!this[q]})},l=()=>{this.off("error",h),this.off("data",a),this.off(w,c),e(),n({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise((d,S)=>{o=S,n=d,this.once(w,c),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[C]=!1;let t=!1,e=()=>(this.pause(),this.off(yi,e),this.off(w,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let r=this.read();return r===null?e():{done:!1,value:r}};return this.once("end",e),this.once(yi,e),this.once(w,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[w])return t?this.emit("error",t):this.emit(w),this;this[w]=!0,this[C]=!0,this[g].length=0,this[_]=0;let e=this;return typeof e.close=="function"&&!this[Le]&&e.close(),t?this.emit("error",t):this.emit(w),this}static get isStream(){return Cr}};var Wr=I.writev,ot=Symbol("_autoClose"),H=Symbol("_close"),ee=Symbol("_ended"),m=Symbol("_fd"),Ti=Symbol("_finished"),J=Symbol("_flags"),xi=Symbol("_flush"),Ai=Symbol("_handleChunk"),Ii=Symbol("_makeBuf"),se=Symbol("_mode"),Ce=Symbol("_needDrain"),Ut=Symbol("_onerror"),Ht=Symbol("_onopen"),Li=Symbol("_onread"),Pt=Symbol("_onwrite"),ht=Symbol("_open"),U=Symbol("_path"),nt=Symbol("_pos"),Y=Symbol("_queue"),zt=Symbol("_read"),Ni=Symbol("_readSize"),Q=Symbol("_reading"),ie=Symbol("_remain"),Di=Symbol("_size"),Fe=Symbol("_write"),Rt=Symbol("_writing"),ke=Symbol("_defaultFlag"),bt=Symbol("_errored"),gt=class extends A{[bt]=!1;[m];[U];[Ni];[Q]=!1;[Di];[ie];[ot];constructor(t,e){if(e=e||{},super(e),this.readable=!0,this.writable=!1,typeof t!="string")throw new TypeError("path must be a string");this[bt]=!1,this[m]=typeof e.fd=="number"?e.fd:void 0,this[U]=t,this[Ni]=e.readSize||16*1024*1024,this[Q]=!1,this[Di]=typeof e.size=="number"?e.size:1/0,this[ie]=this[Di],this[ot]=typeof e.autoClose=="boolean"?e.autoClose:!0,typeof this[m]=="number"?this[zt]():this[ht]()}get fd(){return this[m]}get path(){return this[U]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[ht](){I.open(this[U],"r",(t,e)=>this[Ht](t,e))}[Ht](t,e){t?this[Ut](t):(this[m]=e,this.emit("open",e),this[zt]())}[Ii](){return Buffer.allocUnsafe(Math.min(this[Ni],this[ie]))}[zt](){if(!this[Q]){this[Q]=!0;let t=this[Ii]();if(t.length===0)return process.nextTick(()=>this[Li](null,0,t));I.read(this[m],t,0,t.length,null,(e,i,r)=>this[Li](e,i,r))}}[Li](t,e,i){this[Q]=!1,t?this[Ut](t):this[Ai](e,i)&&this[zt]()}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.close(t,e=>e?this.emit("error",e):this.emit("close"))}}[Ut](t){this[Q]=!0,this[H](),this.emit("error",t)}[Ai](t,e){let i=!1;return this[ie]-=t,t>0&&(i=super.write(tthis[Ht](t,e))}[Ht](t,e){this[ke]&&this[J]==="r+"&&t&&t.code==="ENOENT"?(this[J]="w",this[ht]()):t?this[Ut](t):(this[m]=e,this.emit("open",e),this[Rt]||this[xi]())}end(t,e){return t&&this.write(t,e),this[ee]=!0,!this[Rt]&&!this[Y].length&&typeof this[m]=="number"&&this[Pt](null,0),this}write(t,e){return typeof t=="string"&&(t=Buffer.from(t,e)),this[ee]?(this.emit("error",new Error("write() after end()")),!1):this[m]===void 0||this[Rt]||this[Y].length?(this[Y].push(t),this[Ce]=!0,!1):(this[Rt]=!0,this[Fe](t),!0)}[Fe](t){I.write(this[m],t,0,t.length,this[nt],(e,i)=>this[Pt](e,i))}[Pt](t,e){t?this[Ut](t):(this[nt]!==void 0&&typeof e=="number"&&(this[nt]+=e),this[Y].length?this[xi]():(this[Rt]=!1,this[ee]&&!this[Ti]?(this[Ti]=!0,this[H](),this.emit("finish")):this[Ce]&&(this[Ce]=!1,this.emit("drain"))))}[xi](){if(this[Y].length===0)this[ee]&&this[Pt](null,0);else if(this[Y].length===1)this[Fe](this[Y].pop());else{let t=this[Y];this[Y]=[],Wr(this[m],t,this[nt],(e,i)=>this[Pt](e,i))}}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.close(t,e=>e?this.emit("error",e):this.emit("close"))}}},Wt=class extends tt{[ht](){let t;if(this[ke]&&this[J]==="r+")try{t=I.openSync(this[U],this[J],this[se])}catch(e){if(e?.code==="ENOENT")return this[J]="w",this[ht]();throw e}else t=I.openSync(this[U],this[J],this[se]);this[Ht](null,t)}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.closeSync(t),this.emit("close")}}[Fe](t){let e=!0;try{this[Pt](null,I.writeSync(this[m],t,0,t.length,this[nt])),e=!1}finally{if(e)try{this[H]()}catch{}}}};import or from"node:path";import Vt from"node:fs";import{dirname as bn,parse as gn}from"path";var Gr=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),As=s=>!!s.sync&&!!s.file,Is=s=>!s.sync&&!!s.file,Cs=s=>!!s.sync&&!s.file,Fs=s=>!s.sync&&!s.file;var ks=s=>!!s.file;var Zr=s=>{let t=Gr.get(s);return t||s},re=(s={})=>{if(!s)return{};let t={};for(let[e,i]of Object.entries(s)){let r=Zr(e);t[r]=i}return t.chmod===void 0&&t.noChmod===!1&&(t.chmod=!0),delete t.noChmod,t};var K=(s,t,e,i,r)=>Object.assign((n=[],o,h)=>{Array.isArray(n)&&(o=n,n={}),typeof o=="function"&&(h=o,o=void 0),o?o=Array.from(o):o=[];let a=re(n);if(r?.(a,o),As(a)){if(typeof h=="function")throw new TypeError("callback not supported for sync tar functions");return s(a,o)}else if(Is(a)){let l=t(a,o),c=h||void 0;return c?l.then(()=>c(),c):l}else if(Cs(a)){if(typeof h=="function")throw new TypeError("callback not supported for sync tar functions");return e(a,o)}else if(Fs(a)){if(typeof h=="function")throw new TypeError("callback only supported with file option");return i(a,o)}else throw new Error("impossible options??")},{syncFile:s,asyncFile:t,syncNoFile:e,asyncNoFile:i,validate:r});import{EventEmitter as wn}from"events";import vi from"assert";import{Buffer as _t}from"buffer";import*as vs from"zlib";import Yr from"zlib";var Kr=Yr.constants||{ZLIB_VERNUM:4736},M=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Kr));var Vr=_t.concat,Ms=Object.getOwnPropertyDescriptor(_t,"concat"),$r=s=>s,Fi=Ms?.writable===!0||Ms?.set!==void 0?s=>{_t.concat=s?$r:Vr}:s=>{},Ot=Symbol("_superWrite"),Gt=class extends Error{code;errno;constructor(t,e){super("zlib: "+t.message,{cause:t}),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,e??this.constructor)}get name(){return"ZlibError"}},ki=Symbol("flushFlag"),ne=class extends A{#t=!1;#i=!1;#s;#n;#r;#e;#o;get sawError(){return this.#t}get handle(){return this.#e}get flushFlag(){return this.#s}constructor(t,e){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(t),this.#s=t.flush??0,this.#n=t.finishFlush??0,this.#r=t.fullFlushFlag??0,typeof vs[e]!="function")throw new TypeError("Compression method not supported: "+e);try{this.#e=new vs[e](t)}catch(i){throw new Gt(i,this.constructor)}this.#o=i=>{this.#t||(this.#t=!0,this.close(),this.emit("error",i))},this.#e?.on("error",i=>this.#o(new Gt(i))),this.once("end",()=>this.close)}close(){this.#e&&(this.#e.close(),this.#e=void 0,this.emit("close"))}reset(){if(!this.#t)return vi(this.#e,"zlib binding closed"),this.#e.reset?.()}flush(t){this.ended||(typeof t!="number"&&(t=this.#r),this.write(Object.assign(_t.alloc(0),{[ki]:t})))}end(t,e,i){return typeof t=="function"&&(i=t,e=void 0,t=void 0),typeof e=="function"&&(i=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#n),this.#i=!0,super.end(i)}get ended(){return this.#i}[Ot](t){return super.write(t)}write(t,e,i){if(typeof e=="function"&&(i=e,e="utf8"),typeof t=="string"&&(t=_t.from(t,e)),this.#t)return;vi(this.#e,"zlib binding closed");let r=this.#e._handle,n=r.close;r.close=()=>{};let o=this.#e.close;this.#e.close=()=>{},Fi(!0);let h;try{let l=typeof t[ki]=="number"?t[ki]:this.#s;h=this.#e._processChunk(t,l),Fi(!1)}catch(l){Fi(!1),this.#o(new Gt(l,this.write))}finally{this.#e&&(this.#e._handle=r,r.close=n,this.#e.close=o,this.#e.removeAllListeners("error"))}this.#e&&this.#e.on("error",l=>this.#o(new Gt(l,this.write)));let a;if(h)if(Array.isArray(h)&&h.length>0){let l=h[0];a=this[Ot](_t.from(l));for(let c=1;c{typeof r=="function"&&(n=r,r=this.flushFlag),this.flush(r),n?.()};try{this.handle.params(t,e)}finally{this.handle.flush=i}this.handle&&(this.#t=t,this.#i=e)}}}};var Be=class extends Me{#t;constructor(t){super(t,"Gzip"),this.#t=t&&!!t.portable}[Ot](t){return this.#t?(this.#t=!1,t[9]=255,super[Ot](t)):super[Ot](t)}};var Pe=class extends Me{constructor(t){super(t,"Unzip")}},ze=class extends ne{constructor(t,e){t=t||{},t.flush=t.flush||M.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||M.BROTLI_OPERATION_FINISH,t.fullFlushFlag=M.BROTLI_OPERATION_FLUSH,super(t,e)}},Ue=class extends ze{constructor(t){super(t,"BrotliCompress")}},He=class extends ze{constructor(t){super(t,"BrotliDecompress")}},We=class extends ne{constructor(t,e){t=t||{},t.flush=t.flush||M.ZSTD_e_continue,t.finishFlush=t.finishFlush||M.ZSTD_e_end,t.fullFlushFlag=M.ZSTD_e_flush,super(t,e)}},Ge=class extends We{constructor(t){super(t,"ZstdCompress")}},Ze=class extends We{constructor(t){super(t,"ZstdDecompress")}};import{posix as Zt}from"node:path";var Bs=(s,t)=>{if(Number.isSafeInteger(s))s<0?jr(s,t):qr(s,t);else throw Error("cannot encode number outside of javascript safe integer range");return t},qr=(s,t)=>{t[0]=128;for(var e=t.length;e>1;e--)t[e-1]=s&255,s=Math.floor(s/256)},jr=(s,t)=>{t[0]=255;var e=!1;s=s*-1;for(var i=t.length;i>1;i--){var r=s&255;s=Math.floor(s/256),e?t[i-1]=zs(r):r===0?t[i-1]=0:(e=!0,t[i-1]=Us(r))}},Ps=s=>{let t=s[0],e=t===128?Jr(s.subarray(1,s.length)):t===255?Qr(s):null;if(e===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(e))throw Error("parsed number outside of javascript safe integer range");return e},Qr=s=>{for(var t=s.length,e=0,i=!1,r=t-1;r>-1;r--){var n=Number(s[r]),o;i?o=zs(n):n===0?o=n:(i=!0,o=Us(n)),o!==0&&(e-=o*Math.pow(256,t-r-1))}return e},Jr=s=>{for(var t=s.length,e=0,i=t-1;i>-1;i--){var r=Number(s[i]);r!==0&&(e+=r*Math.pow(256,t-i-1))}return e},zs=s=>(255^s)&255,Us=s=>(255^s)+1&255;var Mi={};Ar(Mi,{code:()=>Ye,isCode:()=>oe,isName:()=>en,name:()=>he});var oe=s=>he.has(s),en=s=>Ye.has(s),he=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),Ye=new Map(Array.from(he).map(s=>[s[1],s[0]]));var F=class{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#t="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,i,r){Buffer.isBuffer(t)?this.decode(t,e||0,i,r):t&&this.#i(t)}decode(t,e,i,r){if(e||(e=0),!t||!(t.length>=e+512))throw new Error("need 512 bytes for header");this.path=i?.path??Tt(t,e,100),this.mode=i?.mode??r?.mode??at(t,e+100,8),this.uid=i?.uid??r?.uid??at(t,e+108,8),this.gid=i?.gid??r?.gid??at(t,e+116,8),this.size=i?.size??r?.size??at(t,e+124,12),this.mtime=i?.mtime??r?.mtime??Bi(t,e+136,12),this.cksum=at(t,e+148,12),r&&this.#i(r,!0),i&&this.#i(i);let n=Tt(t,e+156,1);if(oe(n)&&(this.#t=n||"0"),this.#t==="0"&&this.path.slice(-1)==="/"&&(this.#t="5"),this.#t==="5"&&(this.size=0),this.linkpath=Tt(t,e+157,100),t.subarray(e+257,e+265).toString()==="ustar\x0000")if(this.uname=i?.uname??r?.uname??Tt(t,e+265,32),this.gname=i?.gname??r?.gname??Tt(t,e+297,32),this.devmaj=i?.devmaj??r?.devmaj??at(t,e+329,8)??0,this.devmin=i?.devmin??r?.devmin??at(t,e+337,8)??0,t[e+475]!==0){let h=Tt(t,e+345,155);this.path=h+"/"+this.path}else{let h=Tt(t,e+345,130);h&&(this.path=h+"/"+this.path),this.atime=i?.atime??r?.atime??Bi(t,e+476,12),this.ctime=i?.ctime??r?.ctime??Bi(t,e+488,12)}let o=256;for(let h=e;h!(r==null||i==="path"&&e||i==="linkpath"&&e||i==="global"))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),this.#t==="Unsupported"&&(this.#t="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=sn(this.path||"",i),n=r[0],o=r[1];this.needPax=!!r[2],this.needPax=xt(t,e,100,n)||this.needPax,this.needPax=lt(t,e+100,8,this.mode)||this.needPax,this.needPax=lt(t,e+108,8,this.uid)||this.needPax,this.needPax=lt(t,e+116,8,this.gid)||this.needPax,this.needPax=lt(t,e+124,12,this.size)||this.needPax,this.needPax=Pi(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#t.charCodeAt(0),this.needPax=xt(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=xt(t,e+265,32,this.uname)||this.needPax,this.needPax=xt(t,e+297,32,this.gname)||this.needPax,this.needPax=lt(t,e+329,8,this.devmaj)||this.needPax,this.needPax=lt(t,e+337,8,this.devmin)||this.needPax,this.needPax=xt(t,e+345,i,o)||this.needPax,t[e+475]!==0?this.needPax=xt(t,e+345,155,o)||this.needPax:(this.needPax=xt(t,e+345,130,o)||this.needPax,this.needPax=Pi(t,e+476,12,this.atime)||this.needPax,this.needPax=Pi(t,e+488,12,this.ctime)||this.needPax);let h=256;for(let a=e;a{let i=s,r="",n,o=Zt.parse(s).root||".";if(Buffer.byteLength(i)<100)n=[i,r,!1];else{r=Zt.dirname(i),i=Zt.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=t?n=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=t?n=[i.slice(0,99),r,!0]:(i=Zt.join(Zt.basename(r),i),r=Zt.dirname(r));while(r!==o&&n===void 0);n||(n=[s.slice(0,99),"",!0])}return n},Tt=(s,t,e)=>s.subarray(t,t+e).toString("utf8").replace(/\0.*/,""),Bi=(s,t,e)=>rn(at(s,t,e)),rn=s=>s===void 0?void 0:new Date(s*1e3),at=(s,t,e)=>Number(s[t])&128?Ps(s.subarray(t,t+e)):on(s,t,e),nn=s=>isNaN(s)?void 0:s,on=(s,t,e)=>nn(parseInt(s.subarray(t,t+e).toString("utf8").replace(/\0.*$/,"").trim(),8)),hn={12:8589934591,8:2097151},lt=(s,t,e,i)=>i===void 0?!1:i>hn[e]||i<0?(Bs(i,s.subarray(t,t+e)),!0):(an(s,t,e,i),!1),an=(s,t,e,i)=>s.write(ln(i,e),t,e,"ascii"),ln=(s,t)=>cn(Math.floor(s).toString(8),t),cn=(s,t)=>(s.length===t-1?s:new Array(t-s.length-1).join("0")+s+" ")+"\0",Pi=(s,t,e,i)=>i===void 0?!1:lt(s,t,e,i.getTime()/1e3),fn=new Array(156).join("\0"),xt=(s,t,e,i)=>i===void 0?!1:(s.write(i+fn,t,e,"utf8"),i.length!==Buffer.byteLength(i)||i.length>e);import{basename as dn}from"node:path";var ct=class s{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){let t=this.encodeBody();if(t==="")return Buffer.allocUnsafe(0);let e=Buffer.byteLength(t),i=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(i);for(let n=0;n<512;n++)r[n]=0;new F({path:("PaxHeader/"+dn(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let n=e+512;n=Math.pow(10,o)&&(o+=1),o+n+r}static parse(t,e,i=!1){return new s(un(mn(t),e),i)}},un=(s,t)=>t?Object.assign({},t,s):s,mn=s=>s.replace(/\n$/,"").split(` +`).reduce(pn,Object.create(null)),pn=(s,t)=>{let e=parseInt(t,10);if(e!==Buffer.byteLength(t)+1)return s;t=t.slice((e+" ").length);let i=t.split("="),r=i.shift();if(!r)return s;let n=r.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),o=i.join("=");return s[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(o)*1e3):/^[0-9]+$/.test(o)?+o:o,s};var En=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,f=En!=="win32"?s=>s:s=>s&&s.replace(/\\/g,"/");var Yt=class extends A{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,i){switch(super({}),this.pause(),this.extended=e,this.globalExtended=i,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=f(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?f(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#t(e),i&&this.#t(i,!0)}write(t){let e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-e),this.blockRemain=Math.max(0,r-e),this.ignore?!0:i>=e?super.write(t):super.write(t.subarray(0,i))}#t(t,e=!1){t.path&&(t.path=f(t.path)),t.linkpath&&(t.linkpath=f(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter(([i,r])=>!(r==null||i==="path"&&e))))}};var Lt=(s,t,e,i={})=>{s.file&&(i.file=s.file),s.cwd&&(i.cwd=s.cwd),i.code=e instanceof Error&&e.code||t,i.tarCode=t,!s.strict&&i.recoverable!==!1?(e instanceof Error&&(i=Object.assign(e,i),e=e.message),s.emit("warn",t,e,i)):e instanceof Error?s.emit("error",Object.assign(e,i)):s.emit("error",Object.assign(new Error(`${t}: ${e}`),i))};var Sn=1024*1024,Gi=Buffer.from([31,139]),Zi=Buffer.from([40,181,47,253]),yn=Math.max(Gi.length,Zi.length),B=Symbol("state"),Nt=Symbol("writeEntry"),et=Symbol("readEntry"),zi=Symbol("nextEntry"),Hs=Symbol("processEntry"),V=Symbol("extendedHeader"),ae=Symbol("globalExtendedHeader"),ft=Symbol("meta"),Ws=Symbol("emitMeta"),p=Symbol("buffer"),it=Symbol("queue"),dt=Symbol("ended"),Ui=Symbol("emittedEnd"),Dt=Symbol("emit"),y=Symbol("unzip"),Ke=Symbol("consumeChunk"),Ve=Symbol("consumeChunkSub"),Hi=Symbol("consumeBody"),Gs=Symbol("consumeMeta"),Zs=Symbol("consumeHeader"),le=Symbol("consuming"),Wi=Symbol("bufferConcat"),$e=Symbol("maybeEnd"),Kt=Symbol("writing"),ut=Symbol("aborted"),Xe=Symbol("onDone"),At=Symbol("sawValidEntry"),qe=Symbol("sawNullBlock"),je=Symbol("sawEOF"),Ys=Symbol("closeStream"),Rn=()=>!0,st=class extends wn{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[it]=[];[p];[et];[Nt];[B]="begin";[ft]="";[V];[ae];[dt]=!1;[y];[ut]=!1;[At];[qe]=!1;[je]=!1;[Kt]=!1;[le]=!1;[Ui]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(Xe,()=>{(this[B]==="begin"||this[At]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),t.ondone?this.on(Xe,t.ondone):this.on(Xe,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||Sn,this.filter=typeof t.filter=="function"?t.filter:Rn;let e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=!(t.gzip||t.zstd)&&t.brotli!==void 0?t.brotli:e?void 0:!1;let i=t.file&&(t.file.endsWith(".tar.zst")||t.file.endsWith(".tzst"));this.zstd=!(t.gzip||t.brotli)&&t.zstd!==void 0?t.zstd:i?!0:void 0,this.on("end",()=>this[Ys]()),typeof t.onwarn=="function"&&this.on("warn",t.onwarn),typeof t.onReadEntry=="function"&&this.on("entry",t.onReadEntry)}warn(t,e,i={}){Lt(this,t,e,i)}[Zs](t,e){this[At]===void 0&&(this[At]=!1);let i;try{i=new F(t,e,this[V],this[ae])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[qe]?(this[je]=!0,this[B]==="begin"&&(this[B]="header"),this[Dt]("eof")):(this[qe]=!0,this[Dt]("nullBlock"));else if(this[qe]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&!/^(Global)?ExtendedHeader$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let n=this[Nt]=new Yt(i,this[V],this[ae]);if(!this[At])if(n.remain){let o=()=>{n.invalid||(this[At]=!0)};n.on("end",o)}else this[At]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Dt]("ignoredEntry",n),this[B]="ignore",n.resume()):n.size>0&&(this[ft]="",n.on("data",o=>this[ft]+=o),this[B]="meta"):(this[V]=void 0,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Dt]("ignoredEntry",n),this[B]=n.remain?"ignore":"header",n.resume()):(n.remain?this[B]="body":(this[B]="header",n.end()),this[et]?this[it].push(n):(this[it].push(n),this[zi]())))}}}[Ys](){queueMicrotask(()=>this.emit("close"))}[Hs](t){let e=!0;if(!t)this[et]=void 0,e=!1;else if(Array.isArray(t)){let[i,...r]=t;this.emit(i,...r)}else this[et]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",()=>this[zi]()),e=!1);return e}[zi](){do;while(this[Hs](this[it].shift()));if(!this[it].length){let t=this[et];!t||t.flowing||t.size===t.remain?this[Kt]||this.emit("drain"):t.once("drain",()=>this.emit("drain"))}}[Hi](t,e){let i=this[Nt];if(!i)throw new Error("attempt to consume body without entry??");let r=i.blockRemain??0,n=r>=t.length&&e===0?t:t.subarray(e,e+r);return i.write(n),i.blockRemain||(this[B]="header",this[Nt]=void 0,i.end()),n.length}[Gs](t,e){let i=this[Nt],r=this[Hi](t,e);return!this[Nt]&&i&&this[Ws](i),r}[Dt](t,e,i){!this[it].length&&!this[et]?this.emit(t,e,i):this[it].push([t,e,i])}[Ws](t){switch(this[Dt]("meta",this[ft]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[V]=ct.parse(this[ft],this[V],!1);break;case"GlobalExtendedHeader":this[ae]=ct.parse(this[ft],this[ae],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let e=this[V]??Object.create(null);this[V]=e,e.path=this[ft].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let e=this[V]||Object.create(null);this[V]=e,e.linkpath=this[ft].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[ut]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,i){if(typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8")),this[ut])return i?.(),!1;if((this[y]===void 0||this.brotli===void 0&&this[y]===!1)&&t){if(this[p]&&(t=Buffer.concat([this[p],t]),this[p]=void 0),t.lengththis[Ke](c)),this[y].on("error",c=>this.abort(c)),this[y].on("end",()=>{this[dt]=!0,this[Ke]()}),this[Kt]=!0;let l=!!this[y][a?"end":"write"](t);return this[Kt]=!1,i?.(),l}}this[Kt]=!0,this[y]?this[y].write(t):this[Ke](t),this[Kt]=!1;let n=this[it].length?!1:this[et]?this[et].flowing:!0;return!n&&!this[it].length&&this[et]?.once("drain",()=>this.emit("drain")),i?.(),n}[Wi](t){t&&!this[ut]&&(this[p]=this[p]?Buffer.concat([this[p],t]):t)}[$e](){if(this[dt]&&!this[Ui]&&!this[ut]&&!this[le]){this[Ui]=!0;let t=this[Nt];if(t&&t.blockRemain){let e=this[p]?this[p].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[p]&&t.write(this[p]),t.end()}this[Dt](Xe)}}[Ke](t){if(this[le]&&t)this[Wi](t);else if(!t&&!this[p])this[$e]();else if(t){if(this[le]=!0,this[p]){this[Wi](t);let e=this[p];this[p]=void 0,this[Ve](e)}else this[Ve](t);for(;this[p]&&this[p]?.length>=512&&!this[ut]&&!this[je];){let e=this[p];this[p]=void 0,this[Ve](e)}this[le]=!1}(!this[p]||this[dt])&&this[$e]()}[Ve](t){let e=0,i=t.length;for(;e+512<=i&&!this[ut]&&!this[je];)switch(this[B]){case"begin":case"header":this[Zs](t,e),e+=512;break;case"ignore":case"body":e+=this[Hi](t,e);break;case"meta":e+=this[Gs](t,e);break;default:throw new Error("invalid state: "+this[B])}e{let t=s.length-1,e=-1;for(;t>-1&&s.charAt(t)==="/";)e=t,t--;return e===-1?s:s.slice(0,e)};var _n=s=>{let t=s.onReadEntry;s.onReadEntry=t?e=>{t(e),e.resume()}:e=>e.resume()},Yi=(s,t)=>{let e=new Map(t.map(n=>[mt(n),!0])),i=s.filter,r=(n,o="")=>{let h=o||gn(n).root||".",a;if(n===h)a=!1;else{let l=e.get(n);l!==void 0?a=l:a=r(bn(n),h)}return e.set(n,a),a};s.filter=i?(n,o)=>i(n,o)&&r(mt(n)):n=>r(mt(n))},On=s=>{let t=new st(s),e=s.file,i;try{i=Vt.openSync(e,"r");let r=Vt.fstatSync(i),n=s.maxReadSize||16*1024*1024;if(r.size{let e=new st(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,h)=>{e.on("error",h),e.on("end",o),Vt.stat(r,(a,l)=>{if(a)h(a);else{let c=new gt(r,{readSize:i,size:l.size});c.on("error",h),c.pipe(e)}})})},It=K(On,Tn,s=>new st(s),s=>new st(s),(s,t)=>{t?.length&&Yi(s,t),s.noResume||_n(s)});import ci from"fs";import $ from"fs";import Xs from"path";var Ki=(s,t,e)=>(s&=4095,e&&(s=(s|384)&-19),t&&(s&256&&(s|=64),s&32&&(s|=8),s&4&&(s|=1)),s);import{win32 as xn}from"node:path";var{isAbsolute:Ln,parse:Ks}=xn,ce=s=>{let t="",e=Ks(s);for(;Ln(s)||e.root;){let i=s.charAt(0)==="/"&&s.slice(0,4)!=="//?/"?"/":e.root;s=s.slice(i.length),t+=i,e=Ks(s)}return[t,s]};var Qe=["|","<",">","?",":"],Vi=Qe.map(s=>String.fromCharCode(61440+s.charCodeAt(0))),Nn=new Map(Qe.map((s,t)=>[s,Vi[t]])),Dn=new Map(Vi.map((s,t)=>[s,Qe[t]])),$i=s=>Qe.reduce((t,e)=>t.split(e).join(Nn.get(e)),s),Vs=s=>Vi.reduce((t,e)=>t.split(e).join(Dn.get(e)),s);var tr=(s,t)=>t?(s=f(s).replace(/^\.(\/|$)/,""),mt(t)+"/"+s):f(s),An=16*1024*1024,qs=Symbol("process"),js=Symbol("file"),Qs=Symbol("directory"),qi=Symbol("symlink"),Js=Symbol("hardlink"),fe=Symbol("header"),Je=Symbol("read"),ji=Symbol("lstat"),ti=Symbol("onlstat"),Qi=Symbol("onread"),Ji=Symbol("onreadlink"),ts=Symbol("openfile"),es=Symbol("onopenfile"),pt=Symbol("close"),ei=Symbol("mode"),is=Symbol("awaitDrain"),Xi=Symbol("ondrain"),X=Symbol("prefix"),de=class extends A{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#t=!1;constructor(t,e={}){let i=re(e);super(),this.path=f(t),this.portable=!!i.portable,this.maxReadSize=i.maxReadSize||An,this.linkCache=i.linkCache||new Map,this.statCache=i.statCache||new Map,this.preservePaths=!!i.preservePaths,this.cwd=f(i.cwd||process.cwd()),this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.mtime=i.mtime,this.prefix=i.prefix?f(i.prefix):void 0,this.onWriteEntry=i.onWriteEntry,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let r=!1;if(!this.preservePaths){let[o,h]=ce(this.path);o&&typeof h=="string"&&(this.path=h,r=o)}this.win32=!!i.win32||process.platform==="win32",this.win32&&(this.path=Vs(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=f(i.absolute||Xs.resolve(this.cwd,t)),this.path===""&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});let n=this.statCache.get(this.absolute);n?this[ti](n):this[ji]()}warn(t,e,i={}){return Lt(this,t,e,i)}emit(t,...e){return t==="error"&&(this.#t=!0),super.emit(t,...e)}[ji](){$.lstat(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[ti](e)})}[ti](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=In(t),this.emit("stat",t),this[qs]()}[qs](){switch(this.type){case"File":return this[js]();case"Directory":return this[Qs]();case"SymbolicLink":return this[qi]();default:return this.end()}}[ei](t){return Ki(t,this.type==="Directory",this.portable)}[X](t){return tr(t,this.prefix)}[fe](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new F({path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,mode:this[ei](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new ct({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[Qs](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[fe](),this.end()}[qi](){$.readlink(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[Ji](e)})}[Ji](t){this.linkpath=f(t),this[fe](),this.end()}[Js](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=f(Xs.relative(this.cwd,t)),this.stat.size=0,this[fe](),this.end()}[js](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(e?.indexOf(this.cwd)===0)return this[Js](e);this.linkCache.set(t,this.absolute)}if(this[fe](),this.stat.size===0)return this.end();this[ts]()}[ts](){$.open(this.absolute,"r",(t,e)=>{if(t)return this.emit("error",t);this[es](e)})}[es](t){if(this.fd=t,this.#t)return this[pt]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Je]()}[Je](){let{fd:t,buf:e,offset:i,length:r,pos:n}=this;if(t===void 0||e===void 0)throw new Error("cannot read file without first opening");$.read(t,e,i,r,n,(o,h)=>{if(o)return this[pt](()=>this.emit("error",o));this[Qi](h)})}[pt](t=()=>{}){this.fd!==void 0&&$.close(this.fd,t)}[Qi](t){if(t<=0&&this.remain>0){let r=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pt](()=>this.emit("error",r))}if(t>this.remain){let r=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pt](()=>this.emit("error",r))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let r=t;rthis[Xi]())}[is](t){this.once("drain",t)}write(t,e,i){if(typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8")),this.blockRemaint?this.emit("error",t):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Je]()}},ii=class extends de{sync=!0;[ji](){this[ti]($.lstatSync(this.absolute))}[qi](){this[Ji]($.readlinkSync(this.absolute))}[ts](){this[es]($.openSync(this.absolute,"r"))}[Je](){let t=!0;try{let{fd:e,buf:i,offset:r,length:n,pos:o}=this;if(e===void 0||i===void 0)throw new Error("fd and buf must be set in READ method");let h=$.readSync(e,i,r,n,o);this[Qi](h),t=!1}finally{if(t)try{this[pt](()=>{})}catch{}}}[is](t){t()}[pt](t=()=>{}){this.fd!==void 0&&$.closeSync(this.fd),t()}},si=class extends A{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,i={}){return Lt(this,t,e,i)}constructor(t,e={}){let i=re(e);super(),this.preservePaths=!!i.preservePaths,this.portable=!!i.portable,this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.onWriteEntry=i.onWriteEntry,this.readEntry=t;let{type:r}=t;if(r==="Unsupported")throw new Error("writing entry that should be ignored");this.type=r,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=i.prefix,this.path=f(t.path),this.mode=t.mode!==void 0?this[ei](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:i.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=t.linkpath!==void 0?f(t.linkpath):void 0,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let n=!1;if(!this.preservePaths){let[h,a]=ce(this.path);h&&typeof a=="string"&&(this.path=a,n=h)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new F({path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new ct({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),t.pipe(this)}[X](t){return tr(t,this.prefix)}[ei](t){return Ki(t,this.type==="Directory",this.portable)}write(t,e,i){typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8"));let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,i)}end(t,e,i){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof t=="function"&&(i=t,e=void 0,t=void 0),typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,e??"utf8")),i&&this.once("finish",i),t?super.end(t,i):super.end(i),this}},In=s=>s.isFile()?"File":s.isDirectory()?"Directory":s.isSymbolicLink()?"SymbolicLink":"Unsupported";var ri=class s{tail;head;length=0;static create(t=[]){return new s(t)}constructor(t=[]){for(let e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");let e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);let e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);let e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,i=t.length;e1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;r;n++)i=t(i,r.value,n),r=r.next;return i}reduceReverse(t,e){let i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let n=this.length-1;r;n--)i=t(i,r.value,n),r=r.prev;return i}toArray(){let t=new Array(this.length);for(let e=0,i=this.head;i;e++)t[e]=i.value,i=i.next;return t}toArrayReverse(){let t=new Array(this.length);for(let e=0,i=this.tail;i;e++)t[e]=i.value,i=i.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);let i=new s;if(ethis.length&&(e=this.length);let r=this.head,n=0;for(n=0;r&&nthis.length&&(e=this.length);let r=this.length,n=this.tail;for(;n&&r>e;r--)n=n.prev;for(;n&&r>t;r--,n=n.prev)i.push(n.value);return i}splice(t,e=0,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let o=0;r&&o1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(t.gzip&&(typeof t.gzip!="object"&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new Be(t.gzip)),t.brotli&&(typeof t.brotli!="object"&&(t.brotli={}),this.zip=new Ue(t.brotli)),t.zstd&&(typeof t.zstd!="object"&&(t.zstd={}),this.zip=new Ge(t.zstd)),!this.zip)throw new Error("impossible");let e=this.zip;e.on("data",i=>super.write(i)),e.on("end",()=>super.end()),e.on("drain",()=>this[os]()),this.on("resume",()=>e.resume())}else this.on("drain",this[os]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter=typeof t.filter=="function"?t.filter:()=>!0,this[W]=new ri,this[G]=0,this.jobs=Number(t.jobs)||4,this[pe]=!1,this[me]=!1}[nr](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e=void 0),t&&this.add(t),this[me]=!0,this[Ft](),i&&i(),this}write(t){if(this[me])throw new Error("write after end");return t instanceof Yt?this[ir](t):this[oi](t),this.flowing}[ir](t){let e=f(rr.resolve(this.cwd,t.path));if(!this.filter(t.path,t))t.resume();else{let i=new fi(t.path,e);i.entry=new si(t,this[ns](i)),i.entry.on("end",()=>this[rs](i)),this[G]+=1,this[W].push(i)}this[Ft]()}[oi](t){let e=f(rr.resolve(this.cwd,t));this[W].push(new fi(t,e)),this[Ft]()}[hs](t){t.pending=!0,this[G]+=1;let e=this.follow?"stat":"lstat";ci[e](t.absolute,(i,r)=>{t.pending=!1,this[G]-=1,i?this.emit("error",i):this[ni](t,r)})}[ni](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)?e.isFile()&&e.nlink>1&&t===this[Ct]&&!this.linkCache.get(`${e.dev}:${e.ino}`)&&!this.sync&&this[ss](t):t.ignore=!0,this[Ft]()}[as](t){t.pending=!0,this[G]+=1,ci.readdir(t.absolute,(e,i)=>{if(t.pending=!1,this[G]-=1,e)return this.emit("error",e);this[hi](t,i)})}[hi](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[Ft]()}[Ft](){if(!this[pe]){this[pe]=!0;for(let t=this[W].head;t&&this[G]this.warn(e,i,r),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[sr](t){this[G]+=1;try{return new this[li](t.path,this[ns](t)).on("end",()=>this[rs](t)).on("error",i=>this.emit("error",i))}catch(e){this.emit("error",e)}}[os](){this[Ct]&&this[Ct].entry&&this[Ct].entry.resume()}[ai](t){t.piped=!0,t.readdir&&t.readdir.forEach(r=>{let n=t.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[oi](o+r)});let e=t.entry,i=this.zip;if(!e)throw new Error("cannot pipe without source");i?e.on("data",r=>{i.write(r)||e.pause()}):e.on("data",r=>{super.write(r)||e.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,i={}){Lt(this,t,e,i)}},kt=class extends Et{sync=!0;constructor(t){super(t),this[li]=ii}pause(){}resume(){}[hs](t){let e=this.follow?"statSync":"lstatSync";this[ni](t,ci[e](t.absolute))}[as](t){this[hi](t,ci.readdirSync(t.absolute))}[ai](t){let e=t.entry,i=this.zip;if(t.readdir&&t.readdir.forEach(r=>{let n=t.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[oi](o+r)}),!e)throw new Error("Cannot pipe without source");i?e.on("data",r=>{i.write(r)}):e.on("data",r=>{super[nr](r)})}};var vn=(s,t)=>{let e=new kt(s),i=new Wt(s.file,{mode:s.mode||438});e.pipe(i),hr(e,t)},Mn=(s,t)=>{let e=new Et(s),i=new tt(s.file,{mode:s.mode||438});e.pipe(i);let r=new Promise((n,o)=>{i.on("error",o),i.on("close",n),e.on("error",o)});return ar(e,t),r},hr=(s,t)=>{t.forEach(e=>{e.charAt(0)==="@"?It({file:or.resolve(s.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(e)}),s.end()},ar=async(s,t)=>{for(let e=0;e{s.add(r)}}):s.add(i)}s.end()},Bn=(s,t)=>{let e=new kt(s);return hr(e,t),e},Pn=(s,t)=>{let e=new Et(s);return ar(e,t),e},zn=K(vn,Mn,Bn,Pn,(s,t)=>{if(!t?.length)throw new TypeError("no paths specified to add to archive")});import Lr from"node:fs";import io from"node:assert";import{randomBytes as xr}from"node:crypto";import u from"node:fs";import R from"node:path";import lr from"fs";var Un=process.env.__FAKE_PLATFORM__||process.platform,Hn=Un==="win32",{O_CREAT:Wn,O_TRUNC:Gn,O_WRONLY:Zn}=lr.constants,cr=Number(process.env.__FAKE_FS_O_FILENAME__)||lr.constants.UV_FS_O_FILEMAP||0,Yn=Hn&&!!cr,Kn=512*1024,Vn=cr|Gn|Wn|Zn,ls=Yn?s=>s"w";import ui from"node:fs";import Ee from"node:path";var cs=(s,t,e)=>{try{return ui.lchownSync(s,t,e)}catch(i){if(i?.code!=="ENOENT")throw i}},di=(s,t,e,i)=>{ui.lchown(s,t,e,r=>{i(r&&r?.code!=="ENOENT"?r:null)})},$n=(s,t,e,i,r)=>{if(t.isDirectory())fs(Ee.resolve(s,t.name),e,i,n=>{if(n)return r(n);let o=Ee.resolve(s,t.name);di(o,e,i,r)});else{let n=Ee.resolve(s,t.name);di(n,e,i,r)}},fs=(s,t,e,i)=>{ui.readdir(s,{withFileTypes:!0},(r,n)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!n.length)return di(s,t,e,i);let o=n.length,h=null,a=l=>{if(!h){if(l)return i(h=l);if(--o===0)return di(s,t,e,i)}};for(let l of n)$n(s,l,t,e,a)})},Xn=(s,t,e,i)=>{t.isDirectory()&&ds(Ee.resolve(s,t.name),e,i),cs(Ee.resolve(s,t.name),e,i)},ds=(s,t,e)=>{let i;try{i=ui.readdirSync(s,{withFileTypes:!0})}catch(r){let n=r;if(n?.code==="ENOENT")return;if(n?.code==="ENOTDIR"||n?.code==="ENOTSUP")return cs(s,t,e);throw n}for(let r of i)Xn(s,r,t,e);return cs(s,t,e)};import k from"node:fs";import qn from"node:fs/promises";import mi from"node:path";var we=class extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}};var wt=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}};var jn=(s,t)=>{k.stat(s,(e,i)=>{(e||!i.isDirectory())&&(e=new we(s,e?.code||"ENOTDIR")),t(e)})},fr=(s,t,e)=>{s=f(s);let i=t.umask??18,r=t.mode|448,n=(r&i)!==0,o=t.uid,h=t.gid,a=typeof o=="number"&&typeof h=="number"&&(o!==t.processUid||h!==t.processGid),l=t.preserve,c=t.unlink,d=f(t.cwd),S=(E,x)=>{E?e(E):x&&a?fs(x,o,h,_s=>S(_s)):n?k.chmod(s,r,e):e()};if(s===d)return jn(s,S);if(l)return qn.mkdir(s,{mode:r,recursive:!0}).then(E=>S(null,E??void 0),S);let N=f(mi.relative(d,s)).split("/");us(d,N,r,c,d,void 0,S)},us=(s,t,e,i,r,n,o)=>{if(!t.length)return o(null,n);let h=t.shift(),a=f(mi.resolve(s+"/"+h));k.mkdir(a,e,dr(a,t,e,i,r,n,o))},dr=(s,t,e,i,r,n,o)=>h=>{h?k.lstat(s,(a,l)=>{if(a)a.path=a.path&&f(a.path),o(a);else if(l.isDirectory())us(s,t,e,i,r,n,o);else if(i)k.unlink(s,c=>{if(c)return o(c);k.mkdir(s,e,dr(s,t,e,i,r,n,o))});else{if(l.isSymbolicLink())return o(new wt(s,s+"/"+t.join("/")));o(h)}}):(n=n||s,us(s,t,e,i,r,n,o))},Qn=s=>{let t=!1,e;try{t=k.statSync(s).isDirectory()}catch(i){e=i?.code}finally{if(!t)throw new we(s,e??"ENOTDIR")}},ur=(s,t)=>{s=f(s);let e=t.umask??18,i=t.mode|448,r=(i&e)!==0,n=t.uid,o=t.gid,h=typeof n=="number"&&typeof o=="number"&&(n!==t.processUid||o!==t.processGid),a=t.preserve,l=t.unlink,c=f(t.cwd),d=E=>{E&&h&&ds(E,n,o),r&&k.chmodSync(s,i)};if(s===c)return Qn(c),d();if(a)return d(k.mkdirSync(s,{mode:i,recursive:!0})??void 0);let T=f(mi.relative(c,s)).split("/"),N;for(let E=T.shift(),x=c;E&&(x+="/"+E);E=T.shift()){x=f(mi.resolve(x));try{k.mkdirSync(x,i),N=N||x}catch{let Os=k.lstatSync(x);if(Os.isDirectory())continue;if(l){k.unlinkSync(x),k.mkdirSync(x,i),N=N||x;continue}else if(Os.isSymbolicLink())return new wt(x,x+"/"+T.join("/"))}}return d(N)};import{join as Er}from"node:path";var ms=Object.create(null),mr=1e4,$t=new Set,pr=s=>{$t.has(s)?$t.delete(s):ms[s]=s.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),$t.add(s);let t=ms[s],e=$t.size-mr;if(e>mr/10){for(let i of $t)if($t.delete(i),delete ms[i],--e<=0)break}return t};var Jn=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,to=Jn==="win32",eo=s=>s.split("/").slice(0,-1).reduce((e,i)=>{let r=e[e.length-1];return r!==void 0&&(i=Er(r,i)),e.push(i||"/"),e},[]),pi=class{#t=new Map;#i=new Map;#s=new Set;reserve(t,e){t=to?["win32 parallelization disabled"]:t.map(r=>mt(Er(pr(r))));let i=new Set(t.map(r=>eo(r)).reduce((r,n)=>r.concat(n)));this.#i.set(e,{dirs:i,paths:t});for(let r of t){let n=this.#t.get(r);n?n.push(e):this.#t.set(r,[e])}for(let r of i){let n=this.#t.get(r);if(!n)this.#t.set(r,[new Set([e])]);else{let o=n[n.length-1];o instanceof Set?o.add(e):n.push(new Set([e]))}}return this.#r(e)}#n(t){let e=this.#i.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map(i=>this.#t.get(i)),dirs:[...e.dirs].map(i=>this.#t.get(i))}}check(t){let{paths:e,dirs:i}=this.#n(t);return e.every(r=>r&&r[0]===t)&&i.every(r=>r&&r[0]instanceof Set&&r[0].has(t))}#r(t){return this.#s.has(t)||!this.check(t)?!1:(this.#s.add(t),t(()=>this.#e(t)),!0)}#e(t){if(!this.#s.has(t))return!1;let e=this.#i.get(t);if(!e)throw new Error("invalid reservation");let{paths:i,dirs:r}=e,n=new Set;for(let o of i){let h=this.#t.get(o);if(!h||h?.[0]!==t)continue;let a=h[1];if(!a){this.#t.delete(o);continue}if(h.shift(),typeof a=="function")n.add(a);else for(let l of a)n.add(l)}for(let o of r){let h=this.#t.get(o),a=h?.[0];if(!(!h||!(a instanceof Set)))if(a.size===1&&h.length===1){this.#t.delete(o);continue}else if(a.size===1){h.shift();let l=h[0];typeof l=="function"&&n.add(l)}else a.delete(t)}return this.#s.delete(t),n.forEach(o=>this.#r(o)),!0}};var wr=()=>process.umask();var Sr=Symbol("onEntry"),Ss=Symbol("checkFs"),yr=Symbol("checkFs2"),ys=Symbol("isReusable"),P=Symbol("makeFs"),Rs=Symbol("file"),bs=Symbol("directory"),wi=Symbol("link"),Rr=Symbol("symlink"),br=Symbol("hardlink"),ye=Symbol("ensureNoSymlink"),gr=Symbol("unsupported"),_r=Symbol("checkPath"),ps=Symbol("stripAbsolutePath"),St=Symbol("mkdir"),O=Symbol("onError"),Ei=Symbol("pending"),Or=Symbol("pend"),Xt=Symbol("unpend"),Es=Symbol("ended"),ws=Symbol("maybeClose"),gs=Symbol("skip"),Re=Symbol("doChown"),be=Symbol("uid"),ge=Symbol("gid"),_e=Symbol("checkedCwd"),so=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Oe=so==="win32",ro=1024,no=(s,t)=>{if(!Oe)return u.unlink(s,t);let e=s+".DELETE."+xr(16).toString("hex");u.rename(s,e,i=>{if(i)return t(i);u.unlink(e,t)})},oo=s=>{if(!Oe)return u.unlinkSync(s);let t=s+".DELETE."+xr(16).toString("hex");u.renameSync(s,t),u.unlinkSync(t)},Tr=(s,t,e)=>s!==void 0&&s===s>>>0?s:t!==void 0&&t===t>>>0?t:e,qt=class extends st{[Es]=!1;[_e]=!1;[Ei]=0;reservations=new pi;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[Es]=!0,this[ws]()},super(t),this.transform=t.transform,this.chmod=!!t.chmod,typeof t.uid=="number"||typeof t.gid=="number"){if(typeof t.uid!="number"||typeof t.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;t.preserveOwner===void 0&&typeof t.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:ro,this.forceChown=t.forceChown===!0,this.win32=!!t.win32||Oe,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=f(R.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?typeof t.processUmask=="number"?t.processUmask:wr():0,this.umask=typeof t.umask=="number"?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",e=>this[Sr](e))}warn(t,e,i={}){return(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT")&&(i.recoverable=!1),super.warn(t,e,i)}[ws](){this[Es]&&this[Ei]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[ps](t,e){let i=t[e],{type:r}=t;if(!i||this.preservePaths)return!0;let n=i.split("/");if(n.includes("..")||Oe&&/^[a-z]:\.\.$/i.test(n[0]??"")){if(e==="path"||r==="Link")return this.warn("TAR_ENTRY_ERROR",`${e} contains '..'`,{entry:t,[e]:i}),!1;{let a=R.posix.dirname(t.path),l=R.posix.normalize(R.posix.join(a,i));if(l.startsWith("../")||l==="..")return this.warn("TAR_ENTRY_ERROR",`${e} escapes extraction directory`,{entry:t,[e]:i}),!1}}let[o,h]=ce(i);return o&&(t[e]=String(h),this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute ${e}`,{entry:t,[e]:i})),!0}[_r](t){let e=f(t.path),i=e.split("/");if(this.strip){if(i.length=this.strip)t.linkpath=r.slice(this.strip).join("/");else return!1}i.splice(0,this.strip),t.path=i.join("/")}if(isFinite(this.maxDepth)&&i.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:i.length,maxDepth:this.maxDepth}),!1;if(!this[ps](t,"path")||!this[ps](t,"linkpath"))return!1;if(R.isAbsolute(t.path)?t.absolute=f(R.resolve(t.path)):t.absolute=f(R.resolve(this.cwd,t.path)),!this.preservePaths&&typeof t.absolute=="string"&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:f(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=R.win32.parse(String(t.absolute));t.absolute=r+$i(String(t.absolute).slice(r.length));let{root:n}=R.win32.parse(t.path);t.path=n+$i(t.path.slice(n.length))}return!0}[Sr](t){if(!this[_r](t))return t.resume();switch(io.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=t.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Ss](t);default:return this[gr](t)}}[O](t,e){t.name==="CwdError"?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[Xt](),e.resume())}[St](t,e,i){fr(f(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:e},i)}[Re](t){return this.forceChown||this.preserveOwner&&(typeof t.uid=="number"&&t.uid!==this.processUid||typeof t.gid=="number"&&t.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[be](t){return Tr(this.uid,t.uid,this.processUid)}[ge](t){return Tr(this.gid,t.gid,this.processGid)}[Rs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.fmode,r=new tt(String(t.absolute),{flags:ls(t.size),mode:i,autoClose:!1});r.on("error",a=>{r.fd&&u.close(r.fd,()=>{}),r.write=()=>!0,this[O](a,t),e()});let n=1,o=a=>{if(a){r.fd&&u.close(r.fd,()=>{}),this[O](a,t),e();return}--n===0&&r.fd!==void 0&&u.close(r.fd,l=>{l?this[O](l,t):this[Xt](),e()})};r.on("finish",()=>{let a=String(t.absolute),l=r.fd;if(typeof l=="number"&&t.mtime&&!this.noMtime){n++;let c=t.atime||new Date,d=t.mtime;u.futimes(l,c,d,S=>S?u.utimes(a,c,d,T=>o(T&&S)):o())}if(typeof l=="number"&&this[Re](t)){n++;let c=this[be](t),d=this[ge](t);typeof c=="number"&&typeof d=="number"&&u.fchown(l,c,d,S=>S?u.chown(a,c,d,T=>o(T&&S)):o())}o()});let h=this.transform&&this.transform(t)||t;h!==t&&(h.on("error",a=>{this[O](a,t),e()}),t.pipe(h)),h.pipe(r)}[bs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.dmode;this[St](String(t.absolute),i,r=>{if(r){this[O](r,t),e();return}let n=1,o=()=>{--n===0&&(e(),this[Xt](),t.resume())};t.mtime&&!this.noMtime&&(n++,u.utimes(String(t.absolute),t.atime||new Date,t.mtime,o)),this[Re](t)&&(n++,u.chown(String(t.absolute),Number(this[be](t)),Number(this[ge](t)),o)),o()})}[gr](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[Rr](t,e){let i=f(R.relative(this.cwd,R.resolve(R.dirname(String(t.absolute)),String(t.linkpath)))).split("/");this[ye](t,this.cwd,i,()=>this[wi](t,String(t.linkpath),"symlink",e),r=>{this[O](r,t),e()})}[br](t,e){let i=f(R.resolve(this.cwd,String(t.linkpath))),r=f(String(t.linkpath)).split("/");this[ye](t,this.cwd,r,()=>this[wi](t,i,"link",e),n=>{this[O](n,t),e()})}[ye](t,e,i,r,n){let o=i.shift();if(this.preservePaths||o===void 0)return r();let h=R.resolve(e,o);u.lstat(h,(a,l)=>{if(a)return r();if(l?.isSymbolicLink())return n(new wt(h,R.resolve(h,i.join("/"))));this[ye](t,h,i,r,n)})}[Or](){this[Ei]++}[Xt](){this[Ei]--,this[ws]()}[gs](t){this[Xt](),t.resume()}[ys](t,e){return t.type==="File"&&!this.unlink&&e.isFile()&&e.nlink<=1&&!Oe}[Ss](t){this[Or]();let e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,i=>this[yr](t,i))}[yr](t,e){let i=h=>{e(h)},r=()=>{this[St](this.cwd,this.dmode,h=>{if(h){this[O](h,t),i();return}this[_e]=!0,n()})},n=()=>{if(t.absolute!==this.cwd){let h=f(R.dirname(String(t.absolute)));if(h!==this.cwd)return this[St](h,this.dmode,a=>{if(a){this[O](a,t),i();return}o()})}o()},o=()=>{u.lstat(String(t.absolute),(h,a)=>{if(a&&(this.keep||this.newer&&a.mtime>(t.mtime??a.mtime))){this[gs](t),i();return}if(h||this[ys](t,a))return this[P](null,t,i);if(a.isDirectory()){if(t.type==="Directory"){let l=this.chmod&&t.mode&&(a.mode&4095)!==t.mode,c=d=>this[P](d??null,t,i);return l?u.chmod(String(t.absolute),Number(t.mode),c):c()}if(t.absolute!==this.cwd)return u.rmdir(String(t.absolute),l=>this[P](l??null,t,i))}if(t.absolute===this.cwd)return this[P](null,t,i);no(String(t.absolute),l=>this[P](l??null,t,i))})};this[_e]?n():r()}[P](t,e,i){if(t){this[O](t,e),i();return}switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[Rs](e,i);case"Link":return this[br](e,i);case"SymbolicLink":return this[Rr](e,i);case"Directory":case"GNUDumpDir":return this[bs](e,i)}}[wi](t,e,i,r){u[i](e,String(t.absolute),n=>{n?this[O](n,t):(this[Xt](),t.resume()),r()})}},Se=s=>{try{return[null,s()]}catch(t){return[t,null]}},Te=class extends qt{sync=!0;[P](t,e){return super[P](t,e,()=>{})}[Ss](t){if(!this[_e]){let n=this[St](this.cwd,this.dmode);if(n)return this[O](n,t);this[_e]=!0}if(t.absolute!==this.cwd){let n=f(R.dirname(String(t.absolute)));if(n!==this.cwd){let o=this[St](n,this.dmode);if(o)return this[O](o,t)}}let[e,i]=Se(()=>u.lstatSync(String(t.absolute)));if(i&&(this.keep||this.newer&&i.mtime>(t.mtime??i.mtime)))return this[gs](t);if(e||this[ys](t,i))return this[P](null,t);if(i.isDirectory()){if(t.type==="Directory"){let o=this.chmod&&t.mode&&(i.mode&4095)!==t.mode,[h]=o?Se(()=>{u.chmodSync(String(t.absolute),Number(t.mode))}):[];return this[P](h,t)}let[n]=Se(()=>u.rmdirSync(String(t.absolute)));this[P](n,t)}let[r]=t.absolute===this.cwd?[]:Se(()=>oo(String(t.absolute)));this[P](r,t)}[Rs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.fmode,r=h=>{let a;try{u.closeSync(n)}catch(l){a=l}(h||a)&&this[O](h||a,t),e()},n;try{n=u.openSync(String(t.absolute),ls(t.size),i)}catch(h){return r(h)}let o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",h=>this[O](h,t)),t.pipe(o)),o.on("data",h=>{try{u.writeSync(n,h,0,h.length)}catch(a){r(a)}}),o.on("end",()=>{let h=null;if(t.mtime&&!this.noMtime){let a=t.atime||new Date,l=t.mtime;try{u.futimesSync(n,a,l)}catch(c){try{u.utimesSync(String(t.absolute),a,l)}catch{h=c}}}if(this[Re](t)){let a=this[be](t),l=this[ge](t);try{u.fchownSync(n,Number(a),Number(l))}catch(c){try{u.chownSync(String(t.absolute),Number(a),Number(l))}catch{h=h||c}}}r(h)})}[bs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.dmode,r=this[St](String(t.absolute),i);if(r){this[O](r,t),e();return}if(t.mtime&&!this.noMtime)try{u.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch{}if(this[Re](t))try{u.chownSync(String(t.absolute),Number(this[be](t)),Number(this[ge](t)))}catch{}e(),t.resume()}[St](t,e){try{return ur(f(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:e})}catch(i){return i}}[ye](t,e,i,r,n){if(this.preservePaths||!i.length)return r();let o=e;for(let h of i){o=R.resolve(o,h);let[a,l]=Se(()=>u.lstatSync(o));if(a)return r();if(l.isSymbolicLink())return n(new wt(o,R.resolve(e,i.join("/"))))}r()}[wi](t,e,i,r){let n=`${i}Sync`;try{u[n](e,String(t.absolute)),r(),t.resume()}catch(o){return this[O](o,t)}}};var ho=s=>{let t=new Te(s),e=s.file,i=Lr.statSync(e),r=s.maxReadSize||16*1024*1024;new ve(e,{readSize:r,size:i.size}).pipe(t)},ao=(s,t)=>{let e=new qt(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,h)=>{e.on("error",h),e.on("close",o),Lr.stat(r,(a,l)=>{if(a)h(a);else{let c=new gt(r,{readSize:i,size:l.size});c.on("error",h),c.pipe(e)}})})},lo=K(ho,ao,s=>new Te(s),s=>new qt(s),(s,t)=>{t?.length&&Yi(s,t)});import v from"node:fs";import Nr from"node:path";var co=(s,t)=>{let e=new kt(s),i=!0,r,n;try{try{r=v.openSync(s.file,"r+")}catch(a){if(a?.code==="ENOENT")r=v.openSync(s.file,"w+");else throw a}let o=v.fstatSync(r),h=Buffer.alloc(512);t:for(n=0;no.size)break;n+=l,s.mtimeCache&&a.mtime&&s.mtimeCache.set(String(a.path),a.mtime)}i=!1,fo(s,e,n,r,t)}finally{if(i)try{v.closeSync(r)}catch{}}},fo=(s,t,e,i,r)=>{let n=new Wt(s.file,{fd:i,start:e});t.pipe(n),mo(t,r)},uo=(s,t)=>{t=Array.from(t);let e=new Et(s),i=(n,o,h)=>{let a=(T,N)=>{T?v.close(n,E=>h(T)):h(null,N)},l=0;if(o===0)return a(null,0);let c=0,d=Buffer.alloc(512),S=(T,N)=>{if(T||typeof N>"u")return a(T);if(c+=N,c<512&&N)return v.read(n,d,c,d.length-c,l+c,S);if(l===0&&d[0]===31&&d[1]===139)return a(new Error("cannot append to compressed archives"));if(c<512)return a(null,l);let E=new F(d);if(!E.cksumValid)return a(null,l);let x=512*Math.ceil((E.size??0)/512);if(l+x+512>o||(l+=x+512,l>=o))return a(null,l);s.mtimeCache&&E.mtime&&s.mtimeCache.set(String(E.path),E.mtime),c=0,v.read(n,d,0,512,l,S)};v.read(n,d,0,512,l,S)};return new Promise((n,o)=>{e.on("error",o);let h="r+",a=(l,c)=>{if(l&&l.code==="ENOENT"&&h==="r+")return h="w+",v.open(s.file,h,a);if(l||!c)return o(l);v.fstat(c,(d,S)=>{if(d)return v.close(c,()=>o(d));i(c,S.size,(T,N)=>{if(T)return o(T);let E=new tt(s.file,{fd:c,start:N});e.pipe(E),E.on("error",o),E.on("close",n),po(e,t)})})};v.open(s.file,h,a)})},mo=(s,t)=>{t.forEach(e=>{e.charAt(0)==="@"?It({file:Nr.resolve(s.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(e)}),s.end()},po=async(s,t)=>{for(let e=0;es.add(r)}):s.add(i)}s.end()},vt=K(co,uo,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(s,t)=>{if(!ks(s))throw new TypeError("file is required");if(s.gzip||s.brotli||s.zstd||s.file.endsWith(".br")||s.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t?.length)throw new TypeError("no paths specified to add/replace")});var Eo=K(vt.syncFile,vt.asyncFile,vt.syncNoFile,vt.asyncNoFile,(s,t=[])=>{vt.validate?.(s,t),wo(s)}),wo=s=>{let t=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=t?(e,i)=>t(e,i)&&!((s.mtimeCache?.get(e)??i.mtime??0)>(i.mtime??0)):(e,i)=>!((s.mtimeCache?.get(e)??i.mtime??0)>(i.mtime??0))};export{F as Header,Et as Pack,fi as PackJob,kt as PackSync,st as Parser,ct as Pax,Yt as ReadEntry,qt as Unpack,Te as UnpackSync,de as WriteEntry,ii as WriteEntrySync,si as WriteEntryTar,zn as c,zn as create,lo as extract,Yi as filesFilter,It as list,vt as r,vt as replace,It as t,Mi as types,Eo as u,Eo as update,lo as x}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/tar/dist/esm/process-umask.js b/deps/npm/node_modules/tar/dist/esm/process-umask.js new file mode 100644 index 00000000000000..c6748e2e253c42 --- /dev/null +++ b/deps/npm/node_modules/tar/dist/esm/process-umask.js @@ -0,0 +1,3 @@ +// separate file so I stop getting nagged in vim about deprecated API. +export const umask = () => process.umask(); +//# sourceMappingURL=process-umask.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/tar/dist/esm/unpack.js b/deps/npm/node_modules/tar/dist/esm/unpack.js index 3a9aa807798a71..1d0b53d1df4e66 100644 --- a/deps/npm/node_modules/tar/dist/esm/unpack.js +++ b/deps/npm/node_modules/tar/dist/esm/unpack.js @@ -15,6 +15,8 @@ import { Parser } from './parse.js'; import { stripAbsolutePath } from './strip-absolute-path.js'; import * as wc from './winchars.js'; import { PathReservations } from './path-reservations.js'; +import { SymlinkError } from './symlink-error.js'; +import { umask } from './process-umask.js'; const ONENTRY = Symbol('onEntry'); const CHECKFS = Symbol('checkFs'); const CHECKFS2 = Symbol('checkFs2'); @@ -25,6 +27,7 @@ const DIRECTORY = Symbol('directory'); const LINK = Symbol('link'); const SYMLINK = Symbol('symlink'); const HARDLINK = Symbol('hardlink'); +const ENSURE_NO_SYMLINK = Symbol('ensureNoSymlink'); const UNSUPPORTED = Symbol('unsupported'); const CHECKPATH = Symbol('checkPath'); const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath'); @@ -187,7 +190,7 @@ export class Unpack extends Parser { this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === 'number' ? opt.processUmask - : process.umask(); + : umask(); this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask; // default mode for dirs created as parents @@ -262,6 +265,7 @@ export class Unpack extends Parser { } return true; } + // no IO, just string checking for absolute indicators [CHECKPATH](entry) { const p = normalizeWindowsPath(entry.path); const parts = p.split('/'); @@ -522,11 +526,33 @@ export class Unpack extends Parser { entry.resume(); } [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), 'symlink', done); + const parts = normalizeWindowsPath(path.relative(this.cwd, path.resolve(path.dirname(String(entry.absolute)), String(entry.linkpath)))).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, String(entry.linkpath), 'symlink', done), er => { + this[ONERROR](er, entry); + done(); + }); } [HARDLINK](entry, done) { const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, 'link', done); + const parts = normalizeWindowsPath(String(entry.linkpath)).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, linkpath, 'link', done), er => { + this[ONERROR](er, entry); + done(); + }); + } + [ENSURE_NO_SYMLINK](entry, cwd, parts, done, onError) { + const p = parts.shift(); + if (this.preservePaths || p === undefined) + return done(); + const t = path.resolve(cwd, p); + fs.lstat(t, (er, st) => { + if (er) + return done(); + if (st?.isSymbolicLink()) { + return onError(new SymlinkError(t, path.resolve(t, parts.join('/')))); + } + this[ENSURE_NO_SYMLINK](entry, t, parts, done, onError); + }); } [PEND]() { this[PENDING]++; @@ -660,7 +686,6 @@ export class Unpack extends Parser { } } [LINK](entry, linkpath, link, done) { - // XXX: get the type ('symlink' or 'junction') for windows fs[link](linkpath, String(entry.absolute), er => { if (er) { this[ONERROR](er, entry); @@ -861,10 +886,25 @@ export class UnpackSync extends Unpack { return er; } } + [ENSURE_NO_SYMLINK](_entry, cwd, parts, done, onError) { + if (this.preservePaths || !parts.length) + return done(); + let t = cwd; + for (const p of parts) { + t = path.resolve(t, p); + const [er, st] = callSync(() => fs.lstatSync(t)); + if (er) + return done(); + if (st.isSymbolicLink()) { + return onError(new SymlinkError(t, path.resolve(cwd, parts.join('/')))); + } + } + done(); + } [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; + const linkSync = `${link}Sync`; try { - fs[ls](linkpath, String(entry.absolute)); + fs[linkSync](linkpath, String(entry.absolute)); done(); entry.resume(); } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/package.json b/deps/npm/node_modules/tar/node_modules/yallist/package.json deleted file mode 100644 index 2f5247808bbea8..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/yallist/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "yallist", - "version": "5.0.0", - "description": "Yet Another Linked List", - "files": [ - "dist" - ], - "devDependencies": { - "prettier": "^3.2.5", - "tap": "^18.7.2", - "tshy": "^1.13.1", - "typedoc": "^0.25.13" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", - "typedoc": "typedoc" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "BlueOak-1.0.0", - "tshy": { - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", - "prettier": { - "semi": false, - "printWidth": 70, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "engines": { - "node": ">=18" - } -} diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 397764155b5141..7565cf8144df33 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter", "name": "tar", "description": "tar for node", - "version": "7.5.7", + "version": "7.5.9", "repository": { "type": "git", "url": "https://github.com/isaacs/node-tar.git" @@ -13,7 +13,7 @@ "test": "tap", "pretest": "npm run prepare", "presnap": "npm run prepare", - "prepare": "tshy", + "prepare": "tshy && bash scripts/build.sh", "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", @@ -31,6 +31,7 @@ "@types/node": "^25.0.9", "chmodr": "^2.0.2", "end-of-stream": "^1.4.3", + "esbuild": "^0.27.3", "events-to-array": "^2.0.3", "mutate-fs": "^2.1.1", "nock": "^13.5.4", @@ -50,7 +51,17 @@ "tshy": { "exports": { "./package.json": "./package.json", - ".": "./src/index.ts", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + }, + "./raw": "./src/index.ts", "./c": "./src/create.ts", "./create": "./src/create.ts", "./replace": "./src/create.ts", @@ -74,6 +85,16 @@ "exports": { "./package.json": "./package.json", ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + }, + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -265,7 +286,7 @@ } }, "type": "module", - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.min.js" } diff --git a/deps/npm/node_modules/validate-npm-package-license/LICENSE b/deps/npm/node_modules/validate-npm-package-license/LICENSE deleted file mode 100644 index d645695673349e..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/deps/npm/node_modules/validate-npm-package-license/index.js b/deps/npm/node_modules/validate-npm-package-license/index.js deleted file mode 100644 index 35eaa732559ce2..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var parse = require('spdx-expression-parse'); -var correct = require('spdx-correct'); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - if (argument.trim().length !== 0) { - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 257a76b9484c12..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe -Antoine Motet diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618eaba6c89..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -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/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 52fab560aea707..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -var scan = require('./scan') -var parse = require('./parse') - -module.exports = function (source) { - return parse(scan(source)) -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index c9edc9f939cdf6..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-expression-parse", - "description": "parse SPDX license expressions", - "version": "3.0.1", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "files": [ - "AUTHORS", - "index.js", - "parse.js", - "scan.js" - ], - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.1.0" - }, - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "MIT", - "repository": "jslicense/spdx-expression-parse.js", - "scripts": { - "lint": "standard", - "test:readme": "defence -i javascript README.md | replace-require-self | node", - "test:suite": "node test.js", - "test": "npm run test:suite && npm run test:readme" - } -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js deleted file mode 100644 index 5a00b45c5799c4..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -// The ABNF grammar in the spec is totally ambiguous. -// -// This parser follows the operator precedence defined in the -// `Order of Precedence and Parentheses` section. - -module.exports = function (tokens) { - var index = 0 - - function hasMore () { - return index < tokens.length - } - - function token () { - return hasMore() ? tokens[index] : null - } - - function next () { - if (!hasMore()) { - throw new Error() - } - index++ - } - - function parseOperator (operator) { - var t = token() - if (t && t.type === 'OPERATOR' && operator === t.string) { - next() - return t.string - } - } - - function parseWith () { - if (parseOperator('WITH')) { - var t = token() - if (t && t.type === 'EXCEPTION') { - next() - return t.string - } - throw new Error('Expected exception after `WITH`') - } - } - - function parseLicenseRef () { - // TODO: Actually, everything is concatenated into one string - // for backward-compatibility but it could be better to return - // a nice structure. - var begin = index - var string = '' - var t = token() - if (t.type === 'DOCUMENTREF') { - next() - string += 'DocumentRef-' + t.string + ':' - if (!parseOperator(':')) { - throw new Error('Expected `:` after `DocumentRef-...`') - } - } - t = token() - if (t.type === 'LICENSEREF') { - next() - string += 'LicenseRef-' + t.string - return { license: string } - } - index = begin - } - - function parseLicense () { - var t = token() - if (t && t.type === 'LICENSE') { - next() - var node = { license: t.string } - if (parseOperator('+')) { - node.plus = true - } - var exception = parseWith() - if (exception) { - node.exception = exception - } - return node - } - } - - function parseParenthesizedExpression () { - var left = parseOperator('(') - if (!left) { - return - } - - var expr = parseExpression() - - if (!parseOperator(')')) { - throw new Error('Expected `)`') - } - - return expr - } - - function parseAtom () { - return ( - parseParenthesizedExpression() || - parseLicenseRef() || - parseLicense() - ) - } - - function makeBinaryOpParser (operator, nextParser) { - return function parseBinaryOp () { - var left = nextParser() - if (!left) { - return - } - - if (!parseOperator(operator)) { - return left - } - - var right = parseBinaryOp() - if (!right) { - throw new Error('Expected expression') - } - return { - left: left, - conjunction: operator.toLowerCase(), - right: right - } - } - } - - var parseAnd = makeBinaryOpParser('AND', parseAtom) - var parseExpression = makeBinaryOpParser('OR', parseAnd) - - var node = parseExpression() - if (!node || hasMore()) { - throw new Error('Syntax error') - } - return node -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js deleted file mode 100644 index b74fce2e2c6632..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var licenses = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) -var exceptions = require('spdx-exceptions') - -module.exports = function (source) { - var index = 0 - - function hasMore () { - return index < source.length - } - - // `value` can be a regexp or a string. - // If it is recognized, the matching source string is returned and - // the index is incremented. Otherwise `undefined` is returned. - function read (value) { - if (value instanceof RegExp) { - var chars = source.slice(index) - var match = chars.match(value) - if (match) { - index += match[0].length - return match[0] - } - } else { - if (source.indexOf(value, index) === index) { - index += value.length - return value - } - } - } - - function skipWhitespace () { - read(/[ ]*/) - } - - function operator () { - var string - var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] - for (var i = 0; i < possibilities.length; i++) { - string = read(possibilities[i]) - if (string) { - break - } - } - - if (string === '+' && index > 1 && source[index - 2] === ' ') { - throw new Error('Space before `+`') - } - - return string && { - type: 'OPERATOR', - string: string - } - } - - function idstring () { - return read(/[A-Za-z0-9-.]+/) - } - - function expectIdstring () { - var string = idstring() - if (!string) { - throw new Error('Expected idstring at offset ' + index) - } - return string - } - - function documentRef () { - if (read('DocumentRef-')) { - var string = expectIdstring() - return { type: 'DOCUMENTREF', string: string } - } - } - - function licenseRef () { - if (read('LicenseRef-')) { - var string = expectIdstring() - return { type: 'LICENSEREF', string: string } - } - } - - function identifier () { - var begin = index - var string = idstring() - - if (licenses.indexOf(string) !== -1) { - return { - type: 'LICENSE', - string: string - } - } else if (exceptions.indexOf(string) !== -1) { - return { - type: 'EXCEPTION', - string: string - } - } - - index = begin - } - - // Tries to read the next token. Returns `undefined` if no token is - // recognized. - function parseToken () { - // Ordering matters - return ( - operator() || - documentRef() || - licenseRef() || - identifier() - ) - } - - var tokens = [] - while (hasMore()) { - skipWhitespace() - if (!hasMore()) { - break - } - - var token = parseToken() - if (!token) { - throw new Error('Unexpected `' + source[index] + - '` at offset ' + index) - } - - tokens.push(token) - } - return tokens -} diff --git a/deps/npm/node_modules/validate-npm-package-license/package.json b/deps/npm/node_modules/validate-npm-package-license/package.json deleted file mode 100644 index 9e92af4f44656c..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "validate-npm-package-license", - "description": "Give me a string and I'll tell you if it's a valid npm package license string", - "version": "3.0.4", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "contributors": [ - "Mark Stacey " - ], - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^2.0.1", - "replace-require-self": "^1.0.0" - }, - "keywords": [ - "license", - "npm", - "package", - "validation" - ], - "license": "Apache-2.0", - "repository": "kemitchell/validate-npm-package-license.js", - "scripts": { - "test": "defence README.md | replace-require-self | node" - } -} diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index 915dc4bd27c3a1..c6a4bf229fdab4 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -2,7 +2,7 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "6.0.0", + "version": "6.0.1", "repository": { "type": "git", "url": "git+https://github.com/npm/node-which.git" @@ -13,11 +13,11 @@ }, "license": "ISC", "dependencies": { - "isexe": "^3.1.1" + "isexe": "^4.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.27.1", + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.28.1", "tap": "^16.3.0" }, "scripts": { @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.27.1", + "version": "4.28.1", "publish": "true" } } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/LICENSE.md b/deps/npm/node_modules/yallist/LICENSE.md similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/LICENSE.md rename to deps/npm/node_modules/yallist/LICENSE.md diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/index.js b/deps/npm/node_modules/yallist/dist/commonjs/index.js similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/index.js rename to deps/npm/node_modules/yallist/dist/commonjs/index.js diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/package.json b/deps/npm/node_modules/yallist/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/package.json rename to deps/npm/node_modules/yallist/dist/commonjs/package.json diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/esm/index.js b/deps/npm/node_modules/yallist/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/esm/index.js rename to deps/npm/node_modules/yallist/dist/esm/index.js diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/esm/package.json b/deps/npm/node_modules/yallist/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/esm/package.json rename to deps/npm/node_modules/yallist/dist/esm/package.json diff --git a/deps/npm/node_modules/yallist/package.json b/deps/npm/node_modules/yallist/package.json index 8a083867d72e00..2f5247808bbea8 100644 --- a/deps/npm/node_modules/yallist/package.json +++ b/deps/npm/node_modules/yallist/package.json @@ -1,29 +1,68 @@ { "name": "yallist", - "version": "4.0.0", + "version": "5.0.0", "description": "Yet Another Linked List", - "main": "yallist.js", - "directories": { - "test": "test" - }, "files": [ - "yallist.js", - "iterator.js" + "dist" ], - "dependencies": {}, "devDependencies": { - "tap": "^12.1.0" + "prettier": "^3.2.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.13" }, "scripts": { - "test": "tap test/*.js --100", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", + "typedoc": "typedoc" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/yallist.git" }, "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" + "license": "BlueOak-1.0.0", + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "engines": { + "node": ">=18" + } } diff --git a/deps/npm/package.json b/deps/npm/package.json index 60e6baa52637bc..c5c5292b9251a4 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "11.9.0", + "version": "11.10.1", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -52,12 +52,12 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^9.2.0", - "@npmcli/config": "^10.6.0", + "@npmcli/arborist": "^9.3.1", + "@npmcli/config": "^10.7.1", "@npmcli/fs": "^5.0.0", "@npmcli/map-workspaces": "^5.0.3", "@npmcli/metavuln-calculator": "^9.0.3", - "@npmcli/package-json": "^7.0.4", + "@npmcli/package-json": "^7.0.5", "@npmcli/promise-spawn": "^9.0.1", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.3", @@ -67,29 +67,28 @@ "cacache": "^20.0.3", "chalk": "^5.6.2", "ci-info": "^4.4.0", - "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", "fs-minipass": "^3.0.3", - "glob": "^13.0.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", "hosted-git-info": "^9.0.2", "ini": "^6.0.0", - "init-package-json": "^8.2.4", - "is-cidr": "^6.0.1", + "init-package-json": "^8.2.5", + "is-cidr": "^6.0.3", "json-parse-even-better-errors": "^5.0.0", "libnpmaccess": "^10.0.3", - "libnpmdiff": "^8.1.0", - "libnpmexec": "^10.2.0", - "libnpmfund": "^7.0.14", + "libnpmdiff": "^8.1.2", + "libnpmexec": "^10.2.2", + "libnpmfund": "^7.0.16", "libnpmorg": "^8.0.1", - "libnpmpack": "^9.1.0", + "libnpmpack": "^9.1.2", "libnpmpublish": "^11.1.3", "libnpmsearch": "^9.0.1", "libnpmteam": "^8.0.2", "libnpmversion": "^8.0.3", "make-fetch-happen": "^15.0.3", - "minimatch": "^10.1.1", - "minipass": "^7.1.1", + "minimatch": "^10.2.2", + "minipass": "^7.1.3", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", "node-gyp": "^12.2.0", @@ -102,21 +101,21 @@ "npm-registry-fetch": "^19.1.1", "npm-user-validate": "^4.0.0", "p-map": "^7.0.4", - "pacote": "^21.1.0", + "pacote": "^21.3.1", "parse-conflict-json": "^5.0.1", "proc-log": "^6.1.0", "qrcode-terminal": "^0.12.0", "read": "^5.0.1", - "semver": "^7.7.3", + "semver": "^7.7.4", "spdx-expression-parse": "^4.0.0", - "ssri": "^13.0.0", + "ssri": "^13.0.1", "supports-color": "^10.2.2", - "tar": "^7.5.7", + "tar": "^7.5.9", "text-table": "~0.2.0", "tiny-relative-date": "^2.0.2", "treeverse": "^3.0.0", "validate-npm-package-name": "^7.0.2", - "which": "^6.0.0" + "which": "^6.0.1" }, "bundleDependencies": [ "@isaacs/string-locale-compare", @@ -135,7 +134,6 @@ "cacache", "chalk", "ci-info", - "cli-columns", "fastest-levenshtein", "fs-minipass", "glob", @@ -192,7 +190,7 @@ "@npmcli/git": "^7.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "@tufjs/repo-mock": "^4.0.0", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", @@ -250,7 +248,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "./scripts/template-oss/root.js" }, "license": "Artistic-2.0", diff --git a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs index 64759ec6ef9cf0..0b0ee324ce05dd 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs @@ -6,18 +6,17 @@ */ 'use strict' exports[`test/lib/commands/completion.js TAP completion --no- flags > flags 1`] = ` -Array [ - String( - --no-version - --no-versions - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion commands with no completion > no results 1`] = ` Array [] ` +exports[`test/lib/commands/completion.js TAP completion completion after custom definition flag requiring value > custom definition non-Boolean flag handled 1`] = ` +Array [] +` + exports[`test/lib/commands/completion.js TAP completion completion cannot complete options that take a value in mid-command > does not try to complete option arguments in the middle of a command 1`] = ` Array [] ` @@ -38,134 +37,16 @@ exports[`test/lib/commands/completion.js TAP completion completion of invalid co Array [] ` +exports[`test/lib/commands/completion.js TAP completion completion with double-dash escape in command line > double-dash escape handled 1`] = ` +Array [] +` + +exports[`test/lib/commands/completion.js TAP completion completion with non-flag word > non-flag word completion 1`] = ` +Array [] +` + exports[`test/lib/commands/completion.js TAP completion double dashes escape from flag completion > full command list 1`] = ` -Array [ - String( - 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 - 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 - sbom - search - set - shrinkwrap - star - stars - start - stop - team - test - token - undeprecate - uninstall - unpublish - unstar - update - version - view - whoami - author - home - issues - info - show - find - add - unlink - remove - rm - r - un - rb - list - ln - create - i - it - cit - up - c - s - se - tst - t - ddp - v - run-script - clean-install - clean-install-test - x - why - la - verison - ic - innit - in - ins - inst - insta - instal - isnt - isnta - isntal - isntall - install-clean - isntall-clean - hlep - dist-tags - upgrade - udpate - rum - sit - urn - ogr - add-user - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion filtered subcommands > filtered subcommands 1`] = ` @@ -173,15 +54,7 @@ Array [] ` exports[`test/lib/commands/completion.js TAP completion flags > flags 1`] = ` -Array [ - String( - --version - --versions - --viewer - --verbose - --v - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion multiple command names > multiple command names 1`] = ` @@ -215,6 +88,63 @@ Array [ ] ` +exports[`test/lib/commands/completion.js TAP completion trust filtered subcommands > trust filtered subcommands 1`] = ` +Array [ + String( + github + gitlab + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust github flags > trust github flags with custom definitions 1`] = ` +Array [ + String( + --file + --repository + --repo + --environment + --env + --dry-run + --json + --registry + --yes + --no-dry-run + --no-json + --no-yes + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust gitlab flags > trust gitlab flags with custom definitions 1`] = ` +Array [ + String( + --file + --project + --environment + --env + --dry-run + --json + --registry + --yes + --no-dry-run + --no-json + --no-yes + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust subcommands > trust subcommands 1`] = ` +Array [ + String( + github + gitlab + list + revoke + ), +] +` + exports[`test/lib/commands/completion.js TAP windows without bash > no output 1`] = ` Array [] ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs index d96ebf3412e04c..bae0cc8ede3947 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -103,6 +103,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "name": null, "maxsockets": 15, "message": "%s", + "min-release-age": null, "node-gyp": "{CWD}/node_modules/node-gyp/bin/node-gyp.js", "node-options": null, "noproxy": [ @@ -280,6 +281,7 @@ logs-max = 10 ; long = false ; overridden by cli maxsockets = 15 message = "%s" +min-release-age = null name = null node-gyp = "{CWD}/node_modules/node-gyp/bin/node-gyp.js" node-options = null @@ -449,6 +451,6 @@ registry = "https://some.registry" exports[`test/lib/commands/config.js TAP config list with publishConfig local > warns about unknown config 1`] = ` Array [ - "Unknown publishConfig config /"other/". This will stop working in the next major version of npm.", + "Unknown publishConfig config /"other/". This will stop working in the next major version of npm. See \`npm help npmrc\` for supported config options.", ] ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs index 3c9fa9bbec4476..6143eacb57ffa2 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs @@ -134,9 +134,9 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime @@ -199,9 +199,9 @@ warn EBADDEVENGINES } verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime @@ -225,9 +225,9 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime diff --git a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs index 96a9d064d0e4e5..e7507118a28f50 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -172,6 +172,7 @@ Object { "man/man1/npm-explore.1", "man/man1/npm-find-dupes.1", "man/man1/npm-fund.1", + "man/man1/npm-get.1", "man/man1/npm-help-search.1", "man/man1/npm-help.1", "man/man1/npm-init.1", @@ -179,6 +180,7 @@ Object { "man/man1/npm-install-test.1", "man/man1/npm-install.1", "man/man1/npm-link.1", + "man/man1/npm-ll.1", "man/man1/npm-login.1", "man/man1/npm-logout.1", "man/man1/npm-ls.1", @@ -200,6 +202,7 @@ Object { "man/man1/npm-run.1", "man/man1/npm-sbom.1", "man/man1/npm-search.1", + "man/man1/npm-set.1", "man/man1/npm-shrinkwrap.1", "man/man1/npm-star.1", "man/man1/npm-stars.1", @@ -208,6 +211,7 @@ Object { "man/man1/npm-team.1", "man/man1/npm-test.1", "man/man1/npm-token.1", + "man/man1/npm-trust.1", "man/man1/npm-undeprecate.1", "man/man1/npm-uninstall.1", "man/man1/npm-unpublish.1", diff --git a/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs index d5e7f6bfd49632..8d66ef780008be 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs @@ -39,8 +39,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -68,8 +67,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -97,8 +95,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -122,14 +119,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -148,14 +138,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -174,14 +157,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -265,30 +241,7 @@ dist .unpackedSize: 1 B dependencies: -0: 1.0.0 -10: 1.0.0 -11: 1.0.0 -12: 1.0.0 -13: 1.0.0 -14: 1.0.0 -15: 1.0.0 -16: 1.0.0 -17: 1.0.0 -18: 1.0.0 -19: 1.0.0 -1: 1.0.0 -20: 1.0.0 -21: 1.0.0 -22: 1.0.0 -23: 1.0.0 -2: 1.0.0 -3: 1.0.0 -4: 1.0.0 -5: 1.0.0 -6: 1.0.0 -7: 1.0.0 -8: 1.0.0 -9: 1.0.0 +0: 1.0.0, 1: 1.0.0, 2: 1.0.0, 3: 1.0.0, 4: 1.0.0, 5: 1.0.0, 6: 1.0.0, 7: 1.0.0, 8: 1.0.0, 9: 1.0.0, 10: 1.0.0, 11: 1.0.0, 12: 1.0.0, 13: 1.0.0, 14: 1.0.0, 15: 1.0.0, 16: 1.0.0, 17: 1.0.0, 18: 1.0.0, 19: 1.0.0, 20: 1.0.0, 21: 1.0.0, 22: 1.0.0, 23: 1.0.0 (...and 1 more.) dist-tags: @@ -325,14 +278,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -351,14 +297,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago @@ -376,14 +315,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -469,8 +401,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -579,8 +510,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -695,8 +625,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -759,8 +688,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> diff --git a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs index 2e639084796d85..d1b790cfe94539 100644 --- a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs @@ -155,6 +155,7 @@ Array [ "team", "test", "token", + "trust", "undeprecate", "uninstall", "unpublish", @@ -290,7 +291,7 @@ If the requested version is a \`dist-tag\` and the given tag does not pass the will be used. For example, \`foo@latest\` might install \`foo@1.2\` even though \`latest\` is \`2.0\`. - +This config cannot be used with: \`min-release-age\` #### \`bin-links\` @@ -1121,6 +1122,21 @@ Any "%s" in the message will be replaced with the version number. +#### \`min-release-age\` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to \`before\`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: \`before\` + #### \`name\` * Default: null @@ -2318,6 +2334,7 @@ Array [ "name", "maxsockets", "message", + "min-release-age", "node-gyp", "node-options", "noproxy", @@ -2474,6 +2491,7 @@ Array [ "name", "maxsockets", "message", + "min-release-age", "node-gyp", "noproxy", "offline", @@ -2775,6 +2793,16 @@ npm access revoke [] Options: [--json] [--otp ] [--registry ] + --json + Whether or not to output JSON data, rather than the normal output. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --registry + The base URL of the npm registry. + + Run "npm help access" for more info \`\`\`bash @@ -2803,6 +2831,16 @@ npm adduser Options: [--registry ] [--scope <@scope>] [--auth-type ] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + --auth-type + What authentication strategy to use with \`login\`. + + alias: add-user Run "npm help adduser" for more info @@ -2835,6 +2873,49 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --audit-level + The minimum level of vulnerability for \`npm audit\` to exit with + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -f|--force + Removes various protections against unfortunate side effects, common + + --json + Whether or not to output JSON data, rather than the normal output. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help audit" for more info \`\`\`bash @@ -2868,6 +2949,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: issues Run "npm help bugs" for more info @@ -2900,6 +2997,10 @@ npm cache npx info ... Options: [--cache ] + --cache + The location of npm's cache directory. + + Run "npm help cache" for more info \`\`\`bash @@ -2933,6 +3034,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: clean-install, ic, install-clean, isntall-clean Run "npm help ci" for more info @@ -2968,6 +3121,9 @@ Tab Completion for npm Usage: npm completion +Options: + + Run "npm help completion" for more info \`\`\`bash @@ -2994,6 +3150,22 @@ Options: [--json] [-g|--global] [--editor ] [-L|--location ] [-l|--long] + --json + Whether or not to output JSON data, rather than the normal output. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --editor + The command to run for \`npm edit\` and \`npm config edit\`. + + -L|--location + When passed to \`npm config\` this refers to which config file to use. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + alias: c Run "npm help config" for more info @@ -3034,6 +3206,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: ddp Run "npm help dedupe" for more info @@ -3072,6 +3296,16 @@ npm deprecate Options: [--registry ] [--otp ] [--dry-run] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + Run "npm help deprecate" for more info \`\`\`bash @@ -3099,6 +3333,46 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --diff + Define arguments to compare in \`npm diff\`. + + --diff-name-only + Prints only filenames when using \`npm diff\`. + + --diff-unified + The number of lines of context to print in \`npm diff\`. + + --diff-ignore-all-space + Ignore whitespace when comparing lines in \`npm diff\`. + + --diff-no-prefix + Do not show any source or destination prefix in \`npm diff\` output. + + --diff-src-prefix + Source prefix to be used in \`npm diff\` output. + + --diff-dst-prefix + Destination prefix to be used in \`npm diff\` output. + + --diff-text + Treat all files as text in \`npm diff\`. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --tag + If you ask npm to install a package and don't tell it a specific version, + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + Run "npm help diff" for more info \`\`\`bash @@ -3132,6 +3406,16 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: dist-tags Run "npm help dist-tag" for more info @@ -3160,6 +3444,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: home Run "npm help docs" for more info @@ -3186,6 +3486,10 @@ npm doctor [connection] [registry] [versions] [environment] [permissions] [cache Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help doctor" for more info \`\`\`bash @@ -3206,6 +3510,10 @@ npm edit [/...] Options: [--editor ] + --editor + The command to run for \`npm edit\` and \`npm config edit\`. + + Run "npm help edit" for more info \`\`\`bash @@ -3231,6 +3539,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --package + The package or packages to install for [\`npm exec\`](/commands/npm-exec) + + -c|--call + Optional companion option for \`npm exec\`, \`npx\` that allows for + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: x Run "npm help exec" for more info @@ -3260,6 +3584,13 @@ npm explain Options: [--json] [-w|--workspace [-w|--workspace ...]] + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + alias: why Run "npm help explain" for more info @@ -3283,6 +3614,10 @@ npm explore [ -- ] Options: [--shell ] + --shell + The shell to run for the \`npm explore\` command. + + Run "npm help explore" for more info \`\`\`bash @@ -3309,6 +3644,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help find-dupes" for more info \`\`\`bash @@ -3343,6 +3724,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--which ] + --json + Whether or not to output JSON data, rather than the normal output. + + --browser + The browser that is called by npm commands to open websites. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --which + If there are multiple funding sources, which 1-indexed source URL to open. + + Run "npm help fund" for more info \`\`\`bash @@ -3365,6 +3762,10 @@ npm get [ ...] (See \`npm config\`) Options: [-l|--long] + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + Run "npm help get" for more info \`\`\`bash @@ -3385,6 +3786,10 @@ npm help [] Options: [--viewer ] + --viewer + The program to use to view help content. + + alias: hlep Run "npm help help" for more info @@ -3409,6 +3814,10 @@ npm help-search Options: [-l|--long] + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + Run "npm help help-search" for more info \`\`\`bash @@ -3434,6 +3843,49 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--no-workspaces-update] [--include-workspace-root] + --init-author-name + The value \`npm init\` should use by default for the package author's name. + + --init-author-url + The value \`npm init\` should use by default for the package author's homepage. + + --init-license + The value \`npm init\` should use by default for the package license. + + --init-module + A module that will be loaded by the \`npm init\` command. See the + + --init-type + The value that \`npm init\` should use by default for the package.json type field. + + --init-version + The value that \`npm init\` should use by default for the package + + --init-private + The value \`npm init\` should use by default for the package's private flag. + + -y|--yes + Automatically answer "yes" to any prompts that npm might print on + + -f|--force + Removes various protections against unfortunate side effects, common + + --scope + Associate an operation with a scope for a scoped registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --workspaces-update + If set to true, the npm cli will run an update after operations that may + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + aliases: create, innit Run "npm help init" for more info @@ -3475,11 +3927,96 @@ Options: [--include [--include ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--allow-git ] -[--no-audit] [--before ] [--no-bin-links] [--no-fund] [--dry-run] -[--cpu ] [--os ] [--libc ] +[--no-audit] [--before |--min-release-age ] [--no-bin-links] +[--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -E|--save-exact + Dependencies saved to package.json will be configured with an exact + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --prefer-dedupe + Prefer to deduplicate packages if possible, rather than + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --min-release-age + If set, npm will build the npm tree such that only versions that were + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --cpu + Override CPU architecture of native modules to install. + + --os + Override OS of native modules to install. + + --libc + Override libc of native modules to install. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall Run "npm help install" for more info @@ -3507,6 +4044,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall #### \`allow-git\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -3535,6 +4073,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: cit, clean-install-test, sit Run "npm help install-ci-test" for more info @@ -3578,11 +4168,96 @@ Options: [--include [--include ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--allow-git ] -[--no-audit] [--before ] [--no-bin-links] [--no-fund] [--dry-run] -[--cpu ] [--os ] [--libc ] +[--no-audit] [--before |--min-release-age ] [--no-bin-links] +[--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -E|--save-exact + Dependencies saved to package.json will be configured with an exact + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --prefer-dedupe + Prefer to deduplicate packages if possible, rather than + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --min-release-age + If set, npm will build the npm tree such that only versions that were + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --cpu + Override CPU architecture of native modules to install. + + --os + Override OS of native modules to install. + + --libc + Override libc of native modules to install. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: it Run "npm help install-test" for more info @@ -3610,6 +4285,7 @@ alias: it #### \`allow-git\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -3640,20 +4316,81 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] -alias: ln + -S|--save + Save installed packages to a \`package.json\` file as dependencies. -Run "npm help link" for more info + -E|--save-exact + Dependencies saved to package.json will be configured with an exact -\`\`\`bash -npm link [] + -g|--global + Operates in "global" mode, so that packages are installed into the -alias: ln -\`\`\` + --install-strategy + Sets the strategy for installing packages in node_modules. -#### \`save\` -#### \`save-exact\` -#### \`global\` -#### \`install-strategy\` + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + +alias: ln + +Run "npm help link" for more info + +\`\`\`bash +npm link [] + +alias: ln +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` #### \`legacy-bundling\` #### \`global-style\` #### \`strict-peer-deps\` @@ -3686,6 +4423,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --depth + The depth to go when recursing packages for \`npm ls\`. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --link + Used with \`npm ls\`, limiting output to only those packages that are + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: la Run "npm help ll" for more info @@ -3722,6 +4505,16 @@ npm login Options: [--registry ] [--scope <@scope>] [--auth-type ] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + --auth-type + What authentication strategy to use with \`login\`. + + Run "npm help login" for more info \`\`\`bash @@ -3744,6 +4537,13 @@ npm logout Options: [--registry ] [--scope <@scope>] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + Run "npm help logout" for more info \`\`\`bash @@ -3770,6 +4570,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --depth + The depth to go when recursing packages for \`npm ls\`. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --link + Used with \`npm ls\`, limiting output to only those packages that are + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: list Run "npm help ls" for more info @@ -3829,6 +4675,19 @@ npm org ls orgname [] Options: [--registry ] [--otp ] [--json] [-p|--parseable] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --json + Whether or not to output JSON data, rather than the normal output. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + alias: ogr Run "npm help org" for more info @@ -3858,7 +4717,29 @@ npm outdated [ ...] Options: [-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [-w|--workspace [-w|--workspace ...]] -[--before ] +[--before |--min-release-age ] + + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + Run "npm help outdated" for more info @@ -3873,6 +4754,7 @@ npm outdated [ ...] #### \`global\` #### \`workspace\` #### \`before\` +#### \`min-release-age\` ` exports[`test/lib/docs.js TAP usage owner > must match snapshot 1`] = ` @@ -3888,6 +4770,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + alias: author Run "npm help owner" for more info @@ -3917,6 +4812,28 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--ignore-scripts] + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --json + Whether or not to output JSON data, rather than the normal output. + + --pack-destination + Directory in which \`npm pack\` will save tarballs. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + Run "npm help pack" for more info \`\`\`bash @@ -3941,6 +4858,10 @@ npm ping Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help ping" for more info \`\`\`bash @@ -3968,6 +4889,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + -f|--force + Removes various protections against unfortunate side effects, common + + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help pkg" for more info \`\`\`bash @@ -3994,6 +4928,10 @@ npm prefix Options: [-g|--global] + -g|--global + Operates in "global" mode, so that packages are installed into the + + Run "npm help prefix" for more info \`\`\`bash @@ -4017,6 +4955,19 @@ npm profile set Options: [--registry ] [--json] [-p|--parseable] [--otp ] + --registry + The base URL of the npm registry. + + --json + Whether or not to output JSON data, rather than the normal output. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help profile" for more info \`\`\`bash @@ -4047,6 +4998,37 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --json + Whether or not to output JSON data, rather than the normal output. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help prune" for more info \`\`\`bash @@ -4076,6 +5058,31 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--provenance|--provenance-file ] + --tag + If you ask npm to install a package and don't tell it a specific version, + + --access + If you do not want your scoped package to be publicly viewable (and + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --provenance + When publishing from a supported cloud CI/CD system, the package will be + + Run "npm help publish" for more info \`\`\`bash @@ -4105,6 +5112,25 @@ Options: [--workspaces] [--include-workspace-root] [--package-lock-only] [--expect-results|--expect-result-count ] + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --expect-results + Tells npm whether or not to expect results from the command. + + Run "npm help query" for more info \`\`\`bash @@ -4131,6 +5157,31 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -g|--global + Operates in "global" mode, so that packages are installed into the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: rb Run "npm help rebuild" for more info @@ -4162,6 +5213,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + Run "npm help repo" for more info \`\`\`bash @@ -4184,6 +5251,13 @@ npm restart [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help restart" for more info \`\`\`bash @@ -4203,6 +5277,10 @@ npm root Options: [-g|--global] + -g|--global + Operates in "global" mode, so that packages are installed into the + + Run "npm help root" for more info \`\`\`bash @@ -4225,6 +5303,28 @@ Options: [--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] [--foreground-scripts] [--script-shell ] + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --if-present + If true, npm will not exit with an error code when \`run\` is + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + aliases: run-script, rum, urn Run "npm help run" for more info @@ -4257,6 +5357,25 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --omit + Dependency types to omit from the installation tree on disk. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --sbom-format + SBOM format to use when generating SBOMs. + + --sbom-type + The type of package described by the generated SBOM. For SPDX, this is the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help sbom" for more info \`\`\`bash @@ -4283,6 +5402,40 @@ Options: [--searchexclude ] [--registry ] [--prefer-online] [--prefer-offline] [--offline] + --json + Whether or not to output JSON data, rather than the normal output. + + --color + If false, never shows colors. If \`"always"\` then always shows colors. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --description + Show the description in \`npm search\` + + --searchlimit + Number of items to limit search results to. Will not apply at all to + + --searchopts + Space-separated options that are always passed to search. + + --searchexclude + Space-separated options that limit the results from search. + + --registry + The base URL of the npm registry. + + --prefer-online + If true, staleness checks for cached data will be forced, making the CLI + + --prefer-offline + If true, staleness checks for cached data will be bypassed, but missing + + --offline + Force offline mode: no network requests will be done during install. To allow + + aliases: find, s, se Run "npm help search" for more info @@ -4317,6 +5470,13 @@ npm set = [= ...] (See \`npm config\`) Options: [-g|--global] [-L|--location ] + -g|--global + Operates in "global" mode, so that packages are installed into the + + -L|--location + When passed to \`npm config\` this refers to which config file to use. + + Run "npm help set" for more info \`\`\`bash @@ -4355,6 +5515,16 @@ npm star [...] Options: [--registry ] [--unicode] [--otp ] + --registry + The base URL of the npm registry. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help star" for more info \`\`\`bash @@ -4377,6 +5547,10 @@ npm stars [] Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help stars" for more info \`\`\`bash @@ -4397,6 +5571,13 @@ npm start [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help start" for more info \`\`\`bash @@ -4416,6 +5597,13 @@ npm stop [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help stop" for more info \`\`\`bash @@ -4439,6 +5627,19 @@ npm team ls | Options: [--registry ] [--otp ] [-p|--parseable] [--json] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --json + Whether or not to output JSON data, rather than the normal output. + + Run "npm help team" for more info \`\`\`bash @@ -4466,6 +5667,13 @@ npm test [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + aliases: tst, t Run "npm help test" for more info @@ -4497,6 +5705,52 @@ Options: [--cidr [--cidr ...]] [--bypass-2fa] [--password ] [--registry ] [--otp ] [--read-only] + --name + When creating a Granular Access Token with \`npm token create\`, + + --token-description + Description text for the token when using \`npm token create\`. + + --expires + When creating a Granular Access Token with \`npm token create\`, + + --packages + When creating a Granular Access Token with \`npm token create\`, + + --packages-all + When creating a Granular Access Token with \`npm token create\`, + + --scopes + When creating a Granular Access Token with \`npm token create\`, + + --orgs + When creating a Granular Access Token with \`npm token create\`, + + --packages-and-scopes-permission + When creating a Granular Access Token with \`npm token create\`, + + --orgs-permission + When creating a Granular Access Token with \`npm token create\`, + + --cidr + This is a list of CIDR address to be used when configuring limited access + + --bypass-2fa + When creating a Granular Access Token with \`npm token create\`, + + --password + Password for authentication. Can be provided via command line when + + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --read-only + This is used to mark a token as unable to publish when configuring + + Run "npm help token" for more info \`\`\`bash @@ -4524,6 +5778,45 @@ Note: This command is unaware of workspaces. #### \`read-only\` ` +exports[`test/lib/docs.js TAP usage trust > must match snapshot 1`] = ` +Create a trusted relationship between a package and a OIDC provider + +Usage: +npm trust + +Subcommands: + github + Create a trusted relationship between a package and GitHub Actions + + gitlab + Create a trusted relationship between a package and GitLab CI/CD + + list + List trusted relationships for a package + + revoke + Revoke a trusted relationship for a package + +Run "npm trust --help" for more info on a subcommand. + +Run "npm help trust" for more info + +\`\`\`bash +npm trust +\`\`\` + +Note: This command is unaware of workspaces. + +#### Synopsis +#### Flags +#### Synopsis +#### Flags +#### Synopsis +#### Flags +#### Synopsis +#### Flags +` + exports[`test/lib/docs.js TAP usage undeprecate > must match snapshot 1`] = ` Undeprecate a version of a package @@ -4533,6 +5826,16 @@ npm undeprecate Options: [--registry ] [--otp ] [--dry-run] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + Run "npm help undeprecate" for more info \`\`\`bash @@ -4558,6 +5861,25 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: unlink, remove, rm, r, un Run "npm help uninstall" for more info @@ -4587,6 +5909,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -f|--force + Removes various protections against unfortunate side effects, common + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help unpublish" for more info \`\`\`bash @@ -4608,6 +5943,16 @@ npm unstar [...] Options: [--registry ] [--unicode] [--otp ] + --registry + The base URL of the npm registry. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help unstar" for more info \`\`\`bash @@ -4634,11 +5979,72 @@ Options: [--omit [--omit ...]] [--include [--include ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--before ] [--no-bin-links] [--no-fund] -[--dry-run] +[--ignore-scripts] [--no-audit] [--before |--min-release-age ] +[--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: up, upgrade, udpate Run "npm help update" for more info @@ -4662,6 +6068,7 @@ aliases: up, upgrade, udpate #### \`ignore-scripts\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -4685,6 +6092,43 @@ Options: [--workspaces] [--no-workspaces-update] [--include-workspace-root] [--ignore-scripts] + --allow-same-version + Prevents throwing an error when \`npm version\` is used to set the new + + --commit-hooks + Run git commit hooks when using the \`npm version\` command. + + --git-tag-version + Tag the commit when using the \`npm version\` command. Setting this to + + --json + Whether or not to output JSON data, rather than the normal output. + + --preid + The "prerelease identifier" to use as a prefix for the "prerelease" part + + --sign-git-tag + If set to true, then the \`npm version\` command will tag the version + + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --workspaces-update + If set to true, the npm cli will run an update after operations that may + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + alias: verison Run "npm help version" for more info @@ -4719,6 +6163,19 @@ Options: [--json] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + aliases: info, show, v Run "npm help view" for more info @@ -4744,6 +6201,10 @@ npm whoami Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help whoami" for more info \`\`\`bash diff --git a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs index ca42f133562783..888af047882fa7 100644 --- a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs @@ -38,8 +38,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -88,10 +89,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -140,10 +142,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -178,8 +181,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -228,10 +232,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -280,10 +285,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -330,7 +336,7 @@ All commands: restart, root, run, sbom, search, set, shrinkwrap, star, stars, start, stop, - team, test, token, + team, test, token, trust, undeprecate, uninstall, unpublish, unstar, update, version, view, @@ -369,9 +375,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, - whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -406,8 +412,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -442,8 +449,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} diff --git a/deps/npm/test/fixtures/mock-npm.js b/deps/npm/test/fixtures/mock-npm.js index bac95964c93066..0b29fc934d84c4 100644 --- a/deps/npm/test/fixtures/mock-npm.js +++ b/deps/npm/test/fixtures/mock-npm.js @@ -83,6 +83,16 @@ const getMockNpm = async (t, { mocks, init, load, npm: npmOpts }) => { await Promise.all(this.unrefPromises) return res } + + async exec (cmd, args = this.argv) { + // In tests, when exec is called with args, update config.argv to include them + // This mimics production where config.argv contains the full command line + if (args && args !== this.argv) { + // Build full argv: ['node', 'npm', cmd, ...args] + this.config.argv = [process.argv[0], process.argv[1], cmd, ...args] + } + return super.exec(cmd, args) + } } const npm = init ? new MockNpm() : null diff --git a/deps/npm/test/lib/base-cmd.js b/deps/npm/test/lib/base-cmd.js new file mode 100644 index 00000000000000..21e83d729b0b8c --- /dev/null +++ b/deps/npm/test/lib/base-cmd.js @@ -0,0 +1,678 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../fixtures/mock-npm') +const BaseCommand = require('../../lib/base-cmd.js') +const Definition = require('@npmcli/config/lib/definitions/definition.js') + +t.test('flags() method with command definitions', async t => { + const { npm } = await loadMockNpm(t, { + config: { + mountain: 'kilimanjaro', + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.ok(flags, 'flags() returns an object') + t.equal(flags.mountain, 'kilimanjaro', 'includes config value when set') +}) + +t.test('flags() method with default values', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'everest', 'uses default value when not set') +}) + +t.test('flags() method filters unknown options', async t => { + const { npm } = await loadMockNpm(t, { + // npm.config.argv would have both known and unknown flags parsed + config: { + mountain: 'denali', + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'includes known flag') + t.notOk(flags.bug, 'filters out unknown flags') + t.same(Object.keys(flags), ['mountain'], 'only includes defined keys') +}) + +t.test('flags() method with no definitions', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.same(flags, {}, 'returns empty object when no definitions') +}) + +t.test('flags() throws error for unknown flags', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Manually set config.argv to simulate command-line with unknown flag + npm.config.argv = ['node', 'npm', 'test-command', '--unknown-flag'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Unknown flag.*--unknown-flag/ }, + 'throws error for unknown flag' + ) +}) + +t.test('flags() maps alias to main key', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak'], + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the alias --peak instead of --mountain + npm.config.argv = ['node', 'npm', 'test-command', '--peak=denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'alias value is mapped to main key') + t.notOk('peak' in flags, 'alias key is not present in flags') +}) + +t.test('flags() throws error when both main key and alias are provided', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak'], + }), + ] + + async exec () { + return this.flags() + } + } + + // Provide both --mountain and --peak (its alias) + npm.config.argv = ['node', 'npm', 'test-command', '--mountain=everest', '--peak=denali'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Please provide only one of --mountain or --peak/ }, + 'throws error when main key and alias are both provided' + ) +}) + +t.test('getUsage() with no params and no definitions', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Test command description'), 'includes description') + t.ok(usage.includes('npm test-command'), 'includes usage line') + t.notOk(usage.includes('Options:'), 'does not include Options section') +}) + +t.test('getUsage() with both params and definitions', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static params = ['mountain', 'river'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + new Definition('river', { + type: String, + default: 'nile', + description: 'Your favorite river', + usage: '--river=', + }), + ] + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Test command description'), 'includes description') + t.ok(usage.includes('Options:'), 'includes Options section') + t.ok(usage.includes('--mountain'), 'includes mountain flag') + t.ok(usage.includes('--river'), 'includes river flag') +}) + +t.test('getUsage() with subcommand without description', async t => { + class SubCommandWithDesc extends BaseCommand { + static name = 'with-desc' + static description = 'Subcommand with description' + } + + class SubCommandNoDesc extends BaseCommand { + static name = 'no-desc' + // No description + } + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static subcommands = { + 'with-desc': SubCommandWithDesc, + 'no-desc': SubCommandNoDesc, + } + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Subcommands:'), 'includes Subcommands section') + t.ok(usage.includes('with-desc'), 'includes subcommand with description') + t.ok(usage.includes('Subcommand with description'), 'includes the description text') + t.ok(usage.includes('no-desc'), 'includes subcommand without description') +}) + +t.test('getUsage() with definition without description', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static params = ['mountain', 'river'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + new Definition('river', { + type: String, + default: 'nile', + description: '', // Empty description + usage: '--river=', + }), + ] + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Options:'), 'includes Options section') + t.ok(usage.includes('--mountain'), 'includes mountain flag in options') + t.ok(usage.includes('Your favorite mountain'), 'includes mountain description') + t.ok(usage.includes('[--river=]'), 'includes river in usage line') + t.notOk(usage.includes(' --river'), 'does not include river flag description section') +}) + +t.test('flags() handles definition with multiple aliases', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak', 'summit'], // Multiple aliases + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the second alias --summit + npm.config.argv = ['node', 'npm', 'test-command', '--summit=denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'second alias value is mapped to main key') + t.notOk('summit' in flags, 'alias key is not present in flags') + t.notOk('peak' in flags, 'other alias key is not present in flags') +}) + +t.test('flags() handles definition with short as array', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + short: ['m', 'M'], // Short as array + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the short flag -m + npm.config.argv = ['node', 'npm', 'test-command', '-m', 'denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'short flag value is parsed correctly') +}) + +t.test('flags() returns defaults when argv is empty', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set argv to empty array + npm.config.argv = [] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + t.equal(flags.mountain, 'everest', 'returns default value when argv is empty') + t.same(remains, [], 'remains is empty array') +}) + +t.test('flags() throws error for multiple unknown flags with pluralization', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Provide multiple unknown flags + npm.config.argv = ['node', 'npm', 'test-command', '--unknown-one', '--unknown-two'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Unknown flags:.*--unknown-one.*--unknown-two/ }, + 'throws error with pluralized "flags" for multiple unknown flags' + ) +}) + +t.test('base exec() method returns undefined', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + // Intentionally not overriding exec() to test the base implementation + } + + const command = new TestCommand(npm) + const result = await command.exec() + + t.equal(result, undefined, 'base exec() returns undefined') +}) + +t.test('flags() removes unknown positional warning when value is consumed by command definition', async t => { + // Pass raw argv to loadMockNpm so warnings are generated during config.load() + // The global config sees --id as unknown (boolean), so "abc123" becomes a positional + // and queues a warning. But command-specific definitions should consume it. + const { npm, logs } = await loadMockNpm(t, { + argv: ['--id', 'abc123'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution (mock-npm prepends the command) + npm.config.argv = ['node', 'npm', 'test-command', '--id', 'abc123'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The flag should be properly parsed + t.equal(flags.id, 'abc123', 'id flag is properly parsed') + t.same(remains, [], 'no remaining positionals') + + // Check that no warning about "abc123" being parsed as positional was logged + const warningLogs = logs.warn + const positionalWarnings = warningLogs.filter(msg => + msg.includes('abc123') && msg.includes('parsed as a normal command line argument') + ) + t.equal(positionalWarnings.length, 0, 'no warning about abc123 being a positional') +}) + +t.test('flags() keeps unknown positional warning when multiple values follow unknown flag', async t => { + // Pass raw argv to loadMockNpm so warnings are generated during config.load() + // Both "abc123" and "def456" are seen as positionals by global config because --id is unknown + // nopt only warns about "abc123" (the immediate next value after unknown flag) + // Command definition consumes "abc123" for --id, "def456" remains as true positional + const { npm, logs } = await loadMockNpm(t, { + argv: ['--id', 'abc123', 'def456'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution + npm.config.argv = ['node', 'npm', 'test-command', '--id', 'abc123', 'def456'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The flag should be properly parsed + t.equal(flags.id, 'abc123', 'id flag is properly parsed') + t.same(remains, ['def456'], 'def456 remains as positional') + + // Check that warning about "abc123" was removed (consumed by --id) + const warningLogs = logs.warn + const abc123Warnings = warningLogs.filter(msg => + msg.includes('abc123') && msg.includes('parsed as a normal command line argument') + ) + t.equal(abc123Warnings.length, 0, 'no warning about abc123 (consumed by --id)') +}) + +t.test('flags() does not remove unknown positional warning when value is in remains', async t => { + // This tests the else branch where remainsSet.has(unknownPos) is true + // When a value is a true positional (in remains), we should NOT remove its warning + // The warning should be logged (not suppressed) + const { npm, logs } = await loadMockNpm(t, { + argv: ['truepositional'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Manually queue a warning for a value that will be in remains + npm.config.queueWarning('unknown:truepositional', 'config', 'truepositional was parsed as positional') + + // Set up argv for command execution with the value as a true positional + npm.config.argv = ['node', 'npm', 'test-command', 'truepositional'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The positional should remain + t.same(remains, ['truepositional'], 'truepositional is in remains') + t.equal(flags.id, null, 'id flag uses default') + + // Check that the warning WAS logged (not removed before logWarnings()) + // Because the value is in remains, it's a true positional and should warn + const warningLogs = logs.warn + const positionalWarnings = warningLogs.filter(msg => + msg.includes('truepositional') && msg.includes('parsed as positional') + ) + t.equal(positionalWarnings.length, 1, 'warning for truepositional was logged') +}) + +t.test('flags() throws error for extra positional arguments beyond expected count', async t => { + // When a command specifies static positionals = N, extra positionals should throw an error + const { npm } = await loadMockNpm(t, { + argv: ['pkg1', 'extra1', 'extra2'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static positionals = 1 // expects only 1 positional + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution with multiple positionals + npm.config.argv = ['node', 'npm', 'test-command', 'pkg1', 'extra1', 'extra2'] + + const command = new TestCommand(npm) + + // Should throw error for extra positional + await t.rejects( + command.exec(), + { message: 'Unknown positional argument: extra1' }, + 'throws error for first extra positional' + ) +}) + +t.test('flags() does not throw when positionals is null (unlimited)', async t => { + // When static positionals is null, any number of positionals is allowed without error + const { npm } = await loadMockNpm(t, { + argv: ['pkg1', 'extra1', 'extra2'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static positionals = null // unlimited/unchecked + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution with multiple positionals + npm.config.argv = ['node', 'npm', 'test-command', 'pkg1', 'extra1', 'extra2'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // All positionals should remain - no error thrown + t.same(remains, ['pkg1', 'extra1', 'extra2'], 'all positionals are in remains') + t.equal(flags.id, null, 'id flag uses default') +}) diff --git a/deps/npm/test/lib/commands/ci.js b/deps/npm/test/lib/commands/ci.js index 8dc0f1d3cc149b..6db01d7b6ec7a3 100644 --- a/deps/npm/test/lib/commands/ci.js +++ b/deps/npm/test/lib/commands/ci.js @@ -308,3 +308,142 @@ t.test('should use --workspace flag', async t => { assert.packageMissing('node_modules/abbrev@1.1.0') assert.packageInstalled('node_modules/lodash@1.1.1') }) + +// Issue #8726 - npm ci fails because npm install produces an out-of-sync lockfile +// https://github.com/npm/cli/issues/8726 +// +// Root cause: an optional peerDependency at an exact version causes buildIdealTree() to resolve a different version than what's in the lockfile. +// +// Pattern (mirrors real-world addons-linter / htmlhint / node-fetch scenario): +// - scanner@1.0.0 has optional peerDep: fetcher@1.0.0 (exact version) +// - hint@1.0.0 has regular dep: fetcher@^1.0.0 (semver range) +// - npm install resolves fetcher to 1.1.0 (latest matching ^1.0.0) +// - npm ci's buildIdealTree sees fetcher@1.1.0 doesn't satisfy the exact peerDep "1.0.0", treats it as a problem edge, resolves fetcher to 1.0.0 +// - validateLockfile: lockfile has 1.1.0, ideal tree has 1.0.0 → MISMATCH + +t.test('issue-8726: npm ci with optional peerDep causing lockfile version mismatch', async t => { + // Pre-built lockfile locks fetcher@1.1.0 (what npm install would pick). + // scanner has optional peerDep fetcher@1.0.0 (exact version). + // buildIdealTree should respect the lockfile version, but the bug causes it to resolve fetcher to 1.0.0, failing validateLockfile. + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + strictRegistryNock: false, + prefixDir: { + 'linter-tarball': { + 'package.json': JSON.stringify({ + name: 'linter', + version: '1.0.0', + dependencies: { scanner: '1.0.0' }, + }), + }, + 'scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'scanner', + version: '1.0.0', + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }), + }, + 'hint-tarball': { + 'package.json': JSON.stringify({ + name: 'hint', + version: '1.0.0', + dependencies: { fetcher: '^1.0.0' }, + }), + }, + 'fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.0.0' }), + }, + 'fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + linter: '1.0.0', + hint: '1.0.0', + }, + }), + 'package-lock.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + lockfileVersion: 3, + requires: true, + packages: { + '': { + name: 'test-package', + version: '1.0.0', + devDependencies: { linter: '1.0.0', hint: '1.0.0' }, + }, + 'node_modules/linter': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/linter/-/linter-1.0.0.tgz', + dev: true, + dependencies: { scanner: '1.0.0' }, + }, + 'node_modules/scanner': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/scanner/-/scanner-1.0.0.tgz', + dev: true, + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }, + 'node_modules/hint': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/hint/-/hint-1.0.0.tgz', + dev: true, + dependencies: { fetcher: '^1.0.0' }, + }, + 'node_modules/fetcher': { + version: '1.1.0', + resolved: 'https://registry.npmjs.org/fetcher/-/fetcher-1.1.0.tgz', + dev: true, + }, + }, + }), + }, + }) + + // With the fix, buildIdealTree no longer treats the invalid peerOptional edge as a problem, so npm ci proceeds to reification and needs tarballs. + const linterManifest = registry.manifest({ name: 'linter' }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'linter-tarball'), + }) + + const scannerManifest = registry.manifest({ name: 'scanner' }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'scanner-tarball'), + }) + + const hintManifest = registry.manifest({ name: 'hint' }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'hint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'fetcher', + versions: ['1.0.0', '1.1.0'], + }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.1.0'], + tarball: path.join(npm.prefix, 'fetcher-1.1.0-tarball'), + }) + + // npm ci should succeed - the lockfile is valid and the fix ensures the peerOptional edge doesn't cause a version mismatch. + await npm.exec('ci', []) + + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.1.0', + 'installed the locked fetcher version, not the peer dep version' + ) +}) diff --git a/deps/npm/test/lib/commands/completion.js b/deps/npm/test/lib/commands/completion.js index e9ed95929fc345..f3a2c4e12ff8fa 100644 --- a/deps/npm/test/lib/commands/completion.js +++ b/deps/npm/test/lib/commands/completion.js @@ -186,6 +186,141 @@ t.test('completion', async t => { await completion.exec(['npm', '--registry', 'install']) t.matchSnapshot(outputs, 'does not try to complete option arguments in the middle of a command') }) + + // Test custom definition flag that requires a value (non-Boolean) + t.test('completion after custom definition flag requiring value', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 4, 'npm trust github --file value') + + await completion.exec(['npm', 'trust', 'github', '--file', 'value']) + t.matchSnapshot(outputs, 'custom definition non-Boolean flag handled') + }) + + t.test('trust subcommands', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm trust ') + + await completion.exec(['npm', 'trust', '']) + t.matchSnapshot(outputs, 'trust subcommands') + }) + + t.test('trust filtered subcommands', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm trust g') + + await completion.exec(['npm', 'trust', 'g']) + t.matchSnapshot(outputs, 'trust filtered subcommands') + }) + + t.test('trust github flags', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm trust github --re') + + await completion.exec(['npm', 'trust', 'github', '--re']) + t.matchSnapshot(outputs, 'trust github flags with custom definitions') + }) + + t.test('trust gitlab flags', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm trust gitlab --pro') + + await completion.exec(['npm', 'trust', 'gitlab', '--pro']) + t.matchSnapshot(outputs, 'trust gitlab flags with custom definitions') + }) + + // Test to ensure custom definition aliases are recognized + t.test('custom definition with alias', async t => { + const { completion } = await loadMockCompletionComp(t, 3, 'npm trust github --repo') + await completion.exec(['npm', 'trust', 'github', '--repo']) + t.pass('custom alias handled') + }) + + // Test to ensure the code handles undefined word gracefully + t.test('completion with undefined current word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '3', + 'process.env.COMP_LINE': 'npm trust github ', + 'process.env.COMP_POINT': '19', + }, + }) + await completion.exec(['npm', 'trust', 'github']) + t.pass('undefined word handled') + }) + + // Test custom definition Boolean type checking (covers isFlag with custom defs) + t.test('completion after Boolean flag from custom definitions', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --yes ') + await completion.exec(['npm', 'trust', 'github', '--yes', '']) + t.pass('Boolean custom definition handled') + }) + + // Test custom definition non-Boolean type (requires value) + t.test('completion after non-Boolean custom definition flag', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --file ') + await completion.exec(['npm', 'trust', 'github', '--file', '']) + t.pass('non-Boolean custom definition handled') + }) + + // Test to trigger isFlag with custom definition alias + t.test('completion after custom definition flag with alias', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --repo ') + await completion.exec(['npm', 'trust', 'github', '--repo', '']) + t.pass('custom definition alias handled in isFlag') + }) + + // Test to cover shorthand fallback in isFlag (line 345) + t.test('completion with unknown flag', async t => { + const { completion } = await loadMockCompletionComp(t, 3, 'npm install --unknown ') + await completion.exec(['npm', 'install', '--unknown', '']) + t.pass('unknown flag handled via shorthand fallback') + }) + + // Test to cover line 110 - cursor in middle of word + t.test('completion with cursor in middle of word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '1', + 'process.env.COMP_LINE': 'npm install', + 'process.env.COMP_POINT': '7', // cursor after "npm ins" + }, + }) + await completion.exec(['npm', 'ins']) + t.pass('cursor in middle of word handled') + }) + + // Test to cover line 110 - with escaped/quoted word + t.test('completion with escaped word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '1', + 'process.env.COMP_LINE': 'npm inst', + 'process.env.COMP_POINT': '8', // cursor after "npm inst" + }, + }) + await completion.exec(['npm', 'install']) // args has full word but COMP_LINE is partial + t.pass('escaped word handled') + }) + + // Test to cover line 261 - command with definitions (not subcommand) + t.test('completion for command with definitions', async t => { + const { completion } = await loadMockCompletionComp(t, 2, 'npm completion --') + await completion.exec(['npm', 'completion', '--']) + t.pass('command with definitions handled') + }) + + // Test to cover line 141 - false branch where '--' IS in partialWords + t.test('completion with double-dash escape in command line', async t => { + // This tests the false branch at line 141 where partialWords contains '--' + // The '--' escape prevents flag completion + // COMP_CWORD should point to the word AFTER '--' + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm install -- pkg') + await completion.exec(['npm', 'install', '--', 'pkg']) + t.matchSnapshot(outputs, 'double-dash escape handled') + }) + + // Test to cover line 142 - false branch where word doesn't start with '-' + t.test('completion with non-flag word', async t => { + // Inside the outer if (no '--' in partialWords) but word doesn't start with '-' + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm install pack') + await completion.exec(['npm', 'install', 'pack']) + t.matchSnapshot(outputs, 'non-flag word completion') + }) }) t.test('windows without bash', async t => { diff --git a/deps/npm/test/lib/commands/edit.js b/deps/npm/test/lib/commands/edit.js index ae6826f7f98ade..b55bb2df218ba2 100644 --- a/deps/npm/test/lib/commands/edit.js +++ b/deps/npm/test/lib/commands/edit.js @@ -3,6 +3,20 @@ const path = require('node:path') const tspawk = require('../../fixtures/tspawk') const { load: loadMockNpm } = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { edit } = await loadMockNpm(t, { + command: 'edit', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await edit.completion({ conf: { argv: { remain: ['npm', 'edit'] } } }) + t.match(res, ['bar', 'foo']) +}) + const spawk = tspawk(t) const npmConfig = { diff --git a/deps/npm/test/lib/commands/explain.js b/deps/npm/test/lib/commands/explain.js index b55371c8b7e5c4..d702019e9202a3 100644 --- a/deps/npm/test/lib/commands/explain.js +++ b/deps/npm/test/lib/commands/explain.js @@ -2,6 +2,22 @@ const t = require('tap') const { resolve } = require('node:path') const mockNpm = require('../../fixtures/mock-npm.js') +t.test('completion', async t => { + const { explain } = await mockNpm(t, { + command: 'explain', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await explain.completion({ conf: { argv: { remain: ['npm', 'explain'] } } }) + t.type(res, Array) +}) + const mockExplain = async (t, opts) => { const mock = await mockNpm(t, { command: 'explain', diff --git a/deps/npm/test/lib/commands/explore.js b/deps/npm/test/lib/commands/explore.js index 6988dca90fbfb0..b40de9817bff60 100644 --- a/deps/npm/test/lib/commands/explore.js +++ b/deps/npm/test/lib/commands/explore.js @@ -2,6 +2,20 @@ const t = require('tap') const mockNpm = require('../../fixtures/mock-npm') const { cleanCwd } = require('../../fixtures/clean-snapshot') +t.test('completion', async t => { + const { explore } = await mockNpm(t, { + command: 'explore', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await explore.completion({ conf: { argv: { remain: ['npm', 'explore'] } } }) + t.match(res, ['bar', 'foo']) +}) + const mockExplore = async (t, exec, { PJ_ERROR = null, RUN_SCRIPT_ERROR = null, diff --git a/deps/npm/test/lib/commands/fund.js b/deps/npm/test/lib/commands/fund.js index 277190e7a1a481..95521fb6da650e 100644 --- a/deps/npm/test/lib/commands/fund.js +++ b/deps/npm/test/lib/commands/fund.js @@ -1,6 +1,22 @@ const t = require('tap') const mockNpm = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { fund } = await mockNpm(t, { + command: 'fund', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await fund.completion({ conf: { argv: { remain: ['npm', 'fund'] } } }) + t.type(res, Array) +}) + const version = '1.0.0' const funding = { diff --git a/deps/npm/test/lib/commands/get.js b/deps/npm/test/lib/commands/get.js index dec634f835172e..6a1db696282173 100644 --- a/deps/npm/test/lib/commands/get.js +++ b/deps/npm/test/lib/commands/get.js @@ -1,6 +1,12 @@ const t = require('tap') const { load: loadMockNpm } = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { get } = await loadMockNpm(t, { command: 'get' }) + const res = await get.completion({ conf: { argv: { remain: ['npm', 'get'] } } }) + t.type(res, Array) +}) + t.test('should retrieve values from config', async t => { const name = 'editor' const value = 'vigor' diff --git a/deps/npm/test/lib/commands/install.js b/deps/npm/test/lib/commands/install.js index d886ed787166cb..584690b68b5c62 100644 --- a/deps/npm/test/lib/commands/install.js +++ b/deps/npm/test/lib/commands/install.js @@ -1,3 +1,4 @@ +const fs = require('node:fs') const tspawk = require('../../fixtures/tspawk') const { cleanCwd, @@ -247,7 +248,7 @@ t.test('exec commands', async t => { npm.exec('install', ['npm/npm']), { code: 'EALLOWGIT', - message: 'Fetching packages from git has been disabled', + message: 'Fetching packages of type "git" have been disabled', package: 'github:npm/npm', } ) @@ -267,7 +268,7 @@ t.test('exec commands', async t => { }) await t.rejects( npm.exec('install', ['./abbrev']), - /Fetching packages from git has been disabled/ + /Fetching packages of type "git" have been disabled/ ) }) }) @@ -770,3 +771,272 @@ t.test('devEngines', async t => { t.ok(!output.includes('EBADDEVENGINES')) }) }) + +// Issue #8726 - npm install should re-resolve to satisfy peerOptional constraints +// https://github.com/npm/cli/issues/8726 +// +// When a lockfile has fetcher@1.1.0 but a peerOptional wants fetcher@1.0.0 (exact), npm install (save: true) should re-resolve fetcher to 1.0.0 to satisfy both the regular dep range (^1.0.0) and the exact peerOptional constraint. +t.test('issue-8726: npm install re-resolves to satisfy peerOptional constraint', async t => { + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + prefixDir: { + 'linter-tarball': { + 'package.json': JSON.stringify({ + name: 'linter', + version: '1.0.0', + dependencies: { scanner: '1.0.0' }, + }), + }, + 'scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'scanner', + version: '1.0.0', + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }), + }, + 'hint-tarball': { + 'package.json': JSON.stringify({ + name: 'hint', + version: '1.0.0', + dependencies: { fetcher: '^1.0.0' }, + }), + }, + 'fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.0.0' }), + }, + 'fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + linter: '1.0.0', + hint: '1.0.0', + }, + }), + 'package-lock.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + lockfileVersion: 3, + requires: true, + packages: { + '': { + name: 'test-package', + version: '1.0.0', + devDependencies: { linter: '1.0.0', hint: '1.0.0' }, + }, + 'node_modules/linter': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/linter/-/linter-1.0.0.tgz', + dev: true, + dependencies: { scanner: '1.0.0' }, + }, + 'node_modules/scanner': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/scanner/-/scanner-1.0.0.tgz', + dev: true, + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }, + 'node_modules/hint': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/hint/-/hint-1.0.0.tgz', + dev: true, + dependencies: { fetcher: '^1.0.0' }, + }, + 'node_modules/fetcher': { + version: '1.1.0', + resolved: 'https://registry.npmjs.org/fetcher/-/fetcher-1.1.0.tgz', + dev: true, + }, + }, + }), + }, + }) + + // Only set up mocks that npm install actually needs: tarballs for all installed packages (linter, scanner, hint, fetcher@1.0.0) and the fetcher packument (needed for re-resolution via #problemEdges). + // Packuments for linter/scanner/hint are NOT needed (already in lockfile). + // Fetcher@1.1.0 tarball is NOT needed (gets replaced by 1.0.0). + const linterManifest = registry.manifest({ name: 'linter' }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'linter-tarball'), + }) + + const scannerManifest = registry.manifest({ name: 'scanner' }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'scanner-tarball'), + }) + + const hintManifest = registry.manifest({ name: 'hint' }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'hint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'fetcher', + versions: ['1.0.0', '1.1.0'], + }) + await registry.package({ manifest: fetcherManifest }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'fetcher-1.0.0-tarball'), + }) + + await npm.exec('install', []) + + // Read the updated lockfile and verify fetcher was re-resolved to 1.0.0 + const lockfile = JSON.parse( + fs.readFileSync(path.join(npm.prefix, 'package-lock.json'), 'utf8') + ) + t.equal( + lockfile.packages['node_modules/fetcher'].version, + '1.0.0', + 'lockfile updated fetcher to satisfy peerOptional constraint' + ) + + // Also verify the installed package + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.0.0', + 'installed fetcher version satisfies peerOptional constraint' + ) +}) + +// Issue #8726 - fresh npm install (no lockfile) should pick a version that satisfies both the regular dep range AND the exact peerOptional constraint, even when the peerOptional holder is processed BEFORE the dep is placed. +// https://github.com/npm/cli/issues/8726 +// +// This test uses package names that reproduce the real-world alphabetical ordering from the original issue (addons-linter < htmlhint), which causes addons-scanner to be processed from the queue BEFORE htmlhint places node-fetcher. +// At that point the peerOptional edge has no destination (MISSING, valid for peerOptional). +// Later, htmlhint places node-fetcher@1.1.0 and the edge becomes INVALID. +// The fix re-queues addons-scanner so #problemEdges can trigger re-resolution of node-fetcher to 1.0.0. +// +// Dependency graph: +// root -> addons-linter@1.0.0 -> addons-scanner@1.0.0 -> PEER_OPTIONAL node-fetcher@1.0.0 +// root -> htmlhint@1.0.0 -> node-fetcher@^1.0.0 +// +// Processing order (alphabetical): addons-linter, then addons-scanner (dep of addons-linter), THEN htmlhint (which places node-fetcher@1.1.0) +t.test('issue-8726: fresh install re-queues scanner when dep placed later', async t => { + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + prefixDir: { + 'addons-linter-tarball': { + 'package.json': JSON.stringify({ + name: 'addons-linter', + version: '1.0.0', + dependencies: { 'addons-scanner': '1.0.0' }, + }), + }, + 'addons-scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'addons-scanner', + version: '1.0.0', + peerDependencies: { 'node-fetcher': '1.0.0' }, + peerDependenciesMeta: { 'node-fetcher': { optional: true } }, + }), + }, + 'htmlhint-tarball': { + 'package.json': JSON.stringify({ + name: 'htmlhint', + version: '1.0.0', + dependencies: { 'node-fetcher': '^1.0.0' }, + }), + }, + 'node-fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'node-fetcher', version: '1.0.0' }), + }, + 'node-fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'node-fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + 'addons-linter': '1.0.0', + htmlhint: '1.0.0', + }, + }), + // NO package-lock.json — this is a fresh install + }, + }) + + // Fresh install needs packuments for all packages + const linterManifest = registry.manifest({ + name: 'addons-linter', + packuments: [{ version: '1.0.0', dependencies: { 'addons-scanner': '1.0.0' } }], + }) + await registry.package({ manifest: linterManifest }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'addons-linter-tarball'), + }) + + const scannerManifest = registry.manifest({ + name: 'addons-scanner', + packuments: [{ + version: '1.0.0', + peerDependencies: { 'node-fetcher': '1.0.0' }, + peerDependenciesMeta: { 'node-fetcher': { optional: true } }, + }], + }) + await registry.package({ manifest: scannerManifest }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'addons-scanner-tarball'), + }) + + const hintManifest = registry.manifest({ + name: 'htmlhint', + packuments: [{ version: '1.0.0', dependencies: { 'node-fetcher': '^1.0.0' } }], + }) + await registry.package({ manifest: hintManifest }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'htmlhint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'node-fetcher', + packuments: [{ version: '1.0.0' }, { version: '1.1.0' }], + }) + // Packument is fetched twice: once when htmlhint resolves node-fetcher@^1.0.0 (picking 1.1.0), and again when addons-scanner is re-queued and re-resolves node-fetcher (picking 1.0.0 to satisfy the exact peerOptional spec). + await registry.package({ manifest: fetcherManifest, times: 2 }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'node-fetcher-1.0.0-tarball'), + }) + // node-fetcher@1.1.0 tarball is NOT needed: it's replaced by 1.0.0 during tree building (before reification), so it's never downloaded. + + await npm.exec('install', []) + + // Verify the lockfile has node-fetcher@1.0.0 + const lockfile = JSON.parse( + fs.readFileSync(path.join(npm.prefix, 'package-lock.json'), 'utf8') + ) + t.equal( + lockfile.packages['node_modules/node-fetcher'].version, + '1.0.0', + 'fresh install picks node-fetcher@1.0.0 satisfying peerOptional constraint' + ) + + // Also verify the installed package + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'node-fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.0.0', + 'installed node-fetcher version satisfies peerOptional constraint' + ) +}) diff --git a/deps/npm/test/lib/commands/ls.js b/deps/npm/test/lib/commands/ls.js index c876af9e83ddfc..1de85b8cfd0959 100644 --- a/deps/npm/test/lib/commands/ls.js +++ b/deps/npm/test/lib/commands/ls.js @@ -5285,3 +5285,19 @@ t.test('ls --package-lock-only', async t => { }) }) }) + +t.test('completion', async t => { + const { ls } = await mockNpm(t, { + command: 'ls', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await ls.completion({ conf: { argv: { remain: ['npm', 'ls'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/publish.js b/deps/npm/test/lib/commands/publish.js index e444121b77e113..4bba640b6d8a3b 100644 --- a/deps/npm/test/lib/commands/publish.js +++ b/deps/npm/test/lib/commands/publish.js @@ -55,7 +55,7 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => { 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.same(logs.warn, ['Unknown publishConfig config "other". This will stop working in the next major version of npm.']) + t.same(logs.warn, ['Unknown publishConfig config "other". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.']) }) t.test('re-loads publishConfig.registry if added during script process', async t => { diff --git a/deps/npm/test/lib/commands/rebuild.js b/deps/npm/test/lib/commands/rebuild.js index aa5578460b90fe..0062362b61329b 100644 --- a/deps/npm/test/lib/commands/rebuild.js +++ b/deps/npm/test/lib/commands/rebuild.js @@ -205,3 +205,19 @@ t.test('global prefix', async t => { 'should output success msg' ) }) + +t.test('completion', async t => { + const { rebuild } = await setupMockNpm(t, { + command: 'rebuild', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await rebuild.completion({ conf: { argv: { remain: ['npm', 'rebuild'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/set.js b/deps/npm/test/lib/commands/set.js index a4a2a7349ef1a9..8574b80345e5c5 100644 --- a/deps/npm/test/lib/commands/set.js +++ b/deps/npm/test/lib/commands/set.js @@ -4,6 +4,12 @@ const mockNpm = require('../../fixtures/mock-npm') const { join } = require('node:path') const { cleanNewlines } = require('../../fixtures/clean-snapshot') +t.test('completion', async t => { + const { set } = await mockNpm(t, { command: 'set' }) + const res = await set.completion({ conf: { argv: { remain: ['npm', 'set'] } } }) + t.type(res, Array) +}) + t.test('no args', async t => { const { npm } = await mockNpm(t) t.rejects(npm.exec('set', []), /Usage:/, 'prints usage') diff --git a/deps/npm/test/lib/commands/trust/github.js b/deps/npm/test/lib/commands/trust/github.js new file mode 100644 index 00000000000000..a2b16d272bde15 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/github.js @@ -0,0 +1,153 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') + +const packageName = '@npmcli/test-package' + +t.test('github with all options provided', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'owner/repo', '--environment', 'production']) +}) + +t.test('github with invalid repository format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'invalid']), + { message: /must be specified in the format owner\/repository/ } + ) +}) + +t.test('github with file as path', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--yes', '--file', '.github/workflows/ci.yml', '--repository', 'owner/repo']), + { message: /must be just a file not a path/ } + ) +}) + +t.test('github without environment', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'owner/repo']) +}) + +t.test('bodyToOptions with all fields', t => { + const TrustGitHub = require('../../../../lib/commands/trust/github.js') + + const body = { + id: 'test-id', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + environment: 'prod', + }, + } + + const options = TrustGitHub.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'id should be set') + t.equal(options.type, 'github', 'type should be set') + t.equal(options.file, 'test.yml', 'file should be set') + t.equal(options.repository, 'owner/repo', 'repository should be set') + t.equal(options.environment, 'prod', 'environment should be set') + t.end() +}) diff --git a/deps/npm/test/lib/commands/trust/gitlab.js b/deps/npm/test/lib/commands/trust/gitlab.js new file mode 100644 index 00000000000000..0b60196830c5f7 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/gitlab.js @@ -0,0 +1,153 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') + +const packageName = '@npmcli/test-package' + +t.test('gitlab with all options provided', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'group/subgroup/repo', '--environment', 'production']) +}) + +t.test('gitlab with invalid project format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'invalid']), + { message: /must be specified in the format/ } + ) +}) + +t.test('gitlab with file as path', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab/ci.yml', '--project', 'group/repo']), + { message: /must be just a file not a path/ } + ) +}) + +t.test('gitlab without environment', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'group/repo']) +}) + +t.test('bodyToOptions with all fields', t => { + const TrustGitLab = require('../../../../lib/commands/trust/gitlab.js') + + const body = { + id: 'test-id', + type: 'gitlab', + claims: { + project_path: 'group/repo', + ci_config_ref_uri: { + file: '.gitlab-ci.yml', + }, + environment: 'prod', + }, + } + + const options = TrustGitLab.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'id should be set') + t.equal(options.type, 'gitlab', 'type should be set') + t.equal(options.file, '.gitlab-ci.yml', 'file should be set') + t.equal(options.project, 'group/repo', 'project should be set') + t.equal(options.environment, 'prod', 'environment should be set') + t.end() +}) diff --git a/deps/npm/test/lib/commands/trust/list.js b/deps/npm/test/lib/commands/trust/list.js new file mode 100644 index 00000000000000..99d25b66bc90c8 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/list.js @@ -0,0 +1,256 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') + +const packageName = '@npmcli/test-package' + +t.test('list with package name argument', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + environment: 'production', + }, + { + id: 'test-id-2', + type: 'gitlab', + claims: { + project_id: '12345', + ref_path: 'refs/heads/main', + pipeline_source: 'push', + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list without package name (uses package.json)', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list']) +}) + +t.test('list with no trust configurations', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustList({ packageName, body: [] }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list without package name and no package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['list']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('list without package name and no name in package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['list']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('list with --json flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + json: true, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + environment: 'production', + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list with scoped package', async t => { + const scopedPackage = '@scope/package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: scopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + }, + ] + + registry.trustList({ packageName: scopedPackage, body: trustConfigs }) + + await npm.exec('trust', ['list', scopedPackage]) +}) + +t.test('list with unknown trust type', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'unknown-type', + claims: { + custom: 'value', + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) diff --git a/deps/npm/test/lib/commands/trust/revoke.js b/deps/npm/test/lib/commands/trust/revoke.js new file mode 100644 index 00000000000000..d44d576664c866 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/revoke.js @@ -0,0 +1,319 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') + +const packageName = '@npmcli/test-package' + +t.test('revoke with package name argument and id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-1' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke without package name (uses package.json)', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-2' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', '--id', trustId]) +}) + +t.test('revoke with dry-run flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + // No registry mock needed since dry-run should not make network requests + const trustId = 'test-id-3' + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke without package name and no package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', '--id', 'test-id']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('revoke without package name and no name in package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', '--id', 'test-id']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('revoke without id flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName]), + { message: /ID of the trusted relationship to revoke must be specified with the --id option/ } + ) +}) + +t.test('revoke with scoped package', async t => { + const scopedPackage = '@scope/package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: scopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-scoped' + registry.trustRevoke({ packageName: scopedPackage, id: trustId }) + + await npm.exec('trust', ['revoke', scopedPackage, '--id', trustId]) +}) + +t.test('revoke with special characters in id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id/with:special@chars' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke with 404 response', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'non-existent-id' + registry.trustRevoke({ + packageName, + id: trustId, + responseCode: 404, + body: { error: 'Not Found' }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName, '--id', trustId]), + { statusCode: 404 } + ) +}) + +t.test('revoke with 500 response', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-error' + registry.trustRevoke({ + packageName, + id: trustId, + responseCode: 500, + body: { error: 'Internal Server Error' }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName, '--id', trustId]), + { statusCode: 500 } + ) +}) + +t.test('revoke with unscoped package name', async t => { + const unscopedPackage = 'test-package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: unscopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-unscoped' + registry.trustRevoke({ packageName: unscopedPackage, id: trustId }) + + await npm.exec('trust', ['revoke', unscopedPackage, '--id', trustId]) +}) + +t.test('revoke with very long id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'a'.repeat(100) + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke with UUID id format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = '550e8400-e29b-41d4-a716-446655440000' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) diff --git a/deps/npm/test/lib/commands/uninstall.js b/deps/npm/test/lib/commands/uninstall.js index a1ef1745d0f555..2ede1c4c1a72af 100644 --- a/deps/npm/test/lib/commands/uninstall.js +++ b/deps/npm/test/lib/commands/uninstall.js @@ -200,3 +200,17 @@ t.test('non ENOENT error reading from localPrefix package.json', async t => { 'should throw non ENOENT error' ) }) + +t.test('completion', async t => { + const { uninstall } = await _mockNpm(t, { + command: 'uninstall', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await uninstall.completion({ conf: { argv: { remain: ['npm', 'uninstall'] } } }) + t.match(res, ['bar', 'foo']) +}) diff --git a/deps/npm/test/lib/commands/unpublish.js b/deps/npm/test/lib/commands/unpublish.js index 996edf2b881fc4..4c8bc5e058afa2 100644 --- a/deps/npm/test/lib/commands/unpublish.js +++ b/deps/npm/test/lib/commands/unpublish.js @@ -409,7 +409,7 @@ t.test('publishConfig no spec', async t => { t.equal(joinedOutput(), '- test-package') t.same(logs.warn, [ 'using --force Recommended protections disabled.', - 'Unknown publishConfig config "other". This will stop working in the next major version of npm.', + 'Unknown publishConfig config "other". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.', ]) }) diff --git a/deps/npm/test/lib/commands/update.js b/deps/npm/test/lib/commands/update.js index e84e2c3142141b..a8c68bd65bb361 100644 --- a/deps/npm/test/lib/commands/update.js +++ b/deps/npm/test/lib/commands/update.js @@ -79,3 +79,19 @@ t.test('update --global', async t => { t.match(ctor.path, globalPrefix) t.ok(ctor.path.startsWith(globalPrefix)) }) + +t.test('completion', async t => { + const { update } = await _mockNpm(t, { + command: 'update', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await update.completion({ conf: { argv: { remain: ['npm', 'update'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/view.js b/deps/npm/test/lib/commands/view.js index e5e0fbff981c92..f1b7b5895113b9 100644 --- a/deps/npm/test/lib/commands/view.js +++ b/deps/npm/test/lib/commands/view.js @@ -837,6 +837,6 @@ t.test('allow-git=none', async t => { await t.rejects(view.exec(['npm/npm']), { code: 'EALLOWGIT', package: 'github:npm/npm', - message: 'Fetching packages from git has been disabled', + message: 'Fetching packages of type "git" have been disabled', }) }) diff --git a/deps/npm/test/lib/docs.js b/deps/npm/test/lib/docs.js index 833e58831ea51d..4b4a438997f15d 100644 --- a/deps/npm/test/lib/docs.js +++ b/deps/npm/test/lib/docs.js @@ -90,16 +90,27 @@ t.test('basic usage', async t => { 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 files = await fs.readdir(dir, { withFileTypes: true }) + return files + .filter(f => { + // Include .js files + if (f.isFile() && extname(f.name) === ext) { + return true + } + // Include directories (which should have an index.js) + if (f.isDirectory()) { + return true + } + return false + }) + .map(f => f.isDirectory() ? f.name : basename(f.name, 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-', '')) + const allDocs = docsCommands.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 @@ -125,7 +136,7 @@ t.test('usage', async t => { } const usage = docs.usage(docs.TAGS.USAGE, { path: cmd }) - const params = docs.params(docs.TAGS.CONFIG, { path: cmd }) + const params = docs.definitions(docs.TAGS.CONFIG, { path: cmd }) .split('\n') .filter(l => l.startsWith('#### ')) .join('\n') || 'NO PARAMS' diff --git a/deps/npm/test/lib/npm.js b/deps/npm/test/lib/npm.js index b4ac509adb4952..c4c0d720e86e8c 100644 --- a/deps/npm/test/lib/npm.js +++ b/deps/npm/test/lib/npm.js @@ -1,6 +1,6 @@ const t = require('tap') const { resolve, dirname, join } = require('node:path') -const fs = require('node:fs') +const fs = require('node:fs/promises') const { time } = require('proc-log') const { load: loadMockNpm } = require('../fixtures/mock-npm.js') const mockGlobals = require('@npmcli/mock-globals') @@ -327,11 +327,11 @@ t.test('debug log', async t => { const logsDir = join(testdir, 'my_logs_dir') // make logs dir a file before load so it files - fs.writeFileSync(logsDir, 'A_TEXT_FILE') + await fs.writeFile(logsDir, 'A_TEXT_FILE') await t.resolves(npm.load(), 'loads with invalid logs dir') t.equal(npm.logFiles.length, 0, 'no log files array') - t.strictSame(fs.readFileSync(logsDir, 'utf-8'), 'A_TEXT_FILE') + t.strictSame(await fs.readFile(logsDir, 'utf-8'), 'A_TEXT_FILE') }) }) @@ -339,7 +339,7 @@ t.test('cache dir', async t => { t.test('creates a cache dir', async t => { const { npm } = await loadMockNpm(t) - t.ok(fs.existsSync(npm.cache), 'cache dir exists') + await t.resolves(fs.access(npm.cache), 'cache dir exists') }) t.test('can load with a bad cache dir', async t => { @@ -352,7 +352,7 @@ t.test('cache dir', async t => { await t.resolves(npm.load(), 'loads with cache dir as a file') - t.equal(fs.readFileSync(cache, 'utf-8'), 'A_TEXT_FILE') + t.equal(await fs.readFile(cache, 'utf-8'), 'A_TEXT_FILE') }) }) @@ -497,6 +497,233 @@ t.test('implicit workspace accept', async t => { await t.rejects(mock.npm.exec('org', []), /.*Usage/) }) +t.test('subcommand handling', async t => { + t.test('no subcommand provided', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('trust', []), + /Usage/, + 'throws usage error when no subcommand provided' + ) + }) + + t.test('unknown subcommand', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('trust', ['unknown-subcommand']), + /Unknown subcommand: unknown-subcommand/, + 'throws error for unknown subcommand' + ) + }) + + t.test('subcommand help with --usage', async t => { + const { npm, outputs } = await loadMockNpm(t, { + config: { + usage: true, + }, + }) + await npm.exec('trust', ['github']) + t.ok(outputs.length > 0, 'outputs help text') + // Check if output was generated - the format may be different + t.ok(outputs.some(o => o && o[0]), 'has output content') + }) +}) + +t.test('exec edge cases', async t => { + t.test('command calls exec again - covers else branch at line 207', async t => { + const { npm, outputs } = await loadMockNpm(t) + // 'get' command calls npm.exec('config', ['get', ...]) internally + // The first exec() sets #command, then when it re-enters exec(), + // the else branch (line 217) is taken because #command is already set + await npm.exec('get', ['registry']) + t.ok(outputs.length > 0, 'command executed and produced output') + }) + + t.test('exec without args parameter - covers default args branch', async t => { + const Npm = require('../../lib/npm.js') + const npm = new Npm() + await npm.load() + npm.argv = ['test'] + // Call exec without second parameter - should use default args = this.argv + await npm.exec('run') + t.pass('exec called without second argument') + }) + + t.test('--versions flag sets argv to version', async t => { + const { npm } = await loadMockNpm(t, { + config: { versions: true }, + }) + t.equal(npm.argv.length, 0, 'argv is empty after version command runs') + t.equal(npm.config.get('usage'), false, 'usage is set to false') + }) + + t.test('color true sets COLOR env to 1', async t => { + await loadMockNpm(t, { + config: { color: 'always' }, + }) + t.equal(process.env.COLOR, '1', 'COLOR env is set to 1 when color is truthy') + }) + + t.test('command without subcommands', async t => { + const { npm } = await loadMockNpm(t) + // Test a command that doesn't have subcommands (line 249 branch) + await t.rejects(npm.exec('org', []), /Usage/) + }) + + t.test('command with workspaces support', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'a', + version: '1.0.0', + scripts: { test: 'echo test' }, + }), + }, + }, + 'package.json': JSON.stringify({ + name: 'root', + version: '1.0.0', + workspaces: ['./packages/a'], + }), + }, + config: { + workspace: ['./packages/a'], + }, + }) + // Test a command that supports workspaces to trigger execWorkspaces path (line 321) + await npm.exec('run', ['test']) + t.pass('executes with workspaces') + }) + + t.test('execCommandClass with default commandPath', async t => { + const { npm } = await loadMockNpm(t) + // Create a simple command instance + const Command = npm.constructor.cmd('version') + const commandInstance = new Command(npm) + + // Call execCommandClass without providing commandPath (using default []) + await npm.execCommandClass(commandInstance, []) + + t.pass('execCommandClass works with default commandPath parameter') + }) + + t.test('command with definitions executes exec() without workspaces', async t => { + const BaseCommand = require('../../lib/base-cmd.js') + const Definition = require('@npmcli/config/lib/definitions/definition.js') + + let execCalled = false + let execArgs = null + let execFlags = null + + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-pkg', + version: '1.0.0', + }), + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-cmd' + static description = 'Test command with definitions' + static workspaces = true + static definitions = [ + new Definition('testflag', { + type: String, + default: 'default-value', + description: 'A test flag', + }), + ] + + async exec (args, flags) { + execCalled = true + execArgs = args + execFlags = flags + } + + async execWorkspaces () { + throw new Error('execWorkspaces should not be called') + } + } + + const command = new TestCommand(npm) + // Set config.argv so flags() can parse the positional args + npm.config.argv = [process.argv[0], process.argv[1], 'test-cmd', 'arg1', 'arg2'] + await npm.execCommandClass(command, ['arg1', 'arg2'], ['test-cmd']) + + t.equal(execCalled, true, 'exec() was called') + t.same(execArgs, ['arg1', 'arg2'], 'positional args passed correctly') + t.ok(execFlags, 'flags object passed') + t.equal(execFlags.testflag, 'default-value', 'flag has default value') + }) + + t.test('command with definitions executes execWorkspaces() with workspaces', async t => { + const BaseCommand = require('../../lib/base-cmd.js') + const Definition = require('@npmcli/config/lib/definitions/definition.js') + + let execWorkspacesCalled = false + let execArgs = null + let execFlags = null + + const { npm } = await loadMockNpm(t, { + prefixDir: { + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'workspace-a', + version: '1.0.0', + }), + }, + }, + 'package.json': JSON.stringify({ + name: 'root', + version: '1.0.0', + workspaces: ['./packages/a'], + }), + }, + config: { + workspace: ['./packages/a'], + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-cmd' + static description = 'Test command with definitions' + static workspaces = true + static definitions = [ + new Definition('testflag', { + type: String, + default: 'ws-default', + description: 'A test flag', + }), + ] + + async exec () { + throw new Error('exec should not be called') + } + + async execWorkspaces (args, flags) { + execWorkspacesCalled = true + execArgs = args + execFlags = flags + } + } + + const command = new TestCommand(npm) + // Set config.argv so flags() can parse the positional args + npm.config.argv = [process.argv[0], process.argv[1], 'test-cmd', 'wsarg1'] + await npm.execCommandClass(command, ['wsarg1'], ['test-cmd']) + + t.equal(execWorkspacesCalled, true, 'execWorkspaces() was called') + t.same(execArgs, ['wsarg1'], 'positional args passed correctly') + t.ok(execFlags, 'flags object passed') + t.equal(execFlags.testflag, 'ws-default', 'flag has default value') + }) +}) + t.test('usage', async t => { t.test('with browser', async t => { const { npm } = await loadMockNpm(t, { globals: { process: { platform: 'posix' } } }) @@ -559,11 +786,3 @@ t.test('usage', async t => { } }) }) - -t.test('print usage if non-command param provided', async t => { - const { npm, joinedOutput } = await loadMockNpm(t) - - await t.rejects(npm.exec('tset'), { command: 'tset', exitCode: 1 }) - t.match(joinedOutput(), 'Unknown command: "tset"') - t.match(joinedOutput(), 'Did you mean this?') -}) diff --git a/deps/npm/test/lib/trust-cmd.js b/deps/npm/test/lib/trust-cmd.js new file mode 100644 index 00000000000000..f0c52aadbd2c4a --- /dev/null +++ b/deps/npm/test/lib/trust-cmd.js @@ -0,0 +1,848 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') +const TrustCommand = require('../../lib/trust-cmd.js') + +const packageName = '@npmcli/test-package' + +t.test('trust-cmd via trust github with read function called', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github with all options', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: true, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli', '--environment', 'production']) +}) + +t.test('trust-cmd via trust github infers from package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', '--yes', '--file', 'workflow.yml']) +}) + +t.test('trust-cmd via trust github with dry-run', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + t.ok(joinedOutput().includes('Establishing trust'), 'shows notice about establishing trust') +}) + +t.test('trust-cmd via trust github missing package name', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: /Package name must be specified/ }, + 'throws when no package name' + ) +}) + +t.test('trust-cmd via trust github missing file', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--repository', 'npm/cli']), + { message: /must be specified with the file option/ }, + 'throws when no file' + ) +}) + +t.test('trust-cmd via trust github invalid file extension', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.txt', '--repository', 'npm/cli']), + { message: /must end in \.yml or \.yaml/ }, + 'throws when file has wrong extension' + ) +}) + +t.test('trust-cmd via trust github missing repository', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']), + { message: /must be specified with repository option/ }, + 'throws when no repository' + ) +}) + +t.test('trust-cmd via trust github with custom registry warning', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + registry: 'https://custom.registry.com/', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + t.ok(logs.warn.some(l => l.includes('may not support trusted publishing')), 'warns about custom registry') +}) + +t.test('trust-cmd via trust github with --json', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + json: true, + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.ok(output.includes(packageName), 'JSON output includes package name') + t.ok(output.includes('workflow.yml'), 'JSON output includes file') +}) + +t.test('trust-cmd via trust github with user confirmation no', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'n', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user declines' + ) +}) + +t.test('trust-cmd via trust github with --no-yes', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: false, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when --no-yes flag is set' + ) +}) + +t.test('trust-cmd via trust github with invalid answer', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'maybe', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user gives invalid answer' + ) +}) + +t.test('trust-cmd via trust github with user confirmation Y uppercase', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'Y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github with user enters empty string', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => '', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user enters empty string' + ) +}) + +t.test('trust-cmd via trust github with mismatched repo type', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://gitlab.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', '--file', 'workflow.yml']), + { message: /Repository in package.json is not a GitHub repository/ }, + 'throws when repository type does not match provider' + ) +}) + +t.test('trust-cmd via trust github with mismatched repo type but flag provided', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://gitlab.com/owner/old-repo', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'owner/new-repo']) + + t.ok(logs.warn.some(l => l.includes('Repository in package.json is not a GitHub repository')), 'warns about repository type mismatch') +}) + +t.test('trust-cmd via trust github with different repo in package.json', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/owner/old-repo', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'owner/new-repo']) + + t.ok(logs.warn.some(l => l.includes('differs from provided')), 'warns about repository mismatch') +}) + +t.test('trust-cmd via trust github with user confirmation yes spelled out', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'yes', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github showing response with id and type', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.ok(output.includes('type:'), 'output shows type field') + t.ok(output.includes('id:'), 'output shows id field') +}) + +t.test('trust-cmd via trust github missing repository when package name differs', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: 'other-package', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']), + { message: /must be specified with repository option/ }, + 'throws when no repository and package name differs' + ) +}) + +t.test('TrustCommand - createConfig', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + const response = await cmd.createConfig(packageName, [{ type: 'test' }]) + t.ok(response, 'returns a response') +}) + +t.test('TrustCommand - bodyToOptions', t => { + const body = { + id: 'test-id', + type: 'test-type', + other: 'ignored', + } + + const options = TrustCommand.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'includes id') + t.equal(options.type, 'test-type', 'includes type') + t.notOk(options.other, 'does not include other fields') + t.end() +}) + +t.test('TrustCommand - bodyToOptions with missing fields', t => { + const body = {} + + const options = TrustCommand.bodyToOptions(body) + + t.same(options, {}, 'returns empty object when no fields') + t.end() +}) + +t.test('TrustCommand - NPM_FRONTEND constant', t => { + t.equal(TrustCommand.NPM_FRONTEND, 'https://www.npmjs.com', 'exports NPM_FRONTEND constant') + t.end() +}) +t.test('trust-cmd via trust github showing fromPackageJson indicator', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']) + + const output = joinedOutput() + t.ok(output.includes('from package.json'), 'output shows fromPackageJson indicator') +}) + +t.test('trust-cmd via trust github showing URLs for fields', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.match(output, /https:\/\/github\.com\/npm\/cli\b/, 'output shows repository URL') +}) + +t.test('trust-cmd via trust github with yes=false flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: false, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: /User cancelled operation/ }, + 'throws when yes is explicitly false' + ) +}) + +t.test('TrustCommand - logOptions with no values', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with no values object + cmd.logOptions({}) + t.pass('logOptions handles missing values object') +}) + +t.test('TrustCommand - logOptions with falsey value', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with a falsey but not null/undefined value + cmd.logOptions({ values: { type: 'test', falseyField: 0, anotherFalsey: false, emptyString: '' } }) + t.pass('logOptions handles falsey values that are not null/undefined') +}) + +t.test('TrustCommand - logOptions with null and undefined values', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with null and undefined values that should be skipped + cmd.logOptions({ values: { type: 'test', id: 'test-id', nullField: null, undefinedField: undefined, validField: 'value' } }) + const output = joinedOutput() + t.ok(output.includes('validField'), 'shows valid field') + t.notOk(output.includes('nullField'), 'skips null field') + t.notOk(output.includes('undefinedField'), 'skips undefined field') +}) + +t.test('TrustCommand - logOptions with fromPackageJson and urls', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with fromPackageJson and urls objects + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + fromPackageJson: { + repository: true, + }, + urls: { + repository: 'https://github.com/npm/cli', + file: 'https://github.com/npm/cli/-/blob/HEAD/workflow.yml', + }, + }) + const output = joinedOutput() + t.ok(output.includes('from package.json'), 'shows fromPackageJson indicator') + t.match(output, /https:\/\/github\.com\/npm\/cli\b/, 'shows URL') +}) + +t.test('TrustCommand - logOptions with no urls', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions without urls object + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + }) + const output = joinedOutput() + t.ok(output.includes('repository'), 'shows repository field') + t.ok(output.includes('file'), 'shows file field') + t.notOk(output.includes('Links to verify manually'), 'does not show links header when no urls') +}) + +t.test('TrustCommand - logOptions with urls but all values are null', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with urls object but all values are null/undefined + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + urls: { + repository: null, + file: undefined, + }, + }) + const output = joinedOutput() + t.ok(output.includes('repository'), 'shows repository field') + t.ok(output.includes('file'), 'shows file field') + t.notOk(output.includes('Links to verify manually'), 'does not show links header when all urls are null') +}) diff --git a/deps/openssl/config/archs/aix-gcc/asm/apps/progs.c b/deps/openssl/config/archs/aix-gcc/asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/fips.ld b/deps/openssl/config/archs/aix-gcc/asm/providers/fips.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/fips.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/aix-gcc/asm/providers/legacy.ld b/deps/openssl/config/archs/aix-gcc/asm/providers/legacy.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm/providers/legacy.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/apps/progs.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/fips.ld b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/fips.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/fips.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/legacy.ld b/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/legacy.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/asm_avx2/providers/legacy.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/apps/progs.c b/deps/openssl/config/archs/aix-gcc/no-asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/fips.ld b/deps/openssl/config/archs/aix-gcc/no-asm/providers/fips.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/fips.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/aix-gcc/no-asm/providers/legacy.ld b/deps/openssl/config/archs/aix-gcc/no-asm/providers/legacy.ld deleted file mode 100644 index 8d6632bf3866af..00000000000000 --- a/deps/openssl/config/archs/aix-gcc/no-asm/providers/legacy.ld +++ /dev/null @@ -1 +0,0 @@ -OSSL_provider_init diff --git a/deps/openssl/config/archs/linux-ppc/asm/apps/progs.c b/deps/openssl/config/archs/linux-ppc/asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/fips.ld b/deps/openssl/config/archs/linux-ppc/asm/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc/asm/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc/asm/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/apps/progs.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/fips.ld b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/asm_avx2/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/apps/progs.c b/deps/openssl/config/archs/linux-ppc/no-asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/fips.ld b/deps/openssl/config/archs/linux-ppc/no-asm/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc/no-asm/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc/no-asm/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc/no-asm/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm/apps/progs.c b/deps/openssl/config/archs/linux-ppc64/asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/fips.ld b/deps/openssl/config/archs/linux-ppc64/asm/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc64/asm/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/apps/progs.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/fips.ld b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/asm_avx2/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/apps/progs.c b/deps/openssl/config/archs/linux-ppc64/no-asm/apps/progs.c deleted file mode 100644 index f594c302c42ec6..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/apps/progs.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by apps/progs.pl - * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "progs.h" - -FUNCTION functions[] = { - {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL, NULL}, - {FT_general, "ca", ca_main, ca_options, NULL, NULL}, -#ifndef OPENSSL_NO_SOCK - {FT_general, "ciphers", ciphers_main, ciphers_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMP - {FT_general, "cmp", cmp_main, cmp_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_CMS - {FT_general, "cms", cms_main, cms_options, NULL, NULL}, -#endif - {FT_general, "crl", crl_main, crl_options, NULL, NULL}, - {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL, NULL}, - {FT_general, "dgst", dgst_main, dgst_options, NULL, NULL}, -#ifndef OPENSSL_NO_DH - {FT_general, "dhparam", dhparam_main, dhparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsa", dsa_main, dsa_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_DSA - {FT_general, "dsaparam", dsaparam_main, dsaparam_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ec", ec_main, ec_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_EC - {FT_general, "ecparam", ecparam_main, ecparam_options, NULL, NULL}, -#endif - {FT_general, "enc", enc_main, enc_options, NULL, NULL}, -#ifndef OPENSSL_NO_ENGINE - {FT_general, "engine", engine_main, engine_options, NULL, NULL}, -#endif - {FT_general, "errstr", errstr_main, errstr_options, NULL, NULL}, - {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL, NULL}, -#ifndef OPENSSL_NO_DSA - {FT_general, "gendsa", gendsa_main, gendsa_options, NULL, NULL}, -#endif - {FT_general, "genpkey", genpkey_main, genpkey_options, NULL, NULL}, -#ifndef OPENSSL_NO_RSA - {FT_general, "genrsa", genrsa_main, genrsa_options, NULL, NULL}, -#endif - {FT_general, "help", help_main, help_options, NULL, NULL}, - {FT_general, "info", info_main, info_options, NULL, NULL}, - {FT_general, "kdf", kdf_main, kdf_options, NULL, NULL}, - {FT_general, "list", list_main, list_options, NULL, NULL}, - {FT_general, "mac", mac_main, mac_options, NULL, NULL}, - {FT_general, "nseq", nseq_main, nseq_options, NULL, NULL}, -#ifndef OPENSSL_NO_OCSP - {FT_general, "ocsp", ocsp_main, ocsp_options, NULL, NULL}, -#endif - {FT_general, "passwd", passwd_main, passwd_options, NULL, NULL}, - {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL, NULL}, - {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL, NULL}, - {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL, NULL}, - {FT_general, "pkey", pkey_main, pkey_options, NULL, NULL}, - {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL, NULL}, - {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL, NULL}, - {FT_general, "prime", prime_main, prime_options, NULL, NULL}, - {FT_general, "rand", rand_main, rand_options, NULL, NULL}, - {FT_general, "rehash", rehash_main, rehash_options, NULL, NULL}, - {FT_general, "req", req_main, req_options, NULL, NULL}, - {FT_general, "rsa", rsa_main, rsa_options, NULL, NULL}, -#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(OPENSSL_NO_RSA) - {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl", "3.0"}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_client", s_client_main, s_client_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_server", s_server_main, s_server_options, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SOCK - {FT_general, "s_time", s_time_main, s_time_options, NULL, NULL}, -#endif - {FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL}, - {FT_general, "smime", smime_main, smime_options, NULL, NULL}, - {FT_general, "speed", speed_main, speed_options, NULL, NULL}, - {FT_general, "spkac", spkac_main, spkac_options, NULL, NULL}, -#ifndef OPENSSL_NO_SRP - {FT_general, "srp", srp_main, srp_options, NULL, NULL}, -#endif - {FT_general, "storeutl", storeutl_main, storeutl_options, NULL, NULL}, -#ifndef OPENSSL_NO_TS - {FT_general, "ts", ts_main, ts_options, NULL, NULL}, -#endif - {FT_general, "verify", verify_main, verify_options, NULL, NULL}, - {FT_general, "version", version_main, version_options, NULL, NULL}, - {FT_general, "x509", x509_main, x509_options, NULL, NULL}, -#ifndef OPENSSL_NO_MD2 - {FT_md, "md2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_MD4 - {FT_md, "md4", dgst_main, NULL, NULL}, -#endif - {FT_md, "md5", dgst_main, NULL, NULL}, - {FT_md, "sha1", dgst_main, NULL, NULL}, - {FT_md, "sha224", dgst_main, NULL, NULL}, - {FT_md, "sha256", dgst_main, NULL, NULL}, - {FT_md, "sha384", dgst_main, NULL, NULL}, - {FT_md, "sha512", dgst_main, NULL, NULL}, - {FT_md, "sha512-224", dgst_main, NULL, NULL}, - {FT_md, "sha512-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-224", dgst_main, NULL, NULL}, - {FT_md, "sha3-256", dgst_main, NULL, NULL}, - {FT_md, "sha3-384", dgst_main, NULL, NULL}, - {FT_md, "sha3-512", dgst_main, NULL, NULL}, - {FT_md, "shake128", dgst_main, NULL, NULL}, - {FT_md, "shake256", dgst_main, NULL, NULL}, -#ifndef OPENSSL_NO_MDC2 - {FT_md, "mdc2", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_RMD160 - {FT_md, "rmd160", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2b512", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_BLAKE2 - {FT_md, "blake2s256", dgst_main, NULL, NULL}, -#endif -#ifndef OPENSSL_NO_SM3 - {FT_md, "sm3", dgst_main, NULL, NULL}, -#endif - {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL}, - {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL}, -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_ARIA - {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAMELLIA - {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL}, -#endif - {FT_cipher, "base64", enc_main, enc_options, NULL}, -#ifdef ZLIB - {FT_cipher, "zlib", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "desx", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC4 - {FT_cipher, "rc4-40", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_DES - {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_IDEA - {FT_cipher, "idea-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SEED - {FT_cipher, "seed-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC2 - {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_BF - {FT_cipher, "bf-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_CAST - {FT_cipher, "cast-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_RC5 - {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL}, -#endif -#ifndef OPENSSL_NO_SM4 - {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL}, -#endif - {0, NULL, NULL, NULL, NULL} -}; diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_digests_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_digests_gen.c deleted file mode 100644 index e4e14e82e5648a..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_digests_gen.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_digests_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_digests.h" - -/* Well known OIDs precompiled */ - -/* - * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } - */ -const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { - DER_OID_V_sigAlgs -}; - -/* - * id-sha1 OBJECT IDENTIFIER ::= { iso(1) - * identified-organization(3) oiw(14) - * secsig(3) algorithms(2) 26 } - */ -const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { - DER_OID_V_id_sha1 -}; - -/* - * id-md2 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } - */ -const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { - DER_OID_V_id_md2 -}; - -/* - * id-md5 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } - */ -const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { - DER_OID_V_id_md5 -}; - -/* - * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } - */ -const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { - DER_OID_V_id_sha256 -}; - -/* - * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } - */ -const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { - DER_OID_V_id_sha384 -}; - -/* - * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } - */ -const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { - DER_OID_V_id_sha512 -}; - -/* - * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } - */ -const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { - DER_OID_V_id_sha224 -}; - -/* - * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } - */ -const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { - DER_OID_V_id_sha512_224 -}; - -/* - * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } - */ -const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { - DER_OID_V_id_sha512_256 -}; - -/* - * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } - */ -const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { - DER_OID_V_id_sha3_224 -}; - -/* - * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } - */ -const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { - DER_OID_V_id_sha3_256 -}; - -/* - * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } - */ -const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { - DER_OID_V_id_sha3_384 -}; - -/* - * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } - */ -const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { - DER_OID_V_id_sha3_512 -}; - -/* - * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } - */ -const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { - DER_OID_V_id_shake128 -}; - -/* - * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } - */ -const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { - DER_OID_V_id_shake256 -}; - -/* - * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } - */ -const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { - DER_OID_V_id_shake128_len -}; - -/* - * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } - */ -const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { - DER_OID_V_id_shake256_len -}; - -/* - * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { - DER_OID_V_id_KMACWithSHAKE128 -}; - -/* - * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} - */ -const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { - DER_OID_V_id_KMACWithSHAKE256 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_dsa_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_dsa_gen.c deleted file mode 100644 index e5cfe91e0f2510..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_dsa_gen.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_dsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * DSA low level APIs are deprecated for public use, but still ok for - * internal use. - */ -#include "internal/deprecated.h" - -#include "prov/der_dsa.h" - -/* Well known OIDs precompiled */ - -/* - * id-dsa OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - */ -const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { - DER_OID_V_id_dsa -}; - -/* - * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { - DER_OID_V_id_dsa_with_sha1 -}; - -/* - * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { - DER_OID_V_id_dsa_with_sha224 -}; - -/* - * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { - DER_OID_V_id_dsa_with_sha256 -}; - -/* - * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { - DER_OID_V_id_dsa_with_sha384 -}; - -/* - * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { - DER_OID_V_id_dsa_with_sha512 -}; - -/* - * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { - DER_OID_V_id_dsa_with_sha3_224 -}; - -/* - * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { - DER_OID_V_id_dsa_with_sha3_256 -}; - -/* - * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { - DER_OID_V_id_dsa_with_sha3_384 -}; - -/* - * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } - */ -const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { - DER_OID_V_id_dsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ec_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ec_gen.c deleted file mode 100644 index e1ed54ba05b6ff..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ec_gen.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ec_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ec.h" - -/* Well known OIDs precompiled */ - -/* - * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { - DER_OID_V_ecdsa_with_SHA1 -}; - -/* - * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } - */ -const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { - DER_OID_V_id_ecPublicKey -}; - -/* - * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } - */ -const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { - DER_OID_V_c2pnb163v1 -}; - -/* - * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } - */ -const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { - DER_OID_V_c2pnb163v2 -}; - -/* - * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } - */ -const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { - DER_OID_V_c2pnb163v3 -}; - -/* - * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } - */ -const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { - DER_OID_V_c2pnb176w1 -}; - -/* - * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } - */ -const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { - DER_OID_V_c2tnb191v1 -}; - -/* - * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } - */ -const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { - DER_OID_V_c2tnb191v2 -}; - -/* - * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } - */ -const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { - DER_OID_V_c2tnb191v3 -}; - -/* - * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } - */ -const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { - DER_OID_V_c2onb191v4 -}; - -/* - * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } - */ -const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { - DER_OID_V_c2onb191v5 -}; - -/* - * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } - */ -const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { - DER_OID_V_c2pnb208w1 -}; - -/* - * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } - */ -const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { - DER_OID_V_c2tnb239v1 -}; - -/* - * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } - */ -const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { - DER_OID_V_c2tnb239v2 -}; - -/* - * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } - */ -const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { - DER_OID_V_c2tnb239v3 -}; - -/* - * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } - */ -const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { - DER_OID_V_c2onb239v4 -}; - -/* - * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } - */ -const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { - DER_OID_V_c2onb239v5 -}; - -/* - * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } - */ -const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { - DER_OID_V_c2pnb272w1 -}; - -/* - * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } - */ -const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { - DER_OID_V_c2pnb304w1 -}; - -/* - * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } - */ -const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { - DER_OID_V_c2tnb359v1 -}; - -/* - * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } - */ -const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { - DER_OID_V_c2pnb368w1 -}; - -/* - * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } - */ -const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { - DER_OID_V_c2tnb431r1 -}; - -/* - * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } - */ -const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { - DER_OID_V_prime192v1 -}; - -/* - * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } - */ -const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { - DER_OID_V_prime192v2 -}; - -/* - * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } - */ -const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { - DER_OID_V_prime192v3 -}; - -/* - * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } - */ -const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { - DER_OID_V_prime239v1 -}; - -/* - * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } - */ -const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { - DER_OID_V_prime239v2 -}; - -/* - * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } - */ -const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { - DER_OID_V_prime239v3 -}; - -/* - * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } - */ -const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { - DER_OID_V_prime256v1 -}; - -/* - * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { - DER_OID_V_ecdsa_with_SHA224 -}; - -/* - * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { - DER_OID_V_ecdsa_with_SHA256 -}; - -/* - * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { - DER_OID_V_ecdsa_with_SHA384 -}; - -/* - * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) - * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } - */ -const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { - DER_OID_V_ecdsa_with_SHA512 -}; - -/* - * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { - DER_OID_V_id_ecdsa_with_sha3_224 -}; - -/* - * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { - DER_OID_V_id_ecdsa_with_sha3_256 -}; - -/* - * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { - DER_OID_V_id_ecdsa_with_sha3_384 -}; - -/* - * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } - */ -const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { - DER_OID_V_id_ecdsa_with_sha3_512 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ecx_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ecx_gen.c deleted file mode 100644 index ba7bf14b5e156d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_ecx_gen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_ecx_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_ecx.h" - -/* Well known OIDs precompiled */ - -/* - * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } - */ -const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { - DER_OID_V_id_X25519 -}; - -/* - * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } - */ -const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { - DER_OID_V_id_X448 -}; - -/* - * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } - */ -const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { - DER_OID_V_id_Ed25519 -}; - -/* - * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } - */ -const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { - DER_OID_V_id_Ed448 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_rsa_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_rsa_gen.c deleted file mode 100644 index a3431798402f3f..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_rsa_gen.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_rsa_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_rsa.h" - -/* Well known OIDs precompiled */ - -/* - * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } - */ -const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { - DER_OID_V_hashAlgs -}; - -/* - * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - */ -const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { - DER_OID_V_rsaEncryption -}; - -/* - * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } - */ -const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { - DER_OID_V_id_RSAES_OAEP -}; - -/* - * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } - */ -const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { - DER_OID_V_id_pSpecified -}; - -/* - * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } - */ -const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { - DER_OID_V_id_RSASSA_PSS -}; - -/* - * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - */ -const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { - DER_OID_V_md2WithRSAEncryption -}; - -/* - * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - */ -const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { - DER_OID_V_md5WithRSAEncryption -}; - -/* - * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - */ -const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { - DER_OID_V_sha1WithRSAEncryption -}; - -/* - * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } - */ -const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { - DER_OID_V_sha224WithRSAEncryption -}; - -/* - * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } - */ -const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { - DER_OID_V_sha256WithRSAEncryption -}; - -/* - * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } - */ -const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { - DER_OID_V_sha384WithRSAEncryption -}; - -/* - * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } - */ -const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { - DER_OID_V_sha512WithRSAEncryption -}; - -/* - * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } - */ -const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { - DER_OID_V_sha512_224WithRSAEncryption -}; - -/* - * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } - */ -const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { - DER_OID_V_sha512_256WithRSAEncryption -}; - -/* - * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } - */ -const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { - DER_OID_V_id_mgf1 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 -}; - -/* - * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } - */ -const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { - DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 -}; - -/* - * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } - */ -const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { - DER_OID_V_md4WithRSAEncryption -}; - -/* - * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 - * } - */ -const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { - DER_OID_V_ripemd160WithRSAEncryption -}; - -/* - * mdc2WithRSASignature OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) - * } - */ -const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { - DER_OID_V_mdc2WithRSASignature -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_sm2_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_sm2_gen.c deleted file mode 100644 index 6424ea166b7e15..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_sm2_gen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_sm2_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_sm2.h" - -/* Well known OIDs precompiled */ - -/* - * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } - */ -const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { - DER_OID_V_sm2_with_SM3 -}; - -/* - * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } - */ -const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { - DER_OID_V_curveSM2 -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_wrap_gen.c b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_wrap_gen.c deleted file mode 100644 index 6cf93972f48b6d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/common/der/der_wrap_gen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * WARNING: do not edit! - * Generated by Makefile from providers/common/der/der_wrap_gen.c.in - * - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "prov/der_wrap.h" - -/* Well known OIDs precompiled */ - -/* - * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 - * } - */ -const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { - DER_OID_V_id_alg_CMS3DESwrap -}; - -/* - * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } - */ -const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { - DER_OID_V_id_aes128_wrap -}; - -/* - * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } - */ -const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { - DER_OID_V_id_aes192_wrap -}; - -/* - * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } - */ -const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { - DER_OID_V_id_aes256_wrap -}; - diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/fips.ld b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/fips.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/fips.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/legacy.ld b/deps/openssl/config/archs/linux-ppc64/no-asm/providers/legacy.ld deleted file mode 100644 index 1debaaa7ff652d..00000000000000 --- a/deps/openssl/config/archs/linux-ppc64/no-asm/providers/legacy.ld +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: - OSSL_provider_init; - local: *; -}; diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index ffce5c6df023ce..6aaefc67f05bcf 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -300,6 +300,7 @@ Vadim Gorbachev Varun Varada Victor Costan Victor Polevoy +Vivian Wang Vlad Burlik Vladimir Kempik Vladimir Krivosheev diff --git a/deps/v8/src/codegen/riscv/macro-assembler-riscv.cc b/deps/v8/src/codegen/riscv/macro-assembler-riscv.cc index a1da242a9f6b8b..65539d8d62799d 100644 --- a/deps/v8/src/codegen/riscv/macro-assembler-riscv.cc +++ b/deps/v8/src/codegen/riscv/macro-assembler-riscv.cc @@ -6712,9 +6712,10 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) { void MacroAssembler::LeaveFrame(StackFrame::Type type) { ASM_CODE_COMMENT(this); - AddWord(sp, fp, 2 * kSystemPointerSize); + Move(sp, fp); LoadWord(ra, MemOperand(fp, 1 * kSystemPointerSize)); LoadWord(fp, MemOperand(fp, 0 * kSystemPointerSize)); + AddWord(sp, sp, 2 * kSystemPointerSize); } void MacroAssembler::EnterExitFrame(Register scratch, int stack_space, diff --git a/deps/v8/src/strings/unicode-inl.h b/deps/v8/src/strings/unicode-inl.h index b210e18ebec6a6..782ff2ab500ee1 100644 --- a/deps/v8/src/strings/unicode-inl.h +++ b/deps/v8/src/strings/unicode-inl.h @@ -206,6 +206,16 @@ bool Utf8::IsValidCharacter(uchar c) { c != kBadChar); } +template <> +bool Utf8::IsAsciiOneByteString(const uint8_t* buffer, size_t size) { + return simdutf::validate_ascii(reinterpret_cast(buffer), size); +} + +template <> +bool Utf8::IsAsciiOneByteString(const uint16_t* buffer, size_t size) { + return false; +} + template Utf8::EncodingResult Utf8::Encode(v8::base::Vector string, char* buffer, size_t capacity, @@ -221,8 +231,17 @@ Utf8::EncodingResult Utf8::Encode(v8::base::Vector string, const Char* characters = string.begin(); size_t content_capacity = capacity - write_null; CHECK_LE(content_capacity, capacity); - uint16_t last = Utf16::kNoPreviousCharacter; size_t read_index = 0; + if (kSourceIsOneByte) { + size_t writeable = std::min(string.size(), content_capacity); + // Just memcpy when possible. + if (writeable > 0 && Utf8::IsAsciiOneByteString(characters, writeable)) { + memcpy(buffer, characters, writeable); + read_index = writeable; + write_index = writeable; + } + } + uint16_t last = Utf16::kNoPreviousCharacter; for (; read_index < string.size(); read_index++) { Char character = characters[read_index]; diff --git a/deps/v8/src/strings/unicode.h b/deps/v8/src/strings/unicode.h index ef1e717b1ea857..e8e9cedceeadc9 100644 --- a/deps/v8/src/strings/unicode.h +++ b/deps/v8/src/strings/unicode.h @@ -212,6 +212,9 @@ class V8_EXPORT_PRIVATE Utf8 { // - valid code point range. static bool ValidateEncoding(const uint8_t* str, size_t length); + template + static bool IsAsciiOneByteString(const Char* buffer, size_t size); + // Encode the given characters as Utf8 into the provided output buffer. struct EncodingResult { size_t bytes_written; @@ -223,6 +226,14 @@ class V8_EXPORT_PRIVATE Utf8 { bool replace_invalid_utf8); }; +template <> +inline bool Utf8::IsAsciiOneByteString(const uint8_t* buffer, + size_t size); + +template <> +inline bool Utf8::IsAsciiOneByteString(const uint16_t* buffer, + size_t size); + #if V8_ENABLE_WEBASSEMBLY class V8_EXPORT_PRIVATE Wtf8 { public: diff --git a/doc/api/buffer.md b/doc/api/buffer.md index c23808f767fa5e..d0743c83dde46f 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -3524,13 +3524,13 @@ changes: calculations with them. --> +> Stability: 0 - Deprecated: Use [`buf.subarray`][] instead. + * `start` {integer} Where the new `Buffer` will start. **Default:** `0`. * `end` {integer} Where the new `Buffer` will end (not inclusive). **Default:** [`buf.length`][]. * Returns: {Buffer} -> Stability: 0 - Deprecated: Use [`buf.subarray`][] instead. - Returns a new `Buffer` that references the same memory as the original, but offset and cropped by the `start` and `end` indexes. diff --git a/doc/api/child_process.md b/doc/api/child_process.md index e3273446c3e517..6818eec4594b25 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -118,51 +118,45 @@ operating systems (Unix, Linux, macOS) [`child_process.execFile()`][] can be more efficient because it does not spawn a shell by default. On Windows, however, `.bat` and `.cmd` files are not executable on their own without a terminal, and therefore cannot be launched using [`child_process.execFile()`][]. -When running on Windows, `.bat` and `.cmd` files can be invoked using -[`child_process.spawn()`][] with the `shell` option set, with -[`child_process.exec()`][], or by spawning `cmd.exe` and passing the `.bat` or -`.cmd` file as an argument (which is what the `shell` option and -[`child_process.exec()`][] do). In any case, if the script filename contains -spaces it needs to be quoted. +When running on Windows, `.bat` and `.cmd` files can be invoked by: + +* using [`child_process.spawn()`][] with the `shell` option set, or +* using [`child_process.exec()`][], or +* spawning `cmd.exe` and passing the `.bat` or `.cmd` file as an argument + (which is what the `shell` option and [`child_process.exec()`][] do). + +In any case, if the script filename contains spaces, it needs to be quoted. ```cjs -// OR... const { exec, spawn } = require('node:child_process'); -exec('my.bat', (err, stdout, stderr) => { - if (err) { - console.error(err); - return; - } - console.log(stdout); -}); +// 1. child_process.spawn() with the shell option set +const myBat = spawn('my.bat', { shell: true }); -// Script with spaces in the filename: -const bat = spawn('"my script.cmd" a b', { shell: true }); -// or: -exec('"my script.cmd" a b', (err, stdout, stderr) => { - // ... -}); +// 2. child_process.exec() +exec('my.bat', (err, stdout, stderr) => { /* ... */ }); + +// 3. spawning cmd.exe and passing the .bat or .cmd file as an argument +const bat = spawn('cmd.exe', ['/c', 'my.bat']); + +// If the script filename contains spaces, it needs to be quoted +exec('"my script.cmd" a b', (err, stdout, stderr) => { /* ... */ }); ``` ```mjs -// OR... import { exec, spawn } from 'node:child_process'; -exec('my.bat', (err, stdout, stderr) => { - if (err) { - console.error(err); - return; - } - console.log(stdout); -}); +// 1. child_process.spawn() with the shell option set +const myBat = spawn('my.bat', { shell: true }); -// Script with spaces in the filename: -const bat = spawn('"my script.cmd" a b', { shell: true }); -// or: -exec('"my script.cmd" a b', (err, stdout, stderr) => { - // ... -}); +// 2. child_process.exec() +exec('my.bat', (err, stdout, stderr) => { /* ... */ }); + +// 3. spawning cmd.exe and passing the .bat or .cmd file as an argument +const bat = spawn('cmd.exe', ['/c', 'my.bat']); + +// If the script filename contains spaces, it needs to be quoted +exec('"my script.cmd" a b', (err, stdout, stderr) => { /* ... */ }); ``` ### `child_process.exec(command[, options][, callback])` diff --git a/doc/api/cli.md b/doc/api/cli.md index c693bd60711c88..6e9295940ae161 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -754,7 +754,7 @@ added: By default, Node.js enables trap-handler-based WebAssembly bound checks. As a result, V8 does not need to insert inline bound checks -int the code compiled from WebAssembly which may speedup WebAssembly +in the code compiled from WebAssembly which may speed up WebAssembly execution significantly, but this optimization requires allocating a big virtual memory cage (currently 10GB). If the Node.js process does not have access to a large enough virtual memory address space diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 75cbaf25058b64..d799315aa7bce1 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -4400,6 +4400,57 @@ import { opendir } from 'node:fs/promises'; } ``` +### DEP0201: Passing `options.type` to `Duplex.toWeb()` + + + +Type: Documentation-only + +Passing the `type` option to [`Duplex.toWeb()`][] is deprecated. To specify the +type of the readable half of the constructed readable-writable pair, use the +`readableType` option instead. + +### DEP0202: `Http1IncomingMessage` and `Http1ServerResponse` options of HTTP/2 servers + + + +Type: Documentation-only + +The `Http1IncomingMessage` and `Http1ServerResponse` options of +[`http2.createServer()`][] and [`http2.createSecureServer()`][] are +deprecated. Use `http1Options.IncomingMessage` and +`http1Options.ServerResponse` instead. + +```cjs +// Deprecated +const server = http2.createSecureServer({ + allowHTTP1: true, + Http1IncomingMessage: MyIncomingMessage, + Http1ServerResponse: MyServerResponse, +}); +``` + +```cjs +// Use this instead +const server = http2.createSecureServer({ + allowHTTP1: true, + http1Options: { + IncomingMessage: MyIncomingMessage, + ServerResponse: MyServerResponse, + }, +}); +``` + [DEP0142]: #dep0142-repl_builtinlibs [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 @@ -4418,6 +4469,7 @@ import { opendir } from 'node:fs/promises'; [`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj [`Cipheriv`]: crypto.md#class-cipheriv [`Decipheriv`]: crypto.md#class-decipheriv +[`Duplex.toWeb()`]: stream.md#streamduplextowebstreamduplex-options [`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError [`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand [`ReadStream.open()`]: fs.md#class-fsreadstream @@ -4478,6 +4530,8 @@ import { opendir } from 'node:fs/promises'; [`http.ServerResponse`]: http.md#class-httpserverresponse [`http.get()`]: http.md#httpgetoptions-callback [`http.request()`]: http.md#httprequestoptions-callback +[`http2.createSecureServer()`]: http2.md#http2createsecureserveroptions-onrequesthandler +[`http2.createServer()`]: http2.md#http2createserveroptions-onrequesthandler [`https.get()`]: https.md#httpsgetoptions-callback [`https.request()`]: https.md#httpsrequestoptions-callback [`message.connection`]: http.md#messageconnection diff --git a/doc/api/environment_variables.md b/doc/api/environment_variables.md index 114287251f91a2..6e114c1b9dcce7 100644 --- a/doc/api/environment_variables.md +++ b/doc/api/environment_variables.md @@ -18,10 +18,10 @@ For more details refer to the [`process.env` documentation][]. ## DotEnv -Set of utilities for dealing with additional environment variables defined in `.env` files. - > Stability: 2 - Stable +Set of utilities for dealing with additional environment variables defined in `.env` files. + ### .env files `.env` files (also known as dotenv files) are files that define environment variables, diff --git a/doc/api/events.md b/doc/api/events.md index dbe402db29fbbe..08b34383d7d183 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1489,14 +1489,25 @@ foo(ee, 'foo', ac.signal); ac.abort(); // Prints: Waiting for the event was canceled! ``` -### Awaiting multiple events emitted on `process.nextTick()` +### Caveats when awaiting multiple events -There is an edge case worth noting when using the `events.once()` function -to await multiple events emitted on in the same batch of `process.nextTick()` -operations, or whenever multiple events are emitted synchronously. Specifically, -because the `process.nextTick()` queue is drained before the `Promise` microtask -queue, and because `EventEmitter` emits all events synchronously, it is possible -for `events.once()` to miss an event. +It is important to be aware of execution order when using the `events.once()` +method to await multiple events. + +Conventional event listeners are called synchronously when the event is +emitted. This guarantees that execution will not proceed beyond the emitted +event until all listeners have finished executing. + +The same is _not_ true when awaiting Promises returned by `events.once()`. +Promise tasks are not handled until after the current execution stack runs to +completion, which means that multiple events could be emitted before +asynchronous execution continues from the relevant `await` statement. + +As a result, events can be "missed" if a series of `await events.once()` +statements is used to listen to multiple events, since there might be times +where more than one event is emitted during the same phase of the event loop. +(The same is true when using `process.nextTick()` to emit events, because the +tasks queued by `process.nextTick()` are executed before Promise tasks.) ```mjs import { EventEmitter, once } from 'node:events'; @@ -1504,22 +1515,22 @@ import process from 'node:process'; const myEE = new EventEmitter(); -async function foo() { - await once(myEE, 'bar'); - console.log('bar'); - - // This Promise will never resolve because the 'foo' event will - // have already been emitted before the Promise is created. +async function listen() { await once(myEE, 'foo'); console.log('foo'); + + // This Promise will never resolve, because the 'bar' event will + // have already been emitted before the next line is executed. + await once(myEE, 'bar'); + console.log('bar'); } process.nextTick(() => { - myEE.emit('bar'); myEE.emit('foo'); + myEE.emit('bar'); }); -foo().then(() => console.log('done')); +listen().then(() => console.log('done')); ``` ```cjs @@ -1527,26 +1538,26 @@ const { EventEmitter, once } = require('node:events'); const myEE = new EventEmitter(); -async function foo() { - await once(myEE, 'bar'); - console.log('bar'); - - // This Promise will never resolve because the 'foo' event will - // have already been emitted before the Promise is created. +async function listen() { await once(myEE, 'foo'); console.log('foo'); + + // This Promise will never resolve, because the 'bar' event will + // have already been emitted before the next line is executed. + await once(myEE, 'bar'); + console.log('bar'); } process.nextTick(() => { - myEE.emit('bar'); myEE.emit('foo'); + myEE.emit('bar'); }); -foo().then(() => console.log('done')); +listen().then(() => console.log('done')); ``` -To catch both events, create each of the Promises _before_ awaiting either -of them, then it becomes possible to use `Promise.all()`, `Promise.race()`, +To catch multiple events, create all of the Promises _before_ awaiting any of +them. This is usually made easier by using `Promise.all()`, `Promise.race()`, or `Promise.allSettled()`: ```mjs @@ -1555,17 +1566,20 @@ import process from 'node:process'; const myEE = new EventEmitter(); -async function foo() { - await Promise.all([once(myEE, 'bar'), once(myEE, 'foo')]); +async function listen() { + await Promise.all([ + once(myEE, 'foo'), + once(myEE, 'bar'), + ]); console.log('foo', 'bar'); } process.nextTick(() => { - myEE.emit('bar'); myEE.emit('foo'); + myEE.emit('bar'); }); -foo().then(() => console.log('done')); +listen().then(() => console.log('done')); ``` ```cjs @@ -1573,17 +1587,20 @@ const { EventEmitter, once } = require('node:events'); const myEE = new EventEmitter(); -async function foo() { - await Promise.all([once(myEE, 'bar'), once(myEE, 'foo')]); +async function listen() { + await Promise.all([ + once(myEE, 'bar'), + once(myEE, 'foo'), + ]); console.log('foo', 'bar'); } process.nextTick(() => { - myEE.emit('bar'); myEE.emit('foo'); + myEE.emit('bar'); }); -foo().then(() => console.log('done')); +listen().then(() => console.log('done')); ``` ## `events.captureRejections` @@ -1891,15 +1908,12 @@ Returns a disposable so that it may be unsubscribed from more easily. const { addAbortListener } = require('node:events'); function example(signal) { - let disposable; - try { - signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } + signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + // addAbortListener() returns a disposable, so the `using` keyword ensures + // the abort listener is automatically removed when this scope exits. + using _ = addAbortListener(signal, (e) => { + // Do something when signal is aborted. + }); } ``` @@ -1907,15 +1921,12 @@ function example(signal) { import { addAbortListener } from 'node:events'; function example(signal) { - let disposable; - try { - signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } + signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + // addAbortListener() returns a disposable, so the `using` keyword ensures + // the abort listener is automatically removed when this scope exits. + using _ = addAbortListener(signal, (e) => { + // Do something when signal is aborted. + }); } ``` diff --git a/doc/api/fs.md b/doc/api/fs.md index 6ea9fa9fdde0f2..66d29bc80fbf18 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1719,6 +1719,9 @@ changes: * `options` {Object} * `bigint` {boolean} Whether the numeric values in the returned {fs.Stats} object should be `bigint`. **Default:** `false`. + * `throwIfNoEntry` {boolean} Whether an exception will be thrown + if no file system entry exists, rather than returning `undefined`. + **Default:** `true`. * Returns: {Promise} Fulfills with the {fs.Stats} object for the given `path`. @@ -4436,6 +4439,9 @@ changes: * `options` {Object} * `bigint` {boolean} Whether the numeric values in the returned {fs.Stats} object should be `bigint`. **Default:** `false`. + * `throwIfNoEntry` {boolean} Whether an exception will be thrown + if no file system entry exists, rather than returning `undefined`. + **Default:** `true`. * `callback` {Function} * `err` {Error} * `stats` {fs.Stats} diff --git a/doc/api/globals.md b/doc/api/globals.md index f98da92132a6e2..af454573e8d4c6 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -21,6 +21,14 @@ The objects listed here are specific to Node.js. There are [built-in objects][] that are part of the JavaScript language itself, which are also globally accessible. +## `__dirname` + +This variable may appear to be global but is not. See [`__dirname`][]. + +## `__filename` + +This variable may appear to be global but is not. See [`__filename`][]. + ## Class: `AbortController` -* Type: {boolean} True after the `AbortController` has been aborted. +* Type: {boolean} + +True after the `AbortController` has been aborted. -#### `abortSignal.onabort` +### `abortSignal.onabort` - -See {Blob}. - -## Class: `Buffer` - - - -* Type: {Function} - -Used to handle binary data. See the [buffer section][]. - -## Class: `ByteLengthQueuingStrategy` - - - -A browser-compatible implementation of [`ByteLengthQueuingStrategy`][]. - -## `__dirname` - -This variable may appear to be global but is not. See [`__dirname`][]. - -## `__filename` - -This variable may appear to be global but is not. See [`__filename`][]. - ## `atob(data)` + +See {Blob}. + ## Class: `BroadcastChannel` + +* Type: {Function} + +Used to handle binary data. See the [buffer section][]. + +## Class: `ByteLengthQueuingStrategy` + + + +A browser-compatible implementation of [`ByteLengthQueuingStrategy`][]. + ## `clearImmediate(immediateObject)` + +The WHATWG {DOMException} class. + ## `ErrorEvent` -* Type: {Array} +* Type: {string\[]} The `navigator.languages` read-only property returns an array of strings representing the preferred languages of the Node.js instance. @@ -776,36 +786,6 @@ The fallback value on builds without ICU is `['en-US']`. console.log(`The preferred languages are '${navigator.languages}'`); ``` -### `navigator.platform` - - - -* Type: {string} - -The `navigator.platform` read-only property returns a string identifying the -platform on which the Node.js instance is running. - -```js -console.log(`This process is running on ${navigator.platform}`); -``` - -### `navigator.userAgent` - - - -* Type: {string} - -The `navigator.userAgent` read-only property returns user agent -consisting of the runtime name and major version number. - -```js -console.log(`The user-agent is ${navigator.userAgent}`); // Prints "Node.js/21" -``` - ### `navigator.locks` + +* Type: {string} + +The `navigator.platform` read-only property returns a string identifying the +platform on which the Node.js instance is running. + +```js +console.log(`This process is running on ${navigator.platform}`); +``` + +### `navigator.userAgent` + + + +* Type: {string} + +The `navigator.userAgent` read-only property returns user agent +consisting of the runtime name and major version number. + +```js +console.log(`The user-agent is ${navigator.userAgent}`); // Prints "Node.js/21" +``` + +## `performance` + + + +The [`perf_hooks.performance`][] object. + ## Class: `PerformanceEntry` - -The [`perf_hooks.performance`][] object. - ## `process` -A browser-compatible implementation of {Response}. +A browser-compatible implementation of {Request}. -## Class: `Request` +## `require()` + +This variable may appear to be global but is not. See [`require()`][]. + +## Class: `Response` -A browser-compatible implementation of {Request}. +A browser-compatible implementation of {Response}. ## `sessionStorage` @@ -1159,14 +1169,6 @@ A browser-compatible implementation of {SubtleCrypto}. This global is available only if the Node.js binary was compiled with including support for the `node:crypto` module. -## Class: `DOMException` - - - -The WHATWG {DOMException} class. - ## Class: `TextDecoder` -* `message` { Object | boolean | number | string | null } a parsed JSON object +* `message` {Object|boolean|number|string|null} a parsed JSON object or a serializable primitive value. * `sendHandle` {net.Server|net.Socket} a [`net.Server`][] or [`net.Socket`][] object, or undefined. @@ -907,7 +907,7 @@ changes: description: Change stability index for this feature from Experimental to Stable. --> -* Type: {number} +* Returns: {number} Gets the amount of free memory that is still available to the process (in bytes). @@ -1081,7 +1081,7 @@ changes: description: Aligned return value with `uv_get_constrained_memory`. --> -* Type: {number} +* Returns: {number} Gets the amount of memory available to the process (in bytes) based on limits imposed by the OS. If there is no such constraint, or the constraint diff --git a/doc/api/report.md b/doc/api/report.md index 921eb10cbf297d..a63a310ac677ae 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -4,8 +4,6 @@ -> Stability: 2 - Stable - +> Stability: 2 - Stable + Delivers a JSON-formatted diagnostic summary, written to a file. The report is intended for development, test, and production use, to capture diff --git a/doc/api/single-executable-applications.md b/doc/api/single-executable-applications.md index 12049f07a620bf..d90397dfd668eb 100644 --- a/doc/api/single-executable-applications.md +++ b/doc/api/single-executable-applications.md @@ -31,8 +31,8 @@ into the `node` binary. During start up, the program checks if anything has been injected. If the blob is found, it executes the script in the blob. Otherwise Node.js operates as it normally does. -The single executable application feature currently only supports running a -single embedded script using the [CommonJS][] module system. +The single executable application feature supports running a +single embedded script using the [CommonJS][] or the [ECMAScript Modules][] module system. Users can create a single executable application from their bundled script with the `node` binary itself and any tool which can inject resources into the @@ -110,6 +110,7 @@ The configuration currently reads the following top-level fields: ```json { "main": "/path/to/bundled/script.js", + "mainFormat": "commonjs", // Default: "commonjs", options: "commonjs", "module" "executable": "/path/to/node/binary", // Optional, if not specified, uses the current Node.js binary "output": "/path/to/write/the/generated/executable", "disableExperimentalSEAWarning": true, // Default: false @@ -290,14 +291,12 @@ This would be equivalent to running: node --no-warnings --trace-exit /path/to/bundled/script.js user-arg1 user-arg2 ``` -## In the injected main script - -### Single-executable application API +## Single-executable application API The `node:sea` builtin allows interaction with the single-executable application from the JavaScript main script embedded into the executable. -#### `sea.isSea()` +### `sea.isSea()` + +When using `"mainFormat": "module"`, `import()` can be used to dynamically +load built-in modules. Attempting to use `import()` to load modules from +the file system will throw an error. + ### Using native addons in the injected main script Native addons can be bundled as assets into the single-executable application @@ -599,6 +641,7 @@ start a discussion at to help us document them. [CommonJS]: modules.md#modules-commonjs-modules +[ECMAScript Modules]: esm.md#modules-ecmascript-modules [ELF]: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format [Generating single executable preparation blobs]: #1-generating-single-executable-preparation-blobs [Mach-O]: https://en.wikipedia.org/wiki/Mach-O diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index aef7e7b53d9adf..eac366ccaa9c21 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -5,6 +5,9 @@ -> Stability: 1.1 - Active development. +> Stability: 1.2 - Release candidate. diff --git a/doc/api/stream.md b/doc/api/stream.md index ef6dd51eabfd5e..f7793f91ebd752 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3219,7 +3219,8 @@ changes: If no value is provided, the size will be `1` for all the chunks. * `chunk` {any} * Returns: {number} - * `type` {string} Must be 'bytes' or undefined. + * `type` {string} Specifies the type of the created `ReadableStream`. Must be + `'bytes'` or undefined. * Returns: {ReadableStream} ### `stream.Writable.fromWeb(writableStream[, options])` @@ -3398,9 +3399,13 @@ duplex.once('readable', () => console.log('readable', duplex.read())); +## Usage + `node [options] [V8 options] [script.js | -e "script" | - ] [arguments]` Please see the [Command-line options][] document for more information. diff --git a/doc/api/test.md b/doc/api/test.md index 40fb08d0d5b181..0a040a673a6e7b 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -125,34 +125,6 @@ Any subtests that are still outstanding when their parent finishes are cancelled and treated as failures. Any subtest failures cause the parent test to fail. -## Skipping tests - -Individual tests can be skipped by passing the `skip` option to the test, or by -calling the test context's `skip()` method as shown in the -following example. - -```js -// The skip option is used, but no message is provided. -test('skip option', { skip: true }, (t) => { - // This code is never executed. -}); - -// The skip option is used, and a message is provided. -test('skip option with message', { skip: 'this is skipped' }, (t) => { - // This code is never executed. -}); - -test('skip() method', (t) => { - // Make sure to return here as well if the test contains additional logic. - t.skip(); -}); - -test('skip() method with message', (t) => { - // Make sure to return here as well if the test contains additional logic. - t.skip('this is skipped'); -}); -``` - ## Rerunning failed tests The test runner supports persisting the state of the run to a file, allowing @@ -193,6 +165,68 @@ When the `--test-rerun-failures` option is used, the test runner will only run t node --test-rerun-failures /path/to/state/file ``` +## `describe()` and `it()` aliases + +Suites and tests can also be written using the `describe()` and `it()` +functions. [`describe()`][] is an alias for [`suite()`][], and [`it()`][] is an +alias for [`test()`][]. + +```js +describe('A thing', () => { + it('should work', () => { + assert.strictEqual(1, 1); + }); + + it('should be ok', () => { + assert.strictEqual(2, 2); + }); + + describe('a nested thing', () => { + it('should work', () => { + assert.strictEqual(3, 3); + }); + }); +}); +``` + +`describe()` and `it()` are imported from the `node:test` module. + +```mjs +import { describe, it } from 'node:test'; +``` + +```cjs +const { describe, it } = require('node:test'); +``` + +## Skipping tests + +Individual tests can be skipped by passing the `skip` option to the test, or by +calling the test context's `skip()` method as shown in the +following example. + +```js +// The skip option is used, but no message is provided. +test('skip option', { skip: true }, (t) => { + // This code is never executed. +}); + +// The skip option is used, and a message is provided. +test('skip option with message', { skip: 'this is skipped' }, (t) => { + // This code is never executed. +}); + +test('skip() method', (t) => { + // Make sure to return here as well if the test contains additional logic. + t.skip(); +}); + +test('skip() method with message', (t) => { + // Make sure to return here as well if the test contains additional logic. + t.skip('this is skipped'); +}); +``` + ## TODO tests Individual tests can be marked as flaky or incomplete by passing the `todo` @@ -275,40 +309,6 @@ it.todo('should do the thing', { expectFailure: true }, () => { }); ``` -## `describe()` and `it()` aliases - -Suites and tests can also be written using the `describe()` and `it()` -functions. [`describe()`][] is an alias for [`suite()`][], and [`it()`][] is an -alias for [`test()`][]. - -```js -describe('A thing', () => { - it('should work', () => { - assert.strictEqual(1, 1); - }); - - it('should be ok', () => { - assert.strictEqual(2, 2); - }); - - describe('a nested thing', () => { - it('should work', () => { - assert.strictEqual(3, 3); - }); - }); -}); -``` - -`describe()` and `it()` are imported from the `node:test` module. - -```mjs -import { describe, it } from 'node:test'; -``` - -```cjs -const { describe, it } = require('node:test'); -``` - ## `only` tests If Node.js is started with the [`--test-only`][] command-line option, or test @@ -3348,6 +3348,32 @@ This event is guaranteed to be emitted in the same order as the tests are defined. The corresponding execution ordered event is `'test:complete'`. +### Event: `'test:interrupted'` + + + +* `data` {Object} + * `tests` {Array} An array of objects containing information about the + interrupted tests. + * `column` {number|undefined} The column number where the test is defined, + or `undefined` if the test was run through the REPL. + * `file` {string|undefined} The path of the test file, + `undefined` if test was run through the REPL. + * `line` {number|undefined} The line number where the test is defined, or + `undefined` if the test was run through the REPL. + * `name` {string} The test name. + * `nesting` {number} The nesting level of the test. + +Emitted when the test runner is interrupted by a `SIGINT` signal (e.g., when +pressing Ctrl+C). The event contains information about +the tests that were running at the time of interruption. + +When using process isolation (the default), the test name will be the file path +since the parent runner only knows about file-level tests. When using +`--test-isolation=none`, the actual test name is shown. + ### Event: `'test:pass'` * `data` {Object} diff --git a/doc/api/typescript.md b/doc/api/typescript.md index 136d81ded7e102..c0bb1b96c66bce 100644 --- a/doc/api/typescript.md +++ b/doc/api/typescript.md @@ -142,11 +142,10 @@ The most prominent features that require transformation are: * `Enum` declarations * `namespace` with runtime code -* legacy `module` with runtime code * parameter properties * import aliases -`namespaces` and `module` that do not contain runtime code are supported. +`namespace`s that do not contain runtime code are supported. This example will work correctly: ```ts diff --git a/doc/api/vm.md b/doc/api/vm.md index 47ba00f6c1c6f0..e31132f85bec03 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -25,23 +25,42 @@ object. The invoked code treats any property in the context like a global variable. Any changes to global variables caused by the invoked code are reflected in the context object. -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext } from 'node:vm'; + +const x = 1; + +const context = { x: 2 }; +createContext(context); // Contextify the object. + +const code = 'x += 40; var y = 17;'; +// `x` and `y` are global variables in the context. +// Initially, x has the value 2 because that is the value of context.x. +runInContext(code, context); + +console.log(context.x); // 42 +console.log(context.y); // 17 + +console.log(x); // 1; y is not defined +``` + +```cjs +const { createContext, runInContext } = require('node:vm'); const x = 1; const context = { x: 2 }; -vm.createContext(context); // Contextify the object. +createContext(context); // Contextify the object. const code = 'x += 40; var y = 17;'; // `x` and `y` are global variables in the context. // Initially, x has the value 2 because that is the value of context.x. -vm.runInContext(code, context); +runInContext(code, context); console.log(context.x); // 42 console.log(context.y); // 17 -console.log(x); // 1; y is not defined. +console.log(x); // 1; y is not defined ``` ## Class: `vm.Script` @@ -201,17 +220,36 @@ The following example compiles code that increments a global variable, sets the value of another global variable, then execute the code multiple times. The globals are contained in the `context` object. -```js -const vm = require('node:vm'); +```mjs +import { createContext, Script } from 'node:vm'; const context = { animal: 'cat', count: 2, }; -const script = new vm.Script('count += 1; name = "kitty";'); +const script = new Script('count += 1; name = "kitty";'); -vm.createContext(context); +createContext(context); +for (let i = 0; i < 10; ++i) { + script.runInContext(context); +} + +console.log(context); +// Prints: { animal: 'cat', count: 12, name: 'kitty' } +``` + +```cjs +const { createContext, Script } = require('node:vm'); + +const context = { + animal: 'cat', + count: 2, +}; + +const script = new Script('count += 1; name = "kitty";'); + +createContext(context); for (let i = 0; i < 10; ++i) { script.runInContext(context); } @@ -296,10 +334,30 @@ The following example compiles code that sets a global variable, then executes the code multiple times in different contexts. The globals are set on and contained within each individual `context`. -```js -const vm = require('node:vm'); +```mjs +import { constants, Script } from 'node:vm'; + +const script = new Script('globalVar = "set"'); + +const contexts = [{}, {}, {}]; +contexts.forEach((context) => { + script.runInNewContext(context); +}); + +console.log(contexts); +// Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] + +// This would throw if the context is created from a contextified object. +// constants.DONT_CONTEXTIFY allows creating contexts with ordinary +// global objects that can be frozen. +const freezeScript = new Script('Object.freeze(globalThis); globalThis;'); +const frozenContext = freezeScript.runInNewContext(constants.DONT_CONTEXTIFY); +``` + +```cjs +const { constants, Script } = require('node:vm'); -const script = new vm.Script('globalVar = "set"'); +const script = new Script('globalVar = "set"'); const contexts = [{}, {}, {}]; contexts.forEach((context) => { @@ -310,10 +368,10 @@ console.log(contexts); // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] // This would throw if the context is created from a contextified object. -// vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary +// constants.DONT_CONTEXTIFY allows creating contexts with ordinary // global objects that can be frozen. -const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;'); -const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY); +const freezeScript = new Script('Object.freeze(globalThis); globalThis;'); +const frozenContext = freezeScript.runInNewContext(constants.DONT_CONTEXTIFY); ``` ### `script.runInThisContext([options])` @@ -347,12 +405,28 @@ _does_ have access to the current `global` object. The following example compiles code that increments a `global` variable then executes that code multiple times: -```js -const vm = require('node:vm'); +```mjs +import { Script } from 'node:vm'; global.globalVar = 0; -const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); +const script = new Script('globalVar += 1', { filename: 'myfile.vm' }); + +for (let i = 0; i < 1000; ++i) { + script.runInThisContext(); +} + +console.log(globalVar); + +// 1000 +``` + +```cjs +const { Script } = require('node:vm'); + +global.globalVar = 0; + +const script = new Script('globalVar += 1', { filename: 'myfile.vm' }); for (let i = 0; i < 1000; ++i) { script.runInThisContext(); @@ -1122,16 +1196,40 @@ defined in the WebIDL specification. The purpose of synthetic modules is to provide a generic interface for exposing non-JavaScript sources to ECMAScript module graphs. -```js -const vm = require('node:vm'); +```mjs +import { SyntheticModule } from 'node:vm'; + +const source = '{ "a": 1 }'; +const syntheticModule = new SyntheticModule(['default'], function() { + const obj = JSON.parse(source); + this.setExport('default', obj); +}); + +// Use `syntheticModule` in linking +(async () => { + await syntheticModule.link(() => {}); + await syntheticModule.evaluate(); + + console.log('Default export:', syntheticModule.namespace.default); +})(); +``` + +```cjs +const { SyntheticModule } = require('node:vm'); const source = '{ "a": 1 }'; -const module = new vm.SyntheticModule(['default'], function() { +const syntheticModule = new SyntheticModule(['default'], function() { const obj = JSON.parse(source); this.setExport('default', obj); }); -// Use `module` in linking... +// Use `syntheticModule` in linking +(async () => { + await syntheticModule.link(() => {}); + await syntheticModule.evaluate(); + + console.log('Default export:', syntheticModule.namespace.default); +})(); ``` ### `new vm.SyntheticModule(exportNames, evaluateCallback[, options])` @@ -1389,15 +1487,32 @@ existing properties but also having the built-in objects and functions any standard [global object][] has. Outside of scripts run by the vm module, global variables will remain unchanged. -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext } from 'node:vm'; + +global.globalVar = 3; + +const context = { globalVar: 1 }; +createContext(context); + +runInContext('globalVar *= 2;', context); + +console.log(context); +// Prints: { globalVar: 2 } + +console.log(global.globalVar); +// Prints: 3 +``` + +```cjs +const { createContext, runInContext } = require('node:vm'); global.globalVar = 3; const context = { globalVar: 1 }; -vm.createContext(context); +createContext(context); -vm.runInContext('globalVar *= 2;', context); +runInContext('globalVar *= 2;', context); console.log(context); // Prints: { globalVar: 2 } @@ -1472,45 +1587,62 @@ memory reachable by each V8 specific contexts in the current instance of the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure the memory occupied by each heap space in the current V8 instance. -```js -const vm = require('node:vm'); +```mjs +import { createContext, measureMemory } from 'node:vm'; // Measure the memory used by the main context. -vm.measureMemory({ mode: 'summary' }) +measureMemory({ mode: 'summary' }) // This is the same as vm.measureMemory() .then((result) => { // The current format is: // { - // total: { - // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ] - // } + // total: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + // WebAssembly: { code: 0, metadata: 33962 }, // } console.log(result); }); -const context = vm.createContext({ a: 1 }); -vm.measureMemory({ mode: 'detailed', execution: 'eager' }) +const context = createContext({ a: 1 }); +measureMemory({ mode: 'detailed', execution: 'eager' }).then((result) => { + // Reference the context here so that it won't be GC'ed + // until the measurement is complete. + console.log('Context:', context.a); + // { + // total: { jsMemoryEstimate: 1767100, jsMemoryRange: [1767100, 5440560] }, + // WebAssembly: { code: 0, metadata: 33962 }, + // current: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + // other: [{ jsMemoryEstimate: 165272, jsMemoryRange: [Array] }], + // } + console.log(result); +}); +``` + +```cjs +const { createContext, measureMemory } = require('node:vm'); +// Measure the memory used by the main context. +measureMemory({ mode: 'summary' }) + // This is the same as vm.measureMemory() .then((result) => { - // Reference the context here so that it won't be GC'ed - // until the measurement is complete. - console.log(context.a); + // The current format is: // { - // total: { - // jsMemoryEstimate: 2574732, - // jsMemoryRange: [ 2574732, 2904372 ] - // }, - // current: { - // jsMemoryEstimate: 2438996, - // jsMemoryRange: [ 2438996, 2768636 ] - // }, - // other: [ - // { - // jsMemoryEstimate: 135736, - // jsMemoryRange: [ 135736, 465376 ] - // } - // ] + // total: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + // WebAssembly: { code: 0, metadata: 33962 }, // } console.log(result); }); + +const context = createContext({ a: 1 }); +measureMemory({ mode: 'detailed', execution: 'eager' }).then((result) => { + // Reference the context here so that it won't be GC'ed + // until the measurement is complete. + console.log('Context:', context.a); + // { + // total: { jsMemoryEstimate: 1767100, jsMemoryRange: [1767100, 5440560] }, + // WebAssembly: { code: 0, metadata: 33962 }, + // current: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + // other: [{ jsMemoryEstimate: 165272, jsMemoryRange: [Array] }], + // } + console.log(result); +}); ``` ## `vm.runInContext(code, contextifiedObject[, options])` @@ -1577,14 +1709,27 @@ If `options` is a string, then it specifies the filename. The following example compiles and executes different scripts using a single [contextified][] object: -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext } from 'node:vm'; const contextObject = { globalVar: 1 }; -vm.createContext(contextObject); +createContext(contextObject); for (let i = 0; i < 10; ++i) { - vm.runInContext('globalVar *= 2;', contextObject); + runInContext('globalVar *= 2;', contextObject); +} +console.log(contextObject); +// Prints: { globalVar: 1024 } +``` + +```cjs +const { createContext, runInContext } = require('node:vm'); + +const contextObject = { globalVar: 1 }; +createContext(contextObject); + +for (let i = 0; i < 10; ++i) { + runInContext('globalVar *= 2;', contextObject); } console.log(contextObject); // Prints: { globalVar: 1024 } @@ -1694,22 +1839,46 @@ It does several things at once: The following example compiles and executes code that increments a global variable and sets a new one. These globals are contained in the `contextObject`. -```js -const vm = require('node:vm'); +```mjs +import { runInNewContext, constants } from 'node:vm'; const contextObject = { animal: 'cat', count: 2, }; -vm.runInNewContext('count += 1; name = "kitty"', contextObject); +runInNewContext('count += 1; name = "kitty"', contextObject); console.log(contextObject); // Prints: { animal: 'cat', count: 3, name: 'kitty' } // This would throw if the context is created from a contextified object. // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that // can be frozen. -const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY); +const frozenContext = runInNewContext( + 'Object.freeze(globalThis); globalThis;', + constants.DONT_CONTEXTIFY, +); +``` + +```cjs +const { runInNewContext, constants } = require('node:vm'); + +const contextObject = { + animal: 'cat', + count: 2, +}; + +runInNewContext('count += 1; name = "kitty"', contextObject); +console.log(contextObject); +// Prints: { animal: 'cat', count: 3, name: 'kitty' } + +// This would throw if the context is created from a contextified object. +// vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that +// can be frozen. +const frozenContext = runInNewContext( + 'Object.freeze(globalThis); globalThis;', + constants.DONT_CONTEXTIFY, +); ``` ## `vm.runInThisContext(code[, options])` @@ -1776,11 +1945,26 @@ the JavaScript [`eval()`][] function to run the same code: -```js -const vm = require('node:vm'); +```mjs +import { runInThisContext } from 'node:vm'; let localVar = 'initial value'; -const vmResult = vm.runInThisContext('localVar = "vm";'); +const vmResult = runInThisContext('localVar = "vm";'); +console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`); +// Prints: vmResult: 'vm', localVar: 'initial value' + +const evalResult = eval('localVar = "eval";'); +console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`); +// Prints: evalResult: 'eval', localVar: 'eval' +``` + + + +```cjs +const { runInThisContext } = require('node:vm'); +let localVar = 'initial value'; + +const vmResult = runInThisContext('localVar = "vm";'); console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`); // Prints: vmResult: 'vm', localVar: 'initial value' @@ -1805,15 +1989,17 @@ In order to run a simple web server using the `node:http` module the code passed to the context must either call `require('node:http')` on its own, or have a reference to the `node:http` module passed to it. For instance: -```js -'use strict'; -const vm = require('node:vm'); +```mjs +import { runInThisContext } from 'node:vm'; +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); const code = ` ((require) => { - const http = require('node:http'); + const { createServer } = require('node:http'); - http.createServer((request, response) => { + createServer((request, response) => { response.writeHead(200, { 'Content-Type': 'text/plain' }); response.end('Hello World\\n'); }).listen(8124); @@ -1821,7 +2007,25 @@ const code = ` console.log('Server running at http://127.0.0.1:8124/'); })`; -vm.runInThisContext(code)(require); +runInThisContext(code)(require); +``` + +```cjs +const { runInThisContext } = require('node:vm'); + +const code = ` +((require) => { + const { createServer } = require('node:http'); + + createServer((request, response) => { + response.writeHead(200, { 'Content-Type': 'text/plain' }); + response.end('Hello World\\n'); + }).listen(8124); + + console.log('Server running at http://127.0.0.1:8124/'); +})`; + +runInThisContext(code)(require); ``` The `require()` in the above case shares the state with the context it is @@ -1849,19 +2053,34 @@ The contextifying would introduce some quirks to the `globalThis` value in the c For example, it cannot be frozen, and it is not reference equal to the `contextObject` in the outer context. -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext } from 'node:vm'; // An undefined `contextObject` option makes the global object contextified. -const context = vm.createContext(); -console.log(vm.runInContext('globalThis', context) === context); // false +const context = createContext(); +console.log(runInContext('globalThis', context) === context); // false // A contextified global object cannot be frozen. try { - vm.runInContext('Object.freeze(globalThis);', context); + runInContext('Object.freeze(globalThis);', context); } catch (e) { - console.log(e); // TypeError: Cannot freeze + console.log(`${e.constructor.name}: ${e.message}`); // TypeError: Cannot freeze } -console.log(vm.runInContext('globalThis.foo = 1; foo;', context)); // 1 +console.log(runInContext('globalThis.foo = 1; foo;', context)); // 1 +``` + +```cjs +const { createContext, runInContext } = require('node:vm'); + +// An undefined `contextObject` option makes the global object contextified. +const context = createContext(); +console.log(runInContext('globalThis', context) === context); // false +// A contextified global object cannot be frozen. +try { + runInContext('Object.freeze(globalThis);', context); +} catch (e) { + console.log(`${e.constructor.name}: ${e.message}`); // TypeError: Cannot freeze +} +console.log(runInContext('globalThis.foo = 1; foo;', context)); // 1 ``` To create a context with an ordinary global object and get access to a global proxy in @@ -1875,16 +2094,29 @@ a context without wrapping its global object with another object in a Node.js-sp As a result, the `globalThis` value inside the new context would behave more closely to an ordinary one. -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext, constants } from 'node:vm'; + +// Use vm.constants.DONT_CONTEXTIFY to freeze the global object. +const context = createContext(constants.DONT_CONTEXTIFY); +runInContext('Object.freeze(globalThis);', context); +try { + runInContext('bar = 1; bar;', context); +} catch (e) { + console.log(`${e.constructor.name}: ${e.message}`); // ReferenceError: bar is not defined +} +``` + +```cjs +const { createContext, runInContext, constants } = require('node:vm'); // Use vm.constants.DONT_CONTEXTIFY to freeze the global object. -const context = vm.createContext(vm.constants.DONT_CONTEXTIFY); -vm.runInContext('Object.freeze(globalThis);', context); +const context = createContext(constants.DONT_CONTEXTIFY); +runInContext('Object.freeze(globalThis);', context); try { - vm.runInContext('bar = 1; bar;', context); + runInContext('bar = 1; bar;', context); } catch (e) { - console.log(e); // Uncaught ReferenceError: bar is not defined + console.log(`${e.constructor.name}: ${e.message}`); // ReferenceError: bar is not defined } ``` @@ -1893,27 +2125,51 @@ the returned object is a proxy-like object to the global object in the newly cre fewer Node.js-specific quirks. It is reference equal to the `globalThis` value in the new context, can be modified from outside the context, and can be used to access built-ins in the new context directly. -```js -const vm = require('node:vm'); +```mjs +import { createContext, runInContext, constants } from 'node:vm'; + +const context = createContext(constants.DONT_CONTEXTIFY); + +// Returned object is reference equal to globalThis in the new context. +console.log(runInContext('globalThis', context) === context); // true + +// Can be used to access globals in the new context directly. +console.log(context.Array); // [Function: Array] +runInContext('foo = 1;', context); +console.log(context.foo); // 1 +context.bar = 1; +console.log(runInContext('bar;', context)); // 1 + +// Can be frozen and it affects the inner context. +Object.freeze(context); +try { + runInContext('baz = 1; baz;', context); +} catch (e) { + console.log(`${e.constructor.name}: ${e.message}`); // ReferenceError: baz is not defined +} +``` -const context = vm.createContext(vm.constants.DONT_CONTEXTIFY); +```cjs +const { createContext, runInContext, constants } = require('node:vm'); + +const context = createContext(constants.DONT_CONTEXTIFY); // Returned object is reference equal to globalThis in the new context. -console.log(vm.runInContext('globalThis', context) === context); // true +console.log(runInContext('globalThis', context) === context); // true // Can be used to access globals in the new context directly. console.log(context.Array); // [Function: Array] -vm.runInContext('foo = 1;', context); +runInContext('foo = 1;', context); console.log(context.foo); // 1 context.bar = 1; -console.log(vm.runInContext('bar;', context)); // 1 +console.log(runInContext('bar;', context)); // 1 // Can be frozen and it affects the inner context. Object.freeze(context); try { - vm.runInContext('baz = 1; baz;', context); + runInContext('baz = 1; baz;', context); } catch (e) { - console.log(e); // Uncaught ReferenceError: baz is not defined + console.log(`${e.constructor.name}: ${e.message}`); // ReferenceError: baz is not defined } ``` @@ -1929,34 +2185,65 @@ For example, the following code executed by `vm.runInNewContext()` with a timeout of 5 milliseconds schedules an infinite loop to run after a promise resolves. The scheduled loop is never interrupted by the timeout: -```js -const vm = require('node:vm'); +```mjs +import { runInNewContext } from 'node:vm'; + +function loop() { + console.log('entering loop'); + while (1) console.log(Date.now()); +} + +runInNewContext( + 'Promise.resolve().then(() => loop());', + { loop, console }, + { timeout: 5 }, +); +// This is printed *before* 'entering infinite loop' (!) +console.log('done executing'); +``` + +```cjs +const { runInNewContext } = require('node:vm'); function loop() { console.log('entering loop'); while (1) console.log(Date.now()); } -vm.runInNewContext( +runInNewContext( 'Promise.resolve().then(() => loop());', { loop, console }, { timeout: 5 }, ); -// This is printed *before* 'entering loop' (!) +// This is printed *before* 'entering infinite loop' (!) console.log('done executing'); ``` This can be addressed by passing `microtaskMode: 'afterEvaluate'` to the code that creates the `Context`: -```js -const vm = require('node:vm'); +```mjs +import { runInNewContext } from 'node:vm'; + +function loop() { + while (1) console.log(Date.now()); +} + +runInNewContext( + 'Promise.resolve().then(() => loop());', + { loop, console }, + { timeout: 5, microtaskMode: 'afterEvaluate' }, +); +``` + +```cjs +const { runInNewContext } = require('node:vm'); function loop() { while (1) console.log(Date.now()); } -vm.runInNewContext( +runInNewContext( 'Promise.resolve().then(() => loop());', { loop, console }, { timeout: 5, microtaskMode: 'afterEvaluate' }, @@ -1993,15 +2280,12 @@ flow of the outer context is disrupted in a surprising way: the log statement is never executed. ```mjs -import * as vm from 'node:vm'; +import { createContext, runInContext } from 'node:vm'; -const inner_context = vm.createContext({}, { microtaskMode: 'afterEvaluate' }); +const inner_context = createContext({}, { microtaskMode: 'afterEvaluate' }); // runInContext() returns a Promise created in the inner context. -const inner_promise = vm.runInContext( - 'Promise.resolve()', - context, -); +const inner_promise = runInContext('Promise.resolve()', inner_context); // As part of performing `await`, the JavaScript runtime must enqueue a task // on the microtask queue of the context where `inner_promise` was created. @@ -2015,6 +2299,28 @@ await inner_promise; console.log('this will NOT be printed'); ``` +```cjs +const { createContext, runInContext } = require('node:vm'); + +// runInContext() returns a Promise created in the inner context. +const inner_context = createContext({}, { microtaskMode: 'afterEvaluate' }); + +(async () => { + const inner_promise = runInContext('Promise.resolve()', inner_context); + + // As part of performing `await`, the JavaScript runtime must enqueue a task + // on the microtask queue of the context where `inner_promise` was created. + // A task is added on the inner microtask queue, but **it will not be run + // automatically**: this task will remain pending indefinitely. + // + // Since the outer microtask queue is empty, execution in the outer module + // falls through, and the log statement below is never executed. + await inner_promise; + + console.log('this will NOT be printed'); +})(); +``` + To successfully share promises between contexts with different microtask queues, it is necessary to ensure that tasks on the inner microtask queue will be run **whenever** the outer context enqueues a task on the inner microtask queue. diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index d314f3d990631b..2adbd77459bb0f 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -240,6 +240,7 @@ li.picker-header a span { max-width: 75vw; max-height: min(600px, 60vh); overflow-y: auto; + z-index: 10; } .picker > ul, .picker > ol { diff --git a/doc/changelogs/CHANGELOG_V25.md b/doc/changelogs/CHANGELOG_V25.md index a587c1c2032286..1062c0e3827236 100644 --- a/doc/changelogs/CHANGELOG_V25.md +++ b/doc/changelogs/CHANGELOG_V25.md @@ -8,6 +8,7 @@ +25.7.0
          25.6.1
          25.6.0
          25.5.0
          @@ -48,6 +49,108 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2026-02-24, Version 25.7.0 (Current), @aduh95 + +### Notable Changes + +* \[[`b0a79b10f0`](https://github.com/nodejs/node/commit/b0a79b10f0)] - **(SEMVER-MINOR)** **http2**: add http1Options for HTTP/1 fallback configuration (Amol Yadav) [#61713](https://github.com/nodejs/node/pull/61713) +* \[[`2d874dfb8e`](https://github.com/nodejs/node/commit/2d874dfb8e)] - **(SEMVER-MINOR)** **sea**: support ESM entry point in SEA (Joyee Cheung) [#61813](https://github.com/nodejs/node/pull/61813) +* \[[`ee59127664`](https://github.com/nodejs/node/commit/ee59127664)] - **sqlite**: mark as release candidate (Matteo Collina) [#61262](https://github.com/nodejs/node/pull/61262) +* \[[`608736e19e`](https://github.com/nodejs/node/commit/608736e19e)] - **(SEMVER-MINOR)** **stream**: rename `Duplex.toWeb()` type option to `readableType` (René) [#61632](https://github.com/nodejs/node/pull/61632) +* \[[`a43375999f`](https://github.com/nodejs/node/commit/a43375999f)] - **(SEMVER-MINOR)** **test\_runner**: show interrupted test on SIGINT (Matteo Collina) [#61676](https://github.com/nodejs/node/pull/61676) + +### Commits + +* \[[`ab4375e141`](https://github.com/nodejs/node/commit/ab4375e141)] - **benchmark**: add startup benchmark for ESM entrypoint (Joyee Cheung) [#61769](https://github.com/nodejs/node/pull/61769) +* \[[`8d83d8026b`](https://github.com/nodejs/node/commit/8d83d8026b)] - **build**: add temporal test on GHA windows (Chengzhong Wu) [#61810](https://github.com/nodejs/node/pull/61810) +* \[[`aab153eec3`](https://github.com/nodejs/node/commit/aab153eec3)] - **build**: skip sscache action on non-main branches (Joyee Cheung) [#61790](https://github.com/nodejs/node/pull/61790) +* \[[`9e40fb93bc`](https://github.com/nodejs/node/commit/9e40fb93bc)] - **build**: use path-ignore in GHA coverage-windows.yml (Chengzhong Wu) [#61811](https://github.com/nodejs/node/pull/61811) +* \[[`4896653361`](https://github.com/nodejs/node/commit/4896653361)] - **build**: generate\_config\_gypi.py generates valid JSON (Shelley Vohr) [#61791](https://github.com/nodejs/node/pull/61791) +* \[[`bb82b44de0`](https://github.com/nodejs/node/commit/bb82b44de0)] - **build**: build with v8 gdbjit support on supported platform (Joyee Cheung) [#61010](https://github.com/nodejs/node/pull/61010) +* \[[`e7173a093a`](https://github.com/nodejs/node/commit/e7173a093a)] - **build**: show cc outputs when version detection failed (Chengzhong Wu) [#61700](https://github.com/nodejs/node/pull/61700) +* \[[`848050d38f`](https://github.com/nodejs/node/commit/848050d38f)] - **build,win**: add WinGet Visual Studio 2022 Build Tools Edition config (Mike McCready) [#61652](https://github.com/nodejs/node/pull/61652) +* \[[`938841e1cd`](https://github.com/nodejs/node/commit/938841e1cd)] - **crypto**: always return certificate serial numbers as uppercase (Anna Henningsen) [#61752](https://github.com/nodejs/node/pull/61752) +* \[[`dba9001d6f`](https://github.com/nodejs/node/commit/dba9001d6f)] - **deps**: upgrade npm to 11.10.1 (npm team) [#61892](https://github.com/nodejs/node/pull/61892) +* \[[`75c8e18d2f`](https://github.com/nodejs/node/commit/75c8e18d2f)] - **deps**: update nbytes to 0.1.3 (Node.js GitHub Bot) [#61879](https://github.com/nodejs/node/pull/61879) +* \[[`4ca1597f25`](https://github.com/nodejs/node/commit/4ca1597f25)] - **deps**: remove stale OpenSSL arch configs (René) [#61834](https://github.com/nodejs/node/pull/61834) +* \[[`c4f298c729`](https://github.com/nodejs/node/commit/c4f298c729)] - **deps**: update llhttp to 9.3.1 (Node.js GitHub Bot) [#61827](https://github.com/nodejs/node/pull/61827) +* \[[`7d63a2df93`](https://github.com/nodejs/node/commit/7d63a2df93)] - **deps**: V8: cherry-pick 64b36b441179 (Rafael Magrin) [#61712](https://github.com/nodejs/node/pull/61712) +* \[[`241a6b7088`](https://github.com/nodejs/node/commit/241a6b7088)] - **deps**: update googletest to 5a9c3f9e8d9b90bbbe8feb32902146cb8f7c1757 (Node.js GitHub Bot) [#61731](https://github.com/nodejs/node/pull/61731) +* \[[`eec896c0e0`](https://github.com/nodejs/node/commit/eec896c0e0)] - **deps**: V8: backport 6a0a25abaed3 (Vivian Wang) [#61666](https://github.com/nodejs/node/pull/61666) +* \[[`5a9874af09`](https://github.com/nodejs/node/commit/5a9874af09)] - **doc**: clarify status of feature request issues (Antoine du Hamel) [#61505](https://github.com/nodejs/node/pull/61505) +* \[[`0648ac64aa`](https://github.com/nodejs/node/commit/0648ac64aa)] - **doc**: add esm and cjs examples to node:vm (Alfredo González) [#61498](https://github.com/nodejs/node/pull/61498) +* \[[`8b38718294`](https://github.com/nodejs/node/commit/8b38718294)] - **doc**: clarify build environment is trusted in threat model (Matteo Collina) [#61865](https://github.com/nodejs/node/pull/61865) +* \[[`10e86818ee`](https://github.com/nodejs/node/commit/10e86818ee)] - **doc**: remove incorrect mention of `module` in `typescript.md` (Rob Palmer) [#61839](https://github.com/nodejs/node/pull/61839) +* \[[`b50376f527`](https://github.com/nodejs/node/commit/b50376f527)] - **doc**: simplify addAbortListener example (Chemi Atlow) [#61842](https://github.com/nodejs/node/pull/61842) +* \[[`dea0e7a856`](https://github.com/nodejs/node/commit/dea0e7a856)] - **doc**: fix typo in --disable-wasm-trap-handler description (Dmytro Semchuk) [#61820](https://github.com/nodejs/node/pull/61820) +* \[[`57ac1f5aa0`](https://github.com/nodejs/node/commit/57ac1f5aa0)] - **doc**: clean up globals.md (René) [#61822](https://github.com/nodejs/node/pull/61822) +* \[[`4c30d2bb4d`](https://github.com/nodejs/node/commit/4c30d2bb4d)] - **doc**: remove obsolete Boxstarter automated install (Mike McCready) [#61785](https://github.com/nodejs/node/pull/61785) +* \[[`db610b9e32`](https://github.com/nodejs/node/commit/db610b9e32)] - **doc**: clarify async caveats for `events.once()` (René) [#61572](https://github.com/nodejs/node/pull/61572) +* \[[`b4a826b11c`](https://github.com/nodejs/node/commit/b4a826b11c)] - **doc**: update Juan's security steward info (Juan José) [#61754](https://github.com/nodejs/node/pull/61754) +* \[[`7d9cc5dc54`](https://github.com/nodejs/node/commit/7d9cc5dc54)] - **doc**: fix methods being documented as properties in `process.md` (Antoine du Hamel) [#61765](https://github.com/nodejs/node/pull/61765) +* \[[`aa0362c26a`](https://github.com/nodejs/node/commit/aa0362c26a)] - **doc**: add riscv64 info into platform list (Lu Yahan) [#42251](https://github.com/nodejs/node/pull/42251) +* \[[`9b0101b65b`](https://github.com/nodejs/node/commit/9b0101b65b)] - **doc**: fix dropdown menu being obscured at <600px due to stacking context (Jeff) [#61735](https://github.com/nodejs/node/pull/61735) +* \[[`df2c65b3e4`](https://github.com/nodejs/node/commit/df2c65b3e4)] - **doc**: fix spacing in process message event (Aviv Keller) [#61756](https://github.com/nodejs/node/pull/61756) +* \[[`01018559f5`](https://github.com/nodejs/node/commit/01018559f5)] - **doc**: move describe/it aliases section before expectFailure (Luca Raveri) [#61567](https://github.com/nodejs/node/pull/61567) +* \[[`49443583af`](https://github.com/nodejs/node/commit/49443583af)] - **doc**: fix broken links of net.md (YuSheng Chen) [#61673](https://github.com/nodejs/node/pull/61673) +* \[[`af7c927a2a`](https://github.com/nodejs/node/commit/af7c927a2a)] - **doc**: clean up Windows code snippet in `child_process.md` (reillylm) [#61422](https://github.com/nodejs/node/pull/61422) +* \[[`221648a687`](https://github.com/nodejs/node/commit/221648a687)] - **esm**: update outdated FIXME comment in translators.js (Karan Mangtani) [#61715](https://github.com/nodejs/node/pull/61715) +* \[[`4484e14a31`](https://github.com/nodejs/node/commit/4484e14a31)] - **events**: don't call resume after close (Сковорода Никита Андреевич) [#60548](https://github.com/nodejs/node/pull/60548) +* \[[`4cecbe1f53`](https://github.com/nodejs/node/commit/4cecbe1f53)] - **fs**: add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) [#61178](https://github.com/nodejs/node/pull/61178) +* \[[`2c94967684`](https://github.com/nodejs/node/commit/2c94967684)] - **http**: remove redundant keepAliveTimeoutBuffer assignment (Efe) [#61743](https://github.com/nodejs/node/pull/61743) +* \[[`435f3dd8e4`](https://github.com/nodejs/node/commit/435f3dd8e4)] - **http**: attach error handler to socket synchronously in onSocket (RajeshKumar11) [#61770](https://github.com/nodejs/node/pull/61770) +* \[[`ce0ebd853d`](https://github.com/nodejs/node/commit/ce0ebd853d)] - **http**: fix keep-alive socket reuse race in requestOnFinish (Martin Slota) [#61710](https://github.com/nodejs/node/pull/61710) +* \[[`8103a78b6a`](https://github.com/nodejs/node/commit/8103a78b6a)] - **http2**: add strictSingleValueFields option to relax header validation (Tim Perry) [#59917](https://github.com/nodejs/node/pull/59917) +* \[[`b0a79b10f0`](https://github.com/nodejs/node/commit/b0a79b10f0)] - **(SEMVER-MINOR)** **http2**: add http1Options for HTTP/1 fallback configuration (Amol Yadav) [#61713](https://github.com/nodejs/node/pull/61713) +* \[[`c589b6b23c`](https://github.com/nodejs/node/commit/c589b6b23c)] - **http2**: fix FileHandle leak in respondWithFile (sangwook) [#61707](https://github.com/nodejs/node/pull/61707) +* \[[`df477202ae`](https://github.com/nodejs/node/commit/df477202ae)] - **lib**: reduce cycles in esm loader and load it in snapshot (Joyee Cheung) [#61769](https://github.com/nodejs/node/pull/61769) +* \[[`deda50a819`](https://github.com/nodejs/node/commit/deda50a819)] - **lib**: remove top-level getOptionValue() calls in lib/internal/modules (Joyee Cheung) [#61769](https://github.com/nodejs/node/pull/61769) +* \[[`b1c1ddff79`](https://github.com/nodejs/node/commit/b1c1ddff79)] - **lib**: optimize styleText when validateStream is false (Rafael Gonzaga) [#61792](https://github.com/nodejs/node/pull/61792) +* \[[`df334f7fa0`](https://github.com/nodejs/node/commit/df334f7fa0)] - **meta**: use SCCACHE\_GHA\_ENABLED for shared build workflows (René) [#61640](https://github.com/nodejs/node/pull/61640) +* \[[`24b858547a`](https://github.com/nodejs/node/commit/24b858547a)] - **module**: fix extensionless entry with explicit type=commonjs (Yuya Inoue) [#61600](https://github.com/nodejs/node/pull/61600) +* \[[`4f2f8006bd`](https://github.com/nodejs/node/commit/4f2f8006bd)] - **repl**: fix FileHandle leak in history initialization (sangwook) [#61706](https://github.com/nodejs/node/pull/61706) +* \[[`2d874dfb8e`](https://github.com/nodejs/node/commit/2d874dfb8e)] - **(SEMVER-MINOR)** **sea**: support ESM entry point in SEA (Joyee Cheung) [#61813](https://github.com/nodejs/node/pull/61813) +* \[[`ee59127664`](https://github.com/nodejs/node/commit/ee59127664)] - **sqlite**: mark as release candidate (Matteo Collina) [#61262](https://github.com/nodejs/node/pull/61262) +* \[[`f14ff14473`](https://github.com/nodejs/node/commit/f14ff14473)] - **src**: remove unnecessary `c_str()` conversions in diagnostic messages (Anna Henningsen) [#61786](https://github.com/nodejs/node/pull/61786) +* \[[`26a09e541d`](https://github.com/nodejs/node/commit/26a09e541d)] - **src**: use bool literals in TraceEnvVarOptions (Tobias Nießen) [#61425](https://github.com/nodejs/node/pull/61425) +* \[[`62b0758c47`](https://github.com/nodejs/node/commit/62b0758c47)] - **src**: fix `--build-sea` default executable path (Alex Schwartz) [#61708](https://github.com/nodejs/node/pull/61708) +* \[[`b5724921b1`](https://github.com/nodejs/node/commit/b5724921b1)] - **src**: track allocations made by zstd streams (Anna Henningsen) [#61717](https://github.com/nodejs/node/pull/61717) +* \[[`3d1d1523a5`](https://github.com/nodejs/node/commit/3d1d1523a5)] - **src**: do not store compression methods on Brotli classes (Anna Henningsen) [#61717](https://github.com/nodejs/node/pull/61717) +* \[[`b2915cda77`](https://github.com/nodejs/node/commit/b2915cda77)] - **src**: extract zlib allocation tracking into its own class (Anna Henningsen) [#61717](https://github.com/nodejs/node/pull/61717) +* \[[`3032a7e3c6`](https://github.com/nodejs/node/commit/3032a7e3c6)] - **src**: release memory for zstd contexts in `Close()` (Anna Henningsen) [#61717](https://github.com/nodejs/node/pull/61717) +* \[[`bc2287db74`](https://github.com/nodejs/node/commit/bc2287db74)] - **src**: add more checks and clarify docs for external references (Joyee Cheung) [#61719](https://github.com/nodejs/node/pull/61719) +* \[[`5daf282e33`](https://github.com/nodejs/node/commit/5daf282e33)] - **src**: fix cjs\_lexer external reference registration (Joyee Cheung) [#61718](https://github.com/nodejs/node/pull/61718) +* \[[`fb2db5f947`](https://github.com/nodejs/node/commit/fb2db5f947)] - **src**: support import() and import.meta in embedder-run modules (Joyee Cheung) [#61654](https://github.com/nodejs/node/pull/61654) +* \[[`e146591002`](https://github.com/nodejs/node/commit/e146591002)] - **stream**: fix decoded fromList chunk boundary check (Thomas Watson) [#61884](https://github.com/nodejs/node/pull/61884) +* \[[`065200a5f0`](https://github.com/nodejs/node/commit/065200a5f0)] - **stream**: add fast paths for webstreams read and pipeTo (Matteo Collina) [#61807](https://github.com/nodejs/node/pull/61807) +* \[[`608736e19e`](https://github.com/nodejs/node/commit/608736e19e)] - **(SEMVER-MINOR)** **stream**: rename `Duplex.toWeb()` type option to `readableType` (René) [#61632](https://github.com/nodejs/node/pull/61632) +* \[[`51587d684d`](https://github.com/nodejs/node/commit/51587d684d)] - **test**: fix typos in test files (Daijiro Wachi) [#61408](https://github.com/nodejs/node/pull/61408) +* \[[`17b2361360`](https://github.com/nodejs/node/commit/17b2361360)] - **test**: allow filtering async internal frames in assertSnapshot (Joyee Cheung) [#61769](https://github.com/nodejs/node/pull/61769) +* \[[`3f6a5f5f7f`](https://github.com/nodejs/node/commit/3f6a5f5f7f)] - **test**: unify assertSnapshot stacktrace transform (Chengzhong Wu) [#61665](https://github.com/nodejs/node/pull/61665) +* \[[`c8dac320de`](https://github.com/nodejs/node/commit/c8dac320de)] - **test**: check stability block position in API markdown (René) [#58590](https://github.com/nodejs/node/pull/58590) +* \[[`6809ef8d04`](https://github.com/nodejs/node/commit/6809ef8d04)] - **test**: adapt buffer test for v8 sandbox (Shelley Vohr) [#61772](https://github.com/nodejs/node/pull/61772) +* \[[`60f5771a74`](https://github.com/nodejs/node/commit/60f5771a74)] - **test**: update FileAPI tests from WPT (Ms2ger) [#61750](https://github.com/nodejs/node/pull/61750) +* \[[`d2fef4a31a`](https://github.com/nodejs/node/commit/d2fef4a31a)] - **test**: update WPT for WebCryptoAPI to 7cbe7e8ed9 (Node.js GitHub Bot) [#61729](https://github.com/nodejs/node/pull/61729) +* \[[`d7a87f14da`](https://github.com/nodejs/node/commit/d7a87f14da)] - **test**: update WPT for url to efb889eb4c (Node.js GitHub Bot) [#61728](https://github.com/nodejs/node/pull/61728) +* \[[`b6ae1fc4b8`](https://github.com/nodejs/node/commit/b6ae1fc4b8)] - **test**: split test-embedding.js and run tests in parallel (Joyee Cheung) [#61571](https://github.com/nodejs/node/pull/61571) +* \[[`a43375999f`](https://github.com/nodejs/node/commit/a43375999f)] - **(SEMVER-MINOR)** **test\_runner**: show interrupted test on SIGINT (Matteo Collina) [#61676](https://github.com/nodejs/node/pull/61676) +* \[[`1c02aa09b0`](https://github.com/nodejs/node/commit/1c02aa09b0)] - **test\_runner**: fix suite rerun (Moshe Atlow) [#61775](https://github.com/nodejs/node/pull/61775) +* \[[`89318b0a02`](https://github.com/nodejs/node/commit/89318b0a02)] - **tools**: fix auto-start-ci (Antoine du Hamel) [#61900](https://github.com/nodejs/node/pull/61900) +* \[[`ee107f5e84`](https://github.com/nodejs/node/commit/ee107f5e84)] - **tools**: do not checkout repo in `auto-start-ci.yml` (Antoine du Hamel) [#61874](https://github.com/nodejs/node/pull/61874) +* \[[`c2de1fa619`](https://github.com/nodejs/node/commit/c2de1fa619)] - **tools**: cache V8 build on test-shared workflow (Antoine du Hamel) [#61860](https://github.com/nodejs/node/pull/61860) +* \[[`111c77ec94`](https://github.com/nodejs/node/commit/111c77ec94)] - **tools**: automate updates for test/fixtures/test426 (Rich Trott) [#60978](https://github.com/nodejs/node/pull/60978) +* \[[`ea8886f7d5`](https://github.com/nodejs/node/commit/ea8886f7d5)] - **tools**: use ubuntu-slim runner in GHA (Antoine du Hamel) [#61759](https://github.com/nodejs/node/pull/61759) +* \[[`9db82ba786`](https://github.com/nodejs/node/commit/9db82ba786)] - **tools**: bump unist-util-visit in /tools/doc in the doc group (dependabot\[bot]) [#61646](https://github.com/nodejs/node/pull/61646) +* \[[`c8e58c56b9`](https://github.com/nodejs/node/commit/c8e58c56b9)] - **tools**: bump the eslint group in /tools/eslint with 6 updates (dependabot\[bot]) [#61628](https://github.com/nodejs/node/pull/61628) +* \[[`2518ec77e8`](https://github.com/nodejs/node/commit/2518ec77e8)] - **tools**: use ubuntu-slim runner in GHA (Antoine du Hamel) [#61734](https://github.com/nodejs/node/pull/61734) +* \[[`c5ad2beba3`](https://github.com/nodejs/node/commit/c5ad2beba3)] - **tools**: fix small inconsistencies in JSON doc output (Antoine du Hamel) [#61757](https://github.com/nodejs/node/pull/61757) +* \[[`a9f90bee0a`](https://github.com/nodejs/node/commit/a9f90bee0a)] - **tools**: use ubuntu-latest runner in `notify-on-push` workflow (Antoine du Hamel) [#61742](https://github.com/nodejs/node/pull/61742) +* \[[`30e38182d9`](https://github.com/nodejs/node/commit/30e38182d9)] - **watch**: get flags from execArgv (Efe) [#61779](https://github.com/nodejs/node/pull/61779) +* \[[`da1a08a3a5`](https://github.com/nodejs/node/commit/da1a08a3a5)] - **worker**: eliminate race condition in process.cwd() (giulioAZ) [#61664](https://github.com/nodejs/node/pull/61664) +* \[[`dfac82a235`](https://github.com/nodejs/node/commit/dfac82a235)] - **zlib**: add support for brotli compression dictionary (Andy Weiss) [#61763](https://github.com/nodejs/node/pull/61763) + ## 2026-02-10, Version 25.6.1 (Current), @aduh95 diff --git a/doc/contributing/feature-request-management.md b/doc/contributing/feature-request-management.md index 9331164314fb0e..bb2ecd9d99660b 100644 --- a/doc/contributing/feature-request-management.md +++ b/doc/contributing/feature-request-management.md @@ -1,13 +1,15 @@ # Feature request management -Feature requests are a valuable source of input to the project. -They help our maintainers understand what additions will be of -value to users of the Node.js runtime. - -At the same time, the project is volunteer run and does not -have the ability to direct resources toward specific work. The -features which are implemented are those for which volunteers -are individually motivated to work on. The best way to ensure +Feature requests are not a valuable source of input for the project. +It is usually more productive to first send the Pull Request implementing the +feature, even imperfectly, and let the discussion happen during code review. +That being said, the project still welcomes feature request issues, either for +features you cannot and/or won't implement yourself, or if you need more input +from the community before starting the work. + +The project is volunteer run and does not have the ability to direct resources +toward specific work. The features which are implemented are those for which +volunteers are individually motivated to work on. The best way to ensure a feature gets implemented is to create a PR to add it. The project strives to support people who do that. diff --git a/doc/node.1 b/doc/node.1 index 6d16ef84c45df0..8075225d5d1b3e 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -460,7 +460,7 @@ vm.measureMemory(); .It Fl -disable-wasm-trap-handler By default, Node.js enables trap-handler-based WebAssembly bound checks. As a result, V8 does not need to insert inline bound checks -int the code compiled from WebAssembly which may speedup WebAssembly +in the code compiled from WebAssembly which may speed up WebAssembly execution significantly, but this optimization requires allocating a big virtual memory cage (currently 10GB). If the Node.js process does not have access to a large enough virtual memory address space diff --git a/lib/_http_client.js b/lib/_http_client.js index ee4f47be64ab3c..1358a441c15f90 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -571,7 +571,7 @@ function socketErrorListener(err) { if (req) { // For Safety. Some additional errors might fire later on // and we need to make sure we don't double-fire the error event. - req.socket._hadError = true; + socket._hadError = true; emitErrorEvent(req, err); } @@ -870,7 +870,11 @@ function responseOnTimeout() { function requestOnFinish() { const req = this; - if (req.shouldKeepAlive && req._ended) + // If the response ends before this request finishes writing, `responseOnEnd()` + // already released the socket. When `finish` fires later, that socket may + // belong to a different request, so only call `responseKeepAlive()` when the + // original request is still alive (`!req.destroyed`). + if (req.shouldKeepAlive && req._ended && !req.destroyed) responseKeepAlive(req); } @@ -906,7 +910,6 @@ function tickOnSocket(req, socket) { parser.joinDuplicateHeaders = req.joinDuplicateHeaders; parser.onIncoming = parserOnIncomingClient; - socket.on('error', socketErrorListener); socket.on('data', socketOnData); socket.on('end', socketOnEnd); socket.on('close', socketCloseListener); @@ -945,8 +948,15 @@ function listenSocketTimeout(req) { } ClientRequest.prototype.onSocket = function onSocket(socket, err) { - // TODO(ronag): Between here and onSocketNT the socket - // has no 'error' handler. + // Attach the error listener synchronously so that any errors emitted on + // the socket before onSocketNT runs (e.g. from a blocklist check or other + // next-tick error) are forwarded to the request and can be caught by the + // user's error handler. socketErrorListener requires socket._httpMessage + // to be set so we set it here too. + if (socket && !err) { + socket._httpMessage = this; + socket.on('error', socketErrorListener); + } process.nextTick(onSocketNT, this, socket, err); }; @@ -958,8 +968,10 @@ function onSocketNT(req, socket, err) { if (!req.aborted && !err) { err = new ConnResetException('socket hang up'); } - // ERR_PROXY_TUNNEL is handled by the proxying logic - if (err && err.code !== 'ERR_PROXY_TUNNEL') { + // ERR_PROXY_TUNNEL is handled by the proxying logic. + // Skip if the error was already emitted by the early socketErrorListener. + if (err && err.code !== 'ERR_PROXY_TUNNEL' && + !socket?._hadError) { emitErrorEvent(req, err); } req._closed = true; diff --git a/lib/_http_server.js b/lib/_http_server.js index 3dcb124f881aef..cca7f8f1789466 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -576,12 +576,6 @@ function Server(options, requestListener) { storeHTTPOptions.call(this, options); - // Optional buffer added to the keep-alive timeout when setting socket timeouts. - // Helps reduce ECONNRESET errors from clients by extending the internal timeout. - // Default is 1000ms if not specified. - const buf = options.keepAliveTimeoutBuffer; - this.keepAliveTimeoutBuffer = - (typeof buf === 'number' && NumberIsFinite(buf) && buf >= 0) ? buf : 1000; net.Server.call( this, { allowHalfOpen: true, noDelay: options.noDelay ?? true, diff --git a/lib/events.js b/lib/events.js index 0fd84eea5359cd..c065e43d6d2565 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1074,7 +1074,7 @@ function on(emitter, event, options = kEmptyObject) { const value = unconsumedEvents.shift(); size--; if (paused && size < lowWatermark) { - emitter.resume(); + emitter.resume(); // Can not be finished yet paused = false; } return PromiseResolve(createIterResult(value, false)); @@ -1191,6 +1191,7 @@ function on(emitter, event, options = kEmptyObject) { abortListenerDisposable?.[SymbolDispose](); removeAll(); finished = true; + paused = false; const doneResult = createIterResult(undefined, true); while (!unconsumedPromises.isEmpty()) { unconsumedPromises.shift().resolve(doneResult); diff --git a/lib/fs.js b/lib/fs.js index 66bf3a81aec56d..4a03fada49ea8a 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -188,6 +188,7 @@ function makeStatsCallback(cb) { return (err, stats) => { if (err) return cb(err); + if (stats === undefined && err === null) return cb(null, undefined); cb(err, getStatsFromBinding(stats)); }; } @@ -1621,7 +1622,7 @@ function lstat(path, options = { bigint: false }, callback) { * ) => any} callback * @returns {void} */ -function stat(path, options = { bigint: false }, callback) { +function stat(path, options = { bigint: false, throwIfNoEntry: true }, callback) { if (typeof options === 'function') { callback = options; options = kEmptyObject; @@ -1630,7 +1631,7 @@ function stat(path, options = { bigint: false }, callback) { const req = new FSReqCallback(options.bigint); req.oncomplete = callback; - binding.stat(getValidatedPath(path), options.bigint, req); + binding.stat(getValidatedPath(path), options.bigint, req, options.throwIfNoEntry); } function statfs(path, options = { bigint: false }, callback) { diff --git a/lib/internal/bootstrap/switches/is_main_thread.js b/lib/internal/bootstrap/switches/is_main_thread.js index 74486ba5310b78..06ac27c8486963 100644 --- a/lib/internal/bootstrap/switches/is_main_thread.js +++ b/lib/internal/bootstrap/switches/is_main_thread.js @@ -296,6 +296,7 @@ require('util'); require('url'); // eslint-disable-line no-restricted-modules internalBinding('module_wrap'); require('internal/modules/cjs/loader'); +require('internal/modules/esm/loader'); require('internal/modules/esm/utils'); // Needed to refresh the time origin. diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 9741dcd8516eca..2f95c4b79e17fd 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -1026,12 +1026,16 @@ async function lstat(path, options = { bigint: false }) { return getStatsFromBinding(result); } -async function stat(path, options = { bigint: false }) { +async function stat(path, options = { bigint: false, throwIfNoEntry: true }) { const result = await PromisePrototypeThen( - binding.stat(getValidatedPath(path), options.bigint, kUsePromises), + binding.stat(getValidatedPath(path), options.bigint, kUsePromises, options.throwIfNoEntry), undefined, handleErrorFromBinding, ); + + // Binding will resolve undefined if UV_ENOENT or UV_ENOTDIR and throwIfNoEntry is false + if (!options.throwIfNoEntry && result === undefined) return undefined; + return getStatsFromBinding(result); } diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 8b526c001004c5..273ddd15414b51 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -48,8 +48,12 @@ const { Duplex } = require('stream'); const tls = require('tls'); const { setImmediate, setTimeout, clearTimeout } = require('timers'); -const { kIncomingMessage } = require('_http_common'); -const { kServerResponse, Server: HttpServer, httpServerPreClose, setupConnectionsTracking } = require('_http_server'); +const { + Server: HttpServer, + httpServerPreClose, + setupConnectionsTracking, + storeHTTPOptions, +} = require('_http_server'); const JSStreamSocket = require('internal/js_stream_socket'); const { @@ -132,6 +136,7 @@ const { const { assertIsObject, assertIsArray, + assertValidPseudoHeader, assertValidPseudoHeaderResponse, assertValidPseudoHeaderTrailer, assertWithinRange, @@ -144,6 +149,7 @@ const { isPayloadMeaningless, kAuthority, kSensitiveHeaders, + kStrictSingleValueFields, kSocket, kRequest, kProtocol, @@ -1314,6 +1320,8 @@ class Http2Session extends EventEmitter { this[kSocket] = socket; this[kTimeout] = null; this[kHandle] = undefined; + this[kStrictSingleValueFields] = + options.strictSingleValueFields; // Do not use nagle's algorithm if (typeof socket.setNoDelay === 'function') @@ -2366,7 +2374,11 @@ class Http2Stream extends Duplex { this[kUpdateTimer](); - const headersList = buildNgHeaderString(headers, assertValidPseudoHeaderTrailer); + const headersList = buildNgHeaderString( + headers, + assertValidPseudoHeaderTrailer, + this.session[kStrictSingleValueFields], + ); this[kSentTrailers] = headers; // Send the trailers in setImmediate so we don't do it on nghttp2 stack. @@ -2575,7 +2587,11 @@ function prepareResponseHeaders(stream, headersParam, options) { stream[kSentHeaders] = headers; } - const headersList = buildNgHeaderString(headers, assertValidPseudoHeaderResponse); + const headersList = buildNgHeaderString( + headers, + assertValidPseudoHeaderResponse, + stream.session[kStrictSingleValueFields], + ); return { headers, headersList, statusCode }; } @@ -2678,8 +2694,14 @@ function processRespondWithFD(self, fd, headers, offset = 0, length = -1, let headersList; try { - headersList = buildNgHeaderString(headers, assertValidPseudoHeaderResponse); + headersList = buildNgHeaderString( + headers, + assertValidPseudoHeaderResponse, + self.session[kStrictSingleValueFields], + ); } catch (err) { + if (self.ownsFd) + tryClose(fd); self.destroy(err); return; } @@ -2693,6 +2715,8 @@ function processRespondWithFD(self, fd, headers, offset = 0, length = -1, const ret = self[kHandle].respond(headersList, streamOptions); if (ret < 0) { + if (self.ownsFd) + tryClose(fd); self.destroy(new NghttpError(ret)); return; } @@ -2901,7 +2925,11 @@ class ServerHttp2Stream extends Http2Stream { if (headers[HTTP2_HEADER_METHOD] === HTTP2_METHOD_HEAD) headRequest = options.endStream = true; - const headersList = buildNgHeaderString(headers); + const headersList = buildNgHeaderString( + headers, + assertValidPseudoHeader, + this.session[kStrictSingleValueFields], + ); const streamOptions = options.endStream ? STREAM_OPTION_EMPTY_PAYLOAD : 0; @@ -3165,7 +3193,11 @@ class ServerHttp2Stream extends Http2Stream { this[kUpdateTimer](); - const headersList = buildNgHeaderString(headers, assertValidPseudoHeaderResponse); + const headersList = buildNgHeaderString( + headers, + assertValidPseudoHeaderResponse, + this.session[kStrictSingleValueFields], + ); if (!this[kInfoHeaders]) this[kInfoHeaders] = [headers]; else @@ -3253,8 +3285,6 @@ function connectionListener(socket) { if (socket.alpnProtocol === false || socket.alpnProtocol === 'http/1.1') { // Fallback to HTTP/1.1 if (options.allowHTTP1 === true) { - socket.server[kIncomingMessage] = options.Http1IncomingMessage; - socket.server[kServerResponse] = options.Http1ServerResponse; return httpConnectionListener.call(this, socket); } // Let event handler deal with the socket @@ -3320,25 +3350,43 @@ function initializeOptions(options) { } if (options.maxSessionInvalidFrames !== undefined) - validateUint32(options.maxSessionInvalidFrames, 'maxSessionInvalidFrames'); + validateUint32(options.maxSessionInvalidFrames, 'options.maxSessionInvalidFrames'); if (options.maxSessionRejectedStreams !== undefined) { validateUint32( options.maxSessionRejectedStreams, - 'maxSessionRejectedStreams', + 'options.maxSessionRejectedStreams', ); } if (options.unknownProtocolTimeout !== undefined) - validateUint32(options.unknownProtocolTimeout, 'unknownProtocolTimeout'); + validateUint32(options.unknownProtocolTimeout, 'options.unknownProtocolTimeout'); else // TODO(danbev): is this a good default value? options.unknownProtocolTimeout = 10000; + if (options.strictSingleValueFields !== undefined) { + validateBoolean( + options.strictSingleValueFields, + 'options.strictSingleValueFields', + ); + } else { + options.strictSingleValueFields = true; + } + + + // Initialize http1Options bag for HTTP/1 fallback when allowHTTP1 is true. + // This bag is passed to storeHTTPOptions() to configure HTTP/1 server + // behavior (timeouts, IncomingMessage/ServerResponse classes, etc.). + options.http1Options = { ...options.http1Options }; - // Used only with allowHTTP1 - options.Http1IncomingMessage ||= http.IncomingMessage; - options.Http1ServerResponse ||= http.ServerResponse; + // Backward compat: migrate deprecated top-level Http1 options (DEP0201) + if (options.Http1IncomingMessage !== undefined) { + options.http1Options.IncomingMessage ??= options.Http1IncomingMessage; + } + if (options.Http1ServerResponse !== undefined) { + options.http1Options.ServerResponse ??= options.Http1ServerResponse; + } options.Http2ServerRequest ||= Http2ServerRequest; options.Http2ServerResponse ||= Http2ServerResponse; @@ -3386,9 +3434,7 @@ class Http2SecureServer extends TLSServer { this.timeout = 0; this.on('newListener', setupCompat); if (options.allowHTTP1 === true) { - this.headersTimeout = 60_000; // Minimum between 60 seconds or requestTimeout - this.requestTimeout = 300_000; // 5 minutes - this.connectionsCheckingInterval = 30_000; // 30 seconds + storeHTTPOptions.call(this, { ...options, ...options.http1Options }); this.shouldUpgradeCallback = function() { return this.listenerCount('upgrade') > 0; }; @@ -3540,6 +3586,15 @@ function connect(authority, options, listener) { throw new ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS(); } + if (options.strictSingleValueFields !== undefined) { + validateBoolean( + options.strictSingleValueFields, + 'options.strictSingleValueFields', + ); + } else { + options.strictSingleValueFields = true; + } + if (typeof authority === 'string') authority = new URL(authority); diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index ba981c8934dee9..25adc8f9697d82 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -39,6 +39,7 @@ const { const kAuthority = Symbol('authority'); const kSensitiveHeaders = Symbol('sensitiveHeaders'); +const kStrictSingleValueFields = Symbol('strictSingleValueFields'); const kSocket = Symbol('socket'); const kProtocol = Symbol('protocol'); const kProxySocket = Symbol('proxySocket'); @@ -121,7 +122,7 @@ const kValidPseudoHeaders = new SafeSet([ // This set contains headers that are permitted to have only a single // value. Multiple instances must not be specified. -const kSingleValueHeaders = new SafeSet([ +const kSingleValueFields = new SafeSet([ HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, HTTP2_HEADER_AUTHORITY, @@ -690,6 +691,7 @@ function prepareRequestHeadersArray(headers, session) { const headersList = buildNgHeaderString( rawHeaders, assertValidPseudoHeader, + session[kStrictSingleValueFields], ); return { @@ -731,7 +733,11 @@ function prepareRequestHeadersObject(headers, session) { throw new ERR_HTTP2_CONNECT_PATH(); } - const headersList = buildNgHeaderString(headersObject); + const headersList = buildNgHeaderString( + headersObject, + assertValidPseudoHeader, + session[kStrictSingleValueFields], + ); return { headersObject, @@ -751,10 +757,15 @@ const kNoHeaderFlags = StringFromCharCode(NGHTTP2_NV_FLAG_NONE); * format, rejecting illegal header configurations, and marking sensitive headers * that should not be indexed en route. This takes either a flat map of * raw headers ([k1, v1, k2, v2]) or a header object ({ k1: v1, k2: [v2, v3] }). + * + * Takes a validation function to check the pseudo-headers allowed for this + * message, and a boolean indicating whether to enforce strict single-value + * header validation. * @returns {[string, number]} */ function buildNgHeaderString(arrayOrMap, - assertValuePseudoHeader = assertValidPseudoHeader) { + validatePseudoHeaderValue, + strictSingleValueFields) { let headers = ''; let pseudoHeaders = ''; let count = 0; @@ -765,7 +776,8 @@ function buildNgHeaderString(arrayOrMap, function processHeader(key, value) { key = key.toLowerCase(); - const isSingleValueHeader = kSingleValueHeaders.has(key); + const isStrictSingleValueField = strictSingleValueFields && + kSingleValueFields.has(key); let isArray = ArrayIsArray(value); if (isArray) { switch (value.length) { @@ -776,13 +788,13 @@ function buildNgHeaderString(arrayOrMap, isArray = false; break; default: - if (isSingleValueHeader) + if (isStrictSingleValueField) throw new ERR_HTTP2_HEADER_SINGLE_VALUE(key); } } else { value = String(value); } - if (isSingleValueHeader) { + if (isStrictSingleValueField) { if (singles.has(key)) throw new ERR_HTTP2_HEADER_SINGLE_VALUE(key); singles.add(key); @@ -791,7 +803,7 @@ function buildNgHeaderString(arrayOrMap, kNeverIndexFlag : kNoHeaderFlags; if (key[0] === ':') { - const err = assertValuePseudoHeader(key); + const err = validatePseudoHeaderValue(key); if (err !== undefined) throw err; pseudoHeaders += `${key}\0${value}\0${flags}`; @@ -893,7 +905,7 @@ function toHeaderObject(headers, sensitiveHeaders) { const existing = obj[name]; if (existing === undefined) { obj[name] = name === HTTP2_HEADER_SET_COOKIE ? [value] : value; - } else if (!kSingleValueHeaders.has(name)) { + } else if (!kSingleValueFields.has(name)) { switch (name) { case HTTP2_HEADER_COOKIE: // https://tools.ietf.org/html/rfc7540#section-8.1.2.5 @@ -970,6 +982,7 @@ module.exports = { isPayloadMeaningless, kAuthority, kSensitiveHeaders, + kStrictSingleValueFields, kSocket, kProtocol, kProxySocket, diff --git a/lib/internal/main/embedding.js b/lib/internal/main/embedding.js index 91a12f755e6abc..863f90a32f40ac 100644 --- a/lib/internal/main/embedding.js +++ b/lib/internal/main/embedding.js @@ -15,16 +15,12 @@ const { const { isExperimentalSeaWarningNeeded, isSea } = internalBinding('sea'); const { emitExperimentalWarning } = require('internal/util'); const { emitWarningSync } = require('internal/process/warning'); -const { BuiltinModule } = require('internal/bootstrap/realm'); -const { normalizeRequirableId } = BuiltinModule; const { Module } = require('internal/modules/cjs/loader'); const { compileFunctionForCJSLoader } = internalBinding('contextify'); const { maybeCacheSourceMap } = require('internal/source_map/source_map_cache'); -const { codes: { - ERR_UNKNOWN_BUILTIN_MODULE, -} } = require('internal/errors'); const { pathToFileURL } = require('internal/url'); -const { loadBuiltinModule } = require('internal/modules/helpers'); +const { loadBuiltinModuleForEmbedder } = require('internal/modules/helpers'); +const { compileSourceTextModule, SourceTextModuleTypes: { kEmbedder } } = require('internal/modules/esm/utils'); const { moduleFormats } = internalBinding('modules'); const assert = require('internal/assert'); const path = require('path'); @@ -34,7 +30,6 @@ const path = require('path'); prepareMainThreadExecution(false, true); const isLoadingSea = isSea(); -const isBuiltinWarningNeeded = isLoadingSea && isExperimentalSeaWarningNeeded(); if (isExperimentalSeaWarningNeeded()) { emitExperimentalWarning('Single executable application'); } @@ -65,6 +60,7 @@ function embedderRunCjs(content, filename) { filename, isLoadingSea, // is_sea_main false, // should_detect_module, ESM should be supported differently for embedded code + true, // is_embedder ); // Cache the source map for the module if present. if (sourceMapURL) { @@ -103,28 +99,8 @@ function embedderRunCjs(content, filename) { ); } -let warnedAboutBuiltins = false; -function warnNonBuiltinInSEA() { - if (isBuiltinWarningNeeded && !warnedAboutBuiltins) { - emitWarningSync( - 'Currently the require() provided to the main script embedded into ' + - 'single-executable applications only supports loading built-in modules.\n' + - 'To load a module from disk after the single executable application is ' + - 'launched, use require("module").createRequire().\n' + - 'Support for bundled module loading or virtual file systems are under ' + - 'discussions in https://github.com/nodejs/single-executable'); - warnedAboutBuiltins = true; - } -} - function embedderRequire(id) { - const normalizedId = normalizeRequirableId(id); - - if (!normalizedId) { - warnNonBuiltinInSEA(); - throw new ERR_UNKNOWN_BUILTIN_MODULE(id); - } - return require(normalizedId); + return loadBuiltinModuleForEmbedder(id).exports; } function embedderRunESM(content, filename) { @@ -134,31 +110,10 @@ function embedderRunESM(content, filename) { } else { resourceName = filename; } - const { compileSourceTextModule } = require('internal/modules/esm/utils'); - // TODO(joyeecheung): support code cache, dynamic import() and import.meta. - const wrap = compileSourceTextModule(resourceName, content); - // Cache the source map for the module if present. - if (wrap.sourceMapURL) { - maybeCacheSourceMap(resourceName, content, wrap, false, undefined, wrap.sourceMapURL); - } - const requests = wrap.getModuleRequests(); - const modules = []; - for (let i = 0; i < requests.length; ++i) { - const { specifier } = requests[i]; - const normalizedId = normalizeRequirableId(specifier); - if (!normalizedId) { - warnNonBuiltinInSEA(); - throw new ERR_UNKNOWN_BUILTIN_MODULE(specifier); - } - const mod = loadBuiltinModule(normalizedId); - if (!mod) { - throw new ERR_UNKNOWN_BUILTIN_MODULE(specifier); - } - modules.push(mod.getESMFacade()); - } - wrap.link(modules); - wrap.instantiate(); - wrap.evaluate(-1, false); + // TODO(joyeecheung): allow configuration from node::ModuleData, + // either via a more generic context object, or something like import.meta extensions. + const context = { isMain: true, __proto__: null }; + const wrap = compileSourceTextModule(resourceName, content, kEmbedder, context); // TODO(joyeecheung): we may want to return the v8::Module via a vm.SourceTextModule // when vm.SourceTextModule stablizes, or put it in an out parameter. diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index 225436661f5e56..06c2c8602da444 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -18,7 +18,7 @@ const { triggerUncaughtException, exitCodes: { kNoFailure }, } = internalBinding('errors'); -const { getOptionValue, getOptionsAsFlagsFromBinding } = require('internal/options'); +const { getOptionValue } = require('internal/options'); const { FilesWatcher } = require('internal/watch_mode/files_watcher'); const { green, blue, red, white, clear } = require('internal/util/colors'); const { convertToValidSignal } = require('internal/util'); @@ -44,14 +44,13 @@ const kCommand = ArrayPrototypeSlice(process.argv, 1); const kCommandStr = inspect(ArrayPrototypeJoin(kCommand, ' ')); const argsWithoutWatchOptions = []; -const argsFromBinding = getOptionsAsFlagsFromBinding(); -for (let i = 0; i < argsFromBinding.length; i++) { - const arg = argsFromBinding[i]; +for (let i = 0; i < process.execArgv.length; i++) { + const arg = process.execArgv[i]; if (StringPrototypeStartsWith(arg, '--watch=')) { continue; } if (arg === '--watch') { - const nextArg = argsFromBinding[i + 1]; + const nextArg = process.execArgv[i + 1]; if (nextArg && nextArg[0] !== '-') { // If `--watch` doesn't include `=` and the next // argument is not a flag then it is interpreted as diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index 6a841a2f72f485..a320736d1b6fd7 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -1931,6 +1931,15 @@ Module._extensions['.js'] = function(module, filename) { } else { format = 'typescript'; } + } else if (path.extname(filename) === '') { + // Extensionless files skip the .js suffix check above. When type is explicit, + // follow it so ESM syntax surfaces as SyntaxError for commonjs instead of + // silently delegating to ESM. + pkg = packageJsonReader.getNearestParentPackageJSON(filename); + const typeFromPjson = pkg?.data?.type; + if (typeFromPjson === 'commonjs' || typeFromPjson === 'module') { + format = typeFromPjson; + } } const { source, format: loadedFormat } = loadSource(module, filename, format); // Function require shouldn't be used in ES modules when require(esm) is disabled. diff --git a/lib/internal/modules/esm/create_dynamic_module.js b/lib/internal/modules/esm/create_dynamic_module.js index 068893ce4361f1..bceae4ad2517af 100644 --- a/lib/internal/modules/esm/create_dynamic_module.js +++ b/lib/internal/modules/esm/create_dynamic_module.js @@ -58,8 +58,10 @@ ${ArrayPrototypeJoin(ArrayPrototypeMap(imports, createImport), '\n')} ${ArrayPrototypeJoin(ArrayPrototypeMap(exports, createExport), '\n')} import.meta.done(); `; - const { registerModule, compileSourceTextModule } = require('internal/modules/esm/utils'); - const m = compileSourceTextModule(`${url}`, source); + const { + registerModule, compileSourceTextModule, SourceTextModuleTypes: { kFacade }, + } = require('internal/modules/esm/utils'); + const m = compileSourceTextModule(`${url}`, source, kFacade); const readyfns = new SafeSet(); /** @type {DynamicModuleReflect} */ diff --git a/lib/internal/modules/esm/formats.js b/lib/internal/modules/esm/formats.js deleted file mode 100644 index 6a18bd992fa1d9..00000000000000 --- a/lib/internal/modules/esm/formats.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -const { - RegExpPrototypeExec, -} = primordials; - -const { getOptionValue } = require('internal/options'); -const { getValidatedPath } = require('internal/fs/utils'); -const fsBindings = internalBinding('fs'); -const { internal: internalConstants } = internalBinding('constants'); - -const experimentalAddonModules = getOptionValue('--experimental-addon-modules'); - -const extensionFormatMap = { - '__proto__': null, - '.cjs': 'commonjs', - '.js': 'module', - '.json': 'json', - '.mjs': 'module', - '.wasm': 'wasm', -}; - -if (experimentalAddonModules) { - extensionFormatMap['.node'] = 'addon'; -} - -if (getOptionValue('--strip-types')) { - extensionFormatMap['.ts'] = 'module-typescript'; - extensionFormatMap['.mts'] = 'module-typescript'; - extensionFormatMap['.cts'] = 'commonjs-typescript'; -} - -/** - * @param {string} mime - * @returns {string | null} - */ -function mimeToFormat(mime) { - if ( - RegExpPrototypeExec( - /^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i, - mime, - ) !== null - ) { return 'module'; } - if (mime === 'application/json') { return 'json'; } - if (mime === 'application/wasm') { return 'wasm'; } - return null; -} - -/** - * For extensionless files in a `module` package scope, we check the file contents to disambiguate between ES module - * JavaScript and Wasm. - * We do this by taking advantage of the fact that all Wasm files start with the header `0x00 0x61 0x73 0x6d` (`_asm`). - * @param {URL} url - * @returns {'wasm'|'module'} - */ -function getFormatOfExtensionlessFile(url) { - const path = getValidatedPath(url); - switch (fsBindings.getFormatOfExtensionlessFile(path)) { - case internalConstants.EXTENSIONLESS_FORMAT_WASM: - return 'wasm'; - default: - return 'module'; - } -} - -module.exports = { - extensionFormatMap, - getFormatOfExtensionlessFile, - mimeToFormat, -}; diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js index 48ccb97a6244ea..4f334c7d88c336 100644 --- a/lib/internal/modules/esm/get_format.js +++ b/lib/internal/modules/esm/get_format.js @@ -9,13 +9,63 @@ const { StringPrototypeSlice, } = primordials; const { getOptionValue } = require('internal/options'); -const { - extensionFormatMap, - getFormatOfExtensionlessFile, - mimeToFormat, -} = require('internal/modules/esm/formats'); +const { getValidatedPath } = require('internal/fs/utils'); +const fsBindings = internalBinding('fs'); +const { internal: internalConstants } = internalBinding('constants'); + +const extensionFormatMap = { + '__proto__': null, + '.cjs': 'commonjs', + '.js': 'module', + '.json': 'json', + '.mjs': 'module', + '.wasm': 'wasm', +}; + +function initializeExtensionFormatMap() { + if (getOptionValue('--experimental-addon-modules')) { + extensionFormatMap['.node'] = 'addon'; + } + + if (getOptionValue('--strip-types')) { + extensionFormatMap['.ts'] = 'module-typescript'; + extensionFormatMap['.mts'] = 'module-typescript'; + extensionFormatMap['.cts'] = 'commonjs-typescript'; + } +} -const detectModule = getOptionValue('--experimental-detect-module'); +/** + * @param {string} mime + * @returns {string | null} + */ +function mimeToFormat(mime) { + if ( + RegExpPrototypeExec( + /^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i, + mime, + ) !== null + ) { return 'module'; } + if (mime === 'application/json') { return 'json'; } + if (mime === 'application/wasm') { return 'wasm'; } + return null; +} + +/** + * For extensionless files in a `module` package scope, we check the file contents to disambiguate between ES module + * JavaScript and Wasm. + * We do this by taking advantage of the fact that all Wasm files start with the header `0x00 0x61 0x73 0x6d` (`_asm`). + * @param {URL} url + * @returns {'wasm'|'module'} + */ +function getFormatOfExtensionlessFile(url) { + const path = getValidatedPath(url); + switch (fsBindings.getFormatOfExtensionlessFile(path)) { + case internalConstants.EXTENSIONLESS_FORMAT_WASM: + return 'wasm'; + default: + return 'module'; + } +} const { containsModuleSyntax } = internalBinding('contextify'); const { getPackageScopeConfig, getPackageType } = require('internal/modules/package_json_reader'); const { fileURLToPath } = require('internal/url'); @@ -35,6 +85,7 @@ const protocolHandlers = { * @returns {'module'|'commonjs'} */ function detectModuleFormat(source, url) { + const detectModule = getOptionValue('--experimental-detect-module'); if (!source) { return detectModule ? null : 'commonjs'; } if (!detectModule) { return 'commonjs'; } return containsModuleSyntax(`${source}`, fileURLToPath(url), url) ? 'module' : 'commonjs'; @@ -216,4 +267,5 @@ module.exports = { defaultGetFormatWithoutErrors, extensionFormatMap, extname, + initializeExtensionFormatMap, }; diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 0bff0763fcf58f..37eb267e154cc7 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -34,6 +34,7 @@ const { isURL, pathToFileURL } = require('internal/url'); const { kEmptyObject } = require('internal/util'); const { compileSourceTextModule, + SourceTextModuleTypes: { kUser }, getDefaultConditions, shouldSpawnLoaderHookWorker, requestTypes: { kImportInRequiredESM, kRequireInImportedCJS, kImportInImportedESM }, @@ -64,8 +65,6 @@ const { validateLoadSloppy, } = require('internal/modules/customization_hooks'); -let defaultResolve, defaultLoadSync; - const { tracingChannel } = require('diagnostics_channel'); const onImport = tracingChannel('module.import'); @@ -99,19 +98,9 @@ function newLoadCache() { return new LoadCache(); } -let _translators; -function lazyLoadTranslators() { - _translators ??= require('internal/modules/esm/translators'); - return _translators; -} - -/** - * Lazy-load translators to avoid potentially unnecessary work at startup (ex if ESM is not used). - * @returns {import('./translators.js').Translators} - */ -function getTranslators() { - return lazyLoadTranslators().translators; -} +const { translators } = require('internal/modules/esm/translators'); +const { defaultResolve } = require('internal/modules/esm/resolve'); +const { defaultLoadSync, throwUnknownModuleFormat } = require('internal/modules/esm/load'); /** * Generate message about potential race condition caused by requiring a cached module that has started @@ -180,11 +169,6 @@ class ModuleLoader { */ loadCache = newLoadCache(); - /** - * Methods which translate input code or other information into ES modules - */ - translators = getTranslators(); - /** * @see {AsyncLoaderHooks.isForAsyncLoaderHookWorker} * Shortcut to this.#asyncLoaderHooks.isForAsyncLoaderHookWorker. @@ -244,7 +228,7 @@ class ModuleLoader { * @returns {object} The module wrap object. */ createModuleWrap(source, url, context = kEmptyObject) { - return compileSourceTextModule(url, source, this, context); + return compileSourceTextModule(url, source, kUser, context); } /** @@ -371,7 +355,7 @@ class ModuleLoader { // TODO(joyeecheung): refactor this so that we pre-parse in C++ and hit the // cache here, or use a carrier object to carry the compiled module script // into the constructor to ensure cache hit. - const wrap = compileSourceTextModule(url, source, this); + const wrap = compileSourceTextModule(url, source, kUser); const inspectBrk = (isMain && getOptionValue('--inspect-brk')); const { ModuleJobSync } = require('internal/modules/esm/module_job'); @@ -458,7 +442,7 @@ class ModuleLoader { #translate(url, translateContext, parentURL) { const { translatorKey, format } = translateContext; this.validateLoadResult(url, format); - const translator = getTranslators().get(translatorKey); + const translator = translators.get(translatorKey); if (!translator) { throw new ERR_UNKNOWN_MODULE_FORMAT(translatorKey, url); @@ -709,7 +693,7 @@ class ModuleLoader { if (cachedResult != null) { return cachedResult; } - defaultResolve ??= require('internal/modules/esm/resolve').defaultResolve; + const result = defaultResolve(specifier, context); this.#resolveCache.set(requestKey, parentURL, result); return result; @@ -786,7 +770,6 @@ class ModuleLoader { if (this.#asyncLoaderHooks?.loadSync) { return this.#asyncLoaderHooks.loadSync(url, context); } - defaultLoadSync ??= require('internal/modules/esm/load').defaultLoadSync; return defaultLoadSync(url, context); } @@ -812,7 +795,7 @@ class ModuleLoader { validateLoadResult(url, format) { if (format == null) { - require('internal/modules/esm/load').throwUnknownModuleFormat(url, format); + throwUnknownModuleFormat(url, format); } } diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index cc1230648881d8..d253a3ff67280c 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -29,9 +29,6 @@ const { realpathSync } = require('fs'); const { getOptionValue } = require('internal/options'); // Do not eagerly grab .manifest, it may be in TDZ const { sep, posix: { relative: relativePosixPath }, resolve } = require('path'); -const preserveSymlinks = getOptionValue('--preserve-symlinks'); -const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); -const inputTypeFlag = getOptionValue('--input-type'); const { URL, pathToFileURL, fileURLToPath, isURL, URLParse } = require('internal/url'); const { getCWDURL, setOwnProperty } = require('internal/util'); const { canParse: URLCanParse } = internalBinding('url'); @@ -49,8 +46,7 @@ const { ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST, } = require('internal/errors').codes; - -const { Module: CJSModule } = require('internal/modules/cjs/loader'); +const { defaultGetFormatWithoutErrors } = require('internal/modules/esm/get_format'); const { getConditionsSet } = require('internal/modules/esm/utils'); const packageJsonReader = require('internal/modules/package_json_reader'); const internalFsBinding = internalBinding('fs'); @@ -873,6 +869,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) { */ function resolveAsCommonJS(specifier, parentURL) { try { + const { Module: CJSModule } = require('internal/modules/cjs/loader'); const parent = fileURLToPath(parentURL); const tmpModule = new CJSModule(parent, null); tmpModule.paths = CJSModule._nodeModulePaths(parent); @@ -982,7 +979,7 @@ function defaultResolve(specifier, context = {}) { // input, to avoid user confusion over how expansive the effect of the // flag should be (i.e. entry point only, package scope surrounding the // entry point, etc.). - if (inputTypeFlag) { throw new ERR_INPUT_TYPE_NOT_ALLOWED(); } + if (getOptionValue('--input-type')) { throw new ERR_INPUT_TYPE_NOT_ALLOWED(); } } conditions = getConditionsSet(conditions); @@ -992,7 +989,7 @@ function defaultResolve(specifier, context = {}) { specifier, parentURL, conditions, - isMain ? preserveSymlinksMain : preserveSymlinks, + isMain ? getOptionValue('--preserve-symlinks-main') : getOptionValue('--preserve-symlinks'), ); } catch (error) { // Try to give the user a hint of what would have been the @@ -1046,8 +1043,3 @@ module.exports = { packageResolve, throwIfInvalidParentURL, }; - -// cycle -const { - defaultGetFormatWithoutErrors, -} = require('internal/modules/esm/get_format'); diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 74e90edb5b3a72..8cf008d52ab380 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -13,7 +13,7 @@ const { StringPrototypeReplaceAll, StringPrototypeSlice, StringPrototypeStartsWith, - globalThis: { WebAssembly }, + globalThis, } = primordials; const { @@ -57,16 +57,7 @@ const { maybeCacheSourceMap } = require('internal/source_map/source_map_cache'); const moduleWrap = internalBinding('module_wrap'); const { ModuleWrap, kEvaluationPhase } = moduleWrap; -// Lazy-loading to avoid circular dependencies. -let getSourceSync; -/** - * @param {Parameters[0]} url - * @returns {ReturnType} - */ -function getSource(url) { - getSourceSync ??= require('internal/modules/esm/load').getSourceSync; - return getSourceSync(url); -} +const { getSourceSync } = require('internal/modules/esm/load'); const { parse: cjsParse } = internalBinding('cjs_lexer'); @@ -93,9 +84,11 @@ translators.set('module', function moduleStrategy(url, translateContext, parentU assertBufferSource(source, true, 'load'); source = stringify(source); debug(`Translating StandardModule ${url}`, translateContext); - const { compileSourceTextModule } = require('internal/modules/esm/utils'); + const { + compileSourceTextModule, SourceTextModuleTypes: { kUser }, + } = require('internal/modules/esm/utils'); const context = isMain ? { isMain } : undefined; - const module = compileSourceTextModule(url, source, this, context); + const module = compileSourceTextModule(url, source, kUser, context); return module; }); @@ -142,8 +135,8 @@ function loadCJSModule(module, source, url, filename, isMain) { specifier = `${pathToFileURL(path)}`; } - // FIXME(node:59666) Currently, the ESM loader re-invents require() here for imported CJS and this - // requires a separate cache to be populated as well as introducing several quirks. This is not ideal. + // NOTE: This re-invented require() is only used on the loader-hook worker thread. + // On the main thread, the authentic require() is used instead (fixed by #60380). const request = { specifier, attributes: importAttributes, phase: kEvaluationPhase, __proto__: null }; const job = cascadedLoader.getOrCreateModuleJob(url, request, kRequireInImportedCJS); job.runSync(); @@ -208,7 +201,7 @@ function createCJSModuleWrap(url, translateContext, parentURL, loadCJS = loadCJS const isMain = (parentURL === undefined); const filename = urlToFilename(url); // In case the source was not provided by the `load` step, we need fetch it now. - source = stringify(source ?? getSource(new URL(url)).source); + source = stringify(source ?? getSourceSync(new URL(url)).source); const { exportNames, module } = cjsPreparseModuleExports(filename, source, sourceFormat); cjsCache.set(url, module); @@ -514,6 +507,8 @@ translators.set('json', function jsonStrategy(url, translateContext) { const wasmInstances = new SafeWeakMap(); translators.set('wasm', function(url, translateContext) { const { source } = translateContext; + // WebAssembly global is not available during snapshot building, so we need to get it lazily. + const { WebAssembly } = globalThis; assertBufferSource(source, false, 'load'); debug(`Translating WASMModule ${url}`, translateContext); diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js index e28ecd923cb597..f977bfaf57498f 100644 --- a/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js @@ -14,6 +14,7 @@ const { }, } = internalBinding('util'); const { + embedder_module_hdo, source_text_module_default_hdo, vm_dynamic_import_default_internal, vm_dynamic_import_main_context_default, @@ -43,6 +44,7 @@ const { const assert = require('internal/assert'); const { normalizeReferrerURL, + loadBuiltinModuleForEmbedder, } = require('internal/modules/helpers'); let defaultConditions; @@ -226,6 +228,28 @@ function defaultImportModuleDynamicallyForScript(specifier, phase, attributes, r return cascadedLoader.import(specifier, parentURL, attributes, phase); } +/** + * Loads the built-in and wraps it in a ModuleWrap for embedder ESM. + * @param {string} specifier + * @returns {ModuleWrap} + */ +function getBuiltinModuleWrapForEmbedder(specifier) { + return loadBuiltinModuleForEmbedder(specifier).getESMFacade(); +} + +/** + * Get the built-in module dynamically for embedder ESM. + * @param {string} specifier - The module specifier string. + * @param {number} phase - The module import phase. Ignored for now. + * @param {Record} attributes - The import attributes object. Ignored for now. + * @param {string|null|undefined} referrerName - name of the referrer. + * @returns {import('internal/modules/esm/loader.js').ModuleExports} - The imported module object. + */ +function importModuleDynamicallyForEmbedder(specifier, phase, attributes, referrerName) { + // Ignore phase and attributes for embedder ESM for now, because this only supports loading builtins. + return getBuiltinModuleWrapForEmbedder(specifier).getNamespace(); +} + /** * Asynchronously imports a module dynamically using a callback function. The native callback. * @param {symbol} referrerSymbol - Referrer symbol of the registered script, function, module, or contextified object. @@ -253,6 +277,10 @@ async function importModuleDynamicallyCallback(referrerSymbol, specifier, phase, if (referrerSymbol === source_text_module_default_hdo) { return defaultImportModuleDynamicallyForModule(specifier, phase, attributes, referrerName); } + // For embedder entry point ESM, only allow built-in modules. + if (referrerSymbol === embedder_module_hdo) { + return importModuleDynamicallyForEmbedder(specifier, phase, attributes, referrerName); + } if (moduleRegistries.has(referrerSymbol)) { const { importModuleDynamically, callbackReferrer } = moduleRegistries.get(referrerSymbol); @@ -290,21 +318,42 @@ function shouldSpawnLoaderHookWorker() { return _shouldSpawnLoaderHookWorker; } +const SourceTextModuleTypes = { + kInternal: 'internal', // TODO(joyeecheung): support internal ESM. + kEmbedder: 'embedder', // Embedder ESM, also used by SEA + kUser: 'user', // User-land ESM + kFacade: 'facade', // Currently only used by the facade that proxies WASM module import/exports. +}; + /** * Compile a SourceTextModule for the built-in ESM loader. Register it for default * source map and import.meta and dynamic import() handling if cascadedLoader is provided. * @param {string} url URL of the module. * @param {string} source Source code of the module. - * @param {typeof import('./loader.js').ModuleLoader|undefined} cascadedLoader If provided, - * register the module for default handling. + * @param {string} type Type of the source text module, one of SourceTextModuleTypes. * @param {{ isMain?: boolean }|undefined} context - context object containing module metadata. * @returns {ModuleWrap} */ -function compileSourceTextModule(url, source, cascadedLoader, context = kEmptyObject) { - const hostDefinedOption = cascadedLoader ? source_text_module_default_hdo : undefined; - const wrap = new ModuleWrap(url, undefined, source, 0, 0, hostDefinedOption); +function compileSourceTextModule(url, source, type, context = kEmptyObject) { + let hostDefinedOptions; + switch (type) { + case SourceTextModuleTypes.kFacade: + case SourceTextModuleTypes.kInternal: + hostDefinedOptions = undefined; + break; + case SourceTextModuleTypes.kEmbedder: + hostDefinedOptions = embedder_module_hdo; + break; + case SourceTextModuleTypes.kUser: + hostDefinedOptions = source_text_module_default_hdo; + break; + default: + assert.fail(`Unknown SourceTextModule type: ${type}`); + } + + const wrap = new ModuleWrap(url, undefined, source, 0, 0, hostDefinedOptions); - if (!cascadedLoader) { + if (type === SourceTextModuleTypes.kFacade) { return wrap; } @@ -317,10 +366,18 @@ function compileSourceTextModule(url, source, cascadedLoader, context = kEmptyOb if (wrap.sourceMapURL) { maybeCacheSourceMap(url, source, wrap, false, wrap.sourceURL, wrap.sourceMapURL); } + + if (type === SourceTextModuleTypes.kEmbedder) { + // For embedder ESM, we also handle the linking and evaluation. + const requests = wrap.getModuleRequests(); + const modules = requests.map(({ specifier }) => getBuiltinModuleWrapForEmbedder(specifier)); + wrap.link(modules); + wrap.instantiate(); + wrap.evaluate(-1, false); + } return wrap; } - const kImportInImportedESM = Symbol('kImportInImportedESM'); const kImportInRequiredESM = Symbol('kImportInRequiredESM'); const kRequireInImportedCJS = Symbol('kRequireInImportedCJS'); @@ -331,11 +388,13 @@ const kRequireInImportedCJS = Symbol('kRequireInImportedCJS'); const requestTypes = { kImportInImportedESM, kImportInRequiredESM, kRequireInImportedCJS }; module.exports = { + embedder_module_hdo, registerModule, initializeESM, getDefaultConditions, getConditionsSet, shouldSpawnLoaderHookWorker, compileSourceTextModule, + SourceTextModuleTypes, requestTypes, }; diff --git a/lib/internal/modules/helpers.js b/lib/internal/modules/helpers.js index b04ac126cd35b9..01739fefd6a7f1 100644 --- a/lib/internal/modules/helpers.js +++ b/lib/internal/modules/helpers.js @@ -15,6 +15,7 @@ const { const { ERR_INVALID_ARG_TYPE, ERR_INVALID_RETURN_PROPERTY_VALUE, + ERR_UNKNOWN_BUILTIN_MODULE, } = require('internal/errors').codes; const { BuiltinModule } = require('internal/bootstrap/realm'); @@ -28,6 +29,7 @@ const assert = require('internal/assert'); const { getOptionValue } = require('internal/options'); const { setOwnProperty, getLazy } = require('internal/util'); const { inspect } = require('internal/util/inspect'); +const { emitWarningSync } = require('internal/process/warning'); const lazyTmpdir = getLazy(() => require('os').tmpdir()); const { join } = path; @@ -126,6 +128,42 @@ function loadBuiltinModule(id) { return mod; } +let isSEABuiltinWarningNeeded_; +function isSEABuiltinWarningNeeded() { + if (isSEABuiltinWarningNeeded_ === undefined) { + const { isExperimentalSeaWarningNeeded, isSea } = internalBinding('sea'); + isSEABuiltinWarningNeeded_ = isSea() && isExperimentalSeaWarningNeeded(); + } + return isSEABuiltinWarningNeeded_; +} + +let warnedAboutBuiltins = false; +/** + * Helpers to load built-in modules for embedder modules. + * @param {string} id + * @returns {import('internal/bootstrap/realm.js').BuiltinModule} + */ +function loadBuiltinModuleForEmbedder(id) { + const normalized = BuiltinModule.normalizeRequirableId(id); + if (normalized) { + const mod = loadBuiltinModule(normalized); + if (mod) { + return mod; + } + } + if (isSEABuiltinWarningNeeded() && !warnedAboutBuiltins) { + emitWarningSync( + 'Currently the require() provided to the main script embedded into ' + + 'single-executable applications only supports loading built-in modules.\n' + + 'To load a module from disk after the single executable application is ' + + 'launched, use require("module").createRequire().\n' + + 'Support for bundled module loading or virtual file systems are under ' + + 'discussions in https://github.com/nodejs/single-executable'); + warnedAboutBuiltins = true; + } + throw new ERR_UNKNOWN_BUILTIN_MODULE(id); +} + /** @type {Module} */ let $Module = null; /** @@ -469,6 +507,7 @@ module.exports = { getCjsConditionsArray, getCompileCacheDir, initializeCjsConditions, + loadBuiltinModuleForEmbedder, loadBuiltinModule, makeRequireFunction, normalizeReferrerURL, diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js index 283ec72d388572..2a6480c79738dd 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js @@ -161,6 +161,9 @@ function prepareExecution(options) { assert(!initializeModules); } + const { initializeExtensionFormatMap } = require('internal/modules/esm/get_format'); + initializeExtensionFormatMap(); + setupVmModules(); if (initializeModules) { initializeModuleLoaders({ shouldSpawnLoaderHookWorker, shouldPreloadModules }); diff --git a/lib/internal/quic/quic.js b/lib/internal/quic/quic.js index 459906d270dab6..026c0784f0bbe8 100644 --- a/lib/internal/quic/quic.js +++ b/lib/internal/quic/quic.js @@ -112,6 +112,7 @@ const { const { buildNgHeaderString, + assertValidPseudoHeader, } = require('internal/http2/util'); const kEmptyObject = { __proto__: null }; @@ -887,8 +888,13 @@ class QuicStream { } else { debug(`stream ${this.id} sending headers`, headers); } + const headerString = buildNgHeaderString( + headers, + assertValidPseudoHeader, + true, // This could become an option in future + ); // TODO(@jasnell): Support differentiating between early headers, primary headers, etc - return this.#handle.sendHeaders(1, buildNgHeaderString(headers), 1); + return this.#handle.sendHeaders(1, headerString, 1); } [kFinishClose](error) { diff --git a/lib/internal/repl/completion.js b/lib/internal/repl/completion.js index a16b7af0d1732c..8587e5e5b2333b 100644 --- a/lib/internal/repl/completion.js +++ b/lib/internal/repl/completion.js @@ -48,7 +48,7 @@ const CJSModule = require('internal/modules/cjs/loader').Module; const { extensionFormatMap, -} = require('internal/modules/esm/formats'); +} = require('internal/modules/esm/get_format'); const path = require('path'); const fs = require('fs'); diff --git a/lib/internal/repl/history.js b/lib/internal/repl/history.js index ed63ba01cb1be1..e95056ed5c466b 100644 --- a/lib/internal/repl/history.js +++ b/lib/internal/repl/history.js @@ -327,6 +327,7 @@ class ReplHistory { await this[kFlushHistory](); } catch (err) { + await this[kCloseHandle](); return this[kHandleHistoryInitError](err, onReadyCallback); } } diff --git a/lib/internal/streams/readable.js b/lib/internal/streams/readable.js index 0218f3f427ea99..06fcd95104356e 100644 --- a/lib/internal/streams/readable.js +++ b/lib/internal/streams/readable.js @@ -1664,7 +1664,7 @@ function fromList(n, state) { n -= str.length; buf[idx++] = null; } else { - if (n === buf.length) { + if (n === str.length) { ret += str; buf[idx++] = null; } else { diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index 6b3b13b2c88d65..5418a14a4410a4 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -3,6 +3,7 @@ const { ArrayPrototypeForEach, ArrayPrototypePush, FunctionPrototypeBind, + Promise, PromiseResolve, PromiseWithResolvers, SafeMap, @@ -32,7 +33,7 @@ const { PassThrough, compose } = require('stream'); const { reportReruns } = require('internal/test_runner/reporter/rerun'); const { queueMicrotask } = require('internal/process/task_queues'); const { TIMEOUT_MAX } = require('internal/timers'); -const { clearInterval, setInterval } = require('timers'); +const { clearInterval, setImmediate, setInterval } = require('timers'); const { bigint: hrtime } = process.hrtime; const testResources = new SafeMap(); let globalRoot; @@ -289,7 +290,33 @@ function setupProcessState(root, globalOptions) { } }; + const findRunningTests = (test, running = []) => { + if (test.startTime !== null && !test.finished) { + for (let i = 0; i < test.subtests.length; i++) { + findRunningTests(test.subtests[i], running); + } + // Only add leaf tests (innermost running tests) + if (test.activeSubtests === 0 && test.name !== '') { + ArrayPrototypePush(running, { + __proto__: null, + name: test.name, + nesting: test.nesting, + file: test.loc?.file, + line: test.loc?.line, + column: test.loc?.column, + }); + } + } + return running; + }; + const terminationHandler = async () => { + const runningTests = findRunningTests(root); + if (runningTests.length > 0) { + root.reporter.interrupted(runningTests); + // Allow the reporter stream to process the interrupted event + await new Promise((resolve) => setImmediate(resolve)); + } await exitHandler(true); process.exit(); }; diff --git a/lib/internal/test_runner/reporter/spec.js b/lib/internal/test_runner/reporter/spec.js index 14c447f316492f..fce0754e25061a 100644 --- a/lib/internal/test_runner/reporter/spec.js +++ b/lib/internal/test_runner/reporter/spec.js @@ -106,8 +106,31 @@ class SpecReporter extends Transform { break; case 'test:watch:restarted': return `\nRestarted at ${DatePrototypeToLocaleString(new Date())}\n`; + case 'test:interrupted': + return this.#formatInterruptedTests(data.tests); } } + #formatInterruptedTests(tests) { + if (tests.length === 0) { + return ''; + } + + const results = [ + `\n${colors.yellow}Interrupted while running:${colors.white}\n`, + ]; + + for (let i = 0; i < tests.length; i++) { + const test = tests[i]; + let msg = `${indent(test.nesting)}${reporterUnicodeSymbolMap['warning:alert']}${test.name}`; + if (test.file) { + const relPath = relative(this.#cwd, test.file); + msg += ` ${colors.gray}(${relPath}:${test.line}:${test.column})${colors.white}`; + } + ArrayPrototypePush(results, msg); + } + + return ArrayPrototypeJoin(results, '\n') + '\n'; + } _transform({ type, data }, encoding, callback) { callback(null, this.#handleEvent({ __proto__: null, type, data })); } diff --git a/lib/internal/test_runner/reporter/tap.js b/lib/internal/test_runner/reporter/tap.js index 01c698871b9134..5d25fdda15959f 100644 --- a/lib/internal/test_runner/reporter/tap.js +++ b/lib/internal/test_runner/reporter/tap.js @@ -61,6 +61,16 @@ async function * tapReporter(source) { case 'test:coverage': yield getCoverageReport(indent(data.nesting), data.summary, '# ', '', true); break; + case 'test:interrupted': + for (let i = 0; i < data.tests.length; i++) { + const test = data.tests[i]; + let msg = `Interrupted while running: ${test.name}`; + if (test.file) { + msg += ` at ${test.file}:${test.line}:${test.column}`; + } + yield `# ${tapEscape(msg)}\n`; + } + break; } } } diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index a545c450a3dceb..c508bd91ec185b 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -706,10 +706,12 @@ class Test extends AsyncResource { this.fn = () => { for (let i = 0; i < (previousAttempt.children?.length ?? 0); i++) { const child = previousAttempt.children[i]; - this.createSubtest(Test, child.name, { __proto__: null }, noop, { + const t = this.createSubtest(Test, child.name, { __proto__: null }, noop, { __proto__: null, loc: [child.line, child.column, child.file], - }, noop).start(); + }, noop); + t.endTime = t.startTime = hrtime(); + t.start(); } }; } diff --git a/lib/internal/test_runner/tests_stream.js b/lib/internal/test_runner/tests_stream.js index 7b64487696f53f..17b6890b5fc5df 100644 --- a/lib/internal/test_runner/tests_stream.js +++ b/lib/internal/test_runner/tests_stream.js @@ -149,6 +149,13 @@ class TestsStream extends Readable { }); } + interrupted(tests) { + this[kEmitMessage]('test:interrupted', { + __proto__: null, + tests, + }); + } + end() { this.#tryPush(null); } diff --git a/lib/internal/webstreams/adapters.js b/lib/internal/webstreams/adapters.js index 8d5c1d9fc6d9d0..ed9847f250f1ca 100644 --- a/lib/internal/webstreams/adapters.js +++ b/lib/internal/webstreams/adapters.js @@ -624,7 +624,7 @@ function newStreamReadableFromReadableStream(readableStream, options = kEmptyObj /** * @param {Duplex} duplex - * @param {{ type?: 'bytes' }} [options] + * @param {{ readableType?: 'bytes' }} [options] * @returns {ReadableWritablePair} */ function newReadableWritablePairFromDuplex(duplex, options = kEmptyObject) { @@ -641,9 +641,15 @@ function newReadableWritablePairFromDuplex(duplex, options = kEmptyObject) { validateObject(options, 'options'); + const readableOptions = { + __proto__: null, + // DEP0201: 'options.type' is a deprecated alias for 'options.readableType' + type: options.readableType ?? options.type, + }; + if (isDestroyed(duplex)) { const writable = new WritableStream(); - const readable = new ReadableStream({ type: options.type }); + const readable = new ReadableStream({ type: readableOptions.type }); writable.close(); readable.cancel(); return { readable, writable }; @@ -659,8 +665,8 @@ function newReadableWritablePairFromDuplex(duplex, options = kEmptyObject) { const readable = isReadable(duplex) ? - newReadableStreamFromStreamReadable(duplex, options) : - new ReadableStream({ type: options.type }); + newReadableStreamFromStreamReadable(duplex, readableOptions) : + new ReadableStream({ type: readableOptions.type }); if (!isReadable(duplex)) readable.cancel(); diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index f9b9e6b4fb2c3e..43cfcded03def4 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -860,6 +860,31 @@ class ReadableStreamDefaultReader { new ERR_INVALID_STATE.TypeError( 'The reader is not attached to a stream')); } + + const stream = this[kState].stream; + const controller = stream[kState].controller; + + // Fast path: if data is already buffered in a default controller, + // return a resolved promise immediately without creating a read request. + // This is spec-compliant because read() returns a Promise, and + // Promise.resolve() callbacks still run in the microtask queue. + if (stream[kState].state === 'readable' && + isReadableStreamDefaultController(controller) && + controller[kState].queue.length > 0) { + stream[kState].disturbed = true; + const chunk = dequeueValue(controller); + + if (controller[kState].closeRequested && !controller[kState].queue.length) { + readableStreamDefaultControllerClearAlgorithms(controller); + readableStreamClose(stream); + } else { + readableStreamDefaultControllerCallPullIfNeeded(controller); + } + + return PromiseResolve({ value: chunk, done: false }); + } + + // Slow path: create request and go through normal flow const readRequest = new DefaultReadRequest(); readableStreamDefaultReaderRead(this, readRequest); return readRequest.promise; @@ -1286,6 +1311,8 @@ const isReadableStream = isBrandCheck('ReadableStream'); const isReadableByteStreamController = isBrandCheck('ReadableByteStreamController'); +const isReadableStreamDefaultController = + isBrandCheck('ReadableStreamDefaultController'); const isReadableStreamBYOBRequest = isBrandCheck('ReadableStreamBYOBRequest'); const isReadableStreamDefaultReader = @@ -1510,6 +1537,57 @@ function readableStreamPipeTo( await writer[kState].ready.promise; + const controller = source[kState].controller; + + // Fast path: batch reads when data is buffered in a default controller. + // This avoids creating PipeToReadableStreamReadRequest objects and + // reduces promise allocation overhead. + if (source[kState].state === 'readable' && + isReadableStreamDefaultController(controller) && + controller[kState].queue.length > 0) { + + while (controller[kState].queue.length > 0) { + if (shuttingDown) return true; + + source[kState].disturbed = true; + const chunk = dequeueValue(controller); + + if (controller[kState].closeRequested && !controller[kState].queue.length) { + readableStreamDefaultControllerClearAlgorithms(controller); + readableStreamClose(source); + } + + // Write the chunk - we're already in a separate microtask from enqueue + // because we awaited writer[kState].ready.promise above + state.currentWrite = writableStreamDefaultWriterWrite(writer, chunk); + setPromiseHandled(state.currentWrite); + + // Check backpressure after each write + if (dest[kState].state === 'writable') { + const desiredSize = writer.desiredSize; + if (desiredSize !== null && desiredSize <= 0) { + // Backpressure - stop batch and wait for ready + break; + } + } + } + + // Trigger pull if needed after batch + if (source[kState].state === 'readable' && + !controller[kState].closeRequested) { + readableStreamDefaultControllerCallPullIfNeeded(controller); + } + + // Check if stream closed during batch + if (source[kState].state === 'closed') { + return true; + } + + // Yield to microtask queue between batches to allow events/signals to fire + return false; + } + + // Slow path: use read request for async reads const promise = PromiseWithResolvers(); // eslint-disable-next-line no-use-before-define readableStreamDefaultReaderRead(reader, new PipeToReadableStreamReadRequest(writer, state, promise)); diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 08e87d07e7eb80..2a4caed82cf7c5 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -112,8 +112,8 @@ if (isMainThread) { cwdCounter = new Uint32Array(constructSharedArrayBuffer(4)); const originalChdir = process.chdir; process.chdir = function(path) { - AtomicsAdd(cwdCounter, 0, 1); originalChdir(path); + AtomicsAdd(cwdCounter, 0, 1); }; } diff --git a/lib/net.js b/lib/net.js index cbde238ba0a2ce..e22ef4bfc4bff0 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1125,7 +1125,7 @@ function internalConnect( err = checkBindError(err, localPort, self._handle); if (err) { const ex = new ExceptionWithHostPort(err, 'bind', localAddress, localPort); - process.nextTick(emitErrorAndDestroy, self, ex); + self.destroy(ex); return; } } @@ -1135,7 +1135,7 @@ function internalConnect( if (addressType === 6 || addressType === 4) { if (self.blockList?.check(address, `ipv${addressType}`)) { - process.nextTick(emitErrorAndDestroy, self, new ERR_IP_BLOCKED(address)); + self.destroy(new ERR_IP_BLOCKED(address)); return; } const req = new TCPConnectWrap(); @@ -1167,20 +1167,12 @@ function internalConnect( } const ex = new ExceptionWithHostPort(err, 'connect', address, port, details); - process.nextTick(emitErrorAndDestroy, self, ex); + self.destroy(ex); } else if ((addressType === 6 || addressType === 4) && hasObserver('net')) { startPerf(self, kPerfHooksNetConnectContext, { type: 'net', name: 'connect', detail: { host: address, port } }); } } -// Helper function to defer socket destruction to the next tick. -// This ensures that error handlers have a chance to be set up -// before the error is emitted, particularly important when using -// http.request with a custom lookup function. -function emitErrorAndDestroy(self, err) { - self.destroy(err); -} - function internalConnectMultiple(context, canceled) { clearTimeout(context[kTimeout]); @@ -1194,11 +1186,11 @@ function internalConnectMultiple(context, canceled) { // All connections have been tried without success, destroy with error if (canceled || context.current === context.addresses.length) { if (context.errors.length === 0) { - process.nextTick(emitErrorAndDestroy, self, new ERR_SOCKET_CONNECTION_TIMEOUT()); + self.destroy(new ERR_SOCKET_CONNECTION_TIMEOUT()); return; } - process.nextTick(emitErrorAndDestroy, self, new NodeAggregateError(context.errors)); + self.destroy(new NodeAggregateError(context.errors)); return; } diff --git a/lib/sqlite.js b/lib/sqlite.js index 6d6ada72008f1c..db781a21ee1ce7 100644 --- a/lib/sqlite.js +++ b/lib/sqlite.js @@ -1,6 +1,3 @@ 'use strict'; -const { emitExperimentalWarning } = require('internal/util'); - -emitExperimentalWarning('SQLite'); module.exports = internalBinding('sqlite'); diff --git a/lib/util.js b/lib/util.js index ebd486addc7eb2..5d3c0c75a28fc5 100644 --- a/lib/util.js +++ b/lib/util.js @@ -25,7 +25,6 @@ const { ArrayIsArray, ArrayPrototypePop, ArrayPrototypePush, - ArrayPrototypeReduce, Error, ErrorCaptureStackTrace, FunctionPrototypeBind, @@ -37,8 +36,6 @@ const { ObjectSetPrototypeOf, ObjectValues, ReflectApply, - RegExp, - RegExpPrototypeSymbolReplace, StringPrototypeToWellFormed, } = primordials; @@ -104,13 +101,58 @@ function lazyAbortController() { let internalDeepEqual; -/** - * @param {string} [code] - * @returns {string} - */ -function escapeStyleCode(code) { - if (code === undefined) return ''; - return `\u001b[${code}m`; +// Pre-computed ANSI escape code constants +const kEscape = '\u001b['; +const kEscapeEnd = 'm'; + +// Codes for dim (2) and bold (1) - these share close code 22 +const kDimCode = 2; +const kBoldCode = 1; + +let styleCache; + +function getStyleCache() { + if (styleCache === undefined) { + styleCache = { __proto__: null }; + const colors = inspect.colors; + for (const key of ObjectKeys(colors)) { + const codes = colors[key]; + if (codes) { + const openNum = codes[0]; + const closeNum = codes[1]; + styleCache[key] = { + __proto__: null, + openSeq: kEscape + openNum + kEscapeEnd, + closeSeq: kEscape + closeNum + kEscapeEnd, + keepClose: openNum === kDimCode || openNum === kBoldCode, + }; + } + } + } + return styleCache; +} + +function replaceCloseCode(str, closeSeq, openSeq, keepClose) { + const closeLen = closeSeq.length; + let index = str.indexOf(closeSeq); + if (index === -1) return str; + + let result = ''; + let lastIndex = 0; + const replacement = keepClose ? closeSeq + openSeq : openSeq; + + do { + const afterClose = index + closeLen; + if (afterClose < str.length) { + result += str.slice(lastIndex, index) + replacement; + lastIndex = afterClose; + } else { + break; + } + index = str.indexOf(closeSeq, lastIndex); + } while (index !== -1); + + return result + str.slice(lastIndex); } /** @@ -121,12 +163,29 @@ function escapeStyleCode(code) { * @param {Stream} [options.stream] - The stream used for validation. * @returns {string} */ -function styleText(format, text, { validateStream = true, stream = process.stdout } = {}) { +function styleText(format, text, options) { + const validateStream = options?.validateStream ?? true; + const cache = getStyleCache(); + + // Fast path: single format string with validateStream=false + if (!validateStream && typeof format === 'string' && typeof text === 'string') { + if (format === 'none') return text; + const style = cache[format]; + if (style !== undefined) { + const processed = replaceCloseCode(text, style.closeSeq, style.openSeq, style.keepClose); + return style.openSeq + processed + style.closeSeq; + } + } + validateString(text, 'text'); + if (options !== undefined) { + validateObject(options, 'options'); + } validateBoolean(validateStream, 'options.validateStream'); let skipColorize; if (validateStream) { + const stream = options?.stream ?? process.stdout; if ( !isReadableStream(stream) && !isWritableStream(stream) && @@ -134,71 +193,27 @@ function styleText(format, text, { validateStream = true, stream = process.stdou ) { throw new ERR_INVALID_ARG_TYPE('stream', ['ReadableStream', 'WritableStream', 'Stream'], stream); } - - // If the stream is falsy or should not be colorized, set skipColorize to true skipColorize = !lazyUtilColors().shouldColorize(stream); } - // If the format is not an array, convert it to an array const formatArray = ArrayIsArray(format) ? format : [format]; - const codes = []; + let openCodes = ''; + let closeCodes = ''; + let processedText = text; + for (const key of formatArray) { if (key === 'none') continue; - const formatCodes = inspect.colors[key]; - // If the format is not a valid style, throw an error - if (formatCodes == null) { + const style = cache[key]; + if (style === undefined) { validateOneOf(key, 'format', ObjectKeys(inspect.colors)); } - if (skipColorize) continue; - ArrayPrototypePush(codes, formatCodes); - } - - if (skipColorize) { - return text; + openCodes += style.openSeq; + closeCodes = style.closeSeq + closeCodes; + processedText = replaceCloseCode(processedText, style.closeSeq, style.openSeq, style.keepClose); } - // Build opening codes - let openCodes = ''; - for (let i = 0; i < codes.length; i++) { - openCodes += escapeStyleCode(codes[i][0]); - } - - // Process the text to handle nested styles - let processedText; - if (codes.length > 0) { - processedText = ArrayPrototypeReduce( - codes, - (text, code) => RegExpPrototypeSymbolReplace( - // Find the reset code - new RegExp(`\\u001b\\[${code[1]}m`, 'g'), - text, - (match, offset) => { - // Check if there's more content after this reset - if (offset + match.length < text.length) { - if ( - code[0] === inspect.colors.dim[0] || - code[0] === inspect.colors.bold[0] - ) { - // Dim and bold are not mutually exclusive, so we need to reapply - return `${match}${escapeStyleCode(code[0])}`; - } - return escapeStyleCode(code[0]); - } - return match; - }, - ), - text, - ); - } else { - processedText = text; - } - - // Build closing codes in reverse order - let closeCodes = ''; - for (let i = codes.length - 1; i >= 0; i--) { - closeCodes += escapeStyleCode(codes[i][1]); - } + if (skipColorize) return text; return `${openCodes}${processedText}${closeCodes}`; } diff --git a/lib/zlib.js b/lib/zlib.js index 73eb8ff2120490..056b1a13a17392 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -295,19 +295,19 @@ ZlibBase.prototype.reset = function() { }; /** - * @this {ZlibBase} * This is the _flush function called by the transform class, * internally, when the last chunk has been written. * @returns {void} + * @this {ZlibBase} */ ZlibBase.prototype._flush = function(callback) { this._transform(new FastBuffer(), '', callback); }; /** - * @this {ZlibBase} * Force Transform compat behavior. * @returns {void} + * @this {ZlibBase} */ ZlibBase.prototype._final = function(callback) { callback(); @@ -830,11 +830,29 @@ function Brotli(opts, mode) { }); } + let dictionary = opts?.dictionary; + if (dictionary !== undefined && !isArrayBufferView(dictionary)) { + if (isAnyArrayBuffer(dictionary)) { + dictionary = Buffer.from(dictionary); + } else { + throw new ERR_INVALID_ARG_TYPE( + 'options.dictionary', + ['Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'], + dictionary, + ); + } + } + const handle = mode === BROTLI_DECODE ? new binding.BrotliDecoder(mode) : new binding.BrotliEncoder(mode); this._writeState = new Uint32Array(2); - handle.init(brotliInitParamsArray, this._writeState, processCallback); + handle.init( + brotliInitParamsArray, + this._writeState, + processCallback, + dictionary, + ); ZlibBase.call(this, opts, mode, handle, brotliDefaultOpts); } diff --git a/node.gyp b/node.gyp index 566377625bc712..47ec88c43d0bcd 100644 --- a/node.gyp +++ b/node.gyp @@ -641,7 +641,6 @@ 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)', - '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)', ], }, 'msvs_settings': { @@ -653,7 +652,14 @@ }, }, 'conditions': [ - ['OS != "aix" and OS != "os400" and OS != "mac" and OS != "ios"', { + ['node_use_bundled_v8=="true"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)', + ], + }, + }], + ['node_use_bundled_v8=="true" and OS != "aix" and OS != "os400" and OS != "mac" and OS != "ios"', { 'ldflags': [ '-Wl,--whole-archive', '<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)', @@ -661,6 +667,13 @@ '-Wl,--no-whole-archive', ], }], + ['node_use_bundled_v8!="true" and OS != "aix" and OS != "os400" and OS != "mac" and OS != "ios"', { + 'ldflags': [ + '-Wl,--whole-archive', + '<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)', + '-Wl,--no-whole-archive', + ], + }], [ 'OS=="win"', { 'sources': [ 'src/res/node.rc' ], }], @@ -1530,6 +1543,9 @@ 'src/builtin_info.cc', ], 'conditions': [ + [ 'OS=="mac"', { + 'libraries': [ '-framework CoreFoundation -framework Security' ], + }], [ 'node_shared_simdutf=="false"', { 'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ], }], diff --git a/node.gypi b/node.gypi index ecf118efc2cad2..dd31ac4abcb2c6 100644 --- a/node.gypi +++ b/node.gypi @@ -248,6 +248,7 @@ [ 'node_shared_zstd=="false"', { 'dependencies': [ 'deps/zstd/zstd.gyp:zstd' ], + 'defines': [ 'NODE_BUNDLED_ZSTD' ], }], [ 'OS=="mac"', { @@ -316,8 +317,8 @@ 'NODE_PLATFORM="sunos"', ], }], - [ '(OS=="freebsd" or OS=="linux" or OS=="openharmony") and node_shared=="false"' - ' and force_load=="true"', { + [ 'node_use_bundled_v8=="true" and (OS=="freebsd" or OS=="linux" or OS=="openharmony") ' + 'and node_shared=="false" and force_load=="true"', { 'ldflags': [ '-Wl,-z,noexecstack', '-Wl,--whole-archive <(v8_base)', diff --git a/shell.nix b/shell.nix index 4a9f71b0372787..dabb03e88ff6fe 100644 --- a/shell.nix +++ b/shell.nix @@ -8,6 +8,7 @@ extraConfigFlags ? [ "--debug-node" ], + useSeparateDerivationForV8 ? false, # to help CI better managed its binary cache, not recommended outside of CI usage. # Build options icu ? pkgs.icu, @@ -17,16 +18,21 @@ withSQLite ? true, withSSL ? true, withTemporal ? false, - sharedLibDeps ? import ./tools/nix/sharedLibDeps.nix { - inherit - pkgs - withLief - withQuic - withSQLite - withSSL - withTemporal - ; - }, + sharedLibDeps ? + let + d = import ./tools/nix/sharedLibDeps.nix { + inherit + pkgs + withLief + withQuic + withSQLite + withSSL + withTemporal + ; + }; + in + # To avoid conflicts with V8's bundled simdutf lib, it's easier to remove it when using a precompiled V8. + if (useSeparateDerivationForV8 != false) then builtins.removeAttrs d [ "simdutf" ] else d, # dev tools (not needed to build Node.js, useful to maintain it) ncu-path ? null, # Provide this if you want to use a local version of NCU @@ -40,11 +46,49 @@ let useSharedOpenSSL = builtins.hasAttr "openssl" sharedLibDeps; needsRustCompiler = withTemporal && !builtins.hasAttr "temporal_capi" sharedLibDeps; + + buildInputs = builtins.attrValues sharedLibDeps ++ pkgs.lib.optional useSharedICU icu; + configureFlags = [ + ( + if icu == null then + "--without-intl" + else + "--with-intl=${if useSharedICU then "system" else icu}-icu" + ) + ] + ++ extraConfigFlags + ++ pkgs.lib.optional (!withAmaro) "--without-amaro" + ++ pkgs.lib.optional (!withLief) "--without-lief" + ++ pkgs.lib.optional withQuic "--experimental-quic" + ++ pkgs.lib.optional (!withSQLite) "--without-sqlite" + ++ pkgs.lib.optional (!withSSL) "--without-ssl" + ++ pkgs.lib.optional withTemporal "--v8-enable-temporal-support" + ++ pkgs.lib.optional (ninja != null) "--ninja" + ++ pkgs.lib.optional loadJSBuiltinsDynamically "--node-builtin-modules-path=${builtins.toString ../..}" + ++ pkgs.lib.concatMap (name: [ + "--shared-${name}" + "--shared-${name}-libpath=${pkgs.lib.getLib sharedLibDeps.${name}}/lib" + "--shared-${name}-include=${pkgs.lib.getInclude sharedLibDeps.${name}}/include" + ]) (builtins.attrNames sharedLibDeps); in pkgs.mkShell { inherit (pkgs.nodejs_latest) nativeBuildInputs; - buildInputs = builtins.attrValues sharedLibDeps ++ pkgs.lib.optional useSharedICU icu; + buildInputs = + buildInputs + ++ pkgs.lib.optional (useSeparateDerivationForV8 != false) ( + if useSeparateDerivationForV8 == true then + import ./tools/nix/v8.nix { + inherit + pkgs + configureFlags + buildInputs + needsRustCompiler + ; + } + else + useSeparateDerivationForV8 + ); packages = pkgs.lib.optional (ccache != null) ccache @@ -74,28 +118,7 @@ pkgs.mkShell { ] ); CONFIG_FLAGS = builtins.toString ( - [ - ( - if icu == null then - "--without-intl" - else - "--with-intl=${if useSharedICU then "system" else icu}-icu" - ) - ] - ++ extraConfigFlags - ++ pkgs.lib.optional (!withAmaro) "--without-amaro" - ++ pkgs.lib.optional (!withLief) "--without-lief" - ++ pkgs.lib.optional withQuic "--experimental-quic" - ++ pkgs.lib.optional (!withSQLite) "--without-sqlite" - ++ pkgs.lib.optional (!withSSL) "--without-ssl" - ++ pkgs.lib.optional withTemporal "--v8-enable-temporal-support" - ++ pkgs.lib.optional (ninja != null) "--ninja" - ++ pkgs.lib.optional loadJSBuiltinsDynamically "--node-builtin-modules-path=${builtins.toString ./.}" - ++ pkgs.lib.concatMap (name: [ - "--shared-${name}" - "--shared-${name}-libpath=${pkgs.lib.getLib sharedLibDeps.${name}}/lib" - "--shared-${name}-include=${pkgs.lib.getInclude sharedLibDeps.${name}}/include" - ]) (builtins.attrNames sharedLibDeps) + configureFlags ++ pkgs.lib.optional (useSeparateDerivationForV8 != false) "--without-bundled-v8" ); NOSQLITE = pkgs.lib.optionalString (!withSQLite) "1"; } diff --git a/src/README.md b/src/README.md index 847109950fab2a..b512b9252675bb 100644 --- a/src/README.md +++ b/src/README.md @@ -506,12 +506,17 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace util } // namespace node -// The first argument passed to `NODE_BINDING_EXTERNAL_REFERENCE`, -// which is `util` here, needs to be added to the -// `EXTERNAL_REFERENCE_BINDING_LIST_BASE` list in node_external_reference.h NODE_BINDING_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences) ``` +And add the first argument passed to `NODE_BINDING_EXTERNAL_REFERENCE` to +the list of external references in `src/node_external_reference.h`: + +```cpp +#define EXTERNAL_REFERENCE_LIST_BASE(V) \ + V(util) \ +``` + Otherwise, you might see an error message like this when building the executables: diff --git a/src/blob_serializer_deserializer-inl.h b/src/blob_serializer_deserializer-inl.h index 7f5a3860b5b7e5..fa258dbe814459 100644 --- a/src/blob_serializer_deserializer-inl.h +++ b/src/blob_serializer_deserializer-inl.h @@ -105,7 +105,7 @@ template std::vector BlobDeserializer::ReadVector() { if (is_debug) { std::string name = GetName(); - Debug("\nReadVector<%s>()(%d-byte)\n", name.c_str(), sizeof(T)); + Debug("\nReadVector<%s>()(%d-byte)\n", name, sizeof(T)); } size_t count = static_cast(ReadArithmetic()); if (count == 0) { @@ -123,7 +123,7 @@ std::vector BlobDeserializer::ReadVector() { if (is_debug) { std::string str = std::is_arithmetic_v ? "" : ToStr(result); std::string name = GetName(); - Debug("ReadVector<%s>() read %s\n", name.c_str(), str.c_str()); + Debug("ReadVector<%s>() read %s\n", name, str); } return result; } @@ -163,7 +163,7 @@ void BlobDeserializer::ReadArithmetic(T* out, size_t count) { DCHECK_GT(count, 0); // Should not read contents for vectors of size 0. if (is_debug) { std::string name = GetName(); - Debug("Read<%s>()(%d-byte), count=%d: ", name.c_str(), sizeof(T), count); + Debug("Read<%s>()(%d-byte), count=%d: ", name, sizeof(T), count); } size_t size = sizeof(T) * count; @@ -172,7 +172,7 @@ void BlobDeserializer::ReadArithmetic(T* out, size_t count) { if (is_debug) { std::string str = "{ " + std::to_string(out[0]) + (count > 1 ? ", ... }" : " }"); - Debug("%s, read %zu bytes\n", str.c_str(), size); + Debug("%s, read %zu bytes\n", str, size); } read_total += size; } @@ -240,10 +240,10 @@ size_t BlobSerializer::WriteVector(const std::vector& data) { std::string name = GetName(); Debug("\nAt 0x%x: WriteVector<%s>() (%d-byte), count=%d: %s\n", sink.size(), - name.c_str(), + name, sizeof(T), data.size(), - str.c_str()); + str); } size_t written_total = WriteArithmetic(data.size()); @@ -259,7 +259,7 @@ size_t BlobSerializer::WriteVector(const std::vector& data) { if (is_debug) { std::string name = GetName(); - Debug("WriteVector<%s>() wrote %d bytes\n", name.c_str(), written_total); + Debug("WriteVector<%s>() wrote %d bytes\n", name, written_total); } return written_total; @@ -319,10 +319,10 @@ size_t BlobSerializer::WriteArithmetic(const T* data, size_t count) { std::string name = GetName(); Debug("At 0x%x: Write<%s>() (%zu-byte), count=%zu: %s", sink.size(), - name.c_str(), + name, sizeof(T), count, - str.c_str()); + str); } size_t size = sizeof(T) * count; diff --git a/src/compile_cache.cc b/src/compile_cache.cc index 0920747012f072..6b054db1ccc2e8 100644 --- a/src/compile_cache.cc +++ b/src/compile_cache.cc @@ -265,8 +265,8 @@ CompileCacheEntry* CompileCacheHandler::GetOrInsert(Local code, if (!relative_path.empty()) { file_path = relative_path; Debug("[compile cache] using relative path %s from %s\n", - file_path.c_str(), - compile_cache_dir_.c_str()); + file_path, + compile_cache_dir_); } } uint32_t key = GetCacheKey(file_path, type); diff --git a/src/crypto/crypto_x509.cc b/src/crypto/crypto_x509.cc index 11622d823bbc0a..f40f6dd4f2bcaf 100644 --- a/src/crypto/crypto_x509.cc +++ b/src/crypto/crypto_x509.cc @@ -253,8 +253,8 @@ MaybeLocal GetSignatureAlgorithmOID(Environment* env, MaybeLocal GetSerialNumber(Environment* env, const X509View& view) { if (auto serial = view.getSerialNumber()) { - return OneByteString(env->isolate(), - static_cast(serial.get())); + return ToV8Value( + env, ToUpper(std::string_view(static_cast(serial.get())))); } return Undefined(env->isolate()); } diff --git a/src/env.cc b/src/env.cc index 7eb3007d6d45f0..7066f15710f4b1 100644 --- a/src/env.cc +++ b/src/env.cc @@ -2192,7 +2192,7 @@ size_t Environment::NearHeapLimitCallback(void* data, env->RemoveHeapSnapshotNearHeapLimitCallback(0); } - FPrintF(stderr, "Wrote snapshot to %s\n", filename.c_str()); + FPrintF(stderr, "Wrote snapshot to %s\n", filename); // Tell V8 to reset the heap limit once the heap usage falls down to // 95% of the initial limit. env->isolate()->AutomaticallyRestoreInitialHeapLimit(0.95); diff --git a/src/env_properties.h b/src/env_properties.h index cd76b1fe32970b..77b694e98463e8 100644 --- a/src/env_properties.h +++ b/src/env_properties.h @@ -58,6 +58,7 @@ V(resource_symbol, "resource_symbol") \ V(trigger_async_id_symbol, "trigger_async_id_symbol") \ V(builtin_source_text_module_hdo, "builtin_source_text_module_hdo") \ + V(embedder_module_hdo, "embedder_module_hdo") \ V(source_text_module_default_hdo, "source_text_module_default_hdo") \ V(vm_context_no_contextify, "vm_context_no_contextify") \ V(vm_dynamic_import_default_internal, "vm_dynamic_import_default_internal") \ diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index dd57c779595c80..28653a3939daef 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -66,7 +66,7 @@ uint64_t V8ProfilerConnection::DispatchMessage(const char* method, Debug(env(), DebugCategory::INSPECTOR_PROFILER, "Dispatching message %s\n", - message.c_str()); + message); session_->Dispatch(StringView(message_data, message.length())); return id; } diff --git a/src/module_wrap.cc b/src/module_wrap.cc index d9711500f178c7..354b45bda9ccc7 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -1397,7 +1397,8 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback( // Use the default initializer for source text modules without custom // callbacks. - if (id == env->source_text_module_default_hdo()) { + if (id == env->source_text_module_default_hdo() || + id == env->embedder_module_hdo()) { USE(DefaultImportMetaObjectInitializer(realm, wrap, meta)); return; } diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 1ebefba4b8bb6c..5ef8d06933700c 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -559,7 +559,7 @@ bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache( if (bootstrapCatch.HasCaught()) { per_process::Debug(DebugCategory::CODE_CACHE, "Failed to compile code cache for %s\n", - id.data()); + id); all_succeeded = false; PrintCaughtException(Isolate::GetCurrent(), context, bootstrapCatch); } else { diff --git a/src/node_config_file.cc b/src/node_config_file.cc index 4205a3cee7e52a..ce89a51b7b97d3 100644 --- a/src/node_config_file.cc +++ b/src/node_config_file.cc @@ -49,7 +49,7 @@ ParseResult ConfigReader::ProcessOptionValue( case options_parser::OptionType::kBoolean: { bool result; if (option_value->get_bool().get(result)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } @@ -75,13 +75,13 @@ ParseResult ConfigReader::ProcessOptionValue( std::vector result; simdjson::ondemand::array raw_imports; if (option_value->get_array().get(raw_imports)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } for (auto raw_import : raw_imports) { std::string_view import; if (raw_import.get_string(import)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } output->push_back(option_name + "=" + std::string(import)); @@ -91,14 +91,14 @@ ParseResult ConfigReader::ProcessOptionValue( case simdjson::ondemand::json_type::string: { std::string result; if (option_value->get_string(result)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } output->push_back(option_name + "=" + result); break; } default: - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } break; @@ -106,7 +106,7 @@ ParseResult ConfigReader::ProcessOptionValue( case options_parser::OptionType::kString: { std::string result; if (option_value->get_string(result)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } output->push_back(option_name + "=" + result); @@ -115,7 +115,7 @@ ParseResult ConfigReader::ProcessOptionValue( case options_parser::OptionType::kInteger: { int64_t result; if (option_value->get_int64().get(result)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } output->push_back(option_name + "=" + std::to_string(result)); @@ -125,22 +125,19 @@ ParseResult ConfigReader::ProcessOptionValue( case options_parser::OptionType::kUInteger: { uint64_t result; if (option_value->get_uint64().get(result)) { - FPrintF(stderr, "Invalid value for %s\n", option_name.c_str()); + FPrintF(stderr, "Invalid value for %s\n", option_name); return ParseResult::InvalidContent; } output->push_back(option_name + "=" + std::to_string(result)); break; } case options_parser::OptionType::kNoOp: { - FPrintF(stderr, - "No-op flag %s is currently not supported\n", - option_name.c_str()); + FPrintF( + stderr, "No-op flag %s is currently not supported\n", option_name); return ParseResult::InvalidContent; } case options_parser::OptionType::kV8Option: { - FPrintF(stderr, - "V8 flag %s is currently not supported\n", - option_name.c_str()); + FPrintF(stderr, "V8 flag %s is currently not supported\n", option_name); return ParseResult::InvalidContent; } default: @@ -189,8 +186,7 @@ ParseResult ConfigReader::ParseOptions( if (option != options_map.end()) { // If the option has already been set, return an error if (unique_options->contains(option->first)) { - FPrintF( - stderr, "Option %s is already defined\n", option->first.c_str()); + FPrintF(stderr, "Option %s is already defined\n", option->first); return ParseResult::InvalidContent; } // Add the option to the unique set to prevent duplicates @@ -206,7 +202,7 @@ ParseResult ConfigReader::ParseOptions( FPrintF(stderr, "Unknown or not allowed option %s for namespace %s\n", option_key, - namespace_name.c_str()); + namespace_name); return ParseResult::InvalidContent; } } @@ -303,7 +299,7 @@ ParseResult ConfigReader::ParseConfig(const std::string_view& config_path) { if (field_error) { FPrintF(stderr, "\"%s\" value unexpected for %s (should be an object)\n", - namespace_name.c_str(), + namespace_name, config_path.data()); return ParseResult::InvalidContent; } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 532cb61f44f93d..1ce037f1b95f77 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1640,13 +1640,13 @@ static MaybeLocal CompileFunctionForCJSLoader( Local filename, bool* cache_rejected, bool is_cjs_scope, - ScriptCompiler::CachedData* cached_data) { + ScriptCompiler::CachedData* cached_data, + Local host_defined_option_symbol) { Isolate* isolate = Isolate::GetCurrent(); EscapableHandleScope scope(isolate); - Local symbol = env->vm_dynamic_import_default_internal(); - Local hdo = - loader::ModuleWrap::GetHostDefinedOptions(isolate, symbol); + Local hdo = loader::ModuleWrap::GetHostDefinedOptions( + isolate, host_defined_option_symbol); ScriptOrigin origin(filename, 0, // line offset 0, // column offset @@ -1739,6 +1739,12 @@ static void CompileFunctionForCJSLoader( Realm* realm = Realm::GetCurrent(context); Environment* env = realm->env(); + Local host_defined_option_symbol = + env->vm_dynamic_import_default_internal(); + if (args.Length() > 4 && args[4].As()->Value()) { + host_defined_option_symbol = env->embedder_module_hdo(); + } + bool cache_rejected = false; Local fn; Local cjs_exception; @@ -1767,8 +1773,14 @@ static void CompileFunctionForCJSLoader( { ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); TryCatchScope try_catch(env); - if (!CompileFunctionForCJSLoader( - env, context, code, filename, &cache_rejected, true, cached_data) + if (!CompileFunctionForCJSLoader(env, + context, + code, + filename, + &cache_rejected, + true, + cached_data, + host_defined_option_symbol) .ToLocal(&fn)) { CHECK(try_catch.HasCaught()); CHECK(!try_catch.HasTerminated()); @@ -1929,8 +1941,14 @@ static void ContainsModuleSyntax(const FunctionCallbackInfo& args) { Local fn; TryCatchScope try_catch(env); ShouldNotAbortOnUncaughtScope no_abort_scope(env); - if (CompileFunctionForCJSLoader( - env, context, code, filename, &cache_rejected, cjs_var, nullptr) + if (CompileFunctionForCJSLoader(env, + context, + code, + filename, + &cache_rejected, + cjs_var, + nullptr, + env->vm_dynamic_import_default_internal()) .ToLocal(&fn)) { args.GetReturnValue().Set(false); return; diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 0c3376d9a5f8d9..e94180cd659d35 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -360,9 +360,9 @@ Maybe KVStore::AssignToObject(v8::Isolate* isolate, } struct TraceEnvVarOptions { - bool print_message : 1 = 0; - bool print_js_stack : 1 = 0; - bool print_native_stack : 1 = 0; + bool print_message : 1 = false; + bool print_js_stack : 1 = false; + bool print_native_stack : 1 = false; }; template @@ -387,13 +387,13 @@ TraceEnvVarOptions GetTraceEnvVarOptions(Environment* env) { ? env->options() : per_process::cli_options->per_isolate->per_env; if (cli_options->trace_env) { - options.print_message = 1; + options.print_message = true; }; if (cli_options->trace_env_js_stack) { - options.print_js_stack = 1; + options.print_js_stack = true; }; if (cli_options->trace_env_native_stack) { - options.print_native_stack = 1; + options.print_native_stack = true; }; return options; } diff --git a/src/node_errors.cc b/src/node_errors.cc index 30753ec2b07cd3..23ca0bc50f68c6 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -156,10 +156,8 @@ static std::string GetErrorSource(Isolate* isolate, end -= script_start; } - std::string buf = SPrintF("%s:%i\n%s\n", - filename_string, - linenum, - sourceline.c_str()); + std::string buf = + SPrintF("%s:%i\n%s\n", filename_string, linenum, sourceline); CHECK_GT(buf.size(), 0); *added_exception_line = true; diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 3413bc78b9d740..835471d4f70846 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -67,6 +67,7 @@ class ExternalReferenceRegistry { V(buffer) \ V(builtins) \ V(cares_wrap) \ + V(cjs_lexer) \ V(config) \ V(contextify) \ V(credentials) \ diff --git a/src/node_file.cc b/src/node_file.cc index 9015dbc4a9c6ee..d7926d9a07a3a6 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -810,6 +810,22 @@ void AfterStat(uv_fs_t* req) { } } +void AfterStatNoThrowIfNoEntry(uv_fs_t* req) { + FSReqBase* req_wrap = FSReqBase::from_req(req); + FSReqAfterScope after(req_wrap, req); + + FS_ASYNC_TRACE_END1( + req->fs_type, req_wrap, "result", static_cast(req->result)) + if (req->result == UV_ENOENT || req->result == UV_ENOTDIR) { + req_wrap->Resolve(Undefined(req_wrap->env()->isolate())); + return; + } + + if (after.Proceed()) { + req_wrap->ResolveStat(&req->statbuf); + } +} + void AfterStatFs(uv_fs_t* req) { FSReqBase* req_wrap = FSReqBase::from_req(req); FSReqAfterScope after(req_wrap, req); @@ -1105,7 +1121,9 @@ static void Stat(const FunctionCallbackInfo& args) { ToNamespacedPath(env, &path); bool use_bigint = args[1]->IsTrue(); - if (!args[2]->IsUndefined()) { // stat(path, use_bigint, req) + if (!args[2]->IsUndefined()) { // stat(path, use_bigint, req, + // do_not_throw_if_no_entry) + bool do_not_throw_if_no_entry = args[3]->IsFalse(); FSReqBase* req_wrap_async = GetReqWrap(args, 2, use_bigint); CHECK_NOT_NULL(req_wrap_async); ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS( @@ -1115,8 +1133,25 @@ static void Stat(const FunctionCallbackInfo& args) { path.ToStringView()); FS_ASYNC_TRACE_BEGIN1( UV_FS_STAT, req_wrap_async, "path", TRACE_STR_COPY(*path)) - AsyncCall(env, req_wrap_async, args, "stat", UTF8, AfterStat, - uv_fs_stat, *path); + if (do_not_throw_if_no_entry) { + AsyncCall(env, + req_wrap_async, + args, + "stat", + UTF8, + AfterStatNoThrowIfNoEntry, + uv_fs_stat, + *path); + } else { + AsyncCall(env, + req_wrap_async, + args, + "stat", + UTF8, + AfterStat, + uv_fs_stat, + *path); + } } else { // stat(path, use_bigint, undefined, do_not_throw_if_no_entry) THROW_IF_INSUFFICIENT_PERMISSIONS( env, permission::PermissionScope::kFileSystemRead, path.ToStringView()); diff --git a/src/node_sea.cc b/src/node_sea.cc index bffdc72d1d1791..1f340cf56b21aa 100644 --- a/src/node_sea.cc +++ b/src/node_sea.cc @@ -84,6 +84,11 @@ size_t SeaSerializer::Write(const SeaResource& sea) { static_cast(sea.exec_argv_extension)); written_total += WriteArithmetic(static_cast(sea.exec_argv_extension)); + + Debug("Write SEA main code format %u\n", + static_cast(sea.main_code_format)); + written_total += + WriteArithmetic(static_cast(sea.main_code_format)); DCHECK_EQ(written_total, SeaResource::kHeaderSize); Debug("Write SEA code path %p, size=%zu\n", @@ -161,6 +166,11 @@ SeaResource SeaDeserializer::Read() { SeaExecArgvExtension exec_argv_extension = static_cast(extension_value); Debug("Read SEA resource exec argv extension %u\n", extension_value); + + uint8_t format_value = ReadArithmetic(); + CHECK_LE(format_value, static_cast(ModuleFormat::kModule)); + ModuleFormat main_code_format = static_cast(format_value); + Debug("Read SEA main code format %u\n", format_value); CHECK_EQ(read_total, SeaResource::kHeaderSize); std::string_view code_path = @@ -219,6 +229,7 @@ SeaResource SeaDeserializer::Read() { exec_argv_extension, code_path, code, + main_code_format, code_cache, assets, exec_argv}; @@ -501,6 +512,25 @@ std::optional ParseSingleExecutableConfig( config_path); return std::nullopt; } + } else if (key == "mainFormat") { + std::string_view format_str; + if (field.value().get_string().get(format_str)) { + FPrintF(stderr, + "\"mainFormat\" field of %s is not a string\n", + config_path); + return std::nullopt; + } + if (format_str == "commonjs") { + result.main_format = ModuleFormat::kCommonJS; + } else if (format_str == "module") { + result.main_format = ModuleFormat::kModule; + } else { + FPrintF(stderr, + "\"mainFormat\" field of %s must be one of " + "\"commonjs\" or \"module\"\n", + config_path); + return std::nullopt; + } } } @@ -512,6 +542,23 @@ std::optional ParseSingleExecutableConfig( "\"useCodeCache\" is redundant when \"useSnapshot\" is true\n"); } + // TODO(joyeecheung): support ESM with useSnapshot and useCodeCache. + if (result.main_format == ModuleFormat::kModule && + static_cast(result.flags & SeaFlags::kUseSnapshot)) { + FPrintF(stderr, + "\"mainFormat\": \"module\" is not supported when " + "\"useSnapshot\" is true\n"); + return std::nullopt; + } + + if (result.main_format == ModuleFormat::kModule && + static_cast(result.flags & SeaFlags::kUseCodeCache)) { + FPrintF(stderr, + "\"mainFormat\": \"module\" is not supported when " + "\"useCodeCache\" is true\n"); + return std::nullopt; + } + if (result.main_path.empty()) { FPrintF(stderr, "\"main\" field of %s is not a non-empty string\n", @@ -639,7 +686,7 @@ int BuildAssets(const std::unordered_map& config, int r = ReadFileSync(&blob, path.c_str()); if (r != 0) { const char* err = uv_strerror(r); - FPrintF(stderr, "Cannot read asset %s: %s\n", path.c_str(), err); + FPrintF(stderr, "Cannot read asset %s: %s\n", path, err); return r; } assets->emplace(key, std::move(blob)); @@ -709,6 +756,7 @@ ExitCode GenerateSingleExecutableBlob( builds_snapshot_from_main ? std::string_view{snapshot_blob.data(), snapshot_blob.size()} : std::string_view{main_script.data(), main_script.size()}, + config.main_format, optional_sv_code_cache, assets_view, exec_argv_view}; @@ -792,20 +840,25 @@ void GetAssetKeys(const FunctionCallbackInfo& args) { } MaybeLocal LoadSingleExecutableApplication( - const StartExecutionCallbackInfo& info) { + const StartExecutionCallbackInfoWithModule& info) { // Here we are currently relying on the fact that in NodeMainInstance::Run(), // env->context() is entered. - Local context = Isolate::GetCurrent()->GetCurrentContext(); - Environment* env = Environment::GetCurrent(context); + Environment* env = info.env(); + Local context = env->context(); SeaResource sea = FindSingleExecutableResource(); CHECK(!sea.use_snapshot()); // TODO(joyeecheung): this should be an external string. Refactor UnionBytes // and make it easy to create one based on static content on the fly. Local main_script = - ToV8Value(env->context(), sea.main_code_or_snapshot).ToLocalChecked(); - return info.run_cjs->Call( - env->context(), Null(env->isolate()), 1, &main_script); + ToV8Value(context, sea.main_code_or_snapshot).ToLocalChecked(); + Local kind = + v8::Integer::New(env->isolate(), static_cast(sea.main_code_format)); + Local resource_name = + ToV8Value(context, env->exec_path()).ToLocalChecked(); + Local args[] = {main_script, kind, resource_name}; + return info.run_module()->Call( + env->context(), Null(env->isolate()), arraysize(args), args); } bool MaybeLoadSingleExecutableApplication(Environment* env) { @@ -821,7 +874,7 @@ bool MaybeLoadSingleExecutableApplication(Environment* env) { // this check is just here to guard against the unlikely case where // the SEA preparation blob has been manually modified by someone. CHECK(!env->snapshot_deserialize_main().IsEmpty()); - LoadEnvironment(env, StartExecutionCallback{}); + LoadEnvironment(env, StartExecutionCallbackWithModule{}); return true; } diff --git a/src/node_sea.h b/src/node_sea.h index 34596972b60219..dd0b89db841eed 100644 --- a/src/node_sea.h +++ b/src/node_sea.h @@ -11,6 +11,7 @@ #include #include +#include "node.h" #include "node_exit_code.h" namespace node { @@ -43,6 +44,7 @@ struct SeaConfig { std::string executable_path; SeaFlags flags = SeaFlags::kDefault; SeaExecArgvExtension exec_argv_extension = SeaExecArgvExtension::kEnv; + ModuleFormat main_format = ModuleFormat::kCommonJS; std::unordered_map assets; std::vector exec_argv; }; @@ -52,6 +54,7 @@ struct SeaResource { SeaExecArgvExtension exec_argv_extension = SeaExecArgvExtension::kEnv; std::string_view code_path; std::string_view main_code_or_snapshot; + ModuleFormat main_code_format = ModuleFormat::kCommonJS; std::optional code_cache; std::unordered_map assets; std::vector exec_argv; @@ -59,8 +62,9 @@ struct SeaResource { bool use_snapshot() const; bool use_code_cache() const; - static constexpr size_t kHeaderSize = - sizeof(kMagic) + sizeof(SeaFlags) + sizeof(SeaExecArgvExtension); + static constexpr size_t kHeaderSize = sizeof(kMagic) + sizeof(SeaFlags) + + sizeof(SeaExecArgvExtension) + + sizeof(ModuleFormat); }; bool IsSingleExecutable(); diff --git a/src/node_sea_bin.cc b/src/node_sea_bin.cc index 3e209990a40b86..ef5dab3a25c0c5 100644 --- a/src/node_sea_bin.cc +++ b/src/node_sea_bin.cc @@ -388,7 +388,7 @@ ExitCode BuildSingleExecutable(const std::string& sea_config_path, SeaConfig config = opt_config.value(); if (config.executable_path.empty()) { - config.executable_path = args[0]; + config.executable_path = Environment::GetExecPath(args); } // Get file permissions from source executable to copy over later. diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index e34d24d51d5c09..c6eac77b2c3be4 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -225,7 +225,7 @@ builtins::CodeCacheInfo SnapshotDeserializer::Read() { if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; } @@ -234,7 +234,7 @@ template <> size_t SnapshotSerializer::Write(const builtins::CodeCacheInfo& info) { Debug("\nWrite() id = %s" ", length=%d\n", - info.id.c_str(), + info.id, info.data.length); size_t written_total = WriteString(info.id); @@ -263,7 +263,7 @@ PropInfo SnapshotDeserializer::Read() { if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; @@ -273,7 +273,7 @@ template <> size_t SnapshotSerializer::Write(const PropInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = WriteString(data.name); @@ -305,7 +305,7 @@ AsyncHooks::SerializeInfo SnapshotDeserializer::Read() { if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; @@ -314,7 +314,7 @@ template <> size_t SnapshotSerializer::Write(const AsyncHooks::SerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = @@ -341,7 +341,7 @@ TickInfo::SerializeInfo SnapshotDeserializer::Read() { if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; @@ -351,7 +351,7 @@ template <> size_t SnapshotSerializer::Write(const TickInfo::SerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = WriteArithmetic(data.fields); @@ -370,7 +370,7 @@ ImmediateInfo::SerializeInfo SnapshotDeserializer::Read() { result.fields = ReadArithmetic(); if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; } @@ -379,7 +379,7 @@ template <> size_t SnapshotSerializer::Write(const ImmediateInfo::SerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = WriteArithmetic(data.fields); @@ -403,7 +403,7 @@ performance::PerformanceState::SerializeInfo SnapshotDeserializer::Read() { result.observers = ReadArithmetic(); if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; } @@ -413,7 +413,7 @@ size_t SnapshotSerializer::Write( const performance::PerformanceState::SerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = WriteArithmetic(data.root); @@ -439,7 +439,7 @@ IsolateDataSerializeInfo SnapshotDeserializer::Read() { result.template_values = ReadVector(); if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; } @@ -448,7 +448,7 @@ template <> size_t SnapshotSerializer::Write(const IsolateDataSerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("Write() %s\n", str.c_str()); + Debug("Write() %s\n", str); } size_t written_total = WriteVector(data.primitive_values); @@ -473,7 +473,7 @@ template <> size_t SnapshotSerializer::Write(const RealmSerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("\nWrite() %s\n", str.c_str()); + Debug("\nWrite() %s\n", str); } // Use += here to ensure order of evaluation. @@ -507,7 +507,7 @@ template <> size_t SnapshotSerializer::Write(const EnvSerializeInfo& data) { if (is_debug) { std::string str = ToStr(data); - Debug("\nWrite() %s\n", str.c_str()); + Debug("\nWrite() %s\n", str); } // Use += here to ensure order of evaluation. @@ -549,7 +549,7 @@ SnapshotMetadata SnapshotDeserializer::Read() { if (is_debug) { std::string str = ToStr(result); - Debug("Read() %s\n", str.c_str()); + Debug("Read() %s\n", str); } return result; } @@ -558,7 +558,7 @@ template <> size_t SnapshotSerializer::Write(const SnapshotMetadata& data) { if (is_debug) { std::string str = ToStr(data); - Debug("\nWrite() %s\n", str.c_str()); + Debug("\nWrite() %s\n", str); } size_t written_total = 0; // We need the Node.js version, platform and arch to match because @@ -566,7 +566,7 @@ size_t SnapshotSerializer::Write(const SnapshotMetadata& data) { // can be changed in semver-patches. Debug("Write snapshot type %d\n", static_cast(data.type)); written_total += WriteArithmetic(static_cast(data.type)); - Debug("Write Node.js version %s\n", data.node_version.c_str()); + Debug("Write Node.js version %s\n", data.node_version); written_total += WriteString(data.node_version); Debug("Write Node.js arch %s\n", data.node_arch); written_total += WriteString(data.node_arch); @@ -968,6 +968,61 @@ std::optional ReadSnapshotConfig(const char* config_path) { return result; } +// Find bindings that have been loaded by internalBinding() but the external +// reference method have not been called. This requires that the caller +// match the id passed into their NODE_BINDING_CONTEXT_AWARE_INTERNAL() and +// NODE_BINDING_EXTERNAL_REFERENCE() calls. Note that this only serves as a +// preemptive check. Binding methods create the actual external references +// (usually through function templates) and there's currently no easy way +// to verify at that level of granularity. See "Registering binding functions +// used in bootstrap" in src/README.md. +bool ValidateBindings(Environment* env) { + std::set registered; +#define V(modname) registered.insert(#modname); + EXTERNAL_REFERENCE_BINDING_LIST(V) +#undef V + + std::set bindings_without_external_references = { + "async_context_frame", + "constants", + "symbols", + }; + + std::set unregistered; + for (auto* mod : env->principal_realm()->internal_bindings) { + if (registered.count(mod->nm_modname) == 0 && + bindings_without_external_references.count(mod->nm_modname) == 0) { + unregistered.insert(mod->nm_modname); + } + } + + if (unregistered.size() == 0) { + return true; + } + + FPrintF( + stderr, + "\n---- snapshot building check failed ---\n\n" + "The following bindings are loaded during the snapshot building process," + " but their external reference registration methods have not been " + "called:\n\n"); + for (auto& binding : unregistered) { + FPrintF(stderr, " - %s\n", binding); + } + FPrintF(stderr, + "\nIf the binding does not have any external references, " + "add it to the list of bindings_without_external_references " + "in src/node_snapshotable.cc.\n" + "Otherwise, make sure to call NODE_BINDING_EXTERNAL_REFERENCE() " + "with an appropriate register method for the binding, " + "and add it to EXTERNAL_REFERENCE_BINDING_LIST in " + "src/node_external_reference.h" + "\n\nSee \"Registering binding functions used in bootstrap\" " + "in src/README.md for more details." + "\n----\n\n"); + return false; +} + ExitCode BuildSnapshotWithoutCodeCache( SnapshotData* out, const std::vector& args, @@ -1033,6 +1088,11 @@ ExitCode BuildSnapshotWithoutCodeCache( if (exit_code != ExitCode::kNoFailure) { return exit_code; } + + if (snapshot_type == SnapshotMetadata::Type::kDefault && + !ValidateBindings(env)) { + return ExitCode::kStartupSnapshotFailure; + } } return SnapshotBuilder::CreateSnapshot(out, setup.get()); @@ -1070,8 +1130,8 @@ ExitCode BuildCodeCacheFromSnapshot(SnapshotData* out, std::string size_str = FormatSize(item.data.length); per_process::Debug(DebugCategory::MKSNAPSHOT, "Generated code cache for %d: %s\n", - item.id.c_str(), - size_str.c_str()); + item.id, + size_str); } } return ExitCode::kNoFailure; diff --git a/src/node_sqlite.cc b/src/node_sqlite.cc index 3f4749286406e0..fb229e19fd6aef 100644 --- a/src/node_sqlite.cc +++ b/src/node_sqlite.cc @@ -886,7 +886,7 @@ std::optional ValidateDatabasePath(Environment* env, THROW_ERR_INVALID_ARG_TYPE(env->isolate(), "The \"%s\" argument must be a string, " "Uint8Array, or URL without null bytes.", - field_name.c_str()); + field_name); return std::nullopt; } diff --git a/src/node_version.h b/src/node_version.h index 94a7326975c0a7..0e980e6cc03e0e 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -23,13 +23,13 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 25 -#define NODE_MINOR_VERSION 6 -#define NODE_PATCH_VERSION 2 +#define NODE_MINOR_VERSION 7 +#define NODE_PATCH_VERSION 0 #define NODE_VERSION_IS_LTS 0 #define NODE_VERSION_LTS_CODENAME "" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) diff --git a/src/node_zlib.cc b/src/node_zlib.cc index d0077c282ba193..9d49f13d07c125 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -19,6 +19,10 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +#ifdef NODE_BUNDLED_ZSTD +#define ZSTD_STATIC_LINKING_ONLY +#endif + #include "memory_tracker-inl.h" #include "node.h" #include "node_buffer.h" @@ -36,6 +40,7 @@ #include "brotli/decode.h" #include "brotli/encode.h" +#include "brotli/shared_dictionary.h" #include "zlib.h" #include "zstd.h" #include "zstd_errors.h" @@ -187,9 +192,11 @@ class ZlibContext final : public MemoryRetainer { CompressionError ResetStream(); // Zlib-specific: - void Init(int level, int window_bits, int mem_level, int strategy, + void Init(int level, + int window_bits, + int mem_level, + int strategy, std::vector&& dictionary); - void SetAllocationFunctions(alloc_func alloc, free_func free, void* opaque); CompressionError SetParams(int level, int strategy); SET_MEMORY_INFO_NAME(ZlibContext) @@ -243,11 +250,6 @@ class BrotliContext : public MemoryRetainer { size_t avail_in_ = 0; size_t avail_out_ = 0; BrotliEncoderOperation flush_ = BROTLI_OPERATION_PROCESS; - // TODO(addaleax): These should not need to be stored here. - // This is currently only done this way to make implementing ResetStream() - // easier. - brotli_alloc_func alloc_ = nullptr; - brotli_free_func free_ = nullptr; void* alloc_opaque_ = nullptr; }; @@ -255,9 +257,7 @@ class BrotliEncoderContext final : public BrotliContext { public: void Close(); void DoThreadPoolWork(); - CompressionError Init(brotli_alloc_func alloc, - brotli_free_func free, - void* opaque); + CompressionError Init(std::vector&& dictionary = {}); CompressionError ResetStream(); CompressionError SetParams(int key, uint32_t value); CompressionError GetErrorInfo() const; @@ -269,15 +269,18 @@ class BrotliEncoderContext final : public BrotliContext { private: bool last_result_ = false; DeleteFnPtr state_; + DeleteFnPtr + prepared_dictionary_; + // Dictionary data must remain valid while the prepared dictionary is alive. + std::vector dictionary_; }; class BrotliDecoderContext final : public BrotliContext { public: void Close(); void DoThreadPoolWork(); - CompressionError Init(brotli_alloc_func alloc, - brotli_free_func free, - void* opaque); + CompressionError Init(std::vector&& dictionary = {}); CompressionError ResetStream(); CompressionError SetParams(int key, uint32_t value); CompressionError GetErrorInfo() const; @@ -291,6 +294,8 @@ class BrotliDecoderContext final : public BrotliContext { BrotliDecoderErrorCode error_ = BROTLI_DECODER_NO_ERROR; std::string error_string_; DeleteFnPtr state_; + // Dictionary data must remain valid for the lifetime of the decoder. + std::vector dictionary_; }; class ZstdContext : public MemoryRetainer { @@ -298,7 +303,6 @@ class ZstdContext : public MemoryRetainer { ZstdContext() = default; // Streaming-related, should be available for all compression libraries: - void Close(); void SetBuffers(const char* in, uint32_t in_len, char* out, uint32_t out_len); void SetFlush(int flush); void GetAfterWriteOffsets(uint32_t* avail_in, uint32_t* avail_out) const; @@ -323,6 +327,7 @@ class ZstdCompressContext final : public ZstdContext { ZstdCompressContext() = default; // Streaming-related, should be available for all compression libraries: + void Close(); void DoThreadPoolWork(); CompressionError ResetStream(); @@ -349,6 +354,7 @@ class ZstdDecompressContext final : public ZstdContext { ZstdDecompressContext() = default; // Streaming-related, should be available for all compression libraries: + void Close(); void DoThreadPoolWork(); CompressionError ResetStream(); @@ -369,8 +375,68 @@ class ZstdDecompressContext final : public ZstdContext { DeleteFnPtr dctx_; }; +class CompressionStreamMemoryOwner { + public: + // Allocation functions provided to zlib itself. We store the real size of + // the allocated memory chunk just before the "payload" memory we return + // to zlib. + // Because we use zlib off the thread pool, we can not report memory directly + // to V8; rather, we first store it as "unreported" memory in a separate + // field and later report it back from the main thread. + static void* AllocForZlib(void* data, uInt items, uInt size) { + size_t real_size = MultiplyWithOverflowCheck(static_cast(items), + static_cast(size)); + return AllocForBrotli(data, real_size); + } + + static constexpr size_t reserveSizeAndAlign = + std::max(sizeof(size_t), alignof(max_align_t)); + + static void* AllocForBrotli(void* data, size_t size) { + size += reserveSizeAndAlign; + CompressionStreamMemoryOwner* ctx = + static_cast(data); + char* memory = UncheckedMalloc(size); + if (memory == nullptr) [[unlikely]] { + return nullptr; + } + *reinterpret_cast(memory) = size; + ctx->unreported_allocations_.fetch_add(size, std::memory_order_relaxed); + return memory + reserveSizeAndAlign; + } + + static void FreeForZlib(void* data, void* pointer) { + if (pointer == nullptr) [[unlikely]] { + return; + } + CompressionStreamMemoryOwner* ctx = + static_cast(data); + char* real_pointer = static_cast(pointer) - reserveSizeAndAlign; + size_t real_size = *reinterpret_cast(real_pointer); + ctx->unreported_allocations_.fetch_sub(real_size, + std::memory_order_relaxed); + free(real_pointer); + } + + void* as_allocator_opaque_value() { return static_cast(this); } + + protected: + ssize_t ComputeAdjustmentToExternalAllocatedMemory() { + ssize_t report = + unreported_allocations_.exchange(0, std::memory_order_relaxed); + CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast(-report)); + zlib_memory_ += report; + return report; + } + + std::atomic unreported_allocations_{0}; + size_t zlib_memory_ = 0; +}; + template -class CompressionStream : public AsyncWrap, public ThreadPoolWork { +class CompressionStream : public AsyncWrap, + public ThreadPoolWork, + protected CompressionStreamMemoryOwner { public: enum InternalFields { kCompressionStreamBaseField = AsyncWrap::kInternalFieldCount, @@ -590,6 +656,19 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { zlib_memory_ + unreported_allocations_); } + static void* AllocatorOpaquePointerForContext(CompressionContext* ctx) { + CompressionStream* self = ContainerOf(&CompressionStream::ctx_, ctx); + // There is nothing at the type level stopping someone from using this + // method with `ctx` being an argument that is not part of a + // CompressionStream. This check catches that potential discrepancy in debug + // builds. std::launder is necessary to keep the compiler from optimizing + // away the check in the (common) case that `CompressionContext` is a final + // class. + DCHECK_EQ(std::launder(&self->ctx_)->MemoryInfoName(), + CompressionContext{}.MemoryInfoName()); + return self->as_allocator_opaque_value(); + } + protected: CompressionContext* context() { return &ctx_; } @@ -599,55 +678,11 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { init_done_ = true; } - // Allocation functions provided to zlib itself. We store the real size of - // the allocated memory chunk just before the "payload" memory we return - // to zlib. - // Because we use zlib off the thread pool, we can not report memory directly - // to V8; rather, we first store it as "unreported" memory in a separate - // field and later report it back from the main thread. - static void* AllocForZlib(void* data, uInt items, uInt size) { - size_t real_size = - MultiplyWithOverflowCheck(static_cast(items), - static_cast(size)); - return AllocForBrotli(data, real_size); - } - - static constexpr size_t reserveSizeAndAlign = - std::max(sizeof(size_t), alignof(max_align_t)); - - static void* AllocForBrotli(void* data, size_t size) { - size += reserveSizeAndAlign; - CompressionStream* ctx = static_cast(data); - char* memory = UncheckedMalloc(size); - if (memory == nullptr) [[unlikely]] { - return nullptr; - } - *reinterpret_cast(memory) = size; - ctx->unreported_allocations_.fetch_add(size, - std::memory_order_relaxed); - return memory + reserveSizeAndAlign; - } - - static void FreeForZlib(void* data, void* pointer) { - if (pointer == nullptr) [[unlikely]] { - return; - } - CompressionStream* ctx = static_cast(data); - char* real_pointer = static_cast(pointer) - reserveSizeAndAlign; - size_t real_size = *reinterpret_cast(real_pointer); - ctx->unreported_allocations_.fetch_sub(real_size, - std::memory_order_relaxed); - free(real_pointer); - } - // This is called on the main thread after zlib may have allocated something // in order to report it back to V8. void AdjustAmountOfExternalAllocatedMemory() { - ssize_t report = - unreported_allocations_.exchange(0, std::memory_order_relaxed); + ssize_t report = ComputeAdjustmentToExternalAllocatedMemory(); if (report == 0) return; - CHECK_IMPLIES(report < 0, zlib_memory_ >= static_cast(-report)); - zlib_memory_ += report; AsyncWrap::env()->external_memory_accounter()->Update( AsyncWrap::env()->isolate(), report); } @@ -678,8 +713,6 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { bool closed_ = false; unsigned int refs_ = 0; uint32_t* write_result_ = nullptr; - std::atomic unreported_allocations_{0}; - size_t zlib_memory_ = 0; CompressionContext ctx_; }; @@ -755,8 +788,6 @@ class ZlibStream final : public CompressionStream { wrap->InitStream(write_result, write_js_callback); AllocScope alloc_scope(wrap); - wrap->context()->SetAllocationFunctions( - AllocForZlib, FreeForZlib, static_cast(wrap)); wrap->context()->Init(level, window_bits, mem_level, strategy, std::move(dictionary)); } @@ -807,7 +838,8 @@ class BrotliCompressionStream final : static void Init(const FunctionCallbackInfo& args) { BrotliCompressionStream* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This()); - CHECK(args.Length() == 3 && "init(params, writeResult, writeCallback)"); + CHECK((args.Length() == 3 || args.Length() == 4) && + "init(params, writeResult, writeCallback[, dictionary])"); CHECK(args[1]->IsUint32Array()); CHECK_GE(args[1].As()->Length(), 2); @@ -818,11 +850,18 @@ class BrotliCompressionStream final : wrap->InitStream(write_result, write_js_callback); AllocScope alloc_scope(wrap); - CompressionError err = - wrap->context()->Init( - CompressionStream::AllocForBrotli, - CompressionStream::FreeForZlib, - static_cast*>(wrap)); + std::vector dictionary; + if (args.Length() == 4 && !args[3]->IsUndefined()) { + if (!args[3]->IsArrayBufferView()) { + THROW_ERR_INVALID_ARG_TYPE( + wrap->env(), "dictionary must be an ArrayBufferView if provided"); + return; + } + ArrayBufferViewContents contents(args[3]); + dictionary.assign(contents.data(), contents.data() + contents.length()); + } + + CompressionError err = wrap->context()->Init(std::move(dictionary)); if (err.IsError()) { wrap->EmitError(err); // TODO(addaleax): Sometimes we generate better error codes in C++ land, @@ -1181,19 +1220,15 @@ CompressionError ZlibContext::ResetStream() { return SetDictionary(); } - -void ZlibContext::SetAllocationFunctions(alloc_func alloc, - free_func free, - void* opaque) { - strm_.zalloc = alloc; - strm_.zfree = free; - strm_.opaque = opaque; -} - - void ZlibContext::Init( int level, int window_bits, int mem_level, int strategy, std::vector&& dictionary) { + // Set allocation functions + strm_.zalloc = CompressionStreamMemoryOwner::AllocForZlib; + strm_.zfree = CompressionStreamMemoryOwner::FreeForZlib; + strm_.opaque = + CompressionStream::AllocatorOpaquePointerForContext(this); + if (!((window_bits == 0) && (mode_ == INFLATE || mode_ == GUNZIP || @@ -1372,27 +1407,61 @@ void BrotliEncoderContext::DoThreadPoolWork() { void BrotliEncoderContext::Close() { state_.reset(); + prepared_dictionary_.reset(); + dictionary_.clear(); mode_ = NONE; } -CompressionError BrotliEncoderContext::Init(brotli_alloc_func alloc, - brotli_free_func free, - void* opaque) { - alloc_ = alloc; - free_ = free; - alloc_opaque_ = opaque; +CompressionError BrotliEncoderContext::Init(std::vector&& dictionary) { + brotli_alloc_func alloc = CompressionStreamMemoryOwner::AllocForBrotli; + brotli_free_func free = CompressionStreamMemoryOwner::FreeForZlib; + void* opaque = + CompressionStream::AllocatorOpaquePointerForContext( + this); + + // Clean up any previous dictionary state before re-initializing. + prepared_dictionary_.reset(); + dictionary_.clear(); + state_.reset(BrotliEncoderCreateInstance(alloc, free, opaque)); if (!state_) { return CompressionError("Could not initialize Brotli instance", "ERR_ZLIB_INITIALIZATION_FAILED", -1); - } else { - return CompressionError {}; } + + if (!dictionary.empty()) { + // The dictionary data must remain valid for the lifetime of the prepared + // dictionary, so take ownership via move. + dictionary_ = std::move(dictionary); + + prepared_dictionary_.reset( + BrotliEncoderPrepareDictionary(BROTLI_SHARED_DICTIONARY_RAW, + dictionary_.size(), + dictionary_.data(), + BROTLI_MAX_QUALITY, + alloc, + free, + opaque)); + if (!prepared_dictionary_) { + return CompressionError("Failed to prepare brotli dictionary", + "ERR_ZLIB_DICTIONARY_LOAD_FAILED", + -1); + } + + if (!BrotliEncoderAttachPreparedDictionary(state_.get(), + prepared_dictionary_.get())) { + return CompressionError("Failed to attach brotli dictionary", + "ERR_ZLIB_DICTIONARY_LOAD_FAILED", + -1); + } + } + + return CompressionError{}; } CompressionError BrotliEncoderContext::ResetStream() { - return Init(alloc_, free_, alloc_opaque_); + return Init(); } CompressionError BrotliEncoderContext::SetParams(int key, uint32_t value) { @@ -1420,6 +1489,7 @@ CompressionError BrotliEncoderContext::GetErrorInfo() const { void BrotliDecoderContext::Close() { state_.reset(); + dictionary_.clear(); mode_ = NONE; } @@ -1440,24 +1510,43 @@ void BrotliDecoderContext::DoThreadPoolWork() { } } -CompressionError BrotliDecoderContext::Init(brotli_alloc_func alloc, - brotli_free_func free, - void* opaque) { - alloc_ = alloc; - free_ = free; - alloc_opaque_ = opaque; +CompressionError BrotliDecoderContext::Init(std::vector&& dictionary) { + brotli_alloc_func alloc = CompressionStreamMemoryOwner::AllocForBrotli; + brotli_free_func free = CompressionStreamMemoryOwner::FreeForZlib; + void* opaque = + CompressionStream::AllocatorOpaquePointerForContext( + this); + + // Clean up any previous dictionary state before re-initializing. + dictionary_.clear(); + state_.reset(BrotliDecoderCreateInstance(alloc, free, opaque)); if (!state_) { return CompressionError("Could not initialize Brotli instance", "ERR_ZLIB_INITIALIZATION_FAILED", -1); - } else { - return CompressionError {}; } + + if (!dictionary.empty()) { + // The dictionary data must remain valid for the lifetime of the decoder, + // so take ownership via move. + dictionary_ = std::move(dictionary); + + if (!BrotliDecoderAttachDictionary(state_.get(), + BROTLI_SHARED_DICTIONARY_RAW, + dictionary_.size(), + dictionary_.data())) { + return CompressionError("Failed to attach brotli dictionary", + "ERR_ZLIB_DICTIONARY_LOAD_FAILED", + -1); + } + } + + return CompressionError{}; } CompressionError BrotliDecoderContext::ResetStream() { - return Init(alloc_, free_, alloc_opaque_); + return Init(); } CompressionError BrotliDecoderContext::SetParams(int key, uint32_t value) { @@ -1488,8 +1577,6 @@ CompressionError BrotliDecoderContext::GetErrorInfo() const { } } -void ZstdContext::Close() {} - void ZstdContext::SetBuffers(const char* in, uint32_t in_len, char* out, @@ -1533,10 +1620,23 @@ CompressionError ZstdCompressContext::SetParameter(int key, int value) { return {}; } +void ZstdCompressContext::Close() { + cctx_.reset(); +} + CompressionError ZstdCompressContext::Init(uint64_t pledged_src_size, std::string_view dictionary) { pledged_src_size_ = pledged_src_size; +#ifdef NODE_BUNDLED_ZSTD + ZSTD_customMem custom_mem = { + CompressionStreamMemoryOwner::AllocForBrotli, + CompressionStreamMemoryOwner::FreeForZlib, + CompressionStream::AllocatorOpaquePointerForContext( + this)}; + cctx_.reset(ZSTD_createCCtx_advanced(custom_mem)); +#else cctx_.reset(ZSTD_createCCtx()); +#endif if (!cctx_) { return CompressionError("Could not initialize zstd instance", "ERR_ZLIB_INITIALIZATION_FAILED", @@ -1585,9 +1685,22 @@ CompressionError ZstdDecompressContext::SetParameter(int key, int value) { return {}; } +void ZstdDecompressContext::Close() { + dctx_.reset(); +} + CompressionError ZstdDecompressContext::Init(uint64_t pledged_src_size, std::string_view dictionary) { +#ifdef NODE_BUNDLED_ZSTD + ZSTD_customMem custom_mem = { + CompressionStreamMemoryOwner::AllocForBrotli, + CompressionStreamMemoryOwner::FreeForZlib, + CompressionStream< + ZstdDecompressContext>::AllocatorOpaquePointerForContext(this)}; + dctx_.reset(ZSTD_createDCtx_advanced(custom_mem)); +#else dctx_.reset(ZSTD_createDCtx()); +#endif if (!dctx_) { return CompressionError("Could not initialize zstd instance", "ERR_ZLIB_INITIALIZATION_FAILED", diff --git a/src/permission/fs_permission.cc b/src/permission/fs_permission.cc index 63dfc25f536c7c..3b817c5bcdce75 100644 --- a/src/permission/fs_permission.cc +++ b/src/permission/fs_permission.cc @@ -102,10 +102,8 @@ void PrintTree(const node::permission::FSPermission::RadixTree::Node* node, } } - node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s%s\n", - indent.c_str(), - node->prefix.c_str()); + node::per_process::Debug( + node::DebugCategory::PERMISSION_MODEL, "%s%s\n", indent, node->prefix); } if (node->children.size() > 0) { diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index 3e8e4a65a81bdd..5c9379fca83687 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -1,6 +1,7 @@ +#include "libplatform/libplatform.h" #include "node_buffer.h" #include "node_internals.h" -#include "libplatform/libplatform.h" +#include "node_url.h" #include "util.h" #include @@ -849,6 +850,171 @@ TEST_F(EnvironmentTest, LoadEnvironmentWithESModule) { EXPECT_EQ(frame_str.ToString(), " at embedded:esm.mjs:3:15"); } +static const char* dynamic_import_source = + "const importedProcess = import('node:process');\n" + "const importedNonBuiltin = import('./non-existent.mjs');\n" + "importedNonBuiltin.catch((err) => \n" + " globalThis.importedNonBuiltinStack = err.stack)\n"; +void CheckDynamicImportResult(v8::Isolate* isolate, + v8::Local result) { + v8::Local context = isolate->GetCurrentContext(); + // Check the result of import('node:process'). + EXPECT_TRUE(result->IsObject()); + v8::Local imported_process = + result.As() + ->Get(context, + v8::String::NewFromUtf8Literal(isolate, "importedProcess")) + .ToLocalChecked(); + EXPECT_TRUE(imported_process->IsPromise()); + EXPECT_EQ(imported_process.As()->State(), + v8::Promise::kFulfilled); + v8::Local imported_value = + imported_process.As()->Result(); + EXPECT_TRUE(imported_value->IsObject()); + v8::Local dynamic_process = + imported_value.As() + ->Get(context, v8::String::NewFromUtf8Literal(isolate, "default")) + .ToLocalChecked(); + EXPECT_TRUE(dynamic_process->IsObject()); + + v8::Local global_process_value = + context->Global() + ->Get(context, v8::String::NewFromUtf8Literal(isolate, "process")) + .ToLocalChecked(); + EXPECT_TRUE(global_process_value->IsObject()); + EXPECT_TRUE(dynamic_process->StrictEquals(global_process_value)); + + // Check the result of import('./non-existent.mjs') + v8::Local imported_non_builtin = + result.As() + ->Get(context, + v8::String::NewFromUtf8Literal(isolate, "importedNonBuiltin")) + .ToLocalChecked(); + EXPECT_TRUE(imported_non_builtin->IsPromise()); + EXPECT_EQ(imported_non_builtin.As()->State(), + v8::Promise::kRejected); + + // Check the error message + v8::Local imported_non_builtin_stack = + context->Global() + ->Get(context, + v8::String::NewFromUtf8Literal(isolate, + "importedNonBuiltinStack")) + .ToLocalChecked(); + EXPECT_TRUE(imported_non_builtin_stack->IsString()); + node::Utf8Value error_str(isolate, imported_non_builtin_stack); + // Error stack should include "ERR_UNKNOWN_BUILTIN_MODULE" + EXPECT_NE(error_str.ToString().find("ERR_UNKNOWN_BUILTIN_MODULE"), + std::string::npos); + // Error stack should include "No such built-in module: ./non-existent.mjs" + EXPECT_NE( + error_str.ToString().find("No such built-in module: ./non-existent.mjs"), + std::string::npos); +} + +TEST_F(EnvironmentTest, LoadEnvironmentWithESModuleDynamicImport) { + const v8::HandleScope handle_scope(isolate_); + const Argv argv; + Env env{handle_scope, argv}; + + // Test dynamic import('node:process') in entry point. + std::string source = std::string(dynamic_import_source) + + "export { importedProcess, importedNonBuiltin };\n"; + node::ModuleData entry_point; + entry_point.set_source(source); + entry_point.set_format(node::ModuleFormat::kModule); + entry_point.set_resource_name("embedded:dynamic-import.mjs"); + + v8::Local result = + node::LoadEnvironment(*env, &entry_point).ToLocalChecked(); + + // Finish the await. + v8::Local context = isolate_->GetCurrentContext(); + context->GetMicrotaskQueue()->PerformCheckpoint(isolate_); + CheckDynamicImportResult(isolate_, result); +} + +TEST_F(EnvironmentTest, LoadEnvironmentWithCommonJSDynamicImport) { + const v8::HandleScope handle_scope(isolate_); + const Argv argv; + Env env{handle_scope, argv}; + + std::string source = std::string(dynamic_import_source) + + "return { importedProcess, importedNonBuiltin };\n"; + node::ModuleData entry_point; + entry_point.set_source(source); + entry_point.set_format(node::ModuleFormat::kCommonJS); + entry_point.set_resource_name("/test-cjs-dynamic-import.js"); + + v8::Local result = + node::LoadEnvironment(*env, &entry_point).ToLocalChecked(); + + // Finish the await. + v8::Local context = isolate_->GetCurrentContext(); + context->GetMicrotaskQueue()->PerformCheckpoint(isolate_); + CheckDynamicImportResult(isolate_, result); +} + +TEST_F(EnvironmentTest, LoadEnvironmentWithESModuleImportMeta) { + const v8::HandleScope handle_scope(isolate_); + const Argv argv; + Env env{handle_scope, argv}; + + node::ModuleData entry_point; + // Test import.meta properties in ESM entry point. + std::string source = "export const url = import.meta.url;\n" + "export const main = import.meta.main;\n" + "export const filename = import.meta.filename;\n" + "export const dirname = import.meta.dirname;\n"; + std::string exec_path = (*env)->exec_path(); + std::string url = node::url::FromFilePath(exec_path); + entry_point.set_source(source); + entry_point.set_format(node::ModuleFormat::kModule); + entry_point.set_resource_name(url); + + v8::Local result = + node::LoadEnvironment(*env, &entry_point).ToLocalChecked(); + + EXPECT_TRUE(result->IsObject()); + v8::Local context = isolate_->GetCurrentContext(); + + // Check import.meta.url + v8::Local url_value = + result.As() + ->Get(context, v8::String::NewFromUtf8Literal(isolate_, "url")) + .ToLocalChecked(); + EXPECT_TRUE(url_value->IsString()); + node::Utf8Value url_str(isolate_, url_value); + EXPECT_EQ(url_str.ToStringView(), url); + + // Check import.meta.main + v8::Local main_value = + result.As() + ->Get(context, v8::String::NewFromUtf8Literal(isolate_, "main")) + .ToLocalChecked(); + EXPECT_TRUE(main_value->IsBoolean()); + EXPECT_TRUE(main_value->BooleanValue(isolate_)); + + // Check import.meta.filename + v8::Local filename_value = + result.As() + ->Get(context, v8::String::NewFromUtf8Literal(isolate_, "filename")) + .ToLocalChecked(); + EXPECT_TRUE(filename_value->IsString()); + node::Utf8Value filename_str(isolate_, filename_value); + EXPECT_EQ(filename_str.ToStringView(), exec_path); + + // Check import.meta.dirname + v8::Local dirname_value = + result.As() + ->Get(context, v8::String::NewFromUtf8Literal(isolate_, "dirname")) + .ToLocalChecked(); + EXPECT_TRUE(dirname_value->IsString()); + node::Utf8Value dirname_str(isolate_, dirname_value); + // Just check that dirname is a substring of exec_path + EXPECT_NE(exec_path.find(dirname_str.ToStringView()), std::string::npos); +} + TEST_F(EnvironmentTest, LoadEnvironmentWithCallbackWithCommonJSModule) { const v8::HandleScope handle_scope(isolate_); const Argv argv; diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js index 2b27db283167fc..9a7482020e098a 100644 --- a/test/common/assertSnapshot.js +++ b/test/common/assertSnapshot.js @@ -3,11 +3,30 @@ const common = require('.'); const path = require('node:path'); const test = require('node:test'); const fs = require('node:fs/promises'); +const { realpathSync } = require('node:fs'); const assert = require('node:assert/strict'); const { pathToFileURL } = require('node:url'); const { hostname } = require('node:os'); -const stackFramesRegexp = /(?<=\n)(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g; +/* eslint-disable @stylistic/js/max-len,no-control-regex */ +/** + * Group 1: Line start (including color codes and escapes) + * Group 2: Function name + * Group 3: Filename + * Group 4: Line number + * Group 5: Column number + * Group 6: Line end (including color codes and `{` which indicates the start of an error object details) + */ +// Mappings: (g1 ) (g2 ) (g3 ) (g4 ) (g5 ) (g6 ) +const internalStackFramesRegexp = /(?<=\n)(\s*(?:\x1b?\[\d+m\s+)?(?:at\s+)?)(?:async\s+)?(?:(.+?)\s+\()?(?:(node:.+?):(\d+)(?::(\d+))?)\)?((?:\x1b?\[\d+m)?\s*{?\n|$)/g; +/** + * Group 1: Filename + * Group 2: Line number + * Group 3: Line end and source code line + */ +const internalErrorSourceLines = /(?<=\n|^)(node:.+?):(\d+)(\n.*\n\s*\^(?:\n|$))/g; +/* eslint-enable @stylistic/js/max-len,no-control-regex */ + const windowNewlineRegexp = /\r/g; // Replaces the current Node.js executable version strings with a @@ -17,14 +36,33 @@ function replaceNodeVersion(str) { return str.replaceAll(`Node.js ${process.version}`, 'Node.js '); } -function replaceStackTrace(str, replacement = '$1*$7$8\n') { - return str.replace(stackFramesRegexp, replacement); +// Collapse consecutive identical lines containing the keyword into +// one single line. The `str` should have been processed by `replaceWindowsLineEndings`. +function foldIdenticalLines(str, keyword) { + const lines = str.split('\n'); + const folded = lines.filter((line, idx) => { + if (idx === 0) { + return true; + } + if (line.includes(keyword) && line === lines[idx - 1]) { + return false; + } + return true; + }); + return folded.join('\n'); } +const kInternalFrame = ''; +// Replace non-internal frame `at TracingChannel.traceSync (node:diagnostics_channel:328:14)` +// as well as `at node:internal/main/run_main_module:33:47` with `at `. +// Also replaces error source line like: +// node:internal/mod.js:44 +// throw err; +// ^ function replaceInternalStackTrace(str) { - // Replace non-internal frame `at TracingChannel.traceSync (node:diagnostics_channel:328:14)` - // as well as `at node:internal/main/run_main_module:33:47` with `*`. - return str.replaceAll(/(\W+).*[(\s]node:.*/g, '$1*'); + const result = str.replaceAll(internalErrorSourceLines, `$1:$3`) + .replaceAll(internalStackFramesRegexp, `$1${kInternalFrame}$6`); + return foldIdenticalLines(result, kInternalFrame); } // Replaces Windows line endings with posix line endings for unified snapshots @@ -36,7 +74,12 @@ function replaceWindowsLineEndings(str) { // Replaces all Windows path separators with posix separators for unified snapshots // across platforms. function replaceWindowsPaths(str) { - return common.isWindows ? str.replaceAll(path.win32.sep, path.posix.sep) : str; + if (!common.isWindows) { + return str; + } + // Only replace `\` and `\\` with a leading letter, colon, or a `.`. + // Avoid replacing escaping patterns like ` \#`, `\ `, or `\\`. + return str.replaceAll(/(?<=(\w:|\.|\w+)(?:\S|\\ )*)\\\\?/g, '/'); } // Removes line trailing white spaces. @@ -55,30 +98,53 @@ function replaceWarningPid(str) { return str.replaceAll(/\(node:\d+\)/g, '(node:)'); } -// Replaces path strings representing the nodejs/node repo full project root with -// ``. Also replaces file URLs containing the full project root path. -// The project root path may contain unicode characters. -function transformProjectRoot(replacement = '') { - const projectRoot = path.resolve(__dirname, '../..'); +// Replaces a path with a placeholder. The path can be a platform specific path +// or a file URL. +function transformPath(dirname, replacement) { // Handles output already processed by `replaceWindowsPaths`. - const winPath = replaceWindowsPaths(projectRoot); - // Handles URL encoded project root in file URL strings as well. - const urlEncoded = pathToFileURL(projectRoot).pathname; + const winPath = replaceWindowsPaths(dirname); + // Handles URL encoded path in file URL strings as well. + const urlEncoded = pathToFileURL(dirname).pathname; // On Windows, paths are case-insensitive, so we need to use case-insensitive // regex replacement to handle cases where the drive letter case differs. const flags = common.isWindows ? 'gi' : 'g'; const urlEncodedRegex = new RegExp(RegExp.escape(urlEncoded), flags); - const projectRootRegex = new RegExp(RegExp.escape(projectRoot), flags); + const dirnameRegex = new RegExp(RegExp.escape(dirname), flags); const winPathRegex = new RegExp(RegExp.escape(winPath), flags); return (str) => { return str.replaceAll('\\\'', "'") // Replace fileUrl first as `winPath` could be a substring of the fileUrl. .replaceAll(urlEncodedRegex, replacement) - .replaceAll(projectRootRegex, replacement) + .replaceAll(dirnameRegex, replacement) .replaceAll(winPathRegex, replacement); }; } +// Replaces path strings representing the nodejs/node repo full project root with +// ``. Also replaces file URLs containing the full project root path. +// The project root path may contain unicode characters. +const kProjectRoot = ''; +function transformProjectRoot() { + const projectRoot = path.resolve(__dirname, '../..'); + if (process.env.NODE_TEST_DIR) { + const testDir = realpathSync(process.env.NODE_TEST_DIR); + // On Jenkins CI, the test dir may be overridden by `NODE_TEST_DIR`. + return transform( + transformPath(projectRoot, kProjectRoot), + transformPath(testDir, `${kProjectRoot}/test`), + // TODO(legendecas): test-runner may print relative paths to the test relative to cwd. + // It will be better if we could distinguish them from the project root. + transformPath(path.relative(projectRoot, testDir), 'test'), + ); + } + return transformPath(projectRoot, kProjectRoot); +} + +// Replaces tmpdirs created by `test/common/tmpdir.js`. +function transformTmpDir(str) { + return str.replaceAll(/\/\.tmp\.\d+\//g, '//'); +} + function transform(...args) { return (str) => args.reduce((acc, fn) => fn(acc), str); } @@ -149,14 +215,10 @@ function replaceTestDuration(str) { } const root = path.resolve(__dirname, '..', '..'); -const color = '(\\[\\d+m)'; -const stackTraceBasePath = new RegExp(`${color}\\(${RegExp.escape(root)}/?${color}(.*)${color}\\)`, 'g'); - function replaceSpecDuration(str) { return str .replaceAll(/[0-9.]+ms/g, '*ms') - .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') - .replace(stackTraceBasePath, '$3'); + .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *'); } function replaceJunitDuration(str) { @@ -164,16 +226,7 @@ function replaceJunitDuration(str) { .replaceAll(/time="[0-9.]+"/g, 'time="*"') .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') .replaceAll(`hostname="${hostname()}"`, 'hostname="HOSTNAME"') - .replaceAll(/file="[^"]*"/g, 'file="*"') - .replace(stackTraceBasePath, '$3'); -} - -function removeWindowsPathEscaping(str) { - return common.isWindows ? str.replaceAll(/\\\\/g, '\\') : str; -} - -function replaceTestLocationLine(str) { - return str.replaceAll(/(js:)(\d+)(:\d+)/g, '$1(LINE)$3'); + .replaceAll(/file="[^"]*"/g, 'file="*"'); } // The Node test coverage returns results for all files called by the test. This @@ -194,40 +247,37 @@ function pickTestFileFromLcov(str) { } // Transforms basic patterns like: -// - platform specific path and line endings, -// - line trailing spaces, -// - executable specific path and versions. +// - platform specific path and line endings +// - line trailing spaces +// - executable specific path and versions +// - project root path and tmpdir +// - node internal stack frames const basicTransform = transform( replaceWindowsLineEndings, replaceTrailingSpaces, - removeWindowsPathEscaping, replaceWindowsPaths, replaceNodeVersion, generalizeExeName, replaceWarningPid, + transformProjectRoot(), + transformTmpDir, + replaceInternalStackTrace, ); const defaultTransform = transform( basicTransform, - replaceStackTrace, - transformProjectRoot(), replaceTestDuration, - replaceTestLocationLine, ); const specTransform = transform( replaceSpecDuration, basicTransform, - replaceStackTrace, ); const junitTransform = transform( replaceJunitDuration, basicTransform, - replaceStackTrace, ); const lcovTransform = transform( basicTransform, - replaceStackTrace, - transformProjectRoot(), pickTestFileFromLcov, ); @@ -246,7 +296,6 @@ module.exports = { assertSnapshot, getSnapshotPath, replaceNodeVersion, - replaceStackTrace, replaceInternalStackTrace, replaceWindowsLineEndings, replaceWindowsPaths, diff --git a/test/doctool/test-doc-api-json.mjs b/test/doctool/test-doc-api-json.mjs index 317260245c8f23..6354accfec1e34 100644 --- a/test/doctool/test-doc-api-json.mjs +++ b/test/doctool/test-doc-api-json.mjs @@ -152,7 +152,8 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import 'n-api.md': ['introduced_in', 'stability', 'stabilityText', 'miscs'], 'packages.md': ['introduced_in', 'meta', 'miscs'], 'process.md': ['globals'], - 'report.md': ['introduced_in', 'stability', 'stabilityText', 'meta', 'miscs'], + 'report.md': ['introduced_in', 'meta', 'stability', 'stabilityText', 'miscs'], + 'synopsis.md': ['introduced_in', 'miscs'], }[dirent.name] ?? ['modules'])]); assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json)); diff --git a/test/doctool/test-stability-block-position.mjs b/test/doctool/test-stability-block-position.mjs new file mode 100644 index 00000000000000..d1bd509cd2bd93 --- /dev/null +++ b/test/doctool/test-stability-block-position.mjs @@ -0,0 +1,52 @@ +import '../common/index.mjs'; + +import fs from 'fs'; +import assert from 'assert'; + +import { + remarkParse, + unified, +} from '../../tools/doc/deps.mjs'; + +const ignore = ['deprecations.md', 'documentation.md']; + +const docURL = new URL('../../doc/api/', import.meta.url); +const docList = fs.readdirSync(docURL).filter((filename) => !ignore.includes(filename)); + +const re = /^Stability: \d/; + +for (const file of docList) { + const fileURL = new URL(file, docURL); + const tree = unified() + .use(remarkParse) + .parse(fs.readFileSync(fileURL)); + + // Traverse first-level nodes, ignoring comment blocks + const nodes = tree.children.filter((node) => node.type !== 'html'); + + for (let i = 0; i < nodes.length; i++) { + const { [i]: node, [i - 1]: previousNode } = nodes; + if (node.type !== 'blockquote' || !node.children.length) continue; + + const paragraph = node.children[0]; + if (paragraph.type !== 'paragraph' || !paragraph.children.length) continue; + + const text = paragraph.children[0]; + if (text.type !== 'text' || !re.exec(text.value)) continue; + + // Check that previous node type (excluding comment blocks) is one of: + // * 'heading' + // * 'paragraph' with a leading 'strong' node (pseudo-heading, eg. assert.equal) + try { + assert(previousNode.type === 'heading' || + (previousNode.type === 'paragraph' && previousNode.children[0]?.type === 'strong'), + 'Stability block must be the first content element under heading'); + } catch (error) { + const { line, column } = node.position.start; + error.stack = error.stack.split('\n') + .toSpliced(1, 0, ` at ${fileURL}:${line}:${column}`) + .join('\n'); + throw error; + } + } +} diff --git a/test/embedding/test-embedding-create-require-fs.js b/test/embedding/test-embedding-create-require-fs.js new file mode 100644 index 00000000000000..28a09f60d99eb8 --- /dev/null +++ b/test/embedding/test-embedding-create-require-fs.js @@ -0,0 +1,17 @@ +'use strict'; + +// Tests that createRequire() works correctly with local fs in embedded environments. +// The createRequire() call is in embedtest.cc. + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const { spawnSyncAndExit } = require('../common/child_process'); + +const fixturePath = JSON.stringify(fixtures.path('exit.js')); +spawnSyncAndExit( + common.resolveBuiltBinary('embedtest'), + [`require(${fixturePath})`, 92], + { + status: 92, + signal: null, + }); diff --git a/test/embedding/test-embedding-create-require-internal.js b/test/embedding/test-embedding-create-require-internal.js new file mode 100644 index 00000000000000..d88ae4e39a178c --- /dev/null +++ b/test/embedding/test-embedding-create-require-internal.js @@ -0,0 +1,15 @@ +'use strict'; + +// Tests that createRequire() from embedded environments still cannot access internals. +// The createRequire() call is in embedtest.cc. + +const common = require('../common'); +const { spawnSyncAndExit } = require('../common/child_process'); + +spawnSyncAndExit( + common.resolveBuiltBinary('embedtest'), + ['require("lib/internal/test/binding")'], + { + status: 1, + signal: null, + }); diff --git a/test/embedding/test-embedding-disable-node-env-vars.js b/test/embedding/test-embedding-disable-node-env-vars.js new file mode 100644 index 00000000000000..13492e916947a2 --- /dev/null +++ b/test/embedding/test-embedding-disable-node-env-vars.js @@ -0,0 +1,27 @@ +'use strict'; + +// Tests node::ProcessInitializationFlags::kDisableNodeOptionsEnv works correctly. + +const common = require('../common'); +const { spawnSyncAndExit } = require('../common/child_process'); +const os = require('os'); + +if (process.config.variables.node_without_node_options) { + common.skip('NODE_REPL_EXTERNAL_MODULE cannot be tested with --without-node-options'); +} + +const embedtest = common.resolveBuiltBinary('embedtest'); +spawnSyncAndExit( + embedtest, + ['require("os")'], + { + env: { + ...process.env, + 'NODE_REPL_EXTERNAL_MODULE': 'fs', + }, + }, + { + status: 9, + signal: null, + stderr: `${embedtest}: NODE_REPL_EXTERNAL_MODULE can't be used with kDisableNodeOptionsEnv${os.EOL}`, + }); diff --git a/test/embedding/test-embedding-exit-code.js b/test/embedding/test-embedding-exit-code.js new file mode 100644 index 00000000000000..35cd7ffc125397 --- /dev/null +++ b/test/embedding/test-embedding-exit-code.js @@ -0,0 +1,14 @@ +'use strict'; + +// Tests that process.exitCode works correctly in embedded environments. + +const common = require('../common'); +const { spawnSyncAndExit } = require('../common/child_process'); + +spawnSyncAndExit( + common.resolveBuiltBinary('embedtest'), + ['process.exitCode = 8'], + { + status: 8, + signal: null, + }); diff --git a/test/embedding/test-embedding-load-environment-basic.js b/test/embedding/test-embedding-load-environment-basic.js new file mode 100644 index 00000000000000..2627dd34fc1f50 --- /dev/null +++ b/test/embedding/test-embedding-load-environment-basic.js @@ -0,0 +1,16 @@ +'use strict'; + +// Tests node::LoadEnvironment() with main_script_source_utf8 works. + +const common = require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); + +const embedtest = common.resolveBuiltBinary('embedtest'); + +spawnSyncAndAssert( + embedtest, + ['console.log(42)'], + { + trim: true, + stdout: '42', + }); diff --git a/test/embedding/test-embedding-load-environment-utf8.js b/test/embedding/test-embedding-load-environment-utf8.js new file mode 100644 index 00000000000000..dfc5d52a86f65e --- /dev/null +++ b/test/embedding/test-embedding-load-environment-utf8.js @@ -0,0 +1,17 @@ +'use strict'; + +// Test node::LoadEnvironment() works with non-ASCII source code. The variable +// comes from embedtest.cc. + +const common = require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); + +const embedtest = common.resolveBuiltBinary('embedtest'); + +spawnSyncAndAssert( + embedtest, + ['console.log(embedVars.nön_ascıı)'], + { + trim: true, + stdout: '🏳️‍🌈', + }); diff --git a/test/embedding/test-embedding-snapshot-as-file.js b/test/embedding/test-embedding-snapshot-as-file.js new file mode 100644 index 00000000000000..5a9b4b1d928350 --- /dev/null +++ b/test/embedding/test-embedding-snapshot-as-file.js @@ -0,0 +1,50 @@ +'use strict'; + +// Tests node::EmbedderSnapshotData::FromFile() works correctly. +// The snapshot is created in embedtest.cc. + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); + +const { + spawnSyncAndAssert, + spawnSyncAndExitWithoutError, +} = require('../common/child_process'); + +const snapshotFixture = fixtures.path('snapshot', 'echo-args.js'); +const embedtest = common.resolveBuiltBinary('embedtest'); + +const buildSnapshotExecArgs = [ + `eval(require("fs").readFileSync(${JSON.stringify(snapshotFixture)}, "utf8"))`, + 'arg1', 'arg2', +]; +const snapshotBlobArgs = [ + '--embedder-snapshot-blob', tmpdir.resolve('embedder-snapshot.blob'), +]; + +const runSnapshotExecArgs = ['arg3', 'arg4']; + +tmpdir.refresh(); + +// Build the snapshot with the --embedder-snapshot-as-file flag. +spawnSyncAndExitWithoutError( + embedtest, + ['--', ...buildSnapshotExecArgs, ...snapshotBlobArgs, '--embedder-snapshot-as-file', '--embedder-snapshot-create'], + { cwd: tmpdir.path }); + +// Run the snapshot and check the serialized and refreshed argv values. +spawnSyncAndAssert( + embedtest, + ['--', ...runSnapshotExecArgs, ...snapshotBlobArgs ], + { cwd: tmpdir.path }, + { + stdout(output) { + assert.deepStrictEqual(JSON.parse(output), { + originalArgv: [embedtest, '__node_anonymous_main', ...buildSnapshotExecArgs], + currentArgv: [embedtest, ...runSnapshotExecArgs], + }); + return true; + }, + }); diff --git a/test/embedding/test-embedding-snapshot-basic.js b/test/embedding/test-embedding-snapshot-basic.js new file mode 100644 index 00000000000000..8ace784116df92 --- /dev/null +++ b/test/embedding/test-embedding-snapshot-basic.js @@ -0,0 +1,50 @@ +'use strict'; + +// Tests snapshot support in embedded environments. +// See embedtest.cc for the API usage. + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); + +const { + spawnSyncAndAssert, + spawnSyncAndExitWithoutError, +} = require('../common/child_process'); + +const snapshotFixture = fixtures.path('snapshot', 'echo-args.js'); +const embedtest = common.resolveBuiltBinary('embedtest'); + +const buildSnapshotExecArgs = [ + `eval(require("fs").readFileSync(${JSON.stringify(snapshotFixture)}, "utf8"))`, + 'arg1', 'arg2', +]; +const snapshotBlobArgs = [ + '--embedder-snapshot-blob', tmpdir.resolve('embedder-snapshot.blob'), +]; + +const runSnapshotExecArgs = ['arg3', 'arg4']; + +tmpdir.refresh(); + +// Build the snapshot with the default flags. +spawnSyncAndExitWithoutError( + embedtest, + ['--', ...buildSnapshotExecArgs, ...snapshotBlobArgs, '--embedder-snapshot-create'], + { cwd: tmpdir.path }); + +// Run the snapshot and check the serialized and refreshed argv values. +spawnSyncAndAssert( + embedtest, + ['--', ...runSnapshotExecArgs, ...snapshotBlobArgs ], + { cwd: tmpdir.path }, + { + stdout(output) { + assert.deepStrictEqual(JSON.parse(output), { + originalArgv: [embedtest, '__node_anonymous_main', ...buildSnapshotExecArgs], + currentArgv: [embedtest, ...runSnapshotExecArgs], + }); + return true; + }, + }); diff --git a/test/embedding/test-embedding-snapshot-vm.js b/test/embedding/test-embedding-snapshot-vm.js new file mode 100644 index 00000000000000..0d60059056ad2f --- /dev/null +++ b/test/embedding/test-embedding-snapshot-vm.js @@ -0,0 +1,43 @@ +'use strict'; + +// Tests creating vm contexts after snapshot deserialization works +// in embedded environments. + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fixtures = require('../common/fixtures'); + +const { + spawnSyncAndAssert, + spawnSyncAndExitWithoutError, +} = require('../common/child_process'); + +const snapshotFixture = fixtures.path('snapshot', 'create-vm.js'); +const embedtest = common.resolveBuiltBinary('embedtest'); + +const buildSnapshotExecArgs = [ + `eval(require("fs").readFileSync(${JSON.stringify(snapshotFixture)}, "utf8"))`, + 'arg1', 'arg2', +]; +const snapshotBlobArgs = [ + '--embedder-snapshot-blob', tmpdir.resolve('embedder-snapshot.blob'), +]; + +const runSnapshotExecArgs = ['arg3', 'arg4']; + +tmpdir.refresh(); + +// Build the snapshot with the vm-creating code in serialized main funciton. +spawnSyncAndExitWithoutError( + embedtest, + ['--', ...buildSnapshotExecArgs, ...snapshotBlobArgs, '--embedder-snapshot-create'], + { cwd: tmpdir.path }); + +// Run the snapshot that creates a vm context from the snapshot. +spawnSyncAndAssert( + embedtest, + ['--', ...runSnapshotExecArgs, ...snapshotBlobArgs ], + { cwd: tmpdir.path }, + { + stdout: /value: 42/, + }); diff --git a/test/embedding/test-embedding-snapshot-without-code-cache.js b/test/embedding/test-embedding-snapshot-without-code-cache.js new file mode 100644 index 00000000000000..577ace1188ff40 --- /dev/null +++ b/test/embedding/test-embedding-snapshot-without-code-cache.js @@ -0,0 +1,50 @@ +'use strict'; + +// Tests node::SnapshotFlags::kWithoutCodeCache. See +// embedtest.cc for more details. + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); + +const { + spawnSyncAndAssert, + spawnSyncAndExitWithoutError, +} = require('../common/child_process'); + +const snapshotFixture = fixtures.path('snapshot', 'echo-args.js'); +const embedtest = common.resolveBuiltBinary('embedtest'); + +const buildSnapshotExecArgs = [ + `eval(require("fs").readFileSync(${JSON.stringify(snapshotFixture)}, "utf8"))`, + 'arg1', 'arg2', +]; +const snapshotBlobArgs = [ + '--embedder-snapshot-blob', tmpdir.resolve('embedder-snapshot.blob'), +]; + +const runSnapshotExecArgs = ['arg3', 'arg4']; + +tmpdir.refresh(); + +// Build the snapshot with the --without-code-cache flag. +spawnSyncAndExitWithoutError( + embedtest, + ['--', ...buildSnapshotExecArgs, ...snapshotBlobArgs, '--without-code-cache', '--embedder-snapshot-create'], + { cwd: tmpdir.path }); + +// Run the snapshot and check the serialized and refreshed argv values. +spawnSyncAndAssert( + embedtest, + ['--', ...runSnapshotExecArgs, ...snapshotBlobArgs ], + { cwd: tmpdir.path }, + { + stdout(output) { + assert.deepStrictEqual(JSON.parse(output), { + originalArgv: [embedtest, '__node_anonymous_main', ...buildSnapshotExecArgs], + currentArgv: [embedtest, ...runSnapshotExecArgs], + }); + return true; + }, + }); diff --git a/test/embedding/test-embedding-snapshot-worker.js b/test/embedding/test-embedding-snapshot-worker.js new file mode 100644 index 00000000000000..c6f665eed4d116 --- /dev/null +++ b/test/embedding/test-embedding-snapshot-worker.js @@ -0,0 +1,43 @@ +'use strict'; + +// Tests creating workers after snapshot deserialization works +// in embedded environments. + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fixtures = require('../common/fixtures'); + +const { + spawnSyncAndAssert, + spawnSyncAndExitWithoutError, +} = require('../common/child_process'); + +const snapshotFixture = fixtures.path('snapshot', 'create-worker.js'); +const embedtest = common.resolveBuiltBinary('embedtest'); + +const buildSnapshotExecArgs = [ + `eval(require("fs").readFileSync(${JSON.stringify(snapshotFixture)}, "utf8"))`, + 'arg1', 'arg2', +]; +const snapshotBlobArgs = [ + '--embedder-snapshot-blob', tmpdir.resolve('embedder-snapshot.blob'), +]; + +const runSnapshotExecArgs = ['arg3', 'arg4']; + +tmpdir.refresh(); + +// Build the snapshot with the worker-creating code in serialized main funciton. +spawnSyncAndExitWithoutError( + embedtest, + ['--', ...buildSnapshotExecArgs, ...snapshotBlobArgs, '--embedder-snapshot-create'], + { cwd: tmpdir.path }); + +// Run the snapshot that creates a worker from the snapshot. +spawnSyncAndAssert( + embedtest, + ['--', ...runSnapshotExecArgs, ...snapshotBlobArgs ], + { cwd: tmpdir.path }, + { + stdout: /value: 42/, + }); diff --git a/test/embedding/test-embedding-throw.js b/test/embedding/test-embedding-throw.js new file mode 100644 index 00000000000000..8aacade67d40df --- /dev/null +++ b/test/embedding/test-embedding-throw.js @@ -0,0 +1,14 @@ +'use strict'; + +// Tests that uncaught exceptions are handled correctly in embedded environments. + +const common = require('../common'); +const { spawnSyncAndExit } = require('../common/child_process'); + +spawnSyncAndExit( + common.resolveBuiltBinary('embedtest'), + ['throw new Error()'], + { + status: 1, + signal: null, + }); diff --git a/test/embedding/test-embedding.js b/test/embedding/test-embedding.js deleted file mode 100644 index 79d79079b4b8c6..00000000000000 --- a/test/embedding/test-embedding.js +++ /dev/null @@ -1,164 +0,0 @@ -'use strict'; -const common = require('../common'); -const fixtures = require('../common/fixtures'); -const tmpdir = require('../common/tmpdir'); -const assert = require('assert'); -const { - spawnSyncAndAssert, - spawnSyncAndExit, - spawnSyncAndExitWithoutError, -} = require('../common/child_process'); -const fs = require('fs'); -const os = require('os'); - -tmpdir.refresh(); -common.allowGlobals(global.require); -common.allowGlobals(global.embedVars); - -const binary = common.resolveBuiltBinary('embedtest'); - -spawnSyncAndAssert( - binary, - ['console.log(42)'], - { - trim: true, - stdout: '42', - }); - -spawnSyncAndAssert( - binary, - ['console.log(embedVars.nön_ascıı)'], - { - trim: true, - stdout: '🏳️‍🌈', - }); - -spawnSyncAndExit( - binary, - ['throw new Error()'], - { - status: 1, - signal: null, - }); - -spawnSyncAndExit( - binary, - ['require("lib/internal/test/binding")'], - { - status: 1, - signal: null, - }); - -spawnSyncAndExit( - binary, - ['process.exitCode = 8'], - { - status: 8, - signal: null, - }); - -const fixturePath = JSON.stringify(fixtures.path('exit.js')); -spawnSyncAndExit( - binary, - [`require(${fixturePath})`, 92], - { - status: 92, - signal: null, - }); - -function getReadFileCodeForPath(path) { - return `(require("fs").readFileSync(${JSON.stringify(path)}, "utf8"))`; -} - -// Basic snapshot support -for (const extraSnapshotArgs of [ - [], ['--embedder-snapshot-as-file'], ['--without-code-cache'], -]) { - // readSync + eval since snapshots don't support userland require() (yet) - const snapshotFixture = fixtures.path('snapshot', 'echo-args.js'); - const blobPath = tmpdir.resolve('embedder-snapshot.blob'); - const buildSnapshotExecArgs = [ - `eval(${getReadFileCodeForPath(snapshotFixture)})`, 'arg1', 'arg2', - ]; - const embedTestBuildArgs = [ - '--embedder-snapshot-blob', blobPath, '--embedder-snapshot-create', - ...extraSnapshotArgs, - ]; - const buildSnapshotArgs = [ - ...buildSnapshotExecArgs, - ...embedTestBuildArgs, - ]; - - const runSnapshotExecArgs = [ - 'arg3', 'arg4', - ]; - const embedTestRunArgs = [ - '--embedder-snapshot-blob', blobPath, - ...extraSnapshotArgs, - ]; - const runSnapshotArgs = [ - ...runSnapshotExecArgs, - ...embedTestRunArgs, - ]; - - fs.rmSync(blobPath, { force: true }); - spawnSyncAndExitWithoutError( - binary, - [ '--', ...buildSnapshotArgs ], - { cwd: tmpdir.path }); - spawnSyncAndAssert( - binary, - [ '--', ...runSnapshotArgs ], - { cwd: tmpdir.path }, - { - stdout(output) { - assert.deepStrictEqual(JSON.parse(output), { - originalArgv: [binary, '__node_anonymous_main', ...buildSnapshotExecArgs], - currentArgv: [binary, ...runSnapshotExecArgs], - }); - return true; - }, - }); -} - -// Create workers and vm contexts after deserialization -{ - const snapshotFixture = fixtures.path('snapshot', 'create-worker-and-vm.js'); - const blobPath = tmpdir.resolve('embedder-snapshot.blob'); - const buildSnapshotArgs = [ - `eval(${getReadFileCodeForPath(snapshotFixture)})`, - '--embedder-snapshot-blob', blobPath, '--embedder-snapshot-create', - ]; - const runEmbeddedArgs = [ - '--embedder-snapshot-blob', blobPath, - ]; - - fs.rmSync(blobPath, { force: true }); - - spawnSyncAndExitWithoutError( - binary, - [ '--', ...buildSnapshotArgs ], - { cwd: tmpdir.path }); - spawnSyncAndExitWithoutError( - binary, - [ '--', ...runEmbeddedArgs ], - { cwd: tmpdir.path }); -} - -// Guarantee NODE_REPL_EXTERNAL_MODULE won't bypass kDisableNodeOptionsEnv -if (!process.config.variables.node_without_node_options) { - spawnSyncAndExit( - binary, - ['require("os")'], - { - env: { - ...process.env, - 'NODE_REPL_EXTERNAL_MODULE': 'fs', - }, - }, - { - status: 9, - signal: null, - stderr: `${binary}: NODE_REPL_EXTERNAL_MODULE can't be used with kDisableNodeOptionsEnv${os.EOL}`, - }); -} diff --git a/test/embedding/testcfg.py b/test/embedding/testcfg.py index a4b90f490c670f..f63bc393a6a878 100644 --- a/test/embedding/testcfg.py +++ b/test/embedding/testcfg.py @@ -3,4 +3,4 @@ import testpy def GetConfiguration(context, root): - return testpy.SimpleTestConfiguration(context, root, 'embedding') + return testpy.ParallelTestConfiguration(context, root, 'embedding') diff --git a/test/es-module/test-extensionless-esm-type-commonjs.js b/test/es-module/test-extensionless-esm-type-commonjs.js new file mode 100644 index 00000000000000..cdfdf9361393e9 --- /dev/null +++ b/test/es-module/test-extensionless-esm-type-commonjs.js @@ -0,0 +1,19 @@ +'use strict'; + +require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); +const fixtures = require('../common/fixtures'); + +spawnSyncAndAssert(process.execPath, [ + fixtures.path('es-modules', 'extensionless-esm-commonjs', 'script'), +], { + status: 1, + stderr: /SyntaxError: Cannot use import statement outside a module/, +}); + +spawnSyncAndAssert(process.execPath, [ + fixtures.path('es-modules', 'extensionless-esm-module', 'script'), +], { + stdout: /script STARTED[\s\S]*v\d+\./, + trim: true, +}); diff --git a/test/fixtures/console/console.snapshot b/test/fixtures/console/console.snapshot index 4f1cb254811b6d..b6106485af1612 100644 --- a/test/fixtures/console/console.snapshot +++ b/test/fixtures/console/console.snapshot @@ -1,9 +1,3 @@ Trace: foo - at * - at * - at * - at * - at * - at * - at * - at * + at Object. (/test/fixtures/console/console.js:5:9) + at diff --git a/test/fixtures/console/stack_overflow.snapshot b/test/fixtures/console/stack_overflow.snapshot index e7e499e308dcb2..2af0ca42092301 100644 --- a/test/fixtures/console/stack_overflow.snapshot +++ b/test/fixtures/console/stack_overflow.snapshot @@ -1,5 +1,5 @@ before -/test/fixtures/console/stack_overflow.js:* +/test/fixtures/console/stack_overflow.js:39 JSON.stringify(array); ^ diff --git a/test/fixtures/errors/async_error_nexttick_main.snapshot b/test/fixtures/errors/async_error_nexttick_main.snapshot index 5f1dbc0d86bea5..a52b5b31440cc5 100644 --- a/test/fixtures/errors/async_error_nexttick_main.snapshot +++ b/test/fixtures/errors/async_error_nexttick_main.snapshot @@ -1,7 +1,7 @@ Error: test at one (/test/fixtures/async-error.js:4:9) at two (/test/fixtures/async-error.js:17:9) - at process.processTicksAndRejections (node:internal/process/task_queues:104:5) + at at async three (/test/fixtures/async-error.js:20:3) at async four (/test/fixtures/async-error.js:24:3) at async main (/test/fixtures/errors/async_error_nexttick_main.js:7:5) diff --git a/test/fixtures/errors/core_line_numbers.snapshot b/test/fixtures/errors/core_line_numbers.snapshot index 04fab485252eeb..0a5fc4f8840e97 100644 --- a/test/fixtures/errors/core_line_numbers.snapshot +++ b/test/fixtures/errors/core_line_numbers.snapshot @@ -1,10 +1,9 @@ -node:punycode:54 +node:punycode: throw new RangeError(errors[type]); ^ RangeError: Invalid input - at error (node:punycode:54:8) - at Object.decode (node:punycode:247:5) + at at Object. (/test/fixtures/errors/core_line_numbers.js:13:10) Node.js diff --git a/test/fixtures/errors/error_aggregateTwoErrors.snapshot b/test/fixtures/errors/error_aggregateTwoErrors.snapshot index ab0cafa534db5f..b87c639830cf91 100644 --- a/test/fixtures/errors/error_aggregateTwoErrors.snapshot +++ b/test/fixtures/errors/error_aggregateTwoErrors.snapshot @@ -1,17 +1,17 @@ -/test/fixtures/errors/error_aggregateTwoErrors.js:* +/test/fixtures/errors/error_aggregateTwoErrors.js:15 throw aggregateTwoErrors(err, originalError); ^ AggregateError: original - at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:*:*) { + at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:15:7) { code: 'ERR0', [errors]: [ Error: original - at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:*:*) { + at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:9:23) { code: 'ERR0' }, Error: second error - at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:*:*) { + at Object. (/test/fixtures/errors/error_aggregateTwoErrors.js:10:13) { code: 'ERR1' } ] diff --git a/test/fixtures/errors/error_exit.snapshot b/test/fixtures/errors/error_exit.snapshot index 0c046965647bb8..23df3a59245f54 100644 --- a/test/fixtures/errors/error_exit.snapshot +++ b/test/fixtures/errors/error_exit.snapshot @@ -1,5 +1,5 @@ Exiting with code=1 -node:assert:* +node:assert: throw new AssertionError(obj); ^ @@ -7,7 +7,7 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 1 !== 2 - at Object. (/test/fixtures/errors/error_exit.js:*:*) { + at Object. (/test/fixtures/errors/error_exit.js:32:8) { generatedMessage: true, code: 'ERR_ASSERTION', actual: 1, diff --git a/test/fixtures/errors/error_with_nul.snapshot b/test/fixtures/errors/error_with_nul.snapshot index b60c03fe89cb74..877fb8fa042e72 100644 Binary files a/test/fixtures/errors/error_with_nul.snapshot and b/test/fixtures/errors/error_with_nul.snapshot differ diff --git a/test/fixtures/errors/events_unhandled_error_common_trace.snapshot b/test/fixtures/errors/events_unhandled_error_common_trace.snapshot index 37b3e3b7785874..5c4a3c02d33825 100644 --- a/test/fixtures/errors/events_unhandled_error_common_trace.snapshot +++ b/test/fixtures/errors/events_unhandled_error_common_trace.snapshot @@ -1,12 +1,12 @@ -node:events:* +node:events: throw er; // Unhandled 'error' event ^ Error: foo:bar - at bar (/test/fixtures/errors/events_unhandled_error_common_trace.js:*:*) - at foo (/test/fixtures/errors/events_unhandled_error_common_trace.js:*:*) + at bar (/test/fixtures/errors/events_unhandled_error_common_trace.js:9:12) + at foo (/test/fixtures/errors/events_unhandled_error_common_trace.js:12:10) Emitted 'error' event at: - at quux (/test/fixtures/errors/events_unhandled_error_common_trace.js:*:*) - at Object. (/test/fixtures/errors/events_unhandled_error_common_trace.js:*:*) + at quux (/test/fixtures/errors/events_unhandled_error_common_trace.js:19:6) + at Object. (/test/fixtures/errors/events_unhandled_error_common_trace.js:22:1) Node.js diff --git a/test/fixtures/errors/events_unhandled_error_nexttick.snapshot b/test/fixtures/errors/events_unhandled_error_nexttick.snapshot index df8940bf9f7721..e789ecab2ab047 100644 --- a/test/fixtures/errors/events_unhandled_error_nexttick.snapshot +++ b/test/fixtures/errors/events_unhandled_error_nexttick.snapshot @@ -1,10 +1,10 @@ -node:events:* +node:events: throw er; // Unhandled 'error' event ^ Error - at Object. (/test/fixtures/errors/events_unhandled_error_nexttick.js:*:*) + at Object. (/test/fixtures/errors/events_unhandled_error_nexttick.js:6:12) Emitted 'error' event at: - at /test/fixtures/errors/events_unhandled_error_nexttick.js:*:* + at /test/fixtures/errors/events_unhandled_error_nexttick.js:8:22 Node.js diff --git a/test/fixtures/errors/events_unhandled_error_sameline.snapshot b/test/fixtures/errors/events_unhandled_error_sameline.snapshot index 700a7ace09c9d0..15e44b748edaff 100644 --- a/test/fixtures/errors/events_unhandled_error_sameline.snapshot +++ b/test/fixtures/errors/events_unhandled_error_sameline.snapshot @@ -1,10 +1,10 @@ -node:events:* +node:events: throw er; // Unhandled 'error' event ^ Error - at Object. (/test/fixtures/errors/events_unhandled_error_sameline.js:*:*) + at Object. (/test/fixtures/errors/events_unhandled_error_sameline.js:6:34) Emitted 'error' event at: - at Object. (/test/fixtures/errors/events_unhandled_error_sameline.js:*:*) + at Object. (/test/fixtures/errors/events_unhandled_error_sameline.js:6:20) Node.js diff --git a/test/fixtures/errors/events_unhandled_error_subclass.snapshot b/test/fixtures/errors/events_unhandled_error_subclass.snapshot index a1c2c0485aa4fc..1584badd956515 100644 --- a/test/fixtures/errors/events_unhandled_error_subclass.snapshot +++ b/test/fixtures/errors/events_unhandled_error_subclass.snapshot @@ -1,10 +1,10 @@ -node:events:* +node:events: throw er; // Unhandled 'error' event ^ Error - at Object. (/test/fixtures/errors/events_unhandled_error_subclass.js:*:*) + at Object. (/test/fixtures/errors/events_unhandled_error_subclass.js:7:25) Emitted 'error' event on Foo instance at: - at Object. (/test/fixtures/errors/events_unhandled_error_subclass.js:*:*) + at Object. (/test/fixtures/errors/events_unhandled_error_subclass.js:7:11) Node.js diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot index dd673d0bf9660f..5503072ab10f74 100644 --- a/test/fixtures/errors/force_colors.snapshot +++ b/test/fixtures/errors/force_colors.snapshot @@ -4,12 +4,6 @@ throw new Error('Should include grayed stack trace'); Error: Should include grayed stack trace at Object. (/test/fixtures/errors/force_colors.js:2:7) - at * - at * - at * - at * - at * - at * - at * + at  Node.js diff --git a/test/fixtures/errors/if-error-has-good-stack.snapshot b/test/fixtures/errors/if-error-has-good-stack.snapshot index 923e687c071315..91b7605d8f0ff4 100644 --- a/test/fixtures/errors/if-error-has-good-stack.snapshot +++ b/test/fixtures/errors/if-error-has-good-stack.snapshot @@ -1,23 +1,23 @@ -node:assert:* +node:assert: throw newErr; ^ AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error - at z (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at y (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at x (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at Object. (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at c (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at b (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at a (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at Object. (/test/fixtures/errors/if-error-has-good-stack.js:*:*) { + at z (/test/fixtures/errors/if-error-has-good-stack.js:21:14) + at y (/test/fixtures/errors/if-error-has-good-stack.js:22:7) + at x (/test/fixtures/errors/if-error-has-good-stack.js:23:5) + at Object. (/test/fixtures/errors/if-error-has-good-stack.js:24:3) + at c (/test/fixtures/errors/if-error-has-good-stack.js:13:13) + at b (/test/fixtures/errors/if-error-has-good-stack.js:14:7) + at a (/test/fixtures/errors/if-error-has-good-stack.js:15:5) + at Object. (/test/fixtures/errors/if-error-has-good-stack.js:16:3) { generatedMessage: false, code: 'ERR_ASSERTION', actual: Error: test error - at c (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at b (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at a (/test/fixtures/errors/if-error-has-good-stack.js:*:*) - at Object. (/test/fixtures/errors/if-error-has-good-stack.js:*:*), + at c (/test/fixtures/errors/if-error-has-good-stack.js:13:13) + at b (/test/fixtures/errors/if-error-has-good-stack.js:14:7) + at a (/test/fixtures/errors/if-error-has-good-stack.js:15:5) + at Object. (/test/fixtures/errors/if-error-has-good-stack.js:16:3), expected: null, operator: 'ifError', diff: 'simple' diff --git a/test/fixtures/errors/promise_always_throw_unhandled.snapshot b/test/fixtures/errors/promise_always_throw_unhandled.snapshot index bd4fe396d898e8..6ced213b1b4db9 100644 --- a/test/fixtures/errors/promise_always_throw_unhandled.snapshot +++ b/test/fixtures/errors/promise_always_throw_unhandled.snapshot @@ -1,17 +1,11 @@ -/test/fixtures/errors/promise_always_throw_unhandled.js:* +/test/fixtures/errors/promise_always_throw_unhandled.js:10 throw new Error('One'); ^ Error: One - at * + at /test/fixtures/errors/promise_always_throw_unhandled.js:10:9 at new Promise () - at * - at * - at * - at * - at * - at * - at * - at * + at Object. (/test/fixtures/errors/promise_always_throw_unhandled.js:9:14) + at Node.js diff --git a/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot b/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot index 8a260ab7dfb098..a2a4cb644b586b 100644 --- a/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot +++ b/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot @@ -1,11 +1,5 @@ (node:) UnhandledPromiseRejectionWarning: Error: alas - at * - at * - at * - at * - at * - at * - at * - at * + at Object. (/test/fixtures/errors/promise_unhandled_warn_with_error.js:7:16) + at (Use ` --trace-warnings ...` to show where the warning was created) (node:) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) diff --git a/test/fixtures/errors/throw_custom_error.snapshot b/test/fixtures/errors/throw_custom_error.snapshot index efaf2d6f8aed27..22d5a9de733650 100644 --- a/test/fixtures/errors/throw_custom_error.snapshot +++ b/test/fixtures/errors/throw_custom_error.snapshot @@ -1,5 +1,5 @@ -/test/fixtures/errors/throw_custom_error.js:* +/test/fixtures/errors/throw_custom_error.js:27 throw ({ name: 'MyCustomError', message: 'This is a custom message' }); ^ { name: 'MyCustomError', message: 'This is a custom message' } diff --git a/test/fixtures/errors/throw_error_with_getter_throw.snapshot b/test/fixtures/errors/throw_error_with_getter_throw.snapshot index 5c4281c4769b66..9212c17f6cd574 100644 --- a/test/fixtures/errors/throw_error_with_getter_throw.snapshot +++ b/test/fixtures/errors/throw_error_with_getter_throw.snapshot @@ -1,5 +1,5 @@ -/test/fixtures/errors/throw_error_with_getter_throw.js:* +/test/fixtures/errors/throw_error_with_getter_throw.js:3 throw { // eslint-disable-line no-throw-literal ^ [object Object] diff --git a/test/fixtures/errors/throw_in_eval_anonymous.snapshot b/test/fixtures/errors/throw_in_eval_anonymous.snapshot index 47305671b1bc71..607e7f81d2cd9b 100644 --- a/test/fixtures/errors/throw_in_eval_anonymous.snapshot +++ b/test/fixtures/errors/throw_in_eval_anonymous.snapshot @@ -1,8 +1,8 @@ -:* +:3 throw new Error('error in anonymous script'); ^ Error: error in anonymous script - at eval (eval at (/test/fixtures/errors/throw_in_eval_anonymous.js:*:*), :*:*) + at eval (eval at (/test/fixtures/errors/throw_in_eval_anonymous.js:5:1), :3:9) Node.js diff --git a/test/fixtures/errors/throw_in_eval_named.snapshot b/test/fixtures/errors/throw_in_eval_named.snapshot index 4677dd195ab38c..cfe6295f36da31 100644 --- a/test/fixtures/errors/throw_in_eval_named.snapshot +++ b/test/fixtures/errors/throw_in_eval_named.snapshot @@ -1,8 +1,8 @@ -evalscript.js:* +evalscript.js:3 throw new Error('error in named script'); ^ Error: error in named script - at eval (evalscript.js:*:*) + at eval (evalscript.js:3:9) Node.js diff --git a/test/fixtures/errors/throw_in_line_with_tabs.snapshot b/test/fixtures/errors/throw_in_line_with_tabs.snapshot index b5cb8e99cd3130..24dac9786edb8a 100644 --- a/test/fixtures/errors/throw_in_line_with_tabs.snapshot +++ b/test/fixtures/errors/throw_in_line_with_tabs.snapshot @@ -1,6 +1,6 @@ before -/test/fixtures/errors/throw_in_line_with_tabs.js:* +/test/fixtures/errors/throw_in_line_with_tabs.js:31 throw ({ foo: 'bar' }); ^ { foo: 'bar' } diff --git a/test/fixtures/errors/throw_non_error.snapshot b/test/fixtures/errors/throw_non_error.snapshot index 55f213290b8a85..4da670f95c64f6 100644 --- a/test/fixtures/errors/throw_non_error.snapshot +++ b/test/fixtures/errors/throw_non_error.snapshot @@ -1,5 +1,5 @@ -/test/fixtures/errors/throw_non_error.js:* +/test/fixtures/errors/throw_non_error.js:27 throw ({ foo: 'bar' }); ^ { foo: 'bar' } diff --git a/test/fixtures/errors/throw_null.snapshot b/test/fixtures/errors/throw_null.snapshot index dd535b524ff061..d0a5b499789e1d 100644 --- a/test/fixtures/errors/throw_null.snapshot +++ b/test/fixtures/errors/throw_null.snapshot @@ -1,5 +1,5 @@ -/test/fixtures/errors/throw_null.js:* +/test/fixtures/errors/throw_null.js:26 throw null; ^ null diff --git a/test/fixtures/errors/throw_undefined.snapshot b/test/fixtures/errors/throw_undefined.snapshot index f1b12ae7563a87..71e329e69d6d89 100644 --- a/test/fixtures/errors/throw_undefined.snapshot +++ b/test/fixtures/errors/throw_undefined.snapshot @@ -1,5 +1,5 @@ -/test/fixtures/errors/throw_undefined.js:* +/test/fixtures/errors/throw_undefined.js:26 throw undefined; ^ undefined diff --git a/test/fixtures/errors/timeout_throw.snapshot b/test/fixtures/errors/timeout_throw.snapshot index 5ad384ab43f329..e823593a6a80a8 100644 --- a/test/fixtures/errors/timeout_throw.snapshot +++ b/test/fixtures/errors/timeout_throw.snapshot @@ -1,10 +1,9 @@ -/test/fixtures/errors/timeout_throw.js:* +/test/fixtures/errors/timeout_throw.js:27 undefined_reference_error_maker; ^ ReferenceError: undefined_reference_error_maker is not defined - at Timeout._onTimeout (/test/fixtures/errors/timeout_throw.js:*:*) - at listOnTimeout (node:internal/timers:*:*) - at process.processTimers (node:internal/timers:*:*) + at Timeout._onTimeout (/test/fixtures/errors/timeout_throw.js:27:3) + at Node.js diff --git a/test/fixtures/errors/undefined_reference_in_new_context.snapshot b/test/fixtures/errors/undefined_reference_in_new_context.snapshot index 50b6f8e7f329ff..c8b240a94e36f9 100644 --- a/test/fixtures/errors/undefined_reference_in_new_context.snapshot +++ b/test/fixtures/errors/undefined_reference_in_new_context.snapshot @@ -1,13 +1,11 @@ before -evalmachine.:* +evalmachine.:1 Error.stackTraceLimit = 5; foo.bar = 5; ^ ReferenceError: foo is not defined - at evalmachine.:*:* - at Script.runInContext (node:vm:*:*) - at Script.runInNewContext (node:vm:*:*) - at Object.runInNewContext (node:vm:*:*) - at Object. (/test/fixtures/errors/undefined_reference_in_new_context.js:*:*) + at evalmachine.:1:28 + at + at Object. (/test/fixtures/errors/undefined_reference_in_new_context.js:29:4) Node.js diff --git a/test/fixtures/errors/unhandled_promise_trace_warnings.snapshot b/test/fixtures/errors/unhandled_promise_trace_warnings.snapshot index b0af9d31a97b48..d434f6d3f13276 100644 --- a/test/fixtures/errors/unhandled_promise_trace_warnings.snapshot +++ b/test/fixtures/errors/unhandled_promise_trace_warnings.snapshot @@ -1,29 +1,12 @@ (node:) UnhandledPromiseRejectionWarning: Error: This was rejected - at * - at * - at * - at * - at * - at * - at * - at * - at * - at * - at * - at * + at Object. (/test/fixtures/errors/unhandled_promise_trace_warnings.js:4:26) + at (node:) Error: This was rejected - at * - at * - at * - at * - at * - at * - at * - at * + at Object. (/test/fixtures/errors/unhandled_promise_trace_warnings.js:4:26) + at (node:) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) - at * - at * + at at Promise.then () at Promise.catch () - at * - at * + at Immediate. (/test/fixtures/errors/unhandled_promise_trace_warnings.js:5:27) + at diff --git a/test/fixtures/es-modules/extensionless-esm-commonjs/package.json b/test/fixtures/es-modules/extensionless-esm-commonjs/package.json new file mode 100644 index 00000000000000..5bbefffbabee39 --- /dev/null +++ b/test/fixtures/es-modules/extensionless-esm-commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/test/fixtures/es-modules/extensionless-esm-commonjs/script b/test/fixtures/es-modules/extensionless-esm-commonjs/script new file mode 100755 index 00000000000000..75798ebfc99202 --- /dev/null +++ b/test/fixtures/es-modules/extensionless-esm-commonjs/script @@ -0,0 +1,4 @@ +#!/usr/bin/env node +console.log('script STARTED') +import { version } from 'node:process' +console.log(version) diff --git a/test/fixtures/es-modules/extensionless-esm-module/package.json b/test/fixtures/es-modules/extensionless-esm-module/package.json new file mode 100644 index 00000000000000..3dbc1ca591c055 --- /dev/null +++ b/test/fixtures/es-modules/extensionless-esm-module/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/fixtures/es-modules/extensionless-esm-module/script b/test/fixtures/es-modules/extensionless-esm-module/script new file mode 100755 index 00000000000000..75798ebfc99202 --- /dev/null +++ b/test/fixtures/es-modules/extensionless-esm-module/script @@ -0,0 +1,4 @@ +#!/usr/bin/env node +console.log('script STARTED') +import { version } from 'node:process' +console.log(version) diff --git a/test/fixtures/eval/eval_messages.snapshot b/test/fixtures/eval/eval_messages.snapshot index 615a05089449a1..900569324f65fd 100644 --- a/test/fixtures/eval/eval_messages.snapshot +++ b/test/fixtures/eval/eval_messages.snapshot @@ -5,10 +5,7 @@ with(this){__filename} The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. SyntaxError: Strict mode code may not include a with statement - - - - + at Node.js 42 @@ -18,14 +15,10 @@ throw new Error("hello") ^ Error: hello - - - - - - - - + at [eval]:1:7 + at + at [eval]-wrapper:6:24 + at Node.js [eval]:1 @@ -33,14 +26,10 @@ throw new Error("hello") ^ Error: hello - - - - - - - - + at [eval]:1:7 + at + at [eval]-wrapper:6:24 + at Node.js 100 @@ -49,14 +38,10 @@ var x = 100; y = x; ^ ReferenceError: y is not defined - - - - - - - - + at [eval]:1:16 + at + at [eval]-wrapper:6:24 + at Node.js diff --git a/test/fixtures/eval/eval_typescript.snapshot b/test/fixtures/eval/eval_typescript.snapshot index 49c034895ed92d..7d57ab541cd184 100644 --- a/test/fixtures/eval/eval_typescript.snapshot +++ b/test/fixtures/eval/eval_typescript.snapshot @@ -4,10 +4,7 @@ enum Foo{}; TypeScript enum is not supported in strip-only mode SyntaxError: Unexpected reserved word - - - - + at Node.js [eval]:1 @@ -15,14 +12,10 @@ throw new SyntaxError("hello") ^ SyntaxError: hello - - - - - - - - + at [eval]:1:7 + at + at [eval]-wrapper:6:24 + at Node.js [eval]:1 @@ -31,10 +24,7 @@ const foo; 'const' declarations must be initialized SyntaxError: Missing initializer in const declaration - - - - + at Node.js 100 @@ -46,10 +36,7 @@ interface Foo{};const foo; 'const' declarations must be initialized SyntaxError: Unexpected identifier 'Foo' - - - - + at Node.js [eval]:1 @@ -58,9 +45,6 @@ function foo(){ await Promise.resolve(1)}; await isn't allowed in non-async function SyntaxError: await is only valid in async functions and the top level bodies of modules - - - - + at Node.js diff --git a/test/fixtures/eval/stdin_messages.snapshot b/test/fixtures/eval/stdin_messages.snapshot index 9710f6871583c4..fff0d2e9fcc926 100644 --- a/test/fixtures/eval/stdin_messages.snapshot +++ b/test/fixtures/eval/stdin_messages.snapshot @@ -5,14 +5,7 @@ with(this){__filename} The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. SyntaxError: Strict mode code may not include a with statement - - - - - - - - + at Node.js 42 @@ -22,16 +15,10 @@ throw new Error("hello") ^ Error: hello - - - - - - - - - - + at [stdin]:1:7 + at + at [stdin]-wrapper:6:24 + at Node.js [stdin]:1 @@ -39,16 +26,10 @@ throw new Error("hello") ^ Error: hello - - - - - - - - - - + at [stdin]:1:7 + at + at [stdin]-wrapper:6:24 + at Node.js 100 @@ -57,16 +38,10 @@ let x = 100; y = x; ^ ReferenceError: y is not defined - - - - - - - - - - + at [stdin]:1:16 + at + at [stdin]-wrapper:6:24 + at Node.js diff --git a/test/fixtures/eval/stdin_typescript.snapshot b/test/fixtures/eval/stdin_typescript.snapshot index 7bf7fbaa3bfb97..73d9f714b6aaef 100644 --- a/test/fixtures/eval/stdin_typescript.snapshot +++ b/test/fixtures/eval/stdin_typescript.snapshot @@ -4,14 +4,7 @@ enum Foo{}; TypeScript enum is not supported in strip-only mode SyntaxError: Unexpected reserved word - - - - - - - - + at Node.js [stdin]:1 @@ -20,14 +13,7 @@ enum Foo{}; TypeScript enum is not supported in strip-only mode SyntaxError: Unexpected reserved word - - - - - - - - + at Node.js [stdin]:1 @@ -35,16 +21,10 @@ throw new SyntaxError("hello") ^ SyntaxError: hello - - - - - - - - - - + at [stdin]:1:7 + at + at [stdin]-wrapper:6:24 + at Node.js [stdin]:1 @@ -52,16 +32,10 @@ throw new SyntaxError("hello") ^ SyntaxError: hello - - - - - - - - - - + at [stdin]:1:7 + at + at [stdin]-wrapper:6:24 + at Node.js [stdin]:1 @@ -70,14 +44,7 @@ const foo; 'const' declarations must be initialized SyntaxError: Missing initializer in const declaration - - - - - - - - + at Node.js [stdin]:1 @@ -86,14 +53,7 @@ const foo; 'const' declarations must be initialized SyntaxError: Missing initializer in const declaration - - - - - - - - + at Node.js 100 @@ -108,14 +68,7 @@ interface Foo{};const foo; 'const' declarations must be initialized SyntaxError: Unexpected identifier 'Foo' - - - - - - - - + at Node.js [stdin]:1 @@ -124,14 +77,7 @@ interface Foo{};const foo; 'const' declarations must be initialized SyntaxError: Unexpected strict mode reserved word - - - - - - - - + at Node.js [stdin]:1 @@ -140,14 +86,7 @@ function foo(){ await Promise.resolve(1)}; await isn't allowed in non-async function SyntaxError: await is only valid in async functions and the top level bodies of modules - - - - - - - - + at Node.js [stdin]:1 @@ -156,14 +95,7 @@ function foo(){ await Promise.resolve(1)}; await isn't allowed in non-async function SyntaxError: await is only valid in async functions and the top level bodies of modules - - - - - - - - + at Node.js done diff --git a/test/fixtures/sea/esm/sea-config.json b/test/fixtures/sea/esm/sea-config.json new file mode 100644 index 00000000000000..e5ee27ff7f4c85 --- /dev/null +++ b/test/fixtures/sea/esm/sea-config.json @@ -0,0 +1,6 @@ +{ + "main": "sea.mjs", + "output": "sea", + "mainFormat": "module", + "disableExperimentalSEAWarning": true +} diff --git a/test/fixtures/sea/esm/sea.mjs b/test/fixtures/sea/esm/sea.mjs new file mode 100644 index 00000000000000..c8c9fe0ca1d571 --- /dev/null +++ b/test/fixtures/sea/esm/sea.mjs @@ -0,0 +1,24 @@ +import assert from 'node:assert'; +import { createRequire } from 'node:module'; +import { pathToFileURL } from 'node:url'; +import { dirname } from 'node:path'; + +// Test createRequire with process.execPath. +const assert2 = createRequire(process.execPath)('node:assert'); +assert.strictEqual(assert2.strict, assert.strict); + +// Test import.meta properties. This should be in sync with the CommonJS entry +// point's corresponding values. +assert.strictEqual(import.meta.url, pathToFileURL(process.execPath).href); +assert.strictEqual(import.meta.filename, process.execPath); +assert.strictEqual(import.meta.dirname, dirname(process.execPath)); +assert.strictEqual(import.meta.main, true); +// TODO(joyeecheung): support import.meta.resolve when we also support +// require.resolve in CommonJS entry points, the behavior of the two +// should be in sync. + +// Test import() with a built-in module. +const { strict } = await import('node:assert'); +assert.strictEqual(strict, assert.strict); + +console.log('ESM SEA executed successfully'); diff --git a/test/fixtures/snapshot/create-vm.js b/test/fixtures/snapshot/create-vm.js new file mode 100644 index 00000000000000..72f4eee45ef500 --- /dev/null +++ b/test/fixtures/snapshot/create-vm.js @@ -0,0 +1,11 @@ +const { + setDeserializeMainFunction, +} = require('v8').startupSnapshot; +const assert = require('assert'); + +setDeserializeMainFunction(() => { + const vm = require('vm'); + const result = vm.runInNewContext('21+21'); + console.log(`value: ${result}`); + assert.strictEqual(result, 42); +}); diff --git a/test/fixtures/snapshot/create-worker-and-vm.js b/test/fixtures/snapshot/create-worker.js similarity index 70% rename from test/fixtures/snapshot/create-worker-and-vm.js rename to test/fixtures/snapshot/create-worker.js index 4dd2aa940247af..d27c145dae30d5 100644 --- a/test/fixtures/snapshot/create-worker-and-vm.js +++ b/test/fixtures/snapshot/create-worker.js @@ -4,17 +4,19 @@ const { const assert = require('assert'); setDeserializeMainFunction(() => { - const vm = require('vm'); const { Worker } = require('worker_threads'); - assert.strictEqual(vm.runInNewContext('21+21'), 42); const worker = new Worker( 'require("worker_threads").parentPort.postMessage({value: 21 + 21})', { eval: true }); const messages = []; - worker.on('message', message => messages.push(message)); + worker.on('message', (message) => { + console.log('Worker message:', message); + messages.push(message); + }); process.on('beforeExit', () => { + console.log('Process beforeExit, messages:', messages); assert.deepStrictEqual(messages, [{value:42}]); - }) + }); }); diff --git a/test/fixtures/source-map/output/source_map_assert_source_line.snapshot b/test/fixtures/source-map/output/source_map_assert_source_line.snapshot index d20e19d9fe3870..3bc9661920fd59 100644 --- a/test/fixtures/source-map/output/source_map_assert_source_line.snapshot +++ b/test/fixtures/source-map/output/source_map_assert_source_line.snapshot @@ -3,13 +3,8 @@ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: assert(false) at Object. (/test/fixtures/source-map/output/source_map_assert_source_line.ts:11:3) - * - * - * - * - * - * - * + at + at { generatedMessage: true, code: 'ERR_ASSERTION', actual: false, diff --git a/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot b/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot index 8ebf9af22e9d09..148d1b8190dd08 100644 --- a/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot +++ b/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot @@ -1,3 +1,3 @@ Error: an exception. at Object. (/test/fixtures/source-map/typescript-sourcemapping_url_string.ts:3:7) - * + at diff --git a/test/fixtures/source-map/output/source_map_throw_construct.snapshot b/test/fixtures/source-map/output/source_map_throw_construct.snapshot index 43718adba6a306..824a374747d0b5 100644 --- a/test/fixtures/source-map/output/source_map_throw_construct.snapshot +++ b/test/fixtures/source-map/output/source_map_throw_construct.snapshot @@ -5,8 +5,6 @@ Error: message at new Foo (/test/fixtures/source-map/output/source_map_throw_construct.mts:13:11) at (/test/fixtures/source-map/output/source_map_throw_construct.mts:17:1) - * - * - * + at Node.js diff --git a/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot b/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot index 999258182a6152..461fb3b034ef88 100644 --- a/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot +++ b/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot @@ -5,6 +5,6 @@ Error: goodbye at Hello (/test/fixtures/source-map/uglify-throw-original.js:5:9) at Immediate. (/test/fixtures/source-map/uglify-throw-original.js:9:3) - * + at Node.js diff --git a/test/fixtures/test-runner/global-setup-teardown/another-test-file.js b/test/fixtures/test-runner/global-setup-teardown/another-test-file.js index 6d39ef2ec79aa8..d7808c2b565a7c 100644 --- a/test/fixtures/test-runner/global-setup-teardown/another-test-file.js +++ b/test/fixtures/test-runner/global-setup-teardown/another-test-file.js @@ -4,7 +4,7 @@ const test = require('node:test'); const assert = require('node:assert'); const fs = require('node:fs'); -test('Another test that verifies setup flag existance', (t) => { +test('Another test that verifies setup flag existence', (t) => { const setupFlagPath = process.env.SETUP_FLAG_PATH; assert.ok(fs.existsSync(setupFlagPath), 'Setup flag file should exist'); diff --git a/test/fixtures/test-runner/output/abort-runs-after-hook.snapshot b/test/fixtures/test-runner/output/abort-runs-after-hook.snapshot index f551a0b5baab75..44643bfcb7c3cf 100644 --- a/test/fixtures/test-runner/output/abort-runs-after-hook.snapshot +++ b/test/fixtures/test-runner/output/abort-runs-after-hook.snapshot @@ -5,13 +5,13 @@ not ok 1 - test that aborts --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort-runs-after-hook.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort-runs-after-hook.js:4:1' failureType: 'uncaughtException' error: 'boom' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/abort-runs-after-hook.js:12:11) + ... 1..1 # tests 1 diff --git a/test/fixtures/test-runner/output/abort.snapshot b/test/fixtures/test-runner/output/abort.snapshot index c8e9aeb31b5faa..72504832704c80 100644 --- a/test/fixtures/test-runner/output/abort.snapshot +++ b/test/fixtures/test-runner/output/abort.snapshot @@ -29,7 +29,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):7' + location: '/test/fixtures/test-runner/output/abort.js:11:7' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -39,7 +39,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):7' + location: '/test/fixtures/test-runner/output/abort.js:12:7' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -49,104 +49,67 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):7' + location: '/test/fixtures/test-runner/output/abort.js:13:7' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 4 not ok 8 - not ok 4 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):7' + location: '/test/fixtures/test-runner/output/abort.js:14:7' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 5 not ok 9 - not ok 5 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):7' + location: '/test/fixtures/test-runner/output/abort.js:15:7' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... 1..9 not ok 1 - promise timeout signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort.js:5:1' failureType: 'testAborted' error: 'The operation was aborted due to timeout' code: 23 name: 'TimeoutError' stack: |- - * - * - * - * + ... # Subtest: promise abort signal not ok 2 - promise abort signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort.js:21:1' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + Object. (/test/fixtures/test-runner/output/abort.js:21:52) + ... # Subtest: callback timeout signal # Subtest: ok 1 @@ -178,7 +141,7 @@ not ok 2 - promise abort signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):5' + location: '/test/fixtures/test-runner/output/abort.js:30:5' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -188,7 +151,7 @@ not ok 2 - promise abort signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):5' + location: '/test/fixtures/test-runner/output/abort.js:31:5' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -198,104 +161,67 @@ not ok 2 - promise abort signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):5' + location: '/test/fixtures/test-runner/output/abort.js:32:5' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 4 not ok 8 - not ok 4 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):5' + location: '/test/fixtures/test-runner/output/abort.js:33:5' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 5 not ok 9 - not ok 5 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):5' + location: '/test/fixtures/test-runner/output/abort.js:34:5' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... 1..9 not ok 3 - callback timeout signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort.js:25:1' failureType: 'testAborted' error: 'The operation was aborted due to timeout' code: 23 name: 'TimeoutError' stack: |- - * - * - * - * + ... # Subtest: callback abort signal not ok 4 - callback abort signal --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort.js:39:1' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + Object. (/test/fixtures/test-runner/output/abort.js:39:53) + ... 1..4 # tests 22 diff --git a/test/fixtures/test-runner/output/abort_hooks.snapshot b/test/fixtures/test-runner/output/abort_hooks.snapshot index db52ca3c8fbbb0..10a9c189e7885c 100644 --- a/test/fixtures/test-runner/output/abort_hooks.snapshot +++ b/test/fixtures/test-runner/output/abort_hooks.snapshot @@ -13,7 +13,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:11:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -23,7 +23,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:14:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -33,22 +33,15 @@ not ok 1 - 1 before describe --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_hooks.js:4:1' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + before.signal (/test/fixtures/test-runner/output/abort_hooks.js:8:8) + ... # Subtest: 2 after describe # Subtest: test 1 @@ -68,22 +61,15 @@ not ok 2 - 2 after describe --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_hooks.js:19:1' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + after.signal (/test/fixtures/test-runner/output/abort_hooks.js:23:8) + ... # Subtest: 3 beforeEach describe # Subtest: test 1 @@ -91,51 +77,37 @@ not ok 2 - 2 after describe --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:41:3' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + beforeEach.signal (/test/fixtures/test-runner/output/abort_hooks.js:38:8) + ... # Subtest: test 2 not ok 2 - test 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:44:3' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + beforeEach.signal (/test/fixtures/test-runner/output/abort_hooks.js:38:8) + ... 1..2 not ok 3 - 3 beforeEach describe --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_hooks.js:34:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -146,51 +118,37 @@ not ok 3 - 3 beforeEach describe --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:56:3' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + afterEach.signal (/test/fixtures/test-runner/output/abort_hooks.js:53:8) + ... # Subtest: test 2 not ok 2 - test 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_hooks.js:59:3' failureType: 'hookFailed' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + afterEach.signal (/test/fixtures/test-runner/output/abort_hooks.js:53:8) + ... 1..2 not ok 4 - 4 afterEach describe --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_hooks.js:49:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/output/abort_suite.snapshot b/test/fixtures/test-runner/output/abort_suite.snapshot index 80a7705e92959b..0f1a1710c77d88 100644 --- a/test/fixtures/test-runner/output/abort_suite.snapshot +++ b/test/fixtures/test-runner/output/abort_suite.snapshot @@ -29,7 +29,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_suite.js:10:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -39,7 +39,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_suite.js:11:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -49,104 +49,67 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_suite.js:12:3' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 4 not ok 8 - not ok 4 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_suite.js:13:3' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... # Subtest: not ok 5 not ok 9 - not ok 5 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):3' + location: '/test/fixtures/test-runner/output/abort_suite.js:14:3' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + ... 1..9 not ok 1 - describe timeout signal --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_suite.js:5:1' failureType: 'testAborted' error: 'The operation was aborted due to timeout' code: 23 name: 'TimeoutError' stack: |- - * - * - * - * + ... # Subtest: describe abort signal not ok 2 - describe abort signal --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/abort_suite.js:(LINE):1' + location: '/test/fixtures/test-runner/output/abort_suite.js:19:1' failureType: 'testAborted' error: 'This operation was aborted' code: 20 name: 'AbortError' stack: |- - * - * - * - * - * - * - * - * - * - * + + Object. (/test/fixtures/test-runner/output/abort_suite.js:19:57) + ... 1..2 # tests 9 diff --git a/test/fixtures/test-runner/output/assertion-color-tty.snapshot b/test/fixtures/test-runner/output/assertion-color-tty.snapshot index 56def5cdaa5f79..1489619e4e7cd2 100644 --- a/test/fixtures/test-runner/output/assertion-color-tty.snapshot +++ b/test/fixtures/test-runner/output/assertion-color-tty.snapshot @@ -10,7 +10,7 @@ [31m✖ failing tests:[39m -* +test at test/fixtures/test-runner/output/assertion-color-tty.mjs:4:1 [31m✖ failing assertion [90m(*ms)[39m[39m [AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: [32mactual[39m [31mexpected[39m diff --git a/test/fixtures/test-runner/output/default_output.snapshot b/test/fixtures/test-runner/output/default_output.snapshot index a58e14346ec727..55b40367282366 100644 --- a/test/fixtures/test-runner/output/default_output.snapshot +++ b/test/fixtures/test-runner/output/default_output.snapshot @@ -16,27 +16,16 @@ [31m✖ failing tests:[39m -* +test at test/fixtures/test-runner/output/default_output.js:10:1 [31m✖ should fail [90m(*ms)[39m[39m Error: fail - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m + at TestContext. [90m(/[39mtest/fixtures/test-runner/output/default_output.js:10:35[90m)[39m + [90m at [39m -* +test at test/fixtures/test-runner/output/default_output.js:13:5 [31m✖ should fail [90m(*ms)[39m[39m Error: fail - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m - *[39m + at TestContext. [90m(/[39mtest/fixtures/test-runner/output/default_output.js:13:39[90m)[39m + [90m at [39m + at TestContext. [90m(/[39mtest/fixtures/test-runner/output/default_output.js:13:5[90m)[39m + [90m at [39m diff --git a/test/fixtures/test-runner/output/describe_it.snapshot b/test/fixtures/test-runner/output/describe_it.snapshot index f1240a6a99dafc..9be9d988f0ffa9 100644 --- a/test/fixtures/test-runner/output/describe_it.snapshot +++ b/test/fixtures/test-runner/output/describe_it.snapshot @@ -40,18 +40,13 @@ not ok 7 - sync todo # TODO --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):4' + location: '/test/fixtures/test-runner/output/describe_it.js:30:4' failureType: 'testCodeFailure' error: 'should not count as a failure' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:31:9) + ... # Subtest: sync todo with expect fail ok 8 - sync todo with expect fail # TODO @@ -64,18 +59,13 @@ not ok 9 - sync todo with message # TODO this is a failing todo --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:38:1' failureType: 'testCodeFailure' error: 'should not count as a failure' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:39:9) + ... # Subtest: sync skip pass ok 10 - sync skip pass # SKIP @@ -106,18 +96,13 @@ not ok 14 - sync throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:55:1' failureType: 'testCodeFailure' error: 'thrown from sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:56:9) + ... # Subtest: async skip pass ok 15 - async skip pass # SKIP @@ -142,25 +127,20 @@ not ok 18 - async throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:68:1' failureType: 'testCodeFailure' error: 'thrown from async throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:69:9) + ... # Subtest: async skip fail not ok 19 - async skip fail # SKIP --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:72:1' failureType: 'callbackAndPromisePresent' error: 'passed a callback but also returned a Promise' code: 'ERR_TEST_FAILURE' @@ -170,7 +150,7 @@ not ok 20 - async assertion fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:77:1' failureType: 'testCodeFailure' error: |- Expected values to be strictly equal: @@ -183,13 +163,8 @@ not ok 20 - async assertion fail actual: true operator: 'strictEqual' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:79:10) + ... # Subtest: resolve pass ok 21 - resolve pass @@ -202,18 +177,13 @@ not ok 22 - reject fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:86:1' failureType: 'testCodeFailure' error: 'rejected from reject fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:87:25) + ... # Subtest: unhandled rejection - passes but warns ok 23 - unhandled rejection - passes but warns @@ -251,20 +221,15 @@ ok 27 - immediate resolve pass --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:119:3' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:120:11) + new Promise () - * - * + Array.map () ... # Subtest: mixing describe/it and test should work @@ -278,7 +243,7 @@ not ok 28 - subtest sync throw fail --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:118:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -288,7 +253,7 @@ not ok 29 - sync throw non-error fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:125:1' failureType: 'testCodeFailure' error: 'Symbol(thrown symbol from sync throw non-error fail)' code: 'ERR_TEST_FAILURE' @@ -347,18 +312,13 @@ not ok 34 - sync skip option is false fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:194:1' failureType: 'testCodeFailure' error: 'this should be executed' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:195:9) + ... # Subtest: ok 35 - @@ -419,13 +379,13 @@ not ok 44 - callback fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:226:1' failureType: 'testCodeFailure' error: 'callback failure' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/describe_it.js:228:10) + ... # Subtest: sync t is this in test ok 45 - sync t is this in test @@ -450,7 +410,7 @@ not ok 48 - callback also returns a Promise --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:245:1' failureType: 'callbackAndPromisePresent' error: 'passed a callback but also returned a Promise' code: 'ERR_TEST_FAILURE' @@ -460,31 +420,26 @@ not ok 49 - callback throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:249:1' failureType: 'testCodeFailure' error: 'thrown from callback throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:250:9) + ... # Subtest: callback called twice not ok 50 - callback called twice --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:253:1' failureType: 'multipleCallbackInvocations' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:255:3) + ... # Subtest: callback called twice in different ticks ok 51 - callback called twice in different ticks @@ -497,25 +452,25 @@ not ok 52 - callback called twice in future tick --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:263:1' failureType: 'uncaughtException' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/describe_it.js:266:5) ... # Subtest: callback async throw not ok 53 - callback async throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:270:1' failureType: 'uncaughtException' error: 'thrown from callback async throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/describe_it.js:272:11) + ... # Subtest: callback async throw after done ok 54 - callback async throw after done @@ -528,7 +483,7 @@ not ok 55 - custom inspect symbol fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:284:1' failureType: 'testCodeFailure' error: 'customized' code: 'ERR_TEST_FAILURE' @@ -538,7 +493,7 @@ not ok 56 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:295:1' failureType: 'testCodeFailure' error: |- { @@ -553,20 +508,15 @@ not ok 56 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:307:3' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at first' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:308:11) + new Promise () - * - * + Array.map () ... # Subtest: sync throw fails at second @@ -574,27 +524,22 @@ not ok 56 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:310:3' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at second' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/describe_it.js:311:11) + async Promise.all (index 0) - * - * + ... 1..2 not ok 57 - subtest sync throw fails --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:306:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -605,7 +550,7 @@ not ok 57 - subtest sync throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:316:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -615,21 +560,15 @@ not ok 58 - describe sync throw fails --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:315:1' failureType: 'testCodeFailure' error: 'thrown from describe' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/describe_it.js:317:9) + + Object. (/test/fixtures/test-runner/output/describe_it.js:315:1) + ... # Subtest: describe async throw fails # Subtest: should not run @@ -637,7 +576,7 @@ not ok 58 - describe sync throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:321:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -647,21 +586,15 @@ not ok 59 - describe async throw fails --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:320:1' failureType: 'testCodeFailure' error: 'thrown from describe' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/describe_it.js:322:9) + + Object. (/test/fixtures/test-runner/output/describe_it.js:320:1) + ... # Subtest: timeouts # Subtest: timed out async test @@ -669,7 +602,7 @@ not ok 59 - describe async throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:326:3' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -681,7 +614,7 @@ not ok 59 - describe async throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:335:3' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -703,7 +636,7 @@ not ok 60 - timeouts --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:325:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -720,21 +653,20 @@ not ok 60 - timeouts --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):3' + location: '/test/fixtures/test-runner/output/describe_it.js:366:3' failureType: 'testCodeFailure' error: 'custom error' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * + Object. (/test/fixtures/test-runner/output/describe_it.js:372:50) + ... 1..2 not ok 61 - successful thenable --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:354:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -744,13 +676,13 @@ not ok 62 - rejected thenable --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):1' + location: '/test/fixtures/test-runner/output/describe_it.js:387:1' failureType: 'testCodeFailure' error: 'custom error' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Object. (/test/fixtures/test-runner/output/describe_it.js:393:48) + ... # Subtest: async describe function # Subtest: it inside describe 1 @@ -789,20 +721,20 @@ not ok 64 - invalid subtest fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/describe_it.js:(LINE):5' + location: '/test/fixtures/test-runner/output/describe_it.js:180:5' failureType: 'parentAlreadyFinished' error: 'test could not be started because its parent finished' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/describe_it.js:180:5) ... 1..64 -# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:90:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:94:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/describe_it.js:98:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/describe_it.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/describe_it.js:258:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/describe_it.js:276:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. # tests 73 # suites 11 # pass 35 diff --git a/test/fixtures/test-runner/output/dot_reporter.snapshot b/test/fixtures/test-runner/output/dot_reporter.snapshot index 9d36767c415586..f3335117acf884 100644 --- a/test/fixtures/test-runner/output/dot_reporter.snapshot +++ b/test/fixtures/test-runner/output/dot_reporter.snapshot @@ -8,61 +8,32 @@ Failed tests: ⚠ sync fail todo (*ms) # TODO Error: thrown from sync fail todo - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:42:9) + at ⚠ sync fail todo with message (*ms) # this is a failing todo Error: thrown from sync fail todo with message - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:47:9) + at ✖ sync throw fail (*ms) Error: thrown from sync throw fail - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:63:9) + at ✖ async throw fail (*ms) Error: thrown from async throw fail - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:75:9) + at ﹣ async skip fail (*ms) # SKIP Error: thrown from async throw fail - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:80:9) + at ✖ async assertion fail (*ms) AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: true !== false - * - * - * - * - * - * - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:85:10) + at + at { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, @@ -72,92 +43,61 @@ Failed tests: } ✖ reject fail (*ms) Error: rejected from reject fail - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:93:25) + at ✖ +sync throw fail (*ms) Error: thrown from subtest sync throw fail - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:127:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:125:11) + at ✖ subtest sync throw fail (*ms) '1 subtest failed' ✖ sync throw non-error fail (*ms) Symbol(thrown symbol from sync throw non-error fail) ✖ sync skip option is false fail (*ms) Error: this should be executed - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:212:9) + at ✖ callback fail (*ms) Error: callback failure - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:245:10) + at ✖ callback also returns a Promise (*ms) 'passed a callback but also returned a Promise' ✖ callback throw (*ms) Error: thrown from callback throw - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:267:9) + at ✖ callback called twice (*ms) 'callback invoked multiple times' ✖ callback called twice in future tick (*ms) Error [ERR_TEST_FAILURE]: callback invoked multiple times - * { + at Immediate. (/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } ✖ callback async throw (*ms) Error: thrown from callback async throw - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:289:11) + at ✖ custom inspect symbol fail (*ms) customized ✖ custom inspect symbol that throws fail (*ms) { foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] } ✖ sync throw fails at first (*ms) Error: thrown from subtest sync throw fails at first - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:335:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:334:11) + at ✖ sync throw fails at second (*ms) Error: thrown from subtest sync throw fails at second - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/output.js:338:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:337:11) + at ✖ subtest sync throw fails (*ms) '2 subtests failed' ✖ timed out async test (*ms) @@ -168,14 +108,12 @@ Failed tests: 'custom error' ✖ unfinished test with uncaughtException (*ms) Error: foo - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + at ✖ unfinished test with unhandledRejection (*ms) Error: bar - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + at ✖ assertion errors display actual and expected properly (*ms) AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: @@ -212,7 +150,7 @@ Failed tests: c: [Circular *1] } } - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:425:12) { generatedMessage: true, code: 'ERR_ASSERTION', actual: [Object], diff --git a/test/fixtures/test-runner/output/eval_dot.snapshot b/test/fixtures/test-runner/output/eval_dot.snapshot index 8a22cfd477b15d..cb0cd1cbf9be0e 100644 --- a/test/fixtures/test-runner/output/eval_dot.snapshot +++ b/test/fixtures/test-runner/output/eval_dot.snapshot @@ -4,10 +4,5 @@ Failed tests: ✖ fails (*ms) Error: fail - * - * - * - * - * - * - * + at TestContext.eval (eval at (/test/fixtures/test-runner/output/eval_dot.js:3:1), :6:11) + at diff --git a/test/fixtures/test-runner/output/eval_spec.snapshot b/test/fixtures/test-runner/output/eval_spec.snapshot index 116c23ccf97077..d5b4937bd12a34 100644 --- a/test/fixtures/test-runner/output/eval_spec.snapshot +++ b/test/fixtures/test-runner/output/eval_spec.snapshot @@ -13,10 +13,5 @@ ✖ fails (*ms) Error: fail - * - * - * - * - * - * - * + at TestContext.eval (eval at (/test/fixtures/test-runner/output/eval_spec.js:3:1), :6:11) + at diff --git a/test/fixtures/test-runner/output/eval_tap.snapshot b/test/fixtures/test-runner/output/eval_tap.snapshot index 50457b013633f4..85108ff8cc50b7 100644 --- a/test/fixtures/test-runner/output/eval_tap.snapshot +++ b/test/fixtures/test-runner/output/eval_tap.snapshot @@ -14,13 +14,8 @@ not ok 2 - fails error: 'fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext.eval (eval at (/test/fixtures/test-runner/output/eval_tap.js:3:1), :6:11) + ... 1..2 # tests 2 diff --git a/test/fixtures/test-runner/output/filtered-suite-throws.snapshot b/test/fixtures/test-runner/output/filtered-suite-throws.snapshot index cdcbbc8593df87..123b7f6e823940 100644 --- a/test/fixtures/test-runner/output/filtered-suite-throws.snapshot +++ b/test/fixtures/test-runner/output/filtered-suite-throws.snapshot @@ -4,21 +4,15 @@ not ok 1 - suite 1 --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:(LINE):1' + location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:6:1' failureType: 'testCodeFailure' error: 'boom 1' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/filtered-suite-throws.js:7:9) + + Object. (/test/fixtures/test-runner/output/filtered-suite-throws.js:6:1) + ... # Subtest: suite 2 # Subtest: enabled - should get cancelled @@ -26,7 +20,7 @@ not ok 1 - suite 1 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:(LINE):3' + location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:13:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -36,21 +30,15 @@ not ok 2 - suite 2 --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:(LINE):1' + location: '/test/fixtures/test-runner/output/filtered-suite-throws.js:12:1' failureType: 'testCodeFailure' error: 'boom 1' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/filtered-suite-throws.js:14:9) + + Object. (/test/fixtures/test-runner/output/filtered-suite-throws.js:12:1) + ... 1..2 # tests 1 diff --git a/test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot b/test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot index 1aaedf6df75fa3..52a8d63a2c2709 100644 --- a/test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot +++ b/test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot @@ -9,19 +9,13 @@ ok 1 - this is a test not ok 2 - /test/fixtures/test-runner/output/global_after_should_fail_the_test.js --- duration_ms: * - location: '/test/fixtures/test-runner/output/global_after_should_fail_the_test.js:(LINE):1' + location: '/test/fixtures/test-runner/output/global_after_should_fail_the_test.js:4:1' failureType: 'hookFailed' error: 'this should fail the test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/global_after_should_fail_the_test.js:5:9) + ... 1..1 # tests 1 diff --git a/test/fixtures/test-runner/output/hooks.snapshot b/test/fixtures/test-runner/output/hooks.snapshot index f9cfd9ddb1c206..4a576028d9b98d 100644 --- a/test/fixtures/test-runner/output/hooks.snapshot +++ b/test/fixtures/test-runner/output/hooks.snapshot @@ -50,7 +50,7 @@ ok 2 - describe hooks - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:74:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -60,7 +60,7 @@ ok 2 - describe hooks - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:75:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -70,38 +70,26 @@ not ok 3 - before throws --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:72:1' failureType: 'hookFailed' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/hooks.js:73:24) + ... # Subtest: before throws - no subtests not ok 4 - before throws - no subtests --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:78:1' failureType: 'hookFailed' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/hooks.js:79:24) + ... # Subtest: after throws # Subtest: 1 @@ -121,42 +109,26 @@ not ok 5 - after throws --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:83:1' failureType: 'hookFailed' error: 'after' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/hooks.js:84:23) + ... # Subtest: after throws - no subtests not ok 6 - after throws - no subtests --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:89:1' failureType: 'hookFailed' error: 'after' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/hooks.js:90:23) + ... # Subtest: beforeEach throws # Subtest: 1 @@ -164,20 +136,13 @@ not ok 6 - after throws - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:95:3' failureType: 'hookFailed' error: 'beforeEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:94:28) + new Promise () ... # Subtest: 2 @@ -185,20 +150,13 @@ not ok 6 - after throws - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:96:3' failureType: 'hookFailed' error: 'beforeEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:94:28) + async Promise.all (index 0) ... 1..2 @@ -206,7 +164,7 @@ not ok 7 - beforeEach throws --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:93:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -217,48 +175,35 @@ not ok 7 - beforeEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:101:3' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:100:27) + async Promise.all (index 0) - * + ... # Subtest: 2 not ok 2 - 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:102:3' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:100:27) + ... 1..2 not ok 8 - afterEach throws --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:99:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -269,20 +214,15 @@ not ok 8 - afterEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:107:3' failureType: 'testCodeFailure' error: 'test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:107:25) + new Promise () - * - * + Array.map () ... # Subtest: 2 @@ -296,7 +236,7 @@ not ok 9 - afterEach when test fails --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:105:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -307,20 +247,15 @@ not ok 9 - afterEach when test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:113:3' failureType: 'testCodeFailure' error: 'test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:113:25) + new Promise () - * - * + Array.map () ... # Subtest: 2 @@ -328,27 +263,20 @@ not ok 9 - afterEach when test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:114:3' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:112:27) + ... 1..2 not ok 10 - afterEach throws and test fails --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:111:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -403,84 +331,60 @@ ok 12 - test hooks - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:172:11' failureType: 'hookFailed' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + ... # Subtest: 2 not ok 2 - 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:173:11' failureType: 'hookFailed' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + ... 1..2 not ok 13 - t.before throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:169:1' failureType: 'testCodeFailure' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + ... # Subtest: t.before throws - no subtests not ok 14 - t.before throws - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:176:1' failureType: 'testCodeFailure' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:178:26) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:178:5) + ... # Subtest: t.after throws # Subtest: 1 @@ -500,40 +404,26 @@ not ok 15 - t.after throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:181:1' failureType: 'hookFailed' error: 'after' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:183:25) + ... # Subtest: t.after throws - no subtests not ok 16 - t.after throws - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:188:1' failureType: 'hookFailed' error: 'after' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:190:25) + ... # Subtest: t.beforeEach throws # Subtest: 1 @@ -541,49 +431,37 @@ not ok 16 - t.after throws - no subtests --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:197:11' failureType: 'hookFailed' error: 'beforeEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:196:30) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:197:11) + ... # Subtest: 2 not ok 2 - 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:198:11' failureType: 'hookFailed' error: 'beforeEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:196:30) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:198:11) + ... 1..2 not ok 17 - t.beforeEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:194:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -594,49 +472,37 @@ not ok 17 - t.beforeEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:204:11' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:203:29) + + async TestContext. (/test/fixtures/test-runner/output/hooks.js:204:3) + ... # Subtest: 2 not ok 2 - 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:205:11' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:203:29) + + async TestContext. (/test/fixtures/test-runner/output/hooks.js:205:3) + ... 1..2 not ok 18 - t.afterEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:201:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -647,20 +513,15 @@ not ok 18 - t.afterEach throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:212:11' failureType: 'testCodeFailure' error: 'test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:212:35) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:212:11) + ... # Subtest: 2 ok 2 - 2 @@ -673,7 +534,7 @@ not ok 19 - afterEach when test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:209:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -697,22 +558,20 @@ ok 20 - afterEach context when test passes --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:232:11' failureType: 'testCodeFailure' error: 'test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:226:15) + ... 1..1 not ok 21 - afterEach context when test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:225:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -723,48 +582,37 @@ not ok 21 - afterEach context when test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:238:11' failureType: 'testCodeFailure' error: 'test' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:238:35) + + TestContext. (/test/fixtures/test-runner/output/hooks.js:238:11) + ... # Subtest: 2 not ok 2 - 2 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' + location: '/test/fixtures/test-runner/output/hooks.js:239:11' failureType: 'hookFailed' error: 'afterEach' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:237:29) + + async TestContext. (/test/fixtures/test-runner/output/hooks.js:239:3) + ... 1..2 not ok 22 - afterEach throws and test fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:235:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -774,15 +622,13 @@ not ok 23 - t.after() is called if test body throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:242:1' failureType: 'testCodeFailure' error: 'bye' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/hooks.js:246:9) + ... # - after() called # Subtest: run after when before throws @@ -791,7 +637,7 @@ not ok 23 - t.after() is called if test body throws --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' + location: '/test/fixtures/test-runner/output/hooks.js:254:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -801,19 +647,13 @@ not ok 24 - run after when before throws --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' + location: '/test/fixtures/test-runner/output/hooks.js:249:1' failureType: 'hookFailed' error: 'before' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + SuiteContext. (/test/fixtures/test-runner/output/hooks.js:253:24) + ... # Subtest: test hooks - async # Subtest: 1 diff --git a/test/fixtures/test-runner/output/hooks_spec_reporter.js b/test/fixtures/test-runner/output/hooks_spec_reporter.js index 75bb4b6be1e908..81a125ab93289a 100644 --- a/test/fixtures/test-runner/output/hooks_spec_reporter.js +++ b/test/fixtures/test-runner/output/hooks_spec_reporter.js @@ -6,6 +6,6 @@ const spawn = require('node:child_process').spawn; const child = spawn(process.execPath, ['--no-warnings', '--test-reporter', 'spec', fixtures.path('test-runner/output/hooks.js')], { stdio: 'pipe' }); -// eslint-disable-next-line no-control-regex -child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, ''))); + +child.stdout.pipe(process.stdout); child.stderr.pipe(process.stderr); diff --git a/test/fixtures/test-runner/output/hooks_spec_reporter.snapshot b/test/fixtures/test-runner/output/hooks_spec_reporter.snapshot index 8c267672b9a951..e2ad150bb5f7a2 100644 --- a/test/fixtures/test-runner/output/hooks_spec_reporter.snapshot +++ b/test/fixtures/test-runner/output/hooks_spec_reporter.snapshot @@ -1,466 +1,306 @@ - after() called - describe hooks - 1 (*ms) - 2 (*ms) - nested - nested 1 (*ms) - nested 2 (*ms) - nested (*ms) - describe hooks (*ms) - describe hooks - no subtests (*ms) - before throws - 1 - 2 - before throws (*ms) - before throws - no subtests (*ms) - after throws - 1 (*ms) - 2 (*ms) - after throws (*ms) - after throws - no subtests (*ms) - beforeEach throws - 1 (*ms) - 2 (*ms) - beforeEach throws (*ms) - afterEach throws - 1 (*ms) - 2 (*ms) - afterEach throws (*ms) - afterEach when test fails - 1 (*ms) - 2 (*ms) - afterEach when test fails (*ms) - afterEach throws and test fails - 1 (*ms) - 2 (*ms) - afterEach throws and test fails (*ms) - test hooks - 1 (*ms) - 2 (*ms) - nested - nested 1 (*ms) - nested 2 (*ms) - nested (*ms) - test hooks (*ms) - test hooks - no subtests (*ms) - t.before throws - 1 (*ms) - 2 (*ms) - t.before throws (*ms) - t.before throws - no subtests (*ms) - t.after throws - 1 (*ms) - 2 (*ms) - t.after throws (*ms) - t.after throws - no subtests (*ms) - t.beforeEach throws - 1 (*ms) - 2 (*ms) - t.beforeEach throws (*ms) - t.afterEach throws - 1 (*ms) - 2 (*ms) - t.afterEach throws (*ms) - afterEach when test fails - 1 (*ms) - 2 (*ms) - afterEach when test fails (*ms) - afterEach context when test passes - 1 (*ms) - afterEach context when test passes (*ms) - afterEach context when test fails - 1 (*ms) - afterEach context when test fails (*ms) - afterEach throws and test fails - 1 (*ms) - 2 (*ms) - afterEach throws and test fails (*ms) - t.after() is called if test body throws (*ms) - - after() called - run after when before throws - 1 - run after when before throws (*ms) - test hooks - async - 1 (*ms) - 2 (*ms) - test hooks - async (*ms) - before 1 called - before 2 called - after 1 called - after 2 called - tests 52 - suites 12 - pass 22 - fail 27 - cancelled 3 - skipped 0 - todo 0 - duration_ms * +▶ describe hooks + ✔ 1 (*ms) + ✔ 2 (*ms) + ▶ nested + ✔ nested 1 (*ms) + ✔ nested 2 (*ms) + ✔ nested (*ms) +✔ describe hooks (*ms) +✔ describe hooks - no subtests (*ms) +▶ before throws + ✖ 1 + ✖ 2 +✖ before throws (*ms) +✖ before throws - no subtests (*ms) +▶ after throws + ✔ 1 (*ms) + ✔ 2 (*ms) +✖ after throws (*ms) +✖ after throws - no subtests (*ms) +▶ beforeEach throws + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ beforeEach throws (*ms) +▶ afterEach throws + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ afterEach throws (*ms) +▶ afterEach when test fails + ✖ 1 (*ms) + ✔ 2 (*ms) +✖ afterEach when test fails (*ms) +▶ afterEach throws and test fails + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ afterEach throws and test fails (*ms) +▶ test hooks + ✔ 1 (*ms) + ✔ 2 (*ms) + ▶ nested + ✔ nested 1 (*ms) + ✔ nested 2 (*ms) + ✔ nested (*ms) +✔ test hooks (*ms) +✔ test hooks - no subtests (*ms) +▶ t.before throws + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ t.before throws (*ms) +✖ t.before throws - no subtests (*ms) +▶ t.after throws + ✔ 1 (*ms) + ✔ 2 (*ms) +✖ t.after throws (*ms) +✖ t.after throws - no subtests (*ms) +▶ t.beforeEach throws + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ t.beforeEach throws (*ms) +▶ t.afterEach throws + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ t.afterEach throws (*ms) +▶ afterEach when test fails + ✖ 1 (*ms) + ✔ 2 (*ms) +✖ afterEach when test fails (*ms) +▶ afterEach context when test passes + ✔ 1 (*ms) +✔ afterEach context when test passes (*ms) +▶ afterEach context when test fails + ✖ 1 (*ms) +✖ afterEach context when test fails (*ms) +▶ afterEach throws and test fails + ✖ 1 (*ms) + ✖ 2 (*ms) +✖ afterEach throws and test fails (*ms) +✖ t.after() is called if test body throws (*ms) +ℹ - after() called +▶ run after when before throws + ✖ 1 +✖ run after when before throws (*ms) +▶ test hooks - async + ✔ 1 (*ms) + ✔ 2 (*ms) +✔ test hooks - async (*ms) +ℹ before 1 called +ℹ before 2 called +ℹ after 1 called +ℹ after 2 called +ℹ tests 52 +ℹ suites 12 +ℹ pass 22 +ℹ fail 27 +ℹ cancelled 3 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms * - failing tests: +✖ failing tests: -* - 1 +test at test/fixtures/test-runner/output/hooks.js:74:3 +✖ 1 'test did not finish before its parent and was cancelled' -* - 2 +test at test/fixtures/test-runner/output/hooks.js:75:3 +✖ 2 'test did not finish before its parent and was cancelled' -* - before throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:72:1 +✖ before throws (*ms) Error: before - * - * - * - * - * - * - * - * + at SuiteContext. (/test/fixtures/test-runner/output/hooks.js:73:24) + at -* - before throws - no subtests (*ms) +test at test/fixtures/test-runner/output/hooks.js:78:1 +✖ before throws - no subtests (*ms) Error: before - * - * - * - * - * - * - * - * + at SuiteContext. (/test/fixtures/test-runner/output/hooks.js:79:24) + at -* - after throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:83:1 +✖ after throws (*ms) Error: after - * - * - * - * - * - * - * - * - * - * + at SuiteContext. (/test/fixtures/test-runner/output/hooks.js:84:23) + at -* - after throws - no subtests (*ms) +test at test/fixtures/test-runner/output/hooks.js:89:1 +✖ after throws - no subtests (*ms) Error: after - * - * - * - * - * - * - * - * - * - * + at SuiteContext. (/test/fixtures/test-runner/output/hooks.js:90:23) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:95:3 +✖ 1 (*ms) Error: beforeEach - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:94:28) + at at new Promise () -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:96:3 +✖ 2 (*ms) Error: beforeEach - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:94:28) + at at async Promise.all (index 0) -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:101:3 +✖ 1 (*ms) Error: afterEach - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:100:27) + at at async Promise.all (index 0) - * + at -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:102:3 +✖ 2 (*ms) Error: afterEach - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:100:27) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:107:3 +✖ 1 (*ms) Error: test - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:107:25) + at at new Promise () - * - * + at at Array.map () -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:113:3 +✖ 1 (*ms) Error: test - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:113:25) + at at new Promise () - * - * + at at Array.map () -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:114:3 +✖ 2 (*ms) Error: afterEach - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:112:27) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:172:11 +✖ 1 (*ms) Error: before - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + at -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:173:11 +✖ 2 (*ms) Error: before - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + at -* - t.before throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:169:1 +✖ t.before throws (*ms) Error: before - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:26) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:171:5) + at -* - t.before throws - no subtests (*ms) +test at test/fixtures/test-runner/output/hooks.js:176:1 +✖ t.before throws - no subtests (*ms) Error: before - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:178:26) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:178:5) + at -* - t.after throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:181:1 +✖ t.after throws (*ms) Error: after - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:183:25) + at -* - t.after throws - no subtests (*ms) +test at test/fixtures/test-runner/output/hooks.js:188:1 +✖ t.after throws - no subtests (*ms) Error: after - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:190:25) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:197:11 +✖ 1 (*ms) Error: beforeEach - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:196:30) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:197:11) + at -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:198:11 +✖ 2 (*ms) Error: beforeEach - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:196:30) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:198:11) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:204:11 +✖ 1 (*ms) Error: afterEach - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:203:29) + at + at async TestContext. (/test/fixtures/test-runner/output/hooks.js:204:3) + at -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:205:11 +✖ 2 (*ms) Error: afterEach - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:203:29) + at + at async TestContext. (/test/fixtures/test-runner/output/hooks.js:205:3) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:212:11 +✖ 1 (*ms) Error: test - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:212:35) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:212:11) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:232:11 +✖ 1 (*ms) Error: test - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:226:15) + at -* - 1 (*ms) +test at test/fixtures/test-runner/output/hooks.js:238:11 +✖ 1 (*ms) Error: test - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:238:35) + at + at TestContext. (/test/fixtures/test-runner/output/hooks.js:238:11) + at -* - 2 (*ms) +test at test/fixtures/test-runner/output/hooks.js:239:11 +✖ 2 (*ms) Error: afterEach - * - * - * - * - * - * - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:237:29) + at + at async TestContext. (/test/fixtures/test-runner/output/hooks.js:239:3) + at -* - t.after() is called if test body throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:242:1 +✖ t.after() is called if test body throws (*ms) Error: bye - * - * - * - * + at TestContext. (/test/fixtures/test-runner/output/hooks.js:246:9) + at -* - 1 +test at test/fixtures/test-runner/output/hooks.js:254:3 +✖ 1 'test did not finish before its parent and was cancelled' -* - run after when before throws (*ms) +test at test/fixtures/test-runner/output/hooks.js:249:1 +✖ run after when before throws (*ms) Error: before - * - * - * - * - * - * - * - * + at SuiteContext. (/test/fixtures/test-runner/output/hooks.js:253:24) + at diff --git a/test/fixtures/test-runner/output/junit_reporter.snapshot b/test/fixtures/test-runner/output/junit_reporter.snapshot index 5441bafe360ca2..1142b5b31ff2e7 100644 --- a/test/fixtures/test-runner/output/junit_reporter.snapshot +++ b/test/fixtures/test-runner/output/junit_reporter.snapshot @@ -23,13 +23,8 @@ code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from sync fail todo - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:42:9) + at } @@ -40,13 +35,8 @@ code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from sync fail todo with message - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:47:9) + at } @@ -64,13 +54,8 @@ code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from sync throw fail - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:63:9) + at } @@ -84,13 +69,8 @@ code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from async throw fail - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:75:9) + at } @@ -101,13 +81,8 @@ code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from async throw fail - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:80:9) + at } @@ -123,13 +98,9 @@ true !== false true !== false - * - * - * - * - * - * - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:85:10) + at + at { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, @@ -147,13 +118,8 @@ true !== false code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: rejected from reject fail - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:93:25) + at } @@ -166,21 +132,15 @@ true !== false Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail - * - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:125:11) + at { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from subtest sync throw fail - * - * - * - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:127:11) + at + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:125:11) + at } @@ -216,13 +176,8 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: this should be executed - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:212:9) + at } @@ -247,8 +202,8 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: callback failure - * - * + at Immediate.<anonymous> (/test/fixtures/test-runner/output/output.js:245:10) + at } @@ -266,21 +221,16 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from callback throw - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:267:9) + at } Error [ERR_TEST_FAILURE]: callback invoked multiple times - * - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:272:3) + at { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' @@ -291,11 +241,11 @@ Error [ERR_TEST_FAILURE]: callback invoked multiple times Error [ERR_TEST_FAILURE]: callback invoked multiple times - * { + at { code: 'ERR_TEST_FAILURE', failureType: 'uncaughtException', cause: Error [ERR_TEST_FAILURE]: callback invoked multiple times - * { + at Immediate.<anonymous> (/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' @@ -306,12 +256,12 @@ Error [ERR_TEST_FAILURE]: callback invoked multiple times Error [ERR_TEST_FAILURE]: thrown from callback async throw - * { + at { code: 'ERR_TEST_FAILURE', failureType: 'uncaughtException', cause: Error: thrown from callback async throw - * - * + at Immediate.<anonymous> (/test/fixtures/test-runner/output/output.js:289:11) + at } @@ -342,39 +292,29 @@ Error [ERR_TEST_FAILURE]: thrown from callback async throw Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at first - * - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:334:11) + at { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from subtest sync throw fails at first - * - * - * - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:335:11) + at + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:334:11) + at } Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at second - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:337:11) { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Error: thrown from subtest sync throw fails at second - * - * - * - * - * - * - * - * + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:338:11) + at + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:337:11) + at } @@ -400,26 +340,24 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at second Error [ERR_TEST_FAILURE]: foo - * { + at { code: 'ERR_TEST_FAILURE', failureType: 'uncaughtException', cause: Error: foo - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + at } Error [ERR_TEST_FAILURE]: bar - * { + at { code: 'ERR_TEST_FAILURE', failureType: 'unhandledRejection', cause: Error: bar - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + at } @@ -497,7 +435,7 @@ should loosely deep-equal c: [Circular *1] } } - * { + at TestContext.<anonymous> (/test/fixtures/test-runner/output/output.js:425:12) { generatedMessage: true, code: 'ERR_ASSERTION', actual: [Object], @@ -511,7 +449,7 @@ should loosely deep-equal Error [ERR_TEST_FAILURE]: test could not be started because its parent finished - * { + at Immediate.<anonymous> (/test/fixtures/test-runner/output/output.js:197:7) { code: 'ERR_TEST_FAILURE', failureType: 'parentAlreadyFinished', cause: 'test could not be started because its parent finished' diff --git a/test/fixtures/test-runner/output/output.snapshot b/test/fixtures/test-runner/output/output.snapshot index b99744c9f12a2a..79ac90bd667dda 100644 --- a/test/fixtures/test-runner/output/output.snapshot +++ b/test/fixtures/test-runner/output/output.snapshot @@ -52,36 +52,26 @@ not ok 9 - sync fail todo # TODO --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:40:1' failureType: 'testCodeFailure' error: 'thrown from sync fail todo' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:42:9) + ... # Subtest: sync fail todo with message not ok 10 - sync fail todo with message # TODO this is a failing todo --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:45:1' failureType: 'testCodeFailure' error: 'thrown from sync fail todo with message' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:47:9) + ... # Subtest: sync skip pass ok 11 - sync skip pass # SKIP @@ -107,18 +97,13 @@ not ok 14 - sync throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:62:1' failureType: 'testCodeFailure' error: 'thrown from sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:63:9) + ... # Subtest: async skip pass ok 15 - async skip pass # SKIP @@ -137,43 +122,33 @@ not ok 17 - async throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:74:1' failureType: 'testCodeFailure' error: 'thrown from async throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:75:9) + ... # Subtest: async skip fail not ok 18 - async skip fail # SKIP --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:78:1' failureType: 'testCodeFailure' error: 'thrown from async throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:80:9) + ... # Subtest: async assertion fail not ok 19 - async assertion fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:83:1' failureType: 'testCodeFailure' error: |- Expected values to be strictly equal: @@ -186,13 +161,8 @@ not ok 19 - async assertion fail actual: true operator: 'strictEqual' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:85:10) + ... # Subtest: resolve pass ok 20 - resolve pass @@ -205,18 +175,13 @@ not ok 21 - reject fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:92:1' failureType: 'testCodeFailure' error: 'rejected from reject fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:93:25) + ... # Subtest: unhandled rejection - passes but warns ok 22 - unhandled rejection - passes but warns @@ -254,21 +219,15 @@ ok 26 - immediate resolve pass --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:125:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:127:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:125:11) + ... # this subtest should make its parent test fail 1..1 @@ -276,7 +235,7 @@ not ok 27 - subtest sync throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:124:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -286,7 +245,7 @@ not ok 28 - sync throw non-error fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:131:1' failureType: 'testCodeFailure' error: 'Symbol(thrown symbol from sync throw non-error fail)' code: 'ERR_TEST_FAILURE' @@ -371,18 +330,13 @@ not ok 34 - sync skip option is false fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:211:1' failureType: 'testCodeFailure' error: 'this should be executed' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:212:9) + ... # Subtest: ok 35 - @@ -443,13 +397,13 @@ not ok 44 - callback fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:243:1' failureType: 'testCodeFailure' error: 'callback failure' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/output.js:245:10) + ... # Subtest: sync t is this in test ok 45 - sync t is this in test @@ -474,7 +428,7 @@ not ok 48 - callback also returns a Promise --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:262:1' failureType: 'callbackAndPromisePresent' error: 'passed a callback but also returned a Promise' code: 'ERR_TEST_FAILURE' @@ -484,31 +438,26 @@ not ok 49 - callback throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:266:1' failureType: 'testCodeFailure' error: 'thrown from callback throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:267:9) + ... # Subtest: callback called twice not ok 50 - callback called twice --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:270:1' failureType: 'multipleCallbackInvocations' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:272:3) + ... # Subtest: callback called twice in different ticks ok 51 - callback called twice in different ticks @@ -521,25 +470,25 @@ not ok 52 - callback called twice in future tick --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:280:1' failureType: 'uncaughtException' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/output.js:283:5) ... # Subtest: callback async throw not ok 53 - callback async throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:287:1' failureType: 'uncaughtException' error: 'thrown from callback async throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/output.js:289:11) + ... # Subtest: callback async throw after done ok 54 - callback async throw after done @@ -577,7 +526,7 @@ not ok 56 - custom inspect symbol fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:311:1' failureType: 'testCodeFailure' error: 'customized' code: 'ERR_TEST_FAILURE' @@ -587,7 +536,7 @@ not ok 57 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:322:1' failureType: 'testCodeFailure' error: |- { @@ -602,47 +551,37 @@ not ok 57 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:334:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at first' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:335:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:334:11) + ... # Subtest: sync throw fails at second not ok 2 - sync throw fails at second --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:337:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at second' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:338:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:337:11) + ... 1..2 not ok 58 - subtest sync throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:333:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -652,7 +591,7 @@ not ok 59 - timed out async test --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:342:1' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -662,7 +601,7 @@ not ok 60 - timed out callback test --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:351:1' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -690,7 +629,7 @@ not ok 64 - rejected thenable --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:380:1' failureType: 'testCodeFailure' error: 'custom error' code: 'ERR_TEST_FAILURE' @@ -700,35 +639,33 @@ not ok 65 - unfinished test with uncaughtException --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:391:1' failureType: 'uncaughtException' error: 'foo' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + ... # Subtest: unfinished test with unhandledRejection not ok 66 - unfinished test with unhandledRejection --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:397:1' failureType: 'unhandledRejection' error: 'bar' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + ... # Subtest: assertion errors display actual and expected properly not ok 67 - assertion errors display actual and expected properly --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:409:1' failureType: 'testCodeFailure' error: |- Expected values to be loosely deep-equal: @@ -791,28 +728,28 @@ not ok 67 - assertion errors display actual and expected properly string: 'Hello' operator: 'deepEqual' stack: |- - * + TestContext. (/test/fixtures/test-runner/output/output.js:425:12) ... # Subtest: invalid subtest fail not ok 68 - invalid subtest fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):7' + location: '/test/fixtures/test-runner/output/output.js:197:7' failureType: 'parentAlreadyFinished' error: 'test could not be started because its parent finished' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/output.js:197:7) ... 1..68 -# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. -# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. # tests 81 # suites 0 # pass 40 diff --git a/test/fixtures/test-runner/output/output_cli.snapshot b/test/fixtures/test-runner/output/output_cli.snapshot index 25392dafaa0574..27a144d3e8043a 100644 --- a/test/fixtures/test-runner/output/output_cli.snapshot +++ b/test/fixtures/test-runner/output/output_cli.snapshot @@ -52,36 +52,26 @@ not ok 9 - sync fail todo # TODO --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:40:1' failureType: 'testCodeFailure' error: 'thrown from sync fail todo' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:42:9) + ... # Subtest: sync fail todo with message not ok 10 - sync fail todo with message # TODO this is a failing todo --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:45:1' failureType: 'testCodeFailure' error: 'thrown from sync fail todo with message' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:47:9) + ... # Subtest: sync skip pass ok 11 - sync skip pass # SKIP @@ -107,18 +97,13 @@ not ok 14 - sync throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:62:1' failureType: 'testCodeFailure' error: 'thrown from sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:63:9) + ... # Subtest: async skip pass ok 15 - async skip pass # SKIP @@ -137,43 +122,33 @@ not ok 17 - async throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:74:1' failureType: 'testCodeFailure' error: 'thrown from async throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:75:9) + ... # Subtest: async skip fail not ok 18 - async skip fail # SKIP --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:78:1' failureType: 'testCodeFailure' error: 'thrown from async throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:80:9) + ... # Subtest: async assertion fail not ok 19 - async assertion fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:83:1' failureType: 'testCodeFailure' error: |- Expected values to be strictly equal: @@ -186,13 +161,8 @@ not ok 19 - async assertion fail actual: true operator: 'strictEqual' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:85:10) + ... # Subtest: resolve pass ok 20 - resolve pass @@ -205,18 +175,13 @@ not ok 21 - reject fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:92:1' failureType: 'testCodeFailure' error: 'rejected from reject fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:93:25) + ... # Subtest: unhandled rejection - passes but warns ok 22 - unhandled rejection - passes but warns @@ -254,21 +219,15 @@ ok 26 - immediate resolve pass --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:125:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fail' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:127:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:125:11) + ... # this subtest should make its parent test fail 1..1 @@ -276,7 +235,7 @@ not ok 27 - subtest sync throw fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:124:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -286,7 +245,7 @@ not ok 28 - sync throw non-error fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:131:1' failureType: 'testCodeFailure' error: 'Symbol(thrown symbol from sync throw non-error fail)' code: 'ERR_TEST_FAILURE' @@ -371,18 +330,13 @@ not ok 34 - sync skip option is false fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:211:1' failureType: 'testCodeFailure' error: 'this should be executed' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:212:9) + ... # Subtest: ok 35 - @@ -443,13 +397,13 @@ not ok 44 - callback fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:243:1' failureType: 'testCodeFailure' error: 'callback failure' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/output.js:245:10) + ... # Subtest: sync t is this in test ok 45 - sync t is this in test @@ -474,7 +428,7 @@ not ok 48 - callback also returns a Promise --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:262:1' failureType: 'callbackAndPromisePresent' error: 'passed a callback but also returned a Promise' code: 'ERR_TEST_FAILURE' @@ -484,31 +438,26 @@ not ok 49 - callback throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:266:1' failureType: 'testCodeFailure' error: 'thrown from callback throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:267:9) + ... # Subtest: callback called twice not ok 50 - callback called twice --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:270:1' failureType: 'multipleCallbackInvocations' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:272:3) + ... # Subtest: callback called twice in different ticks ok 51 - callback called twice in different ticks @@ -521,25 +470,25 @@ not ok 52 - callback called twice in future tick --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:280:1' failureType: 'uncaughtException' error: 'callback invoked multiple times' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/output.js:283:5) ... # Subtest: callback async throw not ok 53 - callback async throw --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:287:1' failureType: 'uncaughtException' error: 'thrown from callback async throw' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/output.js:289:11) + ... # Subtest: callback async throw after done ok 54 - callback async throw after done @@ -585,7 +534,7 @@ not ok 56 - custom inspect symbol fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:311:1' failureType: 'testCodeFailure' error: 'customized' code: 'ERR_TEST_FAILURE' @@ -595,7 +544,7 @@ not ok 57 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:322:1' failureType: 'testCodeFailure' error: |- { @@ -610,47 +559,37 @@ not ok 57 - custom inspect symbol that throws fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:334:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at first' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:335:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:334:11) + ... # Subtest: sync throw fails at second not ok 2 - sync throw fails at second --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):11' + location: '/test/fixtures/test-runner/output/output.js:337:11' failureType: 'testCodeFailure' error: 'thrown from subtest sync throw fails at second' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/output.js:338:11) + + TestContext. (/test/fixtures/test-runner/output/output.js:337:11) + ... 1..2 not ok 58 - subtest sync throw fails --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:333:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -660,7 +599,7 @@ not ok 59 - timed out async test --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:342:1' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -670,7 +609,7 @@ not ok 60 - timed out callback test --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:351:1' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -698,7 +637,7 @@ not ok 64 - rejected thenable --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:380:1' failureType: 'testCodeFailure' error: 'custom error' code: 'ERR_TEST_FAILURE' @@ -708,35 +647,33 @@ not ok 65 - unfinished test with uncaughtException --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:391:1' failureType: 'uncaughtException' error: 'foo' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + ... # Subtest: unfinished test with unhandledRejection not ok 66 - unfinished test with unhandledRejection --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:397:1' failureType: 'unhandledRejection' error: 'bar' code: 'ERR_TEST_FAILURE' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + ... # Subtest: assertion errors display actual and expected properly not ok 67 - assertion errors display actual and expected properly --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):1' + location: '/test/fixtures/test-runner/output/output.js:409:1' failureType: 'testCodeFailure' error: |- Expected values to be loosely deep-equal: @@ -799,27 +736,27 @@ not ok 67 - assertion errors display actual and expected properly string: 'Hello' operator: 'deepEqual' stack: |- - * + TestContext. (/test/fixtures/test-runner/output/output.js:425:12) ... # Subtest: invalid subtest fail not ok 68 - invalid subtest fail --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/output.js:(LINE):7' + location: '/test/fixtures/test-runner/output/output.js:197:7' failureType: 'parentAlreadyFinished' error: 'test could not be started because its parent finished' code: 'ERR_TEST_FAILURE' stack: |- - * + Immediate. (/test/fixtures/test-runner/output/output.js:197:7) ... -# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. # Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. -# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. +# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. # Subtest: last test ok 69 - last test --- diff --git a/test/fixtures/test-runner/output/source_mapped_locations.snapshot b/test/fixtures/test-runner/output/source_mapped_locations.snapshot index 41ddcd622c4e62..f5625b69fe5cee 100644 --- a/test/fixtures/test-runner/output/source_mapped_locations.snapshot +++ b/test/fixtures/test-runner/output/source_mapped_locations.snapshot @@ -17,11 +17,8 @@ not ok 1 - fails actual: 1 operator: 'strictEqual' stack: |- - * - * - * - * - * + TestContext. (/test/fixtures/test-runner/output/source_mapped_locations.ts:6:3) + ... 1..1 # tests 1 diff --git a/test/fixtures/test-runner/output/spec_reporter.js b/test/fixtures/test-runner/output/spec_reporter.js index 5edcb6e8d9c8df..131fa432f6d282 100644 --- a/test/fixtures/test-runner/output/spec_reporter.js +++ b/test/fixtures/test-runner/output/spec_reporter.js @@ -13,6 +13,5 @@ const child = spawn( { stdio: 'pipe' }, ); -// eslint-disable-next-line no-control-regex -child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, ''))); +child.stdout.pipe(process.stdout); child.stderr.pipe(process.stderr); diff --git a/test/fixtures/test-runner/output/spec_reporter.snapshot b/test/fixtures/test-runner/output/spec_reporter.snapshot index 71a386e1756369..cbc5c3bac14b73 100644 --- a/test/fixtures/test-runner/output/spec_reporter.snapshot +++ b/test/fixtures/test-runner/output/spec_reporter.snapshot @@ -1,178 +1,149 @@ - sync expect fail (method) (*ms) # EXPECTED FAILURE - sync expect fail (options) (*ms) # EXPECTED FAILURE - async expect fail (method) (*ms) # EXPECTED FAILURE - async expect fail (options) (*ms) # EXPECTED FAILURE - sync todo with expect fail (*ms) # TODO - sync skip expect fail (*ms) # SKIP - sync pass todo (*ms) # TODO - sync pass todo with message (*ms) # this is a passing todo - sync fail todo (*ms) # TODO - sync fail todo with message (*ms) # this is a failing todo - sync skip pass (*ms) # SKIP - sync skip pass with message (*ms) # this is skipped - sync pass (*ms) - this test should pass - sync throw fail (*ms) - async skip pass (*ms) # SKIP - async pass (*ms) - async throw fail (*ms) - async skip fail (*ms) # SKIP - async assertion fail (*ms) - resolve pass (*ms) - reject fail (*ms) - unhandled rejection - passes but warns (*ms) - async unhandled rejection - passes but warns (*ms) - immediate throw - passes but warns (*ms) - immediate reject - passes but warns (*ms) - immediate resolve pass (*ms) - subtest sync throw fail - +sync throw fail (*ms) - this subtest should make its parent test fail - subtest sync throw fail (*ms) - sync throw non-error fail (*ms) - level 0a - level 1a (*ms) - level 1b (*ms) - level 1c (*ms) - level 1d (*ms) - level 0a (*ms) - top level - +long running (*ms) - +short running - ++short running (*ms) - +short running (*ms) - top level (*ms) - invalid subtest - pass but subtest fails (*ms) - sync skip option (*ms) # SKIP - sync skip option with message (*ms) # this is skipped - sync skip option is false fail (*ms) - (*ms) - functionOnly (*ms) - (*ms) - test with only a name provided (*ms) - (*ms) - (*ms) # SKIP - test with a name and options provided (*ms) # SKIP - functionAndOptions (*ms) # SKIP - callback pass (*ms) - callback fail (*ms) - sync t is this in test (*ms) - async t is this in test (*ms) - callback t is this in test (*ms) - callback also returns a Promise (*ms) - callback throw (*ms) - callback called twice (*ms) - callback called twice in different ticks (*ms) - callback called twice in future tick (*ms) - callback async throw (*ms) - callback async throw after done (*ms) - only is set on subtests but not in only mode - running subtest 1 (*ms) - running subtest 3 (*ms) - running subtest 4 (*ms) - only is set on subtests but not in only mode (*ms) - custom inspect symbol fail (*ms) - custom inspect symbol that throws fail (*ms) - subtest sync throw fails - sync throw fails at first (*ms) - sync throw fails at second (*ms) - subtest sync throw fails (*ms) - timed out async test (*ms) - timed out callback test (*ms) - large timeout async test is ok (*ms) - large timeout callback test is ok (*ms) - successful thenable (*ms) - rejected thenable (*ms) - unfinished test with uncaughtException (*ms) - unfinished test with unhandledRejection (*ms) - assertion errors display actual and expected properly (*ms) - invalid subtest fail (*ms) - Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. - Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. - Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. - Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. - tests 81 - suites 0 - pass 40 - fail 24 - cancelled 2 - skipped 10 - todo 5 - duration_ms * - - failing tests: - -* - sync fail todo (*ms) # TODO +✔ sync expect fail (method) (*ms) # EXPECTED FAILURE +✔ sync expect fail (options) (*ms) # EXPECTED FAILURE +✔ async expect fail (method) (*ms) # EXPECTED FAILURE +✔ async expect fail (options) (*ms) # EXPECTED FAILURE +✔ sync todo with expect fail (*ms) # TODO +﹣ sync skip expect fail (*ms) # SKIP +✔ sync pass todo (*ms) # TODO +✔ sync pass todo with message (*ms) # this is a passing todo +⚠ sync fail todo (*ms) # TODO +⚠ sync fail todo with message (*ms) # this is a failing todo +﹣ sync skip pass (*ms) # SKIP +﹣ sync skip pass with message (*ms) # this is skipped +✔ sync pass (*ms) +ℹ this test should pass +✖ sync throw fail (*ms) +﹣ async skip pass (*ms) # SKIP +✔ async pass (*ms) +✖ async throw fail (*ms) +﹣ async skip fail (*ms) # SKIP +✖ async assertion fail (*ms) +✔ resolve pass (*ms) +✖ reject fail (*ms) +✔ unhandled rejection - passes but warns (*ms) +✔ async unhandled rejection - passes but warns (*ms) +✔ immediate throw - passes but warns (*ms) +✔ immediate reject - passes but warns (*ms) +✔ immediate resolve pass (*ms) +▶ subtest sync throw fail + ✖ +sync throw fail (*ms) + ℹ this subtest should make its parent test fail +✖ subtest sync throw fail (*ms) +✖ sync throw non-error fail (*ms) +▶ level 0a + ✔ level 1a (*ms) + ✔ level 1b (*ms) + ✔ level 1c (*ms) + ✔ level 1d (*ms) +✔ level 0a (*ms) +▶ top level + ✔ +long running (*ms) + ▶ +short running + ✔ ++short running (*ms) + ✔ +short running (*ms) +✔ top level (*ms) +✔ invalid subtest - pass but subtest fails (*ms) +﹣ sync skip option (*ms) # SKIP +﹣ sync skip option with message (*ms) # this is skipped +✖ sync skip option is false fail (*ms) +✔ (*ms) +✔ functionOnly (*ms) +✔ (*ms) +✔ test with only a name provided (*ms) +✔ (*ms) +﹣ (*ms) # SKIP +﹣ test with a name and options provided (*ms) # SKIP +﹣ functionAndOptions (*ms) # SKIP +✔ callback pass (*ms) +✖ callback fail (*ms) +✔ sync t is this in test (*ms) +✔ async t is this in test (*ms) +✔ callback t is this in test (*ms) +✖ callback also returns a Promise (*ms) +✖ callback throw (*ms) +✖ callback called twice (*ms) +✔ callback called twice in different ticks (*ms) +✖ callback called twice in future tick (*ms) +✖ callback async throw (*ms) +✔ callback async throw after done (*ms) +▶ only is set on subtests but not in only mode + ✔ running subtest 1 (*ms) + ✔ running subtest 3 (*ms) + ✔ running subtest 4 (*ms) +✔ only is set on subtests but not in only mode (*ms) +✖ custom inspect symbol fail (*ms) +✖ custom inspect symbol that throws fail (*ms) +▶ subtest sync throw fails + ✖ sync throw fails at first (*ms) + ✖ sync throw fails at second (*ms) +✖ subtest sync throw fails (*ms) +✖ timed out async test (*ms) +✖ timed out callback test (*ms) +✔ large timeout async test is ok (*ms) +✔ large timeout callback test is ok (*ms) +✔ successful thenable (*ms) +✖ rejected thenable (*ms) +✖ unfinished test with uncaughtException (*ms) +✖ unfinished test with unhandledRejection (*ms) +✖ assertion errors display actual and expected properly (*ms) +✖ invalid subtest fail (*ms) +ℹ Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. +ℹ Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ tests 81 +ℹ suites 0 +ℹ pass 40 +ℹ fail 24 +ℹ cancelled 2 +ℹ skipped 10 +ℹ todo 5 +ℹ duration_ms * + +✖ failing tests: + +test at test/fixtures/test-runner/output/output.js:40:1 +⚠ sync fail todo (*ms) # TODO Error: thrown from sync fail todo - * - * - * - * - * - * - * - -* - sync fail todo with message (*ms) # this is a failing todo + at TestContext. (/test/fixtures/test-runner/output/output.js:42:9) + at + +test at test/fixtures/test-runner/output/output.js:45:1 +⚠ sync fail todo with message (*ms) # this is a failing todo Error: thrown from sync fail todo with message - * - * - * - * - * - * - * - -* - sync throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:47:9) + at + +test at test/fixtures/test-runner/output/output.js:62:1 +✖ sync throw fail (*ms) Error: thrown from sync throw fail - * - * - * - * - * - * - * - -* - async throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:63:9) + at + +test at test/fixtures/test-runner/output/output.js:74:1 +✖ async throw fail (*ms) Error: thrown from async throw fail - * - * - * - * - * - * - * - -* - async skip fail (*ms) # SKIP + at TestContext. (/test/fixtures/test-runner/output/output.js:75:9) + at + +test at test/fixtures/test-runner/output/output.js:78:1 +﹣ async skip fail (*ms) # SKIP Error: thrown from async throw fail - * - * - * - * - * - * - * - -* - async assertion fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:80:9) + at + +test at test/fixtures/test-runner/output/output.js:83:1 +✖ async assertion fail (*ms) AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: true !== false - * - * - * - * - * - * - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:85:10) + at + at { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, @@ -181,148 +152,115 @@ diff: 'simple' } -* - reject fail (*ms) +test at test/fixtures/test-runner/output/output.js:92:1 +✖ reject fail (*ms) Error: rejected from reject fail - * - * - * - * - * - * - * - -* - +sync throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:93:25) + at + +test at test/fixtures/test-runner/output/output.js:125:11 +✖ +sync throw fail (*ms) Error: thrown from subtest sync throw fail - * - * - * - * - * - * - * - * - * - * - -* - sync throw non-error fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:127:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:125:11) + at + +test at test/fixtures/test-runner/output/output.js:131:1 +✖ sync throw non-error fail (*ms) Symbol(thrown symbol from sync throw non-error fail) -* - sync skip option is false fail (*ms) +test at test/fixtures/test-runner/output/output.js:211:1 +✖ sync skip option is false fail (*ms) Error: this should be executed - * - * - * - * - * - * - * - -* - callback fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:212:9) + at + +test at test/fixtures/test-runner/output/output.js:243:1 +✖ callback fail (*ms) Error: callback failure - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:245:10) + at -* - callback also returns a Promise (*ms) +test at test/fixtures/test-runner/output/output.js:262:1 +✖ callback also returns a Promise (*ms) 'passed a callback but also returned a Promise' -* - callback throw (*ms) +test at test/fixtures/test-runner/output/output.js:266:1 +✖ callback throw (*ms) Error: thrown from callback throw - * - * - * - * - * - * - * - -* - callback called twice (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:267:9) + at + +test at test/fixtures/test-runner/output/output.js:270:1 +✖ callback called twice (*ms) 'callback invoked multiple times' -* - callback called twice in future tick (*ms) +test at test/fixtures/test-runner/output/output.js:280:1 +✖ callback called twice in future tick (*ms) Error [ERR_TEST_FAILURE]: callback invoked multiple times - * { + at Immediate. (/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } -* - callback async throw (*ms) +test at test/fixtures/test-runner/output/output.js:287:1 +✖ callback async throw (*ms) Error: thrown from callback async throw - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:289:11) + at -* - custom inspect symbol fail (*ms) +test at test/fixtures/test-runner/output/output.js:311:1 +✖ custom inspect symbol fail (*ms) customized -* - custom inspect symbol that throws fail (*ms) +test at test/fixtures/test-runner/output/output.js:322:1 +✖ custom inspect symbol that throws fail (*ms) { foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] } -* - sync throw fails at first (*ms) +test at test/fixtures/test-runner/output/output.js:334:11 +✖ sync throw fails at first (*ms) Error: thrown from subtest sync throw fails at first - * - * - * - * - * - * - * - * - * - * - -* - sync throw fails at second (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:335:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:334:11) + at + +test at test/fixtures/test-runner/output/output.js:337:11 +✖ sync throw fails at second (*ms) Error: thrown from subtest sync throw fails at second - * - * - * - * - * - * - * - * - -* - timed out async test (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:338:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:337:11) + at + +test at test/fixtures/test-runner/output/output.js:342:1 +✖ timed out async test (*ms) 'test timed out after *ms' -* - timed out callback test (*ms) +test at test/fixtures/test-runner/output/output.js:351:1 +✖ timed out callback test (*ms) 'test timed out after *ms' -* - rejected thenable (*ms) +test at test/fixtures/test-runner/output/output.js:380:1 +✖ rejected thenable (*ms) 'custom error' -* - unfinished test with uncaughtException (*ms) +test at test/fixtures/test-runner/output/output.js:391:1 +✖ unfinished test with uncaughtException (*ms) Error: foo - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + at -* - unfinished test with unhandledRejection (*ms) +test at test/fixtures/test-runner/output/output.js:397:1 +✖ unfinished test with unhandledRejection (*ms) Error: bar - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + at -* - assertion errors display actual and expected properly (*ms) +test at test/fixtures/test-runner/output/output.js:409:1 +✖ assertion errors display actual and expected properly (*ms) AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: { @@ -358,7 +296,7 @@ c: [Circular *1] } } - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:425:12) { generatedMessage: true, code: 'ERR_ASSERTION', actual: [Object], @@ -367,6 +305,6 @@ diff: 'simple' } -* - invalid subtest fail (*ms) +test at test/fixtures/test-runner/output/output.js:197:7 +✖ invalid subtest fail (*ms) 'test could not be started because its parent finished' diff --git a/test/fixtures/test-runner/output/spec_reporter_cli.js b/test/fixtures/test-runner/output/spec_reporter_cli.js index 9802c6b3414a91..336ee71e7c8de8 100644 --- a/test/fixtures/test-runner/output/spec_reporter_cli.js +++ b/test/fixtures/test-runner/output/spec_reporter_cli.js @@ -14,6 +14,5 @@ const child = spawn( { stdio: 'pipe' }, ); -// eslint-disable-next-line no-control-regex -child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, ''))); +child.stdout.pipe(process.stdout); child.stderr.pipe(process.stderr); diff --git a/test/fixtures/test-runner/output/spec_reporter_cli.snapshot b/test/fixtures/test-runner/output/spec_reporter_cli.snapshot index 5d082244aa3447..fff7f9b0f123fe 100644 --- a/test/fixtures/test-runner/output/spec_reporter_cli.snapshot +++ b/test/fixtures/test-runner/output/spec_reporter_cli.snapshot @@ -1,181 +1,152 @@ - sync expect fail (method) (*ms) # EXPECTED FAILURE - sync expect fail (options) (*ms) # EXPECTED FAILURE - async expect fail (method) (*ms) # EXPECTED FAILURE - async expect fail (options) (*ms) # EXPECTED FAILURE - sync todo with expect fail (*ms) # TODO - sync skip expect fail (*ms) # SKIP - sync pass todo (*ms) # TODO - sync pass todo with message (*ms) # this is a passing todo - sync fail todo (*ms) # TODO - sync fail todo with message (*ms) # this is a failing todo - sync skip pass (*ms) # SKIP - sync skip pass with message (*ms) # this is skipped - sync pass (*ms) - this test should pass - sync throw fail (*ms) - async skip pass (*ms) # SKIP - async pass (*ms) - async throw fail (*ms) - async skip fail (*ms) # SKIP - async assertion fail (*ms) - resolve pass (*ms) - reject fail (*ms) - unhandled rejection - passes but warns (*ms) - async unhandled rejection - passes but warns (*ms) - immediate throw - passes but warns (*ms) - immediate reject - passes but warns (*ms) - immediate resolve pass (*ms) - subtest sync throw fail - +sync throw fail (*ms) - this subtest should make its parent test fail - subtest sync throw fail (*ms) - sync throw non-error fail (*ms) - level 0a - level 1a (*ms) - level 1b (*ms) - level 1c (*ms) - level 1d (*ms) - level 0a (*ms) - top level - +long running (*ms) - +short running - ++short running (*ms) - +short running (*ms) - top level (*ms) - invalid subtest - pass but subtest fails (*ms) - sync skip option (*ms) # SKIP - sync skip option with message (*ms) # this is skipped - sync skip option is false fail (*ms) - (*ms) - functionOnly (*ms) - (*ms) - test with only a name provided (*ms) - (*ms) - (*ms) # SKIP - test with a name and options provided (*ms) # SKIP - functionAndOptions (*ms) # SKIP - callback pass (*ms) - callback fail (*ms) - sync t is this in test (*ms) - async t is this in test (*ms) - callback t is this in test (*ms) - callback also returns a Promise (*ms) - callback throw (*ms) - callback called twice (*ms) - callback called twice in different ticks (*ms) - callback called twice in future tick (*ms) - callback async throw (*ms) - callback async throw after done (*ms) - only is set on subtests but not in only mode - running subtest 1 (*ms) - running subtest 2 (*ms) - 'only' and 'runOnly' require the --test-only command-line option. - running subtest 3 (*ms) - 'only' and 'runOnly' require the --test-only command-line option. - running subtest 4 (*ms) - only is set on subtests but not in only mode (*ms) - custom inspect symbol fail (*ms) - custom inspect symbol that throws fail (*ms) - subtest sync throw fails - sync throw fails at first (*ms) - sync throw fails at second (*ms) - subtest sync throw fails (*ms) - timed out async test (*ms) - timed out callback test (*ms) - large timeout async test is ok (*ms) - large timeout callback test is ok (*ms) - successful thenable (*ms) - rejected thenable (*ms) - unfinished test with uncaughtException (*ms) - unfinished test with unhandledRejection (*ms) - assertion errors display actual and expected properly (*ms) - invalid subtest fail (*ms) - Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. - Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. - Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. - Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. - Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. - tests 82 - suites 0 - pass 41 - fail 24 - cancelled 2 - skipped 10 - todo 5 - duration_ms * - - failing tests: - -* - sync fail todo (*ms) # TODO +✔ sync expect fail (method) (*ms) # EXPECTED FAILURE +✔ sync expect fail (options) (*ms) # EXPECTED FAILURE +✔ async expect fail (method) (*ms) # EXPECTED FAILURE +✔ async expect fail (options) (*ms) # EXPECTED FAILURE +✔ sync todo with expect fail (*ms) # TODO +﹣ sync skip expect fail (*ms) # SKIP +✔ sync pass todo (*ms) # TODO +✔ sync pass todo with message (*ms) # this is a passing todo +⚠ sync fail todo (*ms) # TODO +⚠ sync fail todo with message (*ms) # this is a failing todo +﹣ sync skip pass (*ms) # SKIP +﹣ sync skip pass with message (*ms) # this is skipped +✔ sync pass (*ms) +ℹ this test should pass +✖ sync throw fail (*ms) +﹣ async skip pass (*ms) # SKIP +✔ async pass (*ms) +✖ async throw fail (*ms) +﹣ async skip fail (*ms) # SKIP +✖ async assertion fail (*ms) +✔ resolve pass (*ms) +✖ reject fail (*ms) +✔ unhandled rejection - passes but warns (*ms) +✔ async unhandled rejection - passes but warns (*ms) +✔ immediate throw - passes but warns (*ms) +✔ immediate reject - passes but warns (*ms) +✔ immediate resolve pass (*ms) +▶ subtest sync throw fail + ✖ +sync throw fail (*ms) + ℹ this subtest should make its parent test fail +✖ subtest sync throw fail (*ms) +✖ sync throw non-error fail (*ms) +▶ level 0a + ✔ level 1a (*ms) + ✔ level 1b (*ms) + ✔ level 1c (*ms) + ✔ level 1d (*ms) +✔ level 0a (*ms) +▶ top level + ✔ +long running (*ms) + ▶ +short running + ✔ ++short running (*ms) + ✔ +short running (*ms) +✔ top level (*ms) +✔ invalid subtest - pass but subtest fails (*ms) +﹣ sync skip option (*ms) # SKIP +﹣ sync skip option with message (*ms) # this is skipped +✖ sync skip option is false fail (*ms) +✔ (*ms) +✔ functionOnly (*ms) +✔ (*ms) +✔ test with only a name provided (*ms) +✔ (*ms) +﹣ (*ms) # SKIP +﹣ test with a name and options provided (*ms) # SKIP +﹣ functionAndOptions (*ms) # SKIP +✔ callback pass (*ms) +✖ callback fail (*ms) +✔ sync t is this in test (*ms) +✔ async t is this in test (*ms) +✔ callback t is this in test (*ms) +✖ callback also returns a Promise (*ms) +✖ callback throw (*ms) +✖ callback called twice (*ms) +✔ callback called twice in different ticks (*ms) +✖ callback called twice in future tick (*ms) +✖ callback async throw (*ms) +✔ callback async throw after done (*ms) +▶ only is set on subtests but not in only mode + ✔ running subtest 1 (*ms) + ✔ running subtest 2 (*ms) + ℹ 'only' and 'runOnly' require the --test-only command-line option. + ✔ running subtest 3 (*ms) + ℹ 'only' and 'runOnly' require the --test-only command-line option. + ✔ running subtest 4 (*ms) +✔ only is set on subtests but not in only mode (*ms) +✖ custom inspect symbol fail (*ms) +✖ custom inspect symbol that throws fail (*ms) +▶ subtest sync throw fails + ✖ sync throw fails at first (*ms) + ✖ sync throw fails at second (*ms) +✖ subtest sync throw fails (*ms) +✖ timed out async test (*ms) +✖ timed out callback test (*ms) +✔ large timeout async test is ok (*ms) +✔ large timeout callback test is ok (*ms) +✔ successful thenable (*ms) +✖ rejected thenable (*ms) +✖ unfinished test with uncaughtException (*ms) +✖ unfinished test with unhandledRejection (*ms) +✖ assertion errors display actual and expected properly (*ms) +✖ invalid subtest fail (*ms) +ℹ Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. +ℹ Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. +ℹ Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. +ℹ tests 82 +ℹ suites 0 +ℹ pass 41 +ℹ fail 24 +ℹ cancelled 2 +ℹ skipped 10 +ℹ todo 5 +ℹ duration_ms * + +✖ failing tests: + +test at test/fixtures/test-runner/output/output.js:40:1 +⚠ sync fail todo (*ms) # TODO Error: thrown from sync fail todo - * - * - * - * - * - * - * - -* - sync fail todo with message (*ms) # this is a failing todo + at TestContext. (/test/fixtures/test-runner/output/output.js:42:9) + at + +test at test/fixtures/test-runner/output/output.js:45:1 +⚠ sync fail todo with message (*ms) # this is a failing todo Error: thrown from sync fail todo with message - * - * - * - * - * - * - * - -* - sync throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:47:9) + at + +test at test/fixtures/test-runner/output/output.js:62:1 +✖ sync throw fail (*ms) Error: thrown from sync throw fail - * - * - * - * - * - * - * - -* - async throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:63:9) + at + +test at test/fixtures/test-runner/output/output.js:74:1 +✖ async throw fail (*ms) Error: thrown from async throw fail - * - * - * - * - * - * - * - -* - async skip fail (*ms) # SKIP + at TestContext. (/test/fixtures/test-runner/output/output.js:75:9) + at + +test at test/fixtures/test-runner/output/output.js:78:1 +﹣ async skip fail (*ms) # SKIP Error: thrown from async throw fail - * - * - * - * - * - * - * - -* - async assertion fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:80:9) + at + +test at test/fixtures/test-runner/output/output.js:83:1 +✖ async assertion fail (*ms) AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: true !== false - * - * - * - * - * - * - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:85:10) + at + at { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, @@ -184,148 +155,115 @@ diff: 'simple' } -* - reject fail (*ms) +test at test/fixtures/test-runner/output/output.js:92:1 +✖ reject fail (*ms) Error: rejected from reject fail - * - * - * - * - * - * - * - -* - +sync throw fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:93:25) + at + +test at test/fixtures/test-runner/output/output.js:125:11 +✖ +sync throw fail (*ms) Error: thrown from subtest sync throw fail - * - * - * - * - * - * - * - * - * - * - -* - sync throw non-error fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:127:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:125:11) + at + +test at test/fixtures/test-runner/output/output.js:131:1 +✖ sync throw non-error fail (*ms) Symbol(thrown symbol from sync throw non-error fail) -* - sync skip option is false fail (*ms) +test at test/fixtures/test-runner/output/output.js:211:1 +✖ sync skip option is false fail (*ms) Error: this should be executed - * - * - * - * - * - * - * - -* - callback fail (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:212:9) + at + +test at test/fixtures/test-runner/output/output.js:243:1 +✖ callback fail (*ms) Error: callback failure - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:245:10) + at -* - callback also returns a Promise (*ms) +test at test/fixtures/test-runner/output/output.js:262:1 +✖ callback also returns a Promise (*ms) 'passed a callback but also returned a Promise' -* - callback throw (*ms) +test at test/fixtures/test-runner/output/output.js:266:1 +✖ callback throw (*ms) Error: thrown from callback throw - * - * - * - * - * - * - * - -* - callback called twice (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:267:9) + at + +test at test/fixtures/test-runner/output/output.js:270:1 +✖ callback called twice (*ms) 'callback invoked multiple times' -* - callback called twice in future tick (*ms) +test at test/fixtures/test-runner/output/output.js:280:1 +✖ callback called twice in future tick (*ms) Error [ERR_TEST_FAILURE]: callback invoked multiple times - * { + at Immediate. (/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } -* - callback async throw (*ms) +test at test/fixtures/test-runner/output/output.js:287:1 +✖ callback async throw (*ms) Error: thrown from callback async throw - * - * + at Immediate. (/test/fixtures/test-runner/output/output.js:289:11) + at -* - custom inspect symbol fail (*ms) +test at test/fixtures/test-runner/output/output.js:311:1 +✖ custom inspect symbol fail (*ms) customized -* - custom inspect symbol that throws fail (*ms) +test at test/fixtures/test-runner/output/output.js:322:1 +✖ custom inspect symbol that throws fail (*ms) { foo: 1 } -* - sync throw fails at first (*ms) +test at test/fixtures/test-runner/output/output.js:334:11 +✖ sync throw fails at first (*ms) Error: thrown from subtest sync throw fails at first - * - * - * - * - * - * - * - * - * - * - -* - sync throw fails at second (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:335:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:334:11) + at + +test at test/fixtures/test-runner/output/output.js:337:11 +✖ sync throw fails at second (*ms) Error: thrown from subtest sync throw fails at second - * - * - * - * - * - * - * - * - -* - timed out async test (*ms) + at TestContext. (/test/fixtures/test-runner/output/output.js:338:11) + at + at TestContext. (/test/fixtures/test-runner/output/output.js:337:11) + at + +test at test/fixtures/test-runner/output/output.js:342:1 +✖ timed out async test (*ms) 'test timed out after *ms' -* - timed out callback test (*ms) +test at test/fixtures/test-runner/output/output.js:351:1 +✖ timed out callback test (*ms) 'test timed out after *ms' -* - rejected thenable (*ms) +test at test/fixtures/test-runner/output/output.js:380:1 +✖ rejected thenable (*ms) 'custom error' -* - unfinished test with uncaughtException (*ms) +test at test/fixtures/test-runner/output/output.js:391:1 +✖ unfinished test with uncaughtException (*ms) Error: foo - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:393:30) + at -* - unfinished test with unhandledRejection (*ms) +test at test/fixtures/test-runner/output/output.js:397:1 +✖ unfinished test with unhandledRejection (*ms) Error: bar - * - * - * + at Timeout._onTimeout (/test/fixtures/test-runner/output/output.js:399:37) + at -* - assertion errors display actual and expected properly (*ms) +test at test/fixtures/test-runner/output/output.js:409:1 +✖ assertion errors display actual and expected properly (*ms) AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: { @@ -361,7 +299,7 @@ c: [Circular *1] } } - * { + at TestContext. (/test/fixtures/test-runner/output/output.js:425:12) { generatedMessage: true, code: 'ERR_ASSERTION', actual: { foo: 1, bar: 1, boo: [ 1 ], baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined } }, @@ -370,6 +308,6 @@ diff: 'simple' } -* - invalid subtest fail (*ms) +test at test/fixtures/test-runner/output/output.js:197:7 +✖ invalid subtest fail (*ms) 'test could not be started because its parent finished' diff --git a/test/fixtures/test-runner/output/test-runner-plan-timeout.snapshot b/test/fixtures/test-runner/output/test-runner-plan-timeout.snapshot index b704f0af39cf74..8982635f1f8208 100644 --- a/test/fixtures/test-runner/output/test-runner-plan-timeout.snapshot +++ b/test/fixtures/test-runner/output/test-runner-plan-timeout.snapshot @@ -11,7 +11,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:17:3' failureType: 'uncaughtException' error: |- The expression evaluated to a falsy value: @@ -24,16 +24,15 @@ TAP version 13 actual: false operator: '==' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/test-runner-plan-timeout.js:22:18) + ... # Subtest: planning wait time expires before plan is met not ok 3 - planning wait time expires before plan is met --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:29:3' failureType: 'testTimeoutFailure' error: 'plan timed out after 500ms with 0 assertions when expecting 2' code: 'ERR_TEST_FAILURE' @@ -49,7 +48,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:53:3' failureType: 'uncaughtException' error: |- The expression evaluated to a falsy value: @@ -62,16 +61,15 @@ TAP version 13 actual: false operator: '==' stack: |- - * - * - * + Timeout._onTimeout (/test/fixtures/test-runner/output/test-runner-plan-timeout.js:58:18) + ... # Subtest: planning with wait "options.wait : false" should not wait not ok 6 - planning with wait "options.wait : false" should not wait --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:65:3' failureType: 'testCodeFailure' error: 'plan expected 1 assertions but received 0' code: 'ERR_TEST_FAILURE' @@ -81,7 +79,7 @@ not ok 1 - planning with wait --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-runner-plan-timeout.js:4:1' failureType: 'subtestsFailed' error: '4 subtests failed' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/output/test-runner-plan.snapshot b/test/fixtures/test-runner/output/test-runner-plan.snapshot index 8698312a519d81..7cfc1977901216 100644 --- a/test/fixtures/test-runner/output/test-runner-plan.snapshot +++ b/test/fixtures/test-runner/output/test-runner-plan.snapshot @@ -35,7 +35,7 @@ not ok 3 - less assertions than planned --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-runner-plan.js:40:1' failureType: 'testCodeFailure' error: 'plan expected 1 assertions but received 0' code: 'ERR_TEST_FAILURE' @@ -45,7 +45,7 @@ not ok 4 - more assertions than planned --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-runner-plan.js:44:1' failureType: 'testCodeFailure' error: 'plan expected 1 assertions but received 2' code: 'ERR_TEST_FAILURE' @@ -94,7 +94,7 @@ not ok 8 - failing planning by options --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-runner-plan.js:72:1' failureType: 'testCodeFailure' error: 'plan expected 1 assertions but received 0' code: 'ERR_TEST_FAILURE' @@ -123,7 +123,7 @@ not ok 11 - failing more assertions than planned --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-runner-plan.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-runner-plan.js:85:1' failureType: 'testCodeFailure' error: 'plan expected 2 assertions but received 3' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/output/test-runner-watch-spec.snapshot b/test/fixtures/test-runner/output/test-runner-watch-spec.snapshot index c0af6b179c20b7..2bf56936159e35 100644 --- a/test/fixtures/test-runner/output/test-runner-watch-spec.snapshot +++ b/test/fixtures/test-runner/output/test-runner-watch-spec.snapshot @@ -11,15 +11,11 @@ ✖ failing tests: -* +test at test//failing-test.js:3:3 ✖ failing test (*ms) Error: failed - * - * - * - * - * - * + at TestContext. (/test//failing-test.js:4:11) + at ℹ tests 0 ℹ suites 0 ℹ pass 0 diff --git a/test/fixtures/test-runner/output/test-timeout-flag.snapshot b/test/fixtures/test-runner/output/test-timeout-flag.snapshot index 2c45befde37c5f..2b5ba9d76a2031 100644 --- a/test/fixtures/test-runner/output/test-timeout-flag.snapshot +++ b/test/fixtures/test-runner/output/test-timeout-flag.snapshot @@ -5,7 +5,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-timeout-flag.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-timeout-flag.js:8:3' failureType: 'testTimeoutFailure' error: 'test timed out after 100ms' code: 'ERR_TEST_FAILURE' @@ -17,7 +17,7 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-timeout-flag.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-timeout-flag.js:16:3' failureType: 'testTimeoutFailure' error: 'test timed out after 5ms' code: 'ERR_TEST_FAILURE' @@ -39,7 +39,7 @@ not ok 1 - --test-timeout is set to 100ms --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/test-timeout-flag.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-timeout-flag.js:5:1' failureType: 'subtestsFailed' error: '2 subtests failed' code: 'ERR_TEST_FAILURE' @@ -50,7 +50,7 @@ not ok 1 - --test-timeout is set to 100ms --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/test-timeout-flag.js:(LINE):3' + location: '/test/fixtures/test-runner/output/test-timeout-flag.js:51:3' failureType: 'cancelledByParent' error: 'test did not finish before its parent and was cancelled' code: 'ERR_TEST_FAILURE' @@ -60,7 +60,7 @@ not ok 2 - should inherit timeout options to children --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/test-timeout-flag.js:(LINE):1' + location: '/test/fixtures/test-runner/output/test-timeout-flag.js:42:1' failureType: 'testTimeoutFailure' error: 'test timed out after 1ms' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot b/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot index a22daa3174ce0f..00d34906582371 100644 --- a/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot +++ b/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.snapshot @@ -10,7 +10,7 @@ gonna timeout --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:(LINE):3' + location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:18:3' failureType: 'hookFailed' error: 'failed running beforeEach hook' code: 'ERR_TEST_FAILURE' @@ -28,7 +28,7 @@ not ok 1 - before each timeout --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:(LINE):1' + location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:6:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' @@ -41,7 +41,7 @@ not gonna timeout --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:(LINE):3' + location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:40:3' failureType: 'hookFailed' error: 'failed running afterEach hook' code: 'ERR_TEST_FAILURE' @@ -59,7 +59,7 @@ not ok 2 - after each timeout --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:(LINE):1' + location: '/test/fixtures/test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js:28:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/output/unfinished-suite-async-error.snapshot b/test/fixtures/test-runner/output/unfinished-suite-async-error.snapshot index 59c04c818c7458..ae9765ee054259 100644 --- a/test/fixtures/test-runner/output/unfinished-suite-async-error.snapshot +++ b/test/fixtures/test-runner/output/unfinished-suite-async-error.snapshot @@ -5,13 +5,13 @@ TAP version 13 --- duration_ms: * type: 'test' - location: '/test/fixtures/test-runner/output/unfinished-suite-async-error.js:(LINE):3' + location: '/test/fixtures/test-runner/output/unfinished-suite-async-error.js:5:3' failureType: 'uncaughtException' error: 'callback test does not complete' code: 'ERR_TEST_FAILURE' stack: |- - * - * + Immediate. (/test/fixtures/test-runner/output/unfinished-suite-async-error.js:7:13) + ... # Subtest: should pass 1 ok 2 - should pass 1 @@ -24,7 +24,7 @@ not ok 1 - unfinished suite with asynchronous error --- duration_ms: * type: 'suite' - location: '/test/fixtures/test-runner/output/unfinished-suite-async-error.js:(LINE):1' + location: '/test/fixtures/test-runner/output/unfinished-suite-async-error.js:4:1' failureType: 'subtestsFailed' error: '1 subtest failed' code: 'ERR_TEST_FAILURE' diff --git a/test/fixtures/test-runner/rerun.js b/test/fixtures/test-runner/rerun.js index a76a1bd00dd12a..563e92e4c1bb80 100644 --- a/test/fixtures/test-runner/rerun.js +++ b/test/fixtures/test-runner/rerun.js @@ -1,4 +1,4 @@ -const { test } = require('node:test') +const { test, describe } = require('node:test') test('should fail on first two attempts', ({ attempt }) => { if (attempt < 2) { @@ -38,3 +38,11 @@ function nestedAmbiguousTest(expectedAttempts) { test('nested ambiguous (expectedAttempts=0)', nestedAmbiguousTest(0)); test('nested ambiguous (expectedAttempts=1)', nestedAmbiguousTest(2)); + + +describe('describe rerun', { timeout: 1000, concurrency: 1000 }, () => { + test('passed on first attempt', async (t) => { + await t.test('nested', async () => {}); + }); + test('a'); +}); diff --git a/test/fixtures/v8/v8_warning.snapshot b/test/fixtures/v8/v8_warning.snapshot index 5419601c1d27d3..87c7c86b4fedeb 100644 --- a/test/fixtures/v8/v8_warning.snapshot +++ b/test/fixtures/v8/v8_warning.snapshot @@ -1,2 +1,2 @@ -(node:) V8: /test/fixtures/v8/v8_warning.js:* Invalid asm.js: Invalid return type +(node:) V8: /test/fixtures/v8/v8_warning.js:13 Invalid asm.js: Invalid return type (Use ` --trace-warnings ...` to show where the warning was created) diff --git a/test/fixtures/vm/vm_display_runtime_error.snapshot b/test/fixtures/vm/vm_display_runtime_error.snapshot index a20375f224c625..87fa3d7b6a6458 100644 --- a/test/fixtures/vm/vm_display_runtime_error.snapshot +++ b/test/fixtures/vm/vm_display_runtime_error.snapshot @@ -5,8 +5,7 @@ throw new Error("boo!") Error: boo! at test.vm:1:7 - at Script.runInThisContext (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_display_runtime_error.js:31:6) test.vm:1 throw new Error("spooky!") @@ -14,8 +13,7 @@ throw new Error("spooky!") Error: spooky! at test.vm:1:7 - at Script.runInThisContext (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_display_runtime_error.js:36:4) Node.js diff --git a/test/fixtures/vm/vm_display_syntax_error.snapshot b/test/fixtures/vm/vm_display_syntax_error.snapshot index b374091a1e67b3..87e9872563876f 100644 --- a/test/fixtures/vm/vm_display_syntax_error.snapshot +++ b/test/fixtures/vm/vm_display_syntax_error.snapshot @@ -4,18 +4,14 @@ var 4; ^ SyntaxError: Unexpected number - at new Script (node:vm:*) - at createScript (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_display_syntax_error.js:31:6) test.vm:1 var 5; ^ SyntaxError: Unexpected number - at new Script (node:vm:*) - at createScript (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_display_syntax_error.js:36:4) Node.js diff --git a/test/fixtures/vm/vm_dont_display_runtime_error.snapshot b/test/fixtures/vm/vm_dont_display_runtime_error.snapshot index fd64cf80c91004..c111ca1d90bff9 100644 --- a/test/fixtures/vm/vm_dont_display_runtime_error.snapshot +++ b/test/fixtures/vm/vm_dont_display_runtime_error.snapshot @@ -6,8 +6,7 @@ throw new Error("boo!") Error: boo! at test.vm:1:7 - at Script.runInThisContext (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_dont_display_runtime_error.js:41:4) Node.js diff --git a/test/fixtures/vm/vm_dont_display_syntax_error.snapshot b/test/fixtures/vm/vm_dont_display_syntax_error.snapshot index 26790583539470..58e24ca762422e 100644 --- a/test/fixtures/vm/vm_dont_display_syntax_error.snapshot +++ b/test/fixtures/vm/vm_dont_display_syntax_error.snapshot @@ -5,9 +5,7 @@ var 5; ^ SyntaxError: Unexpected number - at new Script (node:vm:*) - at createScript (node:vm:*) - at Object.runInThisContext (node:vm:*) + at at Object. (/test/fixtures/vm/vm_dont_display_syntax_error.js:41:4) Node.js diff --git a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-navigation.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-navigation.https.html new file mode 100644 index 00000000000000..a92e0f7a8a9b20 --- /dev/null +++ b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-navigation.https.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-self-fetch.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-self-fetch.https.html new file mode 100644 index 00000000000000..cbff2fa18fa15d --- /dev/null +++ b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-self-fetch.https.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-worker-creation.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-worker-creation.https.html new file mode 100644 index 00000000000000..e8d0bad4c97580 --- /dev/null +++ b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition-worker-creation.https.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.https.html new file mode 100644 index 00000000000000..cb66ebe77093bc --- /dev/null +++ b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.https.html @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.tentative.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.tentative.https.html deleted file mode 100644 index c75ce07d054eb7..00000000000000 --- a/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.tentative.https.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/test/fixtures/wpt/FileAPI/BlobURL/resources/common.js b/test/fixtures/wpt/FileAPI/BlobURL/resources/common.js new file mode 100644 index 00000000000000..60a97d6a5ea5fe --- /dev/null +++ b/test/fixtures/wpt/FileAPI/BlobURL/resources/common.js @@ -0,0 +1,33 @@ +const add_iframe_js = (iframe_origin, response_queue_uuid) => ` + const importScript = ${importScript}; + await importScript("/html/cross-origin-embedder-policy/credentialless" + + "/resources/common.js"); + await importScript("/html/anonymous-iframe/resources/common.js"); + await importScript("/common/utils.js"); + + // dispatcher.js has already been loaded by the popup this is running in. + await send("${response_queue_uuid}", newIframe("${iframe_origin}")); +`; + +async function create_test_iframes(t, response_queue_uuid) { + const same_site_origin = get_host_info().HTTPS_ORIGIN; + const cross_site_origin = get_host_info().HTTPS_NOTSAMESITE_ORIGIN; + + assert_equals("https://" + window.location.host, same_site_origin, + "this test assumes that the page's window.location.host corresponds to " + + "get_host_info().HTTPS_ORIGIN"); + + // Create a same-origin iframe in a cross-site popup. + const not_same_site_popup_uuid = newPopup(t, cross_site_origin); + await send(not_same_site_popup_uuid, + add_iframe_js(same_site_origin, response_queue_uuid)); + const cross_site_iframe_uuid = await receive(response_queue_uuid); + + // Create a same-origin iframe in a same-site popup. + const same_origin_popup_uuid = newPopup(t, same_site_origin); + await send(same_origin_popup_uuid, + add_iframe_js(same_site_origin, response_queue_uuid)); + const same_site_iframe_uuid = await receive(response_queue_uuid); + + return [cross_site_iframe_uuid, same_site_iframe_uuid]; +} \ No newline at end of file diff --git a/test/fixtures/wpt/FileAPI/WEB_FEATURES.yml b/test/fixtures/wpt/FileAPI/WEB_FEATURES.yml new file mode 100644 index 00000000000000..8d279ceaaeab21 --- /dev/null +++ b/test/fixtures/wpt/FileAPI/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: file + files: "**" diff --git a/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js index 6dc44e8e156cce..03155b99cb20ea 100644 --- a/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js +++ b/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js @@ -104,6 +104,59 @@ test_blob(function() { desc: "A Uint8Array object should be treated as a sequence for the blobParts argument." }); +test(function() { + assert_throws_js(TypeError, function() { new Blob(true) }); +}, "blobParts not an object: boolean"); + +test(function() { + Boolean.prototype[Symbol.iterator] = () => ["FAIL"][Symbol.iterator]() + this.add_cleanup(function() { delete Boolean.prototype[Symbol.iterator] }); + assert_throws_js(TypeError, function() { new Blob(true) }); +}, "blobParts not an object: boolean with Boolean.prototype[Symbol.iterator]"); + +test(function() { + assert_throws_js(TypeError, function() { new Blob("fail") }); +}, "blobParts not an object: string"); + +test(function() { + const original = String.prototype[Symbol.iterator]; + String.prototype[Symbol.iterator] = () => ["FAIL"][Symbol.iterator]() + this.add_cleanup(function() { String.prototype[Symbol.iterator] = original }); + assert_throws_js(TypeError, function() { new Blob("fail") }); +}, "blobParts not an object: string with String.prototype[Symbol.iterator]"); + +test(function() { + assert_throws_js(TypeError, function() { new Blob(7) }); +}, "blobParts not an object: number"); + +test(function() { + Number.prototype[Symbol.iterator] = () => ["FAIL"][Symbol.iterator]() + this.add_cleanup(function() { delete Number.prototype[Symbol.iterator] }); + assert_throws_js(TypeError, function() { new Blob(7) }); +}, "blobParts not an object: number with Number.prototype[Symbol.iterator]"); + +test(function() { + assert_throws_js(TypeError, function() { new Blob(7n) }); +}, "blobParts not an object: BigInt"); + +test(function() { + BigInt.prototype[Symbol.iterator] = () => ["FAIL"][Symbol.iterator]() + this.add_cleanup(function() { delete BigInt.prototype[Symbol.iterator] }); + assert_throws_js(TypeError, function() { new Blob(7n) }); +}, "blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]"); + +test(function() { + const symbol = Symbol(); + assert_throws_js(TypeError, function() { new Blob(symbol) }); +}, "blobParts not an object: Symbol"); + +test(function() { + const symbol = Symbol(); + Symbol.prototype[Symbol.iterator] = () => ["FAIL"][Symbol.iterator]() + this.add_cleanup(function() { delete Symbol.prototype[Symbol.iterator] }); + assert_throws_js(TypeError, function() { new Blob(symbol) }); +}, "blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]"); + var test_error = { name: "test", message: "test error", @@ -290,14 +343,22 @@ test_blob(function() { new Int16Array([0x4150, 0x5353]), new Uint32Array([0x53534150]), new Int32Array([0x53534150]), - new Float16Array([2.65625, 58.59375]), new Float32Array([0xD341500000]) ]); }, { - expected: "PASSPASSPASSPASSPASSPASSPASSPASS", + expected: "PASSPASSPASSPASSPASSPASSPASS", type: "", desc: "Passing typed arrays as elements of the blobParts array should work." }); +test_blob(function() { + return new Blob([ + new Float16Array([2.65625, 58.59375]) + ]); +}, { + expected: "PASS", + type: "", + desc: "Passing a Float16Array as element of the blobParts array should work." +}); test_blob(function() { return new Blob([ // 0x535 3415053534150 diff --git a/test/fixtures/wpt/FileAPI/blob/Blob-newobject.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-newobject.any.js new file mode 100644 index 00000000000000..e036c3a9a743e6 --- /dev/null +++ b/test/fixtures/wpt/FileAPI/blob/Blob-newobject.any.js @@ -0,0 +1,12 @@ +// META: title=Blob methods return new objects ([NewObject]) +// META: global=window,worker +'use strict'; + +['stream', 'text', 'arrayBuffer', 'bytes'].forEach(method => { + test(() => { + const blob = new Blob(['PASS']); + const a = blob[method](); + const b = blob[method](); + assert_not_equals(a, b, `Blob.${method}() must return a new object`); + }, `Blob.${method}() returns [NewObject]`); +}); diff --git a/test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js index 1f85d44d269191..bedc8d737302a0 100644 --- a/test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js +++ b/test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js @@ -12,24 +12,50 @@ test_blob(function() { }); test(function() { - var blob1, blob2; + var blob1 = new Blob(["squiggle"]); + var blob2 = new Blob(["steak"], {type: "content/type"}); - test_blob(function() { - return blob1 = new Blob(["squiggle"]); - }, { + test_blob(() => blob1, + { expected: "squiggle", type: "", desc: "blob1." }); - test_blob(function() { - return blob2 = new Blob(["steak"], {type: "content/type"}); - }, { + test_blob(() => blob2, + { expected: "steak", type: "content/type", desc: "blob2." }); + test_blob(function() { + var blob = new Blob(["abcd"]); + return blob.slice(undefined, undefined, "content/type"); + }, { + expected: "abcd", + type: "content/type", + desc: "undefined start/end Blob slice" + }); + + test_blob(function() { + var blob = new Blob(["abcd"]); + return blob.slice(undefined, 2, "content/type"); + }, { + expected: "ab", + type: "content/type", + desc: "undefined start Blob slice" + }); + + test_blob(function() { + var blob = new Blob(["abcd"]); + return blob.slice(2, undefined, "content/type"); + }, { + expected: "cd", + type: "content/type", + desc: "undefined end Blob slice" + }); + test_blob(function() { return new Blob().slice(0,0,null); }, { @@ -74,6 +100,21 @@ test(function() { {start: 7, end: 4, contents: ""}] ], + // Test double start/end values + [ + ["abcd"], + [{start: 0.5, contents: "abcd"}, + {start: 1.5, contents: "cd"}, + {start: 2.5, contents: "cd"}, + {start: 3.5, contents: ""}, + {start: 0, end: 0.5, contents: ""}, + {start: 0, end: 1.5, contents: "ab"}, + {start: 0, end: 2.5, contents: "ab"}, + {start: 0, end: 3.5, contents: "abcd"}, + {start: 1.5, end: 2.5, contents: ""}, + {start: 1.5, end: 3.5, contents: "cd"}] + ], + // Test 3 strings [ ["foo", "bar", "baz"], diff --git a/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js index d06e3170782b7c..88c4f4d26cc0b2 100644 --- a/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js +++ b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js @@ -7,6 +7,7 @@ reader.onload = this.step_func(function(evt) { assert_equals(reader.result.byteLength, 4, "The byteLength is 4"); assert_true(reader.result instanceof ArrayBuffer, "The result is instanceof ArrayBuffer"); + assert_array_equals(new Uint8Array(reader.result), [84, 69, 83, 84]); assert_equals(reader.readyState, reader.DONE); this.done(); }); diff --git a/test/fixtures/wpt/FileAPI/support/Blob.js b/test/fixtures/wpt/FileAPI/support/Blob.js index 2c249746858918..e8a52425a17085 100644 --- a/test/fixtures/wpt/FileAPI/support/Blob.js +++ b/test/fixtures/wpt/FileAPI/support/Blob.js @@ -5,23 +5,16 @@ self.test_blob = (fn, expectations) => { type = expectations.type, desc = expectations.desc; - var t = async_test(desc); - t.step(function() { + promise_test(async (t) => { var blob = fn(); assert_true(blob instanceof Blob); assert_false(blob instanceof File); assert_equals(blob.type, type); assert_equals(blob.size, expected.length); - var fr = new FileReader(); - fr.onload = t.step_func_done(function(event) { - assert_equals(this.result, expected); - }, fr); - fr.onerror = t.step_func(function(e) { - assert_unreached("got error event on FileReader"); - }); - fr.readAsText(blob, "UTF-8"); - }); + const text = await blob.text(); + assert_equals(text, expected); + }, desc); } self.test_blob_binary = (fn, expectations) => { @@ -29,25 +22,18 @@ self.test_blob_binary = (fn, expectations) => { type = expectations.type, desc = expectations.desc; - var t = async_test(desc); - t.step(function() { + promise_test(async (t) => { var blob = fn(); assert_true(blob instanceof Blob); assert_false(blob instanceof File); assert_equals(blob.type, type); assert_equals(blob.size, expected.length); - var fr = new FileReader(); - fr.onload = t.step_func_done(function(event) { - assert_true(this.result instanceof ArrayBuffer, - "Result should be an ArrayBuffer"); - assert_array_equals(new Uint8Array(this.result), expected); - }, fr); - fr.onerror = t.step_func(function(e) { - assert_unreached("got error event on FileReader"); - }); - fr.readAsArrayBuffer(blob); - }); + const ab = await blob.arrayBuffer(); + assert_true(ab instanceof ArrayBuffer, + "Result should be an ArrayBuffer"); + assert_array_equals(new Uint8Array(ab), expected); + }, desc); } // Assert that two TypedArray objects have the same byte values diff --git a/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js index 39c73c41b42207..d6adf21ec33795 100644 --- a/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js +++ b/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js @@ -180,7 +180,7 @@ const formPostFileUploadTest = ({ // Used to verify that the browser agrees with the test about // field value replacement and encoding independently of file system - // idiosyncrasies. + // idiosyncracies. form.append(Object.assign(document.createElement('input'), { type: 'hidden', name: 'filename', diff --git a/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js index dd62a0e98e92c8..53c8cca7e09b8e 100644 --- a/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js +++ b/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js @@ -34,7 +34,7 @@ const formDataPostFileUploadTest = ({ // Used to verify that the browser agrees with the test about // field value replacement and encoding independently of file system - // idiosyncrasies. + // idiosyncracies. formData.append("filename", fileBaseName); // Same, but with name and value reversed to ensure field names diff --git a/test/fixtures/wpt/FileAPI/url/url-in-tags.window.js b/test/fixtures/wpt/FileAPI/url/url-in-tags.window.js index f20b3599013bf5..8a722dcac82b66 100644 --- a/test/fixtures/wpt/FileAPI/url/url-in-tags.window.js +++ b/test/fixtures/wpt/FileAPI/url/url-in-tags.window.js @@ -1,3 +1,10 @@ +setup(() => { + const viewport_meta = document.createElement('meta'); + viewport_meta.name = "viewport"; + viewport_meta.content = "width=device-width,initial-scale=1"; + document.head.appendChild(viewport_meta); +}); + async_test(t => { const run_result = 'test_script_OK'; const blob_contents = 'window.test_result = "' + run_result + '";'; diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 22e6bc3e3b480e..2ce7de20ded95f 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -17,7 +17,7 @@ Last update: - dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events - encoding: https://github.com/web-platform-tests/wpt/tree/1ac8deee08/encoding - fetch/data-urls/resources: https://github.com/web-platform-tests/wpt/tree/7c79d998ff/fetch/data-urls/resources -- FileAPI: https://github.com/web-platform-tests/wpt/tree/cceaf3628d/FileAPI +- FileAPI: https://github.com/web-platform-tests/wpt/tree/7f51301888/FileAPI - hr-time: https://github.com/web-platform-tests/wpt/tree/34cafd797e/hr-time - html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing @@ -28,13 +28,13 @@ Last update: - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing - resources: https://github.com/web-platform-tests/wpt/tree/1d2c5fb36a/resources - streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams -- url: https://github.com/web-platform-tests/wpt/tree/e3c46fdf55/url +- url: https://github.com/web-platform-tests/wpt/tree/efb889eb4c/url - urlpattern: https://github.com/web-platform-tests/wpt/tree/a2e15ad405/urlpattern - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi - web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks -- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/1e4933113d/WebCryptoAPI +- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/7cbe7e8ed9/WebCryptoAPI - webidl: https://github.com/web-platform-tests/wpt/tree/63ca529a02/webidl - webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions - webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel diff --git a/test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey.https.any.js b/test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey.https.any.js index a01bfbb0ef2e18..6a5cc8d4724b57 100644 --- a/test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey.https.any.js +++ b/test/fixtures/wpt/WebCryptoAPI/import_export/ec_importKey.https.any.js @@ -16,6 +16,7 @@ raw: new Uint8Array([4, 1, 86, 244, 121, 248, 223, 30, 32, 167, 255, 192, 76, 228, 32, 195, 225, 84, 174, 37, 25, 150, 190, 228, 47, 3, 75, 132, 212, 27, 116, 63, 52, 228, 95, 49, 27, 129, 58, 156, 222, 200, 205, 165, 155, 187, 189, 49, 212, 96, 179, 41, 37, 33, 231, 193, 183, 34, 229, 102, 124, 3, 219, 47, 174, 117, 63, 1, 80, 23, 54, 207, 226, 71, 57, 67, 32, 216, 228, 175, 194, 253, 57, 181, 169, 51, 16, 97, 184, 30, 34, 65, 40, 43, 158, 23, 137, 24, 34, 181, 183, 158, 5, 47, 69, 151, 181, 150, 67, 253, 57, 55, 156, 81, 189, 81, 37, 196, 244, 139, 195, 240, 37, 206, 60, 211, 105, 83, 40, 108, 203, 56, 251]), raw_compressed: new Uint8Array([3, 1, 86, 244, 121, 248, 223, 30, 32, 167, 255, 192, 76, 228, 32, 195, 225, 84, 174, 37, 25, 150, 190, 228, 47, 3, 75, 132, 212, 27, 116, 63, 52, 228, 95, 49, 27, 129, 58, 156, 222, 200, 205, 165, 155, 187, 189, 49, 212, 96, 179, 41, 37, 33, 231, 193, 183, 34, 229, 102, 124, 3, 219, 47, 174, 117, 63]), pkcs8: new Uint8Array([48, 129, 238, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 35, 4, 129, 214, 48, 129, 211, 2, 1, 1, 4, 66, 0, 244, 8, 117, 131, 104, 186, 147, 15, 48, 247, 106, 224, 84, 254, 92, 210, 206, 127, 218, 44, 159, 118, 166, 212, 54, 207, 117, 214, 108, 68, 11, 254, 99, 49, 199, 193, 114, 161, 36, 120, 25, 60, 130, 81, 72, 123, 201, 18, 99, 250, 80, 33, 127, 133, 255, 99, 111, 89, 205, 84, 110, 58, 180, 131, 180, 161, 129, 137, 3, 129, 134, 0, 4, 1, 86, 244, 121, 248, 223, 30, 32, 167, 255, 192, 76, 228, 32, 195, 225, 84, 174, 37, 25, 150, 190, 228, 47, 3, 75, 132, 212, 27, 116, 63, 52, 228, 95, 49, 27, 129, 58, 156, 222, 200, 205, 165, 155, 187, 189, 49, 212, 96, 179, 41, 37, 33, 231, 193, 183, 34, 229, 102, 124, 3, 219, 47, 174, 117, 63, 1, 80, 23, 54, 207, 226, 71, 57, 67, 32, 216, 228, 175, 194, 253, 57, 181, 169, 51, 16, 97, 184, 30, 34, 65, 40, 43, 158, 23, 137, 24, 34, 181, 183, 158, 5, 47, 69, 151, 181, 150, 67, 253, 57, 55, 156, 81, 189, 81, 37, 196, 244, 139, 195, 240, 37, 206, 60, 211, 105, 83, 40, 108, 203, 56, 251]), + pkcs8_private_only: new Uint8Array([48, 96, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 35, 4, 73, 48, 71, 2, 1, 1, 4, 66, 0, 244, 8, 117, 131, 104, 186, 147, 15, 48, 247, 106, 224, 84, 254, 92, 210, 206, 127, 218, 44, 159, 118, 166, 212, 54, 207, 117, 214, 108, 68, 11, 254, 99, 49, 199, 193, 114, 161, 36, 120, 25, 60, 130, 81, 72, 123, 201, 18, 99, 250, 80, 33, 127, 133, 255, 99, 111, 89, 205, 84, 110, 58, 180, 131, 180]), jwk: { kty: "EC", crv: "P-521", @@ -31,6 +32,7 @@ raw: new Uint8Array([4, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209, 206, 3, 117, 82, 212, 129, 69, 12, 227, 155, 77, 16, 149, 112, 27, 23, 91, 250, 179, 75, 142, 108, 9, 158, 24, 241, 193, 152, 53, 131, 97, 232]), raw_compressed: new Uint8Array([2, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209]), pkcs8: new Uint8Array([48, 129, 135, 2, 1, 0, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 4, 109, 48, 107, 2, 1, 1, 4, 32, 19, 211, 58, 45, 90, 191, 156, 249, 235, 178, 31, 248, 96, 212, 174, 254, 110, 86, 231, 119, 144, 244, 222, 233, 180, 8, 132, 235, 211, 53, 68, 234, 161, 68, 3, 66, 0, 4, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209, 206, 3, 117, 82, 212, 129, 69, 12, 227, 155, 77, 16, 149, 112, 27, 23, 91, 250, 179, 75, 142, 108, 9, 158, 24, 241, 193, 152, 53, 131, 97, 232]), + pkcs8_private_only: new Uint8Array([48, 65, 2, 1, 0, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 4, 39, 48, 37, 2, 1, 1, 4, 32, 19, 211, 58, 45, 90, 191, 156, 249, 235, 178, 31, 248, 96, 212, 174, 254, 110, 86, 231, 119, 144, 244, 222, 233, 180, 8, 132, 235, 211, 53, 68, 234]), jwk: { kty: "EC", crv: "P-256", @@ -46,6 +48,7 @@ raw: new Uint8Array([4, 33, 156, 20, 214, 102, 23, 179, 110, 198, 216, 133, 107, 56, 91, 115, 167, 77, 52, 79, 216, 174, 117, 239, 4, 100, 53, 221, 165, 78, 59, 68, 189, 95, 189, 235, 209, 208, 141, 214, 158, 45, 125, 193, 220, 33, 140, 180, 53, 189, 40, 19, 140, 199, 120, 51, 122, 132, 47, 107, 214, 27, 36, 14, 116, 36, 159, 36, 102, 124, 42, 88, 16, 167, 107, 252, 40, 224, 51, 95, 136, 166, 80, 29, 236, 1, 151, 109, 168, 90, 251, 0, 134, 156, 182, 172, 232]), raw_compressed: new Uint8Array([2, 33, 156, 20, 214, 102, 23, 179, 110, 198, 216, 133, 107, 56, 91, 115, 167, 77, 52, 79, 216, 174, 117, 239, 4, 100, 53, 221, 165, 78, 59, 68, 189, 95, 189, 235, 209, 208, 141, 214, 158, 45, 125, 193, 220, 33, 140, 180, 53]), pkcs8: new Uint8Array([48, 129, 182, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 4, 129, 158, 48, 129, 155, 2, 1, 1, 4, 48, 69, 55, 181, 153, 7, 132, 211, 194, 210, 46, 150, 168, 249, 47, 161, 170, 73, 46, 232, 115, 229, 118, 164, 21, 130, 225, 68, 24, 60, 152, 136, 209, 14, 107, 158, 180, 206, 212, 178, 204, 64, 18, 228, 172, 94, 168, 64, 115, 161, 100, 3, 98, 0, 4, 33, 156, 20, 214, 102, 23, 179, 110, 198, 216, 133, 107, 56, 91, 115, 167, 77, 52, 79, 216, 174, 117, 239, 4, 100, 53, 221, 165, 78, 59, 68, 189, 95, 189, 235, 209, 208, 141, 214, 158, 45, 125, 193, 220, 33, 140, 180, 53, 189, 40, 19, 140, 199, 120, 51, 122, 132, 47, 107, 214, 27, 36, 14, 116, 36, 159, 36, 102, 124, 42, 88, 16, 167, 107, 252, 40, 224, 51, 95, 136, 166, 80, 29, 236, 1, 151, 109, 168, 90, 251, 0, 134, 156, 182, 172, 232]), + pkcs8_private_only: new Uint8Array([48, 78, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 4, 55, 48, 53, 2, 1, 1, 4, 48, 69, 55, 181, 153, 7, 132, 211, 194, 210, 46, 150, 168, 249, 47, 161, 170, 73, 46, 232, 115, 229, 118, 164, 21, 130, 225, 68, 24, 60, 152, 136, 209, 14, 107, 158, 180, 206, 212, 178, 204, 64, 18, 228, 172, 94, 168, 64, 115]), jwk: { kty: "EC", crv: "P-384", @@ -100,6 +103,14 @@ testEmptyUsages(format, algorithm, data, curve, extractable); }); }); + + { + var algorithm = {name: vector.name, namedCurve: curve}; + var data = keyData[curve]; + allValidUsages(vector.privateUsages).forEach(function(usages) { + testPkcs8PrivateOnly(algorithm, data, curve, usages); + }); + } }); }); @@ -171,6 +182,40 @@ }, "ECDH any JWK alg: " + keySize.toString() + " bits " + parameterString(format, false, keyData, algorithm, extractable, usages)); } + // Test importKey with pkcs8 without public key + // Should succeed in import, re-export as pkcs8, and export as jwk + function testPkcs8PrivateOnly(algorithm, data, keySize, usages) { + const format = "pkcs8"; + const keyData = data.pkcs8_private_only; + promise_test(function(test) { + return subtle.importKey(format, keyData, algorithm, true, usages). + then(function(key) { + assert_equals(key.constructor, CryptoKey, "Imported a CryptoKey object"); + assert_goodCryptoKey(key, algorithm, true, usages, 'private'); + + // Test re-export as pkcs8 + return subtle.exportKey(format, key). + then(function(result) { + assert_true(result instanceof ArrayBuffer, "Re-exported pkcs8 is an ArrayBuffer"); + const equal = equalBuffers(result, keyData.buffer) || equalBuffers(result, data.pkcs8.buffer); + assert_true(equal, "Round trip works"); + // Test export as jwk + return subtle.exportKey('jwk', key); + }).then(function(jwkResult) { + assert_equals(jwkResult.kty, "EC", "Exported JWK has correct kty"); + assert_equals(jwkResult.crv, algorithm.namedCurve, "Exported JWK has correct crv"); + assert_true('x' in jwkResult, "Exported JWK has x"); + assert_true('y' in jwkResult, "Exported JWK has y"); + assert_true('d' in jwkResult, "Exported JWK has d"); + }, function(err) { + assert_unreached("Export threw an unexpected error: " + err.toString()); + }); + }, function(err) { + assert_unreached("Import threw an unexpected error: " + err.toString()); + }); + }, "PKCS8 private-only: " + keySize.toString() + " bits " + parameterString(format, false, keyData, algorithm, true, usages)); + } + // Helper methods follow: diff --git a/test/fixtures/wpt/url/resources/percent-encoding.json b/test/fixtures/wpt/url/resources/percent-encoding.json index eccd1db62fe601..cba59e4f6cd549 100644 --- a/test/fixtures/wpt/url/resources/percent-encoding.json +++ b/test/fixtures/wpt/url/resources/percent-encoding.json @@ -39,6 +39,13 @@ "utf-8": "%E2%88%92" } }, + { + "input": "\u00A2", + "output": { + "iso-8859-2": "%26%23162%3B", + "utf-8": "%C2%A2" + } + }, { "input": "á|", "output": { diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 382038acf9f05b..50173e71b1b9d7 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -28,7 +28,7 @@ "path": "fetch/data-urls/resources" }, "FileAPI": { - "commit": "cceaf3628da950621004d9b5d8c1d1f367073347", + "commit": "7f5130188818b6c12c636491186b459ec2bf131f", "path": "FileAPI" }, "hr-time": { @@ -72,7 +72,7 @@ "path": "streams" }, "url": { - "commit": "e3c46fdf5587369127de2863a7e38295f4e07f16", + "commit": "efb889eb4c9ca0b4e3ebd8ab308646b7483a8f54", "path": "url" }, "urlpattern": { @@ -96,7 +96,7 @@ "path": "web-locks" }, "WebCryptoAPI": { - "commit": "1e4933113d2028e092d07a9e865db8f606b21026", + "commit": "7cbe7e8ed962eac692ba4ad2e6ce3b9daafb65c0", "path": "WebCryptoAPI" }, "webidl": { diff --git a/test/parallel/test-abortsignal-drop-settled-signals.mjs b/test/parallel/test-abortsignal-drop-settled-signals.mjs index d5d704d55c5243..29a0dcf8b58638 100644 --- a/test/parallel/test-abortsignal-drop-settled-signals.mjs +++ b/test/parallel/test-abortsignal-drop-settled-signals.mjs @@ -103,7 +103,7 @@ function runWithOrphanListeners(limit, done) { const limit = 10_000; describe('when there is a long-lived signal', () => { - it('drops settled dependant signals', (t, done) => { + it('drops settled dependent signals', (t, done) => { makeSubsequentCalls(limit, (signal, dependantSignalsKey) => { setImmediate(() => { t.assert.strictEqual(signal[dependantSignalsKey].size, 0); @@ -112,7 +112,7 @@ describe('when there is a long-lived signal', () => { }); }); - it('keeps all active dependant signals', (t, done) => { + it('keeps all active dependent signals', (t, done) => { makeSubsequentCalls(limit, (signal, dependantSignalsKey) => { t.assert.strictEqual(signal[dependantSignalsKey].size, limit); @@ -132,7 +132,7 @@ it('does not prevent source signal from being GCed if it is short-lived', (t, do }); }); -it('drops settled dependant signals when signal is composite', (t, done) => { +it('drops settled dependent signals when signal is composite', (t, done) => { const controllers = Array.from({ length: 2 }, () => new AbortController()); // Using WeakRefs to avoid this test to retain information that will make the test fail diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index ae96258e95d89d..67a59c3ff7f105 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -115,6 +115,7 @@ expected.beforePreExec = new Set([ 'NativeModule internal/modules/run_main', 'NativeModule internal/net', 'NativeModule internal/dns/utils', + 'NativeModule internal/modules/esm/get_format', ]); expected.atRunTime = new Set([ @@ -125,6 +126,12 @@ const { isMainThread } = require('worker_threads'); if (isMainThread) { [ + 'Internal Binding cjs_lexer', + 'NativeModule internal/modules/esm/assert', + 'NativeModule internal/modules/esm/loader', + 'NativeModule internal/modules/esm/load', + 'NativeModule internal/modules/esm/resolve', + 'NativeModule internal/modules/esm/translators', 'NativeModule url', ].forEach(expected.beforePreExec.add.bind(expected.beforePreExec)); } else { // Worker. diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js index 9f0eadd2f10163..9323126897d691 100644 --- a/test/parallel/test-buffer-concat.js +++ b/test/parallel/test-buffer-concat.js @@ -22,6 +22,7 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); +const { kMaxLength } = require('buffer'); const zero = []; const one = [ Buffer.from('asdf') ]; @@ -84,8 +85,8 @@ assert.throws(() => { Buffer.concat([Buffer.from('hello')], -2); }, { code: 'ERR_OUT_OF_RANGE', - message: 'The value of "length" is out of range. It must be >= 0 && <= 9007199254740991. ' + - 'Received -2' + message: 'The value of "length" is out of range. It must be >= 0 && <= ' + + `${kMaxLength}. Received -2` }); // eslint-disable-next-line node-core/crypto-check diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js index d1807a41586d64..36112d6fb60035 100644 --- a/test/parallel/test-fs-promises.js +++ b/test/parallel/test-fs-promises.js @@ -152,6 +152,12 @@ async function executeOnHandle(dest, func) { })); } + // File stats throwIfNoEntry: false + { + const stats = await stat('meow.js', { throwIfNoEntry: false }); + assert.strictEqual(stats, undefined); + } + // File system stats { const statFs = await statfs(dest); diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index cc7be77e53dadc..93bf6573a109a7 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -224,5 +224,9 @@ fs.lstat(__filename, undefined, common.mustCall()); { // Test that the throwIfNoEntry option works and returns undefined - assert.ok(!(fs.statSync('./wont_exists', { throwIfNoEntry: false }))); + const opts = { throwIfNoEntry: false }; + assert.ok(!(fs.statSync('./wont_exists', opts))); + fs.stat('./wont_exists', opts, common.mustSucceed((err, stats) => { + assert.strictEqual(stats, undefined); + })); } diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index e6ae75d4e33a5f..41e5faea46be66 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -63,7 +63,7 @@ function expect_ok(syscall, resource, err, atime, mtime, statSync) { const mtime_diff = check_mtime(resource, mtime, statSync); assert( // Check up to single-second precision. - // Sub-second precision is OS and fs dependant. + // Sub-second precision is OS and fs dependent. !err && (mtime_diff < 2) || err && err.code === 'ENOSYS', `FAILED: expect_ok ${util.inspect(arguments)} check_mtime: ${mtime_diff}` diff --git a/test/parallel/test-http-expect-continue-reuse-race.js b/test/parallel/test-http-expect-continue-reuse-race.js new file mode 100644 index 00000000000000..d56319d0e6bab1 --- /dev/null +++ b/test/parallel/test-http-expect-continue-reuse-race.js @@ -0,0 +1,117 @@ +'use strict'; + +// Regression test for a keep-alive socket reuse race condition. +// +// The race is between responseOnEnd() and requestOnFinish(), both of which +// can call responseKeepAlive(). The window is: req.end() has been called, +// the socket write has completed (writableFinished true), but the write +// callback that emits the 'finish' event has not fired yet. +// +// With plain HTTP the window is normally too narrow to hit. This test +// widens it by delaying every client-socket write *callback* by a few +// milliseconds (the actual I/O is not delayed, so writableFinished becomes +// true while the 'finish'-emitting callback is still pending). +// +// With Expect: 100-continue, the server responds quickly while the client +// delays req.end() just slightly (setTimeout 0), creating the perfect +// timing for the response to arrive in that window. +// +// On unpatched Node, the double responseKeepAlive() call corrupts the +// socket by stripping a subsequent request's listeners and emitting a +// spurious 'free' event, causing requests to hang / time out. + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const REQUEST_COUNT = 100; +const agent = new http.Agent({ keepAlive: true, maxSockets: 1 }); + +// Delay every write *callback* on the client socket so that +// socket.writableLength drops to 0 (writableFinished becomes true) before +// the callback that ultimately emits the 'finish' event fires. With +// HTTPS the TLS layer provides this gap naturally; for plain HTTP we +// need to create it artificially. +const patchedSockets = new WeakSet(); +function patchSocket(socket) { + if (patchedSockets.has(socket)) return; + patchedSockets.add(socket); + const delay = 5; + const origWrite = socket.write; + socket.write = function(chunk, encoding, cb) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (typeof cb === 'function') { + const orig = cb; + cb = (...args) => setTimeout(() => orig(...args), delay); + } + return origWrite.call(this, chunk, encoding, cb); + }; +} + +const server = http.createServer(common.mustCall((req, res) => { + req.on('error', common.mustNotCall()); + res.writeHead(200); + res.end(); +}, REQUEST_COUNT)); + +server.listen(0, common.mustCall(() => { + const { port } = server.address(); + + async function run() { + try { + for (let i = 0; i < REQUEST_COUNT; i++) { + await sendRequest(port); + } + } finally { + agent.destroy(); + server.close(); + } + } + + run().then(common.mustCall()); +})); + +function sendRequest(port) { + let timeout; + const promise = new Promise((resolve, reject) => { + function done(err) { + clearTimeout(timeout); + if (err) + reject(err); + else + resolve(); + } + + const req = http.request({ + port, + host: '127.0.0.1', + method: 'POST', + agent, + headers: { + 'Content-Length': '0', + 'Expect': '100-continue', + }, + }, common.mustCall((res) => { + assert.strictEqual(res.statusCode, 200); + res.resume(); + res.once('end', done); + res.once('error', done); + })); + + req.on('socket', patchSocket); + + timeout = setTimeout(() => { + const err = new Error('request timed out'); + req.destroy(err); + done(err); + }, common.platformTimeout(5000)); + + req.once('error', done); + + setTimeout(() => req.end(Buffer.alloc(0)), 0); + }); + return promise.finally(() => clearTimeout(timeout)); +} diff --git a/test/parallel/test-http-outgoing-message-capture-rejection.js b/test/parallel/test-http-outgoing-message-capture-rejection.js index a89ef8baf70605..31cc047ea2e319 100644 --- a/test/parallel/test-http-outgoing-message-capture-rejection.js +++ b/test/parallel/test-http-outgoing-message-capture-rejection.js @@ -46,7 +46,7 @@ events.captureRejections = true; { let _res; let shouldEnd = false; - // Not using mustCall here, because it is OS-dependant. + // Not using mustCall here, because it is OS-dependent. const server = createServer((req, res) => { // So that we cleanly stop _res = res; diff --git a/test/parallel/test-http-request-lookup-error-catchable.js b/test/parallel/test-http-request-lookup-error-catchable.js index 905f841c77c096..242f6ad45a553f 100644 --- a/test/parallel/test-http-request-lookup-error-catchable.js +++ b/test/parallel/test-http-request-lookup-error-catchable.js @@ -13,8 +13,8 @@ const net = require('net'); // 2. The lookup returns an IP that triggers a synchronous error (e.g., blockList) // 3. The error is emitted before http's error handler is set up (via nextTick) // -// The fix defers socket.destroy() calls in internalConnect to the next tick, -// giving http.request() time to set up its error handlers. +// The fix attaches socketErrorListener synchronously in onSocket so that +// socket errors are forwarded to the request before onSocketNT runs. const blockList = new net.BlockList(); blockList.addAddress(common.localhostIPv4); diff --git a/test/parallel/test-http2-https-fallback-http-server-options.js b/test/parallel/test-http2-https-fallback-http-server-options.js index 8143f56d491ccc..29bb24d1cfd242 100644 --- a/test/parallel/test-http2-https-fallback-http-server-options.js +++ b/test/parallel/test-http2-https-fallback-http-server-options.js @@ -20,6 +20,10 @@ const ca = fixtures.readKey('fake-startcom-root-cert.pem'); function onRequest(request, response) { const { socket: { alpnProtocol } } = request.httpVersion === '2.0' ? request.stream.session : request; + // Verify that http1Options are applied when allowHTTP1 is true + if (request.httpVersion === '1.1') { + assert.strictEqual(request.socket.server.keepAliveTimeout, 10000); + } response.status(200); response.end(JSON.stringify({ alpnProtocol, @@ -46,8 +50,11 @@ class MyServerResponse extends http.ServerResponse { { cert, key, allowHTTP1: true, - Http1IncomingMessage: MyIncomingMessage, - Http1ServerResponse: MyServerResponse + http1Options: { + IncomingMessage: MyIncomingMessage, + ServerResponse: MyServerResponse, + keepAliveTimeout: 10000, + }, }, common.mustCall(onRequest, 1) ); diff --git a/test/parallel/test-http2-respond-file-fd-leak.js b/test/parallel/test-http2-respond-file-fd-leak.js new file mode 100644 index 00000000000000..45e12185008a45 --- /dev/null +++ b/test/parallel/test-http2-respond-file-fd-leak.js @@ -0,0 +1,51 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const http2 = require('http2'); +const fs = require('fs'); + +const fname = fixtures.path('elipses.txt'); + +const server = http2.createServer(); + +server.on('stream', common.mustCall((stream) => { + const originalClose = fs.close; + let fdClosed = false; + + fs.close = common.mustCall(function(fd, cb) { + fdClosed = true; + return originalClose.apply(this, arguments); + }); + + const headers = { + ':method': 'GET', + 'content-type': 'text/plain' + }; + + stream.respondWithFile(fname, headers); + + stream.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_HTTP2_INVALID_PSEUDOHEADER'); + })); + + stream.on('close', common.mustCall(() => { + fs.close = originalClose; + assert.strictEqual(fdClosed, true); + })); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + + req.on('close', common.mustCall(() => { + client.close(); + server.close(); + })); + + req.on('error', common.mustCall()); + req.end(); +})); diff --git a/test/parallel/test-http2-single-headers-validation-disabled.js b/test/parallel/test-http2-single-headers-validation-disabled.js new file mode 100644 index 00000000000000..4ea6da83673040 --- /dev/null +++ b/test/parallel/test-http2-single-headers-validation-disabled.js @@ -0,0 +1,53 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const server = http2.createServer({ + strictSingleValueFields: false +}); + +server.on('stream', common.mustCall((stream, _headers, _flags, rawHeaders) => { + assert.deepStrictEqual(rawHeaders.slice(8), [ + 'user-agent', 'abc', + 'user-agent', 'xyz', + 'referer', 'qwe', + 'referer', 'asd', + ]); + + stream.respond({ + ':status': 200, + 'expires': 'Thu, 01 Jan 1970 00:00:00 GMT', + 'EXPIRES': 'Thu, 01 Jan 1970 00:00:00 GMT', + 'content-type': ['a', 'b'], + }); + + stream.end(); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`, { + strictSingleValueFields: false + }); + + const res = client.request({ + 'user-agent': 'abc', + 'USER-AGENT': 'xyz', + 'referer': ['qwe', 'asd'], + }); + + res.on('response', common.mustCall((_headers, _flags, rawHeaders) => { + assert.deepStrictEqual(rawHeaders.slice(2, 10), [ + 'expires', 'Thu, 01 Jan 1970 00:00:00 GMT', + 'expires', 'Thu, 01 Jan 1970 00:00:00 GMT', + 'content-type', 'a', + 'content-type', 'b', + ]); + + server.close(); + client.close(); + })); +})); diff --git a/test/parallel/test-http2-single-headers.js b/test/parallel/test-http2-single-headers-validation.js similarity index 100% rename from test/parallel/test-http2-single-headers.js rename to test/parallel/test-http2-single-headers-validation.js diff --git a/test/parallel/test-http2-util-assert-valid-pseudoheader.js b/test/parallel/test-http2-util-assert-valid-pseudoheader.js index bd995f0338f106..29c41e7a5a83e9 100644 --- a/test/parallel/test-http2-util-assert-valid-pseudoheader.js +++ b/test/parallel/test-http2-util-assert-valid-pseudoheader.js @@ -4,20 +4,16 @@ require('../common'); const assert = require('assert'); -// Tests the assertValidPseudoHeader function that is used within the -// buildNgHeaderString function. The assert function is not exported so we -// have to test it through buildNgHeaderString - -const { buildNgHeaderString } = require('internal/http2/util'); +const { assertValidPseudoHeader } = require('internal/http2/util'); // These should not throw -buildNgHeaderString({ ':status': 'a' }); -buildNgHeaderString({ ':path': 'a' }); -buildNgHeaderString({ ':authority': 'a' }); -buildNgHeaderString({ ':scheme': 'a' }); -buildNgHeaderString({ ':method': 'a' }); +assertValidPseudoHeader(':status'); +assertValidPseudoHeader(':path'); +assertValidPseudoHeader(':authority'); +assertValidPseudoHeader(':scheme'); +assertValidPseudoHeader(':method'); -assert.throws(() => buildNgHeaderString({ ':foo': 'a' }), { +assert.throws(() => assertValidPseudoHeader(':foo'), { code: 'ERR_HTTP2_INVALID_PSEUDOHEADER', name: 'TypeError', message: '":foo" is an invalid pseudoheader or is used incorrectly' diff --git a/test/parallel/test-http2-util-headers-list.js b/test/parallel/test-http2-util-headers-list.js index 0d1ac1d1b8c694..09135e865d4f98 100644 --- a/test/parallel/test-http2-util-headers-list.js +++ b/test/parallel/test-http2-util-headers-list.js @@ -9,6 +9,7 @@ if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); const { + assertValidPseudoHeader, getAuthority, buildNgHeaderString, toHeaderObject @@ -106,7 +107,7 @@ const { }; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ [ ':path', 'abc\0', ':status', '200\0', 'abc', '1\0', 'xyz', '1\0', 'xyz', '2\0', 'xyz', '3\0', 'xyz', '4\0', 'bar', '1\0', '' ].join('\0'), 8 ] @@ -123,7 +124,7 @@ const { }; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ [ ':status', '200\0', ':path', 'abc\0', 'abc', '1\0', 'xyz', '1\0', 'xyz', '2\0', 'xyz', '3\0', 'xyz', '4\0', '' ].join('\0'), 7 ] ); @@ -140,7 +141,7 @@ const { }; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ [ ':status', '200\0', ':path', 'abc\0', 'abc', '1\0', 'xyz', '1\0', 'xyz', '2\0', 'xyz', '3\0', 'xyz', '4\0', '' ].join('\0'), 7 ] ); @@ -156,7 +157,7 @@ const { headers[':path'] = 'abc'; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ [ ':status', '200\0', ':path', 'abc\0', 'xyz', '1\0', 'xyz', '2\0', 'xyz', '3\0', 'xyz', '4\0', '' ].join('\0'), 6 ] ); @@ -169,7 +170,7 @@ const { 'set-cookie': ['foo=bar'] }; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ [ 'set-cookie', 'foo=bar\0', '' ].join('\0'), 1 ] ); } @@ -181,7 +182,7 @@ const { ':statuS': 204, }; - assert.throws(() => buildNgHeaderString(headers), { + assert.throws(() => buildNgHeaderString(headers, assertValidPseudoHeader, true), { code: 'ERR_HTTP2_HEADER_SINGLE_VALUE', name: 'TypeError', message: 'Header field ":status" must only have a single value' @@ -199,13 +200,14 @@ const { }; assert.deepStrictEqual( - buildNgHeaderString(headers), + buildNgHeaderString(headers, assertValidPseudoHeader, true), [ ':status\x00200\x00\x00:path\x00abc\x00\x00abc\x001\x00\x00' + 'xyz\x001\x00\x01xyz\x002\x00\x01xyz\x003\x00\x01xyz\x004\x00\x01', 7 ] ); } -// The following are not allowed to have multiple values +// The following are not allowed to have multiple values by default, unless +// strictSingleValueFields is set to false. [ HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, @@ -248,10 +250,20 @@ const { HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS, ].forEach((name) => { const msg = `Header field "${name}" must only have a single value`; - assert.throws(() => buildNgHeaderString({ [name]: [1, 2, 3] }), { + assert.throws(() => buildNgHeaderString( + { [name]: [1, 2, 3] }, + assertValidPseudoHeader, + true + ), { code: 'ERR_HTTP2_HEADER_SINGLE_VALUE', message: msg }); + + assert(!(buildNgHeaderString( + { [name]: [1, 2, 3] }, + assertValidPseudoHeader, + false + ) instanceof Error), name); }); [ @@ -285,7 +297,11 @@ const { HTTP2_HEADER_WWW_AUTHENTICATE, HTTP2_HEADER_X_FRAME_OPTIONS, ].forEach((name) => { - assert(!(buildNgHeaderString({ [name]: [1, 2, 3] }) instanceof Error), name); + assert(!(buildNgHeaderString( + { [name]: [1, 2, 3] }, + assertValidPseudoHeader, + true + ) instanceof Error), name); }); [ @@ -304,7 +320,11 @@ const { 'Proxy-Connection', 'Keep-Alive', ].forEach((name) => { - assert.throws(() => buildNgHeaderString({ [name]: 'abc' }), { + assert.throws(() => buildNgHeaderString( + { [name]: 'abc' }, + assertValidPseudoHeader, + true + ), { code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS', name: 'TypeError', message: 'HTTP/1 Connection specific headers are forbidden: ' + @@ -312,7 +332,11 @@ const { }); }); -assert.throws(() => buildNgHeaderString({ [HTTP2_HEADER_TE]: ['abc'] }), { +assert.throws(() => buildNgHeaderString( + { [HTTP2_HEADER_TE]: ['abc'] }, + assertValidPseudoHeader, + true +), { code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS', name: 'TypeError', message: 'HTTP/1 Connection specific headers are forbidden: ' + @@ -320,7 +344,11 @@ assert.throws(() => buildNgHeaderString({ [HTTP2_HEADER_TE]: ['abc'] }), { }); assert.throws( - () => buildNgHeaderString({ [HTTP2_HEADER_TE]: ['abc', 'trailers'] }), { + () => buildNgHeaderString( + { [HTTP2_HEADER_TE]: ['abc', 'trailers'] }, + assertValidPseudoHeader, + true + ), { code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS', name: 'TypeError', message: 'HTTP/1 Connection specific headers are forbidden: ' + @@ -328,13 +356,25 @@ assert.throws( }); // These should not throw -buildNgHeaderString({ te: 'trailers' }); -buildNgHeaderString({ te: ['trailers'] }); +buildNgHeaderString( + { te: 'trailers' }, + assertValidPseudoHeader, + true +); +buildNgHeaderString( + { te: ['trailers'] }, + assertValidPseudoHeader, + true +); // HTTP/2 encourages use of Host instead of :authority when converting // from HTTP/1 to HTTP/2, so we no longer disallow it. // Refs: https://github.com/nodejs/node/issues/29858 -buildNgHeaderString({ [HTTP2_HEADER_HOST]: 'abc' }); +buildNgHeaderString( + { [HTTP2_HEADER_HOST]: 'abc' }, + assertValidPseudoHeader, + true +); // If both are present, the latter has priority assert.strictEqual(getAuthority({ diff --git a/test/parallel/test-https-expect-continue-reuse-race.js b/test/parallel/test-https-expect-continue-reuse-race.js new file mode 100644 index 00000000000000..cc754477b788c3 --- /dev/null +++ b/test/parallel/test-https-expect-continue-reuse-race.js @@ -0,0 +1,97 @@ +'use strict'; + +// Regression test for a keep-alive socket reuse race condition. +// +// The race is between responseOnEnd() and requestOnFinish(), both of which +// can call responseKeepAlive(). The window is: req.end() has been called, +// the socket write has completed (writableFinished true), but the write +// callback that emits the 'finish' event has not fired yet. +// +// HTTPS widens this window because the TLS layer introduces async +// indirection between the actual write completion and the JS callback. +// +// With Expect: 100-continue, the server responds quickly while the client +// delays req.end() just slightly (setTimeout 0), creating the perfect +// timing for the response to arrive in that window. +// +// On unpatched Node, the double responseKeepAlive() call corrupts the +// socket by stripping a subsequent request's listeners and emitting a +// spurious 'free' event, causing requests to hang / time out. + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const https = require('https'); +const fixtures = require('../common/fixtures'); + +const REQUEST_COUNT = 100; +const agent = new https.Agent({ keepAlive: true, maxSockets: 1 }); + +const key = fixtures.readKey('agent1-key.pem'); +const cert = fixtures.readKey('agent1-cert.pem'); +const server = https.createServer({ key, cert }, common.mustCall((req, res) => { + req.on('error', common.mustNotCall()); + res.writeHead(200); + res.end(); +}, REQUEST_COUNT)); + +server.listen(0, common.mustCall(() => { + const { port } = server.address(); + + async function run() { + try { + for (let i = 0; i < REQUEST_COUNT; i++) { + await sendRequest(port); + } + } finally { + agent.destroy(); + server.close(); + } + } + + run().then(common.mustCall()); +})); + +function sendRequest(port) { + let timeout; + const promise = new Promise((resolve, reject) => { + function done(err) { + clearTimeout(timeout); + if (err) + reject(err); + else + resolve(); + } + + const req = https.request({ + port, + host: '127.0.0.1', + rejectUnauthorized: false, + method: 'POST', + agent, + headers: { + 'Content-Length': '0', + 'Expect': '100-continue', + }, + }, common.mustCall((res) => { + assert.strictEqual(res.statusCode, 200); + res.resume(); + res.once('end', done); + res.once('error', done); + })); + + timeout = setTimeout(() => { + const err = new Error('request timed out'); + req.destroy(err); + done(err); + }, common.platformTimeout(5000)); + + req.once('error', done); + + setTimeout(() => req.end(Buffer.alloc(0)), 0); + }); + return promise.finally(() => clearTimeout(timeout)); +} diff --git a/test/parallel/test-node-output-console.mjs b/test/parallel/test-node-output-console.mjs index 8fabed9db60ab7..e9b001db336cf5 100644 --- a/test/parallel/test-node-output-console.mjs +++ b/test/parallel/test-node-output-console.mjs @@ -7,37 +7,20 @@ const skipForceColors = process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' || process.config.variables.node_shared_openssl; -function replaceStackTrace(str) { - return snapshot.replaceStackTrace(str, '$1at *$7\n'); -} - describe('console output', { concurrency: !process.env.TEST_PARALLEL }, () => { - function normalize(str) { - return str.replaceAll(/\d+/g, '*'); - } const tests = [ { name: 'console/2100bytes.js' }, { name: 'console/console_low_stack_space.js' }, { name: 'console/console.js' }, { name: 'console/hello_world.js' }, - { - name: 'console/stack_overflow.js', - transform: snapshot - .transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - normalize - ) - }, + { name: 'console/stack_overflow.js' }, !skipForceColors ? { name: 'console/force_colors.js', env: { FORCE_COLOR: 1 } } : null, ].filter(Boolean); - const defaultTransform = snapshot - .transform(snapshot.basicTransform, replaceStackTrace); - for (const { name, transform, env } of tests) { + for (const { name, env } of tests) { it(name, async () => { await snapshot.spawnAndAssert( fixtures.path(name), - transform ?? defaultTransform, + snapshot.defaultTransform, { env: { ...env, ...process.env } }, ); }); diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs index 731a21243481f4..3764ce52107379 100644 --- a/test/parallel/test-node-output-errors.mjs +++ b/test/parallel/test-node-output-errors.mjs @@ -7,41 +7,7 @@ import { describe, it } from 'node:test'; const skipForceColors = (common.isWindows && (Number(os.release().split('.')[0]) !== 10 || Number(os.release().split('.')[2]) < 14393)); // See https://github.com/nodejs/node/pull/33132 - -function replaceStackTrace(str) { - return snapshot.replaceStackTrace(str, '$1at *$7\n'); -} - -function replaceForceColorsStackTrace(str) { - // eslint-disable-next-line no-control-regex - return str.replaceAll(/(\[90m\W+)at .*node:.*/g, '$1at *'); -} - describe('errors output', { concurrency: !process.env.TEST_PARALLEL }, () => { - function normalizeNoNumbers(str) { - return str.replaceAll(/\d+:\d+/g, '*:*').replaceAll(/:\d+/g, ':*').replaceAll('*fixtures*message*', '*'); - } - const defaultTransform = snapshot.transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - ); - const errTransform = snapshot.transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - normalizeNoNumbers, - ); - const promiseTransform = snapshot.transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - replaceStackTrace, - normalizeNoNumbers, - ); - const forceColorsTransform = snapshot.transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - replaceForceColorsStackTrace, - ); - const tests = [ { name: 'errors/async_error_eval_cjs.js' }, { name: 'errors/async_error_eval_esm.js' }, @@ -51,33 +17,36 @@ describe('errors output', { concurrency: !process.env.TEST_PARALLEL }, () => { { name: 'errors/core_line_numbers.js' }, { name: 'errors/async_error_sync_esm.mjs' }, { name: 'errors/test-no-extra-info-on-fatal-exception.js' }, - { name: 'errors/error_aggregateTwoErrors.js', transform: errTransform }, - { name: 'errors/error_exit.js', transform: errTransform }, - { name: 'errors/error_with_nul.js', transform: errTransform }, - { name: 'errors/events_unhandled_error_common_trace.js', transform: errTransform }, - { name: 'errors/events_unhandled_error_nexttick.js', transform: errTransform }, - { name: 'errors/events_unhandled_error_sameline.js', transform: errTransform }, - { name: 'errors/events_unhandled_error_subclass.js', transform: errTransform }, - { name: 'errors/if-error-has-good-stack.js', transform: errTransform }, - { name: 'errors/throw_custom_error.js', transform: errTransform }, - { name: 'errors/throw_error_with_getter_throw.js', transform: errTransform }, - { name: 'errors/throw_in_eval_anonymous.js', transform: errTransform }, - { name: 'errors/throw_in_eval_named.js', transform: errTransform }, - { name: 'errors/throw_in_line_with_tabs.js', transform: errTransform }, - { name: 'errors/throw_non_error.js', transform: errTransform }, - { name: 'errors/throw_null.js', transform: errTransform }, - { name: 'errors/throw_undefined.js', transform: errTransform }, - { name: 'errors/timeout_throw.js', transform: errTransform }, - { name: 'errors/undefined_reference_in_new_context.js', transform: errTransform }, - { name: 'errors/promise_always_throw_unhandled.js', transform: promiseTransform }, - { name: 'errors/promise_unhandled_warn_with_error.js', transform: promiseTransform }, - { name: 'errors/unhandled_promise_trace_warnings.js', transform: promiseTransform }, - { skip: skipForceColors, name: 'errors/force_colors.js', - transform: forceColorsTransform, env: { FORCE_COLOR: 1 } }, + { name: 'errors/error_aggregateTwoErrors.js' }, + { name: 'errors/error_exit.js' }, + { name: 'errors/error_with_nul.js' }, + { name: 'errors/events_unhandled_error_common_trace.js' }, + { name: 'errors/events_unhandled_error_nexttick.js' }, + { name: 'errors/events_unhandled_error_sameline.js' }, + { name: 'errors/events_unhandled_error_subclass.js' }, + { name: 'errors/if-error-has-good-stack.js' }, + { name: 'errors/throw_custom_error.js' }, + { name: 'errors/throw_error_with_getter_throw.js' }, + { name: 'errors/throw_in_eval_anonymous.js' }, + { name: 'errors/throw_in_eval_named.js' }, + { name: 'errors/throw_in_line_with_tabs.js' }, + { name: 'errors/throw_non_error.js' }, + { name: 'errors/throw_null.js' }, + { name: 'errors/throw_undefined.js' }, + { name: 'errors/timeout_throw.js' }, + { name: 'errors/undefined_reference_in_new_context.js' }, + { name: 'errors/promise_always_throw_unhandled.js' }, + { name: 'errors/promise_unhandled_warn_with_error.js' }, + { name: 'errors/unhandled_promise_trace_warnings.js' }, + { skip: skipForceColors, name: 'errors/force_colors.js', env: { FORCE_COLOR: 1 } }, ]; - for (const { name, transform = defaultTransform, env, skip = false } of tests) { + for (const { name, env, skip = false } of tests) { it(name, { skip }, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), transform, { env: { ...env, ...process.env } }); + await snapshot.spawnAndAssert( + fixtures.path(name), + snapshot.defaultTransform, + { env: { ...env, ...process.env } } + ); }); } }); diff --git a/test/parallel/test-node-output-eval.mjs b/test/parallel/test-node-output-eval.mjs index 0dc97ac9f32e42..e064b47073f6aa 100644 --- a/test/parallel/test-node-output-eval.mjs +++ b/test/parallel/test-node-output-eval.mjs @@ -7,22 +7,6 @@ import * as snapshot from '../common/assertSnapshot.js'; import { describe, it } from 'node:test'; describe('eval output', { concurrency: true }, () => { - function normalize(str) { - return str - .replaceAll(/\d+:\d+/g, '*:*'); - } - - const defaultTransform = snapshot.transform( - normalize, - snapshot.basicTransform, - snapshot.transformProjectRoot(), - removeStackTraces, - ); - - function removeStackTraces(output) { - return output.replaceAll(/^ *at .+$/gm, ''); - } - const tests = [ { name: 'eval/eval_messages.js' }, { name: 'eval/stdin_messages.js' }, @@ -32,7 +16,7 @@ describe('eval output', { concurrency: true }, () => { for (const { name } of tests) { it(name, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform); + await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform); }); } }); diff --git a/test/parallel/test-node-output-sourcemaps.mjs b/test/parallel/test-node-output-sourcemaps.mjs index 2341d66e628746..840ca7cf59a47c 100644 --- a/test/parallel/test-node-output-sourcemaps.mjs +++ b/test/parallel/test-node-output-sourcemaps.mjs @@ -4,13 +4,6 @@ import * as snapshot from '../common/assertSnapshot.js'; import { describe, it } from 'node:test'; describe('sourcemaps output', { concurrency: !process.env.TEST_PARALLEL }, () => { - const defaultTransform = snapshot - .transform( - snapshot.basicTransform, - snapshot.transformProjectRoot(), - snapshot.replaceInternalStackTrace, - ); - const tests = [ { name: 'source-map/output/source_map_assert_source_line.ts' }, { name: 'source-map/output/source_map_disabled_by_api.js' }, @@ -35,7 +28,7 @@ describe('sourcemaps output', { concurrency: !process.env.TEST_PARALLEL }, () => for (const { name } of tests) { const skip = name.endsWith('.ts') && !process.config.variables.node_use_amaro; it(name, { skip }, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform); + await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform); }); } }); diff --git a/test/parallel/test-node-output-v8-warning.mjs b/test/parallel/test-node-output-v8-warning.mjs index f342ef1d4f8db9..43f6709dc248c7 100644 --- a/test/parallel/test-node-output-v8-warning.mjs +++ b/test/parallel/test-node-output-v8-warning.mjs @@ -4,16 +4,12 @@ import * as snapshot from '../common/assertSnapshot.js'; import { describe, it } from 'node:test'; describe('v8 output', { concurrency: !process.env.TEST_PARALLEL }, () => { - function normalize(str) { - return str.replaceAll(/:\d+/g, ':*'); - } - const defaultTransform = snapshot.transform(snapshot.basicTransform, snapshot.transformProjectRoot(), normalize); const tests = [ { name: 'v8/v8_warning.js' }, ]; for (const { name } of tests) { it(name, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform); + await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform); }); } }); diff --git a/test/parallel/test-node-output-vm.mjs b/test/parallel/test-node-output-vm.mjs index 9a285d9ca0f006..f87e66a8bc5df3 100644 --- a/test/parallel/test-node-output-vm.mjs +++ b/test/parallel/test-node-output-vm.mjs @@ -4,13 +4,6 @@ import * as snapshot from '../common/assertSnapshot.js'; import { describe, it } from 'node:test'; describe('vm output', { concurrency: !process.env.TEST_PARALLEL }, () => { - function normalize(str) { - return str.replaceAll(/node:vm:\d+:\d+/g, 'node:vm:*'); - } - - const defaultTransform = snapshot - .transform(snapshot.basicTransform, snapshot.transformProjectRoot(), normalize); - const tests = [ { name: 'vm/vm_caught_custom_runtime_error.js' }, { name: 'vm/vm_display_runtime_error.js' }, @@ -20,7 +13,7 @@ describe('vm output', { concurrency: !process.env.TEST_PARALLEL }, () => { ]; for (const { name } of tests) { it(name, async () => { - await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform); + await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform); }); } }); diff --git a/test/parallel/test-readline-async-iterators.js b/test/parallel/test-readline-async-iterators.js index 32fa32a1284a09..a88c550c07efae 100644 --- a/test/parallel/test-readline-async-iterators.js +++ b/test/parallel/test-readline-async-iterators.js @@ -17,6 +17,7 @@ const testContents = [ 'line 1', 'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing', 'line 1\nline 2\nline 3 ends with newline\n', + Array(1e4).fill(0).map((_, i) => i).join('\n'), // More that 2 * highWaterMark ]; async function testSimple() { @@ -43,6 +44,29 @@ async function testSimple() { } } +// Same as testSimple, but with Readable.from() instead of fs.createReadStream +async function testReadableFrom() { + for (const fileContent of testContents) { + const readable = Readable.from([fileContent]); + const rli = readline.createInterface({ + input: readable, + crlfDelay: Infinity + }); + + const iteratedLines = []; + for await (const k of rli) { + iteratedLines.push(k); + } + + const expectedLines = fileContent.split('\n'); + if (expectedLines[expectedLines.length - 1] === '') { + expectedLines.pop(); + } + assert.deepStrictEqual(iteratedLines, expectedLines); + assert.strictEqual(iteratedLines.join(''), fileContent.replace(/\n/g, '')); + } +} + async function testMutual() { for (const fileContent of testContents) { fs.writeFileSync(filename, fileContent); @@ -115,6 +139,7 @@ async function testSlowStreamForLeaks() { } testSimple() + .then(testReadableFrom) .then(testMutual) .then(testSlowStreamForLeaks) .then(common.mustCall()); diff --git a/test/parallel/test-repl-history-init-fail-leak.js b/test/parallel/test-repl-history-init-fail-leak.js new file mode 100644 index 00000000000000..701a611ed2f385 --- /dev/null +++ b/test/parallel/test-repl-history-init-fail-leak.js @@ -0,0 +1,56 @@ +'use strict'; +// Flags: --expose-internals + +const common = require('../common'); +const fs = require('fs'); +const path = require('path'); +const { ReplHistory } = require('internal/repl/history'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const historyPath = path.join(tmpdir.path, '.node_repl_history'); + +fs.writeFileSync(historyPath, 'dummy\n'); + +const originalOpen = fs.promises.open; +let closeCalled = false; + +fs.promises.open = async (filepath, flags, mode) => { + const handle = await originalOpen(filepath, flags, mode); + + if (flags === 'r+' && filepath === historyPath) { + handle.truncate = async (len) => { + throw new Error('Mock truncate error'); + }; + + const originalClose = handle.close; + handle.close = async () => { + closeCalled = true; + return originalClose.call(handle); + }; + } + + return handle; +}; + +const context = { + historySize: 30, + on: () => {}, + once: () => {}, + emit: () => {}, + pause: () => {}, + resume: () => {}, + off: () => {}, + line: '', + _historyPrev: () => {}, + _writeToOutput: () => {} +}; + +const history = new ReplHistory(context, { filePath: historyPath }); + +history.initialize(common.mustCall((err) => { + assert.strictEqual(err, null); + assert.strictEqual(closeCalled, true); +})); diff --git a/test/parallel/test-runner-exit-code.js b/test/parallel/test-runner-exit-code.js index 792c5f1717bd60..4024a52841bb28 100644 --- a/test/parallel/test-runner-exit-code.js +++ b/test/parallel/test-runner-exit-code.js @@ -6,7 +6,7 @@ const { spawnSync, spawn } = require('child_process'); const { once } = require('events'); const { finished } = require('stream/promises'); -async function runAndKill(file) { +async function runAndKill(file, expectedTestName) { if (common.isWindows) { common.printSkipMessage(`signals are not supported in windows, skipping ${file}`); return; @@ -21,6 +21,9 @@ async function runAndKill(file) { const [code, signal] = await once(child, 'exit'); await finished(child.stdout); assert(stdout.startsWith('TAP version 13\n')); + // Verify interrupted test message + assert(stdout.includes(`Interrupted while running: ${expectedTestName}`), + `Expected output to contain interrupted test name`); assert.strictEqual(signal, null); assert.strictEqual(code, 1); } @@ -67,6 +70,10 @@ if (process.argv[2] === 'child') { assert.strictEqual(child.status, 1); assert.strictEqual(child.signal, null); - runAndKill(fixtures.path('test-runner', 'never_ending_sync.js')).then(common.mustCall()); - runAndKill(fixtures.path('test-runner', 'never_ending_async.js')).then(common.mustCall()); + // With process isolation (default), the test name shown is the file path + // because the parent runner only knows about file-level tests + const neverEndingSync = fixtures.path('test-runner', 'never_ending_sync.js'); + const neverEndingAsync = fixtures.path('test-runner', 'never_ending_async.js'); + runAndKill(neverEndingSync, neverEndingSync).then(common.mustCall()); + runAndKill(neverEndingAsync, neverEndingAsync).then(common.mustCall()); } diff --git a/test/parallel/test-runner-test-rerun-failures.js b/test/parallel/test-runner-test-rerun-failures.js index 220ec140b368a6..4a9ea5d4ac0bee 100644 --- a/test/parallel/test-runner-test-rerun-failures.js +++ b/test/parallel/test-runner-test-rerun-failures.js @@ -23,6 +23,10 @@ const expectedStateFile = [ 'test/fixtures/test-runner/rerun.js:39:1': { passed_on_attempt: 0, name: 'nested ambiguous (expectedAttempts=0)' }, 'test/fixtures/test-runner/rerun.js:30:16:(1)': { passed_on_attempt: 0, name: '2 levels deep' }, 'test/fixtures/test-runner/rerun.js:35:13:(1)': { passed_on_attempt: 0, name: 'ok' }, + 'test/fixtures/test-runner/rerun.js:45:13': { passed_on_attempt: 0, name: 'nested' }, + 'test/fixtures/test-runner/rerun.js:44:3': { passed_on_attempt: 0, name: 'passed on first attempt' }, + 'test/fixtures/test-runner/rerun.js:47:3': { passed_on_attempt: 0, name: 'a' }, + 'test/fixtures/test-runner/rerun.js:43:1': { passed_on_attempt: 0, name: 'describe rerun' }, }, { 'test/fixtures/test-runner/rerun.js:9:1': { passed_on_attempt: 0, name: 'ok' }, @@ -34,6 +38,11 @@ const expectedStateFile = [ 'test/fixtures/test-runner/rerun.js:39:1': { passed_on_attempt: 0, name: 'nested ambiguous (expectedAttempts=0)' }, 'test/fixtures/test-runner/rerun.js:30:16:(1)': { passed_on_attempt: 0, name: '2 levels deep' }, 'test/fixtures/test-runner/rerun.js:35:13:(1)': { passed_on_attempt: 0, name: 'ok' }, + 'test/fixtures/test-runner/rerun.js:43:1': { passed_on_attempt: 0, name: 'describe rerun' }, + 'test/fixtures/test-runner/rerun.js:44:3': { passed_on_attempt: 0, name: 'passed on first attempt' }, + 'test/fixtures/test-runner/rerun.js:45:13': { passed_on_attempt: 0, name: 'nested' }, + 'test/fixtures/test-runner/rerun.js:45:13:(1)': { passed_on_attempt: 1, name: 'nested' }, + 'test/fixtures/test-runner/rerun.js:47:3': { passed_on_attempt: 0, name: 'a' }, }, { 'test/fixtures/test-runner/rerun.js:3:1': { passed_on_attempt: 2, name: 'should fail on first two attempts' }, @@ -48,6 +57,11 @@ const expectedStateFile = [ 'test/fixtures/test-runner/rerun.js:30:16:(1)': { passed_on_attempt: 0, name: '2 levels deep' }, 'test/fixtures/test-runner/rerun.js:35:13:(1)': { passed_on_attempt: 0, name: 'ok' }, 'test/fixtures/test-runner/rerun.js:40:1': { passed_on_attempt: 2, name: 'nested ambiguous (expectedAttempts=1)' }, + 'test/fixtures/test-runner/rerun.js:43:1': { passed_on_attempt: 0, name: 'describe rerun' }, + 'test/fixtures/test-runner/rerun.js:44:3': { passed_on_attempt: 0, name: 'passed on first attempt' }, + 'test/fixtures/test-runner/rerun.js:45:13': { passed_on_attempt: 0, name: 'nested' }, + 'test/fixtures/test-runner/rerun.js:45:13:(1)': { passed_on_attempt: 1, name: 'nested' }, + 'test/fixtures/test-runner/rerun.js:47:3': { passed_on_attempt: 0, name: 'a' }, }, ]; @@ -67,23 +81,26 @@ test('test should pass on third rerun', async () => { let { code, stdout, signal } = await common.spawnPromisified(process.execPath, args); assert.strictEqual(code, 1); assert.strictEqual(signal, null); - assert.match(stdout, /pass 8/); + assert.match(stdout, /pass 11/); assert.match(stdout, /fail 4/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile.slice(0, 1)); ({ code, stdout, signal } = await common.spawnPromisified(process.execPath, args)); assert.strictEqual(code, 1); assert.strictEqual(signal, null); - assert.match(stdout, /pass 9/); + assert.match(stdout, /pass 13/); assert.match(stdout, /fail 3/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile.slice(0, 2)); ({ code, stdout, signal } = await common.spawnPromisified(process.execPath, args)); assert.strictEqual(code, 0); assert.strictEqual(signal, null); - assert.match(stdout, /pass 12/); + assert.match(stdout, /pass 18/); assert.match(stdout, /fail 0/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile); }); @@ -93,29 +110,32 @@ test('test should pass on third rerun with `--test`', async () => { let { code, stdout, signal } = await common.spawnPromisified(process.execPath, args); assert.strictEqual(code, 1); assert.strictEqual(signal, null); - assert.match(stdout, /pass 8/); + assert.match(stdout, /pass 11/); assert.match(stdout, /fail 4/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile.slice(0, 1)); ({ code, stdout, signal } = await common.spawnPromisified(process.execPath, args)); assert.strictEqual(code, 1); assert.strictEqual(signal, null); - assert.match(stdout, /pass 9/); + assert.match(stdout, /pass 13/); assert.match(stdout, /fail 3/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile.slice(0, 2)); ({ code, stdout, signal } = await common.spawnPromisified(process.execPath, args)); assert.strictEqual(code, 0); assert.strictEqual(signal, null); - assert.match(stdout, /pass 12/); + assert.match(stdout, /pass 18/); assert.match(stdout, /fail 0/); + assert.match(stdout, /suites 1/); assert.deepStrictEqual(await getStateFile(), expectedStateFile); }); test('using `run` api', async () => { let stream = run({ files: [fixture], rerunFailuresFilePath: stateFile }); - stream.on('test:pass', common.mustCall(8)); + stream.on('test:pass', common.mustCall(12)); stream.on('test:fail', common.mustCall(4)); // eslint-disable-next-line no-unused-vars @@ -125,7 +145,7 @@ test('using `run` api', async () => { stream = run({ files: [fixture], rerunFailuresFilePath: stateFile }); - stream.on('test:pass', common.mustCall(9)); + stream.on('test:pass', common.mustCall(14)); stream.on('test:fail', common.mustCall(3)); // eslint-disable-next-line no-unused-vars @@ -135,7 +155,7 @@ test('using `run` api', async () => { stream = run({ files: [fixture], rerunFailuresFilePath: stateFile }); - stream.on('test:pass', common.mustCall(12)); + stream.on('test:pass', common.mustCall(19)); stream.on('test:fail', common.mustNotCall()); // eslint-disable-next-line no-unused-vars diff --git a/test/parallel/test-stream-duplex.js b/test/parallel/test-stream-duplex.js index 6fa5541c555c28..862e1fec0baf6c 100644 --- a/test/parallel/test-stream-duplex.js +++ b/test/parallel/test-stream-duplex.js @@ -147,10 +147,14 @@ process.on('exit', () => { }) }); - const { writable, readable } = Duplex.toWeb(duplex, { type: 'bytes' }); + const { writable, readable } = Duplex.toWeb(duplex, { readableType: 'bytes' }); writable.getWriter().write(dataToWrite); const data = new Uint8Array(dataToRead.length); readable.getReader({ mode: 'byob' }).read(data).then(common.mustCall((result) => { assert.deepStrictEqual(Buffer.from(result.value), dataToRead); })); + + // Ensure that the originally-named `options.type` still works as an alias for `options.readableType` + // `getReader({ mode: 'byob' })` throws if the underlying ReadableStream is not a byte stream + Duplex.toWeb(duplex, { type: 'bytes' }).readable.getReader({ mode: 'byob' }); } diff --git a/test/parallel/test-stream2-read-correct-num-bytes-in-utf8.js b/test/parallel/test-stream2-read-correct-num-bytes-in-utf8.js new file mode 100644 index 00000000000000..476f041e3f4087 --- /dev/null +++ b/test/parallel/test-stream2-read-correct-num-bytes-in-utf8.js @@ -0,0 +1,16 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); +const { Readable } = require('stream'); + +const readable = new Readable({ read() {} }); +readable.setEncoding('utf8'); + +readable.push('abc'); +readable.push('defgh'); +readable.push(null); + +assert.strictEqual(readable.read(5), 'abcde'); +assert.strictEqual(readable.read(3), 'fgh'); +assert.strictEqual(readable.read(1), null); diff --git a/test/parallel/test-util-styletext.js b/test/parallel/test-util-styletext.js index b87c5d7e82c74c..4fdf419143453c 100644 --- a/test/parallel/test-util-styletext.js +++ b/test/parallel/test-util-styletext.js @@ -22,12 +22,12 @@ const noChange = 'test'; util.styleText(invalidOption, 'test'); }, { code: 'ERR_INVALID_ARG_VALUE', - }); + }, invalidOption); assert.throws(() => { util.styleText('red', invalidOption); }, { code: 'ERR_INVALID_ARG_TYPE' - }); + }, invalidOption); }); assert.throws(() => { diff --git a/test/parallel/test-worker-cwd-race-condition.js b/test/parallel/test-worker-cwd-race-condition.js new file mode 100644 index 00000000000000..19394c85f0d1c4 --- /dev/null +++ b/test/parallel/test-worker-cwd-race-condition.js @@ -0,0 +1,70 @@ +// Flags: --expose-internals --no-warnings +'use strict'; + +const common = require('../common'); +const { isMainThread } = require('worker_threads'); + +if (!isMainThread) { + common.skip('process.chdir is not available in Workers'); +} + +const { internalBinding } = require('internal/test/binding'); + +const assert = require('assert'); +const { Worker } = require('worker_threads'); + +const processBinding = internalBinding('process_methods'); +const originalChdir = processBinding.chdir; + +const cwdOriginal = process.cwd(); +const i32 = new Int32Array(new SharedArrayBuffer(12)); + +processBinding.chdir = common.mustCall(function chdir(path) { + // Signal to the worker that we're inside the chdir call + Atomics.store(i32, 0, 1); + Atomics.notify(i32, 0); + + // Pause the chdir call while the worker calls process.cwd(), + // to simulate a race condition + Atomics.wait(i32, 1, 0); + + return originalChdir(path); +}); + +const worker = new Worker(` + const { + parentPort, + workerData: { i32 }, + } = require('worker_threads'); + + // Wait until the main thread has entered the chdir call + Atomics.wait(i32, 0, 0); + + const cwdDuringChdir = process.cwd(); + + // Signal the main thread to continue the chdir call + Atomics.store(i32, 1, 1); + Atomics.notify(i32, 1); + + // Wait until the main thread has left the chdir call + Atomics.wait(i32, 2, 0); + + const cwdAfterChdir = process.cwd(); + parentPort.postMessage({ cwdDuringChdir, cwdAfterChdir }); +`, { + eval: true, + workerData: { i32 }, +}); + +worker.on('exit', common.mustCall()); +worker.on('error', common.mustNotCall()); +worker.on('message', common.mustCall(({ cwdDuringChdir, cwdAfterChdir }) => { + assert.strictEqual(cwdDuringChdir, cwdOriginal); + assert.strictEqual(cwdAfterChdir, process.cwd()); +})); + +process.chdir('..'); + +// Signal to the worker that the chdir call is completed +Atomics.store(i32, 2, 1); +Atomics.notify(i32, 2); diff --git a/test/parallel/test-zlib-brotli-dictionary.js b/test/parallel/test-zlib-brotli-dictionary.js new file mode 100644 index 00000000000000..1703a5e047041a --- /dev/null +++ b/test/parallel/test-zlib-brotli-dictionary.js @@ -0,0 +1,126 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const zlib = require('zlib'); + +const dictionary = Buffer.from( + `Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.` +); + +const input = Buffer.from( + `Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.` +); + +// Test with convenience methods (async). +zlib.brotliCompress(input, { dictionary }, common.mustSucceed((compressed) => { + assert(compressed.length < input.length, + 'compressed data should be smaller with dictionary'); + zlib.brotliDecompress(compressed, { dictionary }, common.mustSucceed((decompressed) => { + assert.strictEqual(decompressed.toString(), input.toString()); + })); +})); + +// Test with streaming API. +{ + const encoder = zlib.createBrotliCompress({ dictionary }); + const decoder = zlib.createBrotliDecompress({ dictionary }); + + const chunks = []; + decoder.on('data', (chunk) => chunks.push(chunk)); + decoder.on('end', common.mustCall(() => { + const result = Buffer.concat(chunks); + assert.strictEqual(result.toString(), input.toString()); + })); + + encoder.pipe(decoder); + encoder.end(input); +} + +// Test that dictionary improves compression ratio. +{ + const withDict = zlib.brotliCompressSync(input, { dictionary }); + const withoutDict = zlib.brotliCompressSync(input); + + // Dictionary-based compression should be at least as good as without. + assert(withDict.length <= withoutDict.length, + `Dictionary compression (${withDict.length}) should not be ` + + `larger than non-dictionary compression (${withoutDict.length})`); + + // Verify decompression with dictionary works. + const decompressed = zlib.brotliDecompressSync(withDict, { dictionary }); + assert.strictEqual(decompressed.toString(), input.toString()); +} + +// Test that decompression without matching dictionary fails. +{ + const compressed = zlib.brotliCompressSync(input, { dictionary }); + assert.throws(() => { + zlib.brotliDecompressSync(compressed); + }, (err) => { + assert.match(err.code, /ERR_/); + return true; + }); +} + +// Test that decompression with wrong dictionary fails. +{ + const compressed = zlib.brotliCompressSync(input, { dictionary }); + const wrongDictionary = Buffer.from('this is the wrong dictionary'); + assert.throws(() => { + zlib.brotliDecompressSync(compressed, { dictionary: wrongDictionary }); + }, (err) => { + assert.match(err.code, /ERR_/); + return true; + }); +} + +// Test that dictionary works with ArrayBuffer (converted to Buffer). +{ + const arrayBufferDict = dictionary.buffer.slice( + dictionary.byteOffset, + dictionary.byteOffset + dictionary.byteLength, + ); + const compressed = zlib.brotliCompressSync(input, { dictionary: arrayBufferDict }); + const decompressed = zlib.brotliDecompressSync(compressed, { dictionary: arrayBufferDict }); + assert.strictEqual(decompressed.toString(), input.toString()); +} + +// Test that dictionary works with TypedArray (Uint8Array). +{ + const uint8Dict = new Uint8Array(dictionary); + const compressed = zlib.brotliCompressSync(input, { dictionary: uint8Dict }); + const decompressed = zlib.brotliDecompressSync(compressed, { dictionary: uint8Dict }); + assert.strictEqual(decompressed.toString(), input.toString()); +} + +// Test that invalid dictionary type throws ERR_INVALID_ARG_TYPE. +for (const invalidDict of ['string', 123, true, { object: true }, [1, 2, 3]]) { + assert.throws(() => { + zlib.createBrotliCompress({ dictionary: invalidDict }); + }, { code: 'ERR_INVALID_ARG_TYPE' }); + + assert.throws(() => { + zlib.createBrotliDecompress({ dictionary: invalidDict }); + }, { code: 'ERR_INVALID_ARG_TYPE' }); +} + +// Test with streaming API and wrong dictionary emits error event. +{ + const compressed = zlib.brotliCompressSync(input, { dictionary }); + const wrongDict = Buffer.from('wrong dictionary data'); + const decoder = zlib.createBrotliDecompress({ dictionary: wrongDict }); + + decoder.on('error', common.mustCall((err) => { + assert.match(err.code, /ERR_/); + })); + + decoder.write(compressed); + decoder.end(); +} diff --git a/test/pummel/test-heapdump-zstd.js b/test/pummel/test-heapdump-zstd.js new file mode 100644 index 00000000000000..5f642202e3fb88 --- /dev/null +++ b/test/pummel/test-heapdump-zstd.js @@ -0,0 +1,49 @@ +'use strict'; +// This tests heap snapshot integration of zlib stream. + +const common = require('../common'); +const assert = require('assert'); +const { validateByRetainingPath, validateByRetainingPathFromNodes } = require('../common/heap'); +const zlib = require('zlib'); + +// Before zstd stream is created, no ZstdStream should be created. +{ + const nodes = validateByRetainingPath('Node / ZstdStream', []); + assert.strictEqual(nodes.length, 0); +} + +const compress = zlib.createZstdCompress(); + +// After zstd stream is created, a ZstdStream should be created. +{ + const streams = validateByRetainingPath('Node / ZstdStream', []); + validateByRetainingPathFromNodes(streams, 'Node / ZstdStream', [ + { node_name: 'ZstdCompress', edge_name: 'native_to_javascript' }, + ]); + const withMemory = validateByRetainingPathFromNodes(streams, 'Node / ZstdStream', [ + { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' }, + ], true); + if (process.config.variables.node_shared_zstd === true) { + assert.strictEqual(withMemory.length, 0); + } else { + assert.strictEqual(withMemory.length, 1); + // Between 1KB and 1MB (measured value was around ~5kB) + assert.ok(withMemory[0].self_size > 1024); + assert.ok(withMemory[0].self_size < 1024 * 1024); + } +} + +// After zstd stream is written, zlib_memory is significantly larger. +compress.write('hello world', common.mustCall(() => { + const streams = validateByRetainingPath('Node / ZstdStream', []); + const withMemory = validateByRetainingPathFromNodes(streams, 'Node / ZstdStream', [ + { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' }, + ], true); + if (process.config.variables.node_shared_zstd === true) { + assert.strictEqual(withMemory.length, 0); + } else { + assert.strictEqual(withMemory.length, 1); + // More than 1MB + assert.ok(withMemory[0].self_size > 1024 * 1024); + } +})); diff --git a/test/sea/test-build-sea-custom-argv0.js b/test/sea/test-build-sea-custom-argv0.js new file mode 100644 index 00000000000000..2c8b6b83e02cdb --- /dev/null +++ b/test/sea/test-build-sea-custom-argv0.js @@ -0,0 +1,34 @@ +'use strict'; +// This tests --build-sea with a custom argv0 value. + +require('../common'); + +const { skipIfBuildSEAIsNotSupported } = require('../common/sea'); + +skipIfBuildSEAIsNotSupported(); + +const tmpdir = require('../common/tmpdir'); +const fixtures = require('../common/fixtures'); +const { copyFileSync } = require('fs'); + +const { spawnSyncAndAssert } = require('../common/child_process'); +tmpdir.refresh(); + +copyFileSync( + fixtures.path('sea', 'basic', 'sea-config.json'), + tmpdir.resolve('sea-config.json'), +); + +copyFileSync( + fixtures.path('sea', 'basic', 'sea.js'), + tmpdir.resolve('sea.js'), +); + +spawnSyncAndAssert( + process.execPath, + ['--build-sea', tmpdir.resolve('sea-config.json')], { + cwd: tmpdir.path, + argv0: 'argv0', + }, { + stdout: /Generated single executable/, + }); diff --git a/test/sea/test-single-executable-application-esm.js b/test/sea/test-single-executable-application-esm.js new file mode 100644 index 00000000000000..9f7366cb0e2405 --- /dev/null +++ b/test/sea/test-single-executable-application-esm.js @@ -0,0 +1,33 @@ +'use strict'; + +require('../common'); + +const { + buildSEA, + skipIfBuildSEAIsNotSupported, +} = require('../common/sea'); + +skipIfBuildSEAIsNotSupported(); + +// This tests the creation of a single executable application with an ESM +// entry point using the "mainFormat": "module" configuration. + +const tmpdir = require('../common/tmpdir'); +const fixtures = require('../common/fixtures'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); + +tmpdir.refresh(); + +const outputFile = buildSEA(fixtures.path('sea', 'esm')); + +spawnSyncAndExitWithoutError( + outputFile, + { + env: { + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + }, + }, + { + stdout: /ESM SEA executed successfully/, + }); diff --git a/test/sequential/test-watch-mode.mjs b/test/sequential/test-watch-mode.mjs index 4fb0f0acb377c3..a5cac129ad1c21 100644 --- a/test/sequential/test-watch-mode.mjs +++ b/test/sequential/test-watch-mode.mjs @@ -893,4 +893,33 @@ process.on('message', (message) => { await done(); } }); + + it('should respect the order for --env-file and --env-file-if-exists', async () => { + const envKey = `TEST_ENV_${Date.now()}`; + const jsFile = createTmpFile(`console.log('ENV: ' + process.env.${envKey});`); + + const envFile = createTmpFile(`${envKey}=base`, '.env'); + const envFileIfExists = createTmpFile(`${envKey}=override`, '.env'); + + const { done, restart } = runInBackground({ + args: [ + '--watch', + `--env-file=${envFile}`, + `--env-file-if-exists=${envFileIfExists}`, + jsFile, + ], + }); + + try { + const { stdout, stderr } = await restart(); + + assert.strictEqual(stderr, ''); + assert.deepStrictEqual(stdout, [ + 'ENV: override', + `Completed running ${inspect(jsFile)}. Waiting for file changes before restarting...`, + ]); + } finally { + await done(); + } + }); }); diff --git a/test/test-runner/test-output-tap-escape.mjs b/test/test-runner/test-output-tap-escape.mjs index f0b4471d5158bb..794e0fe94558f3 100644 --- a/test/test-runner/test-output-tap-escape.mjs +++ b/test/test-runner/test-output-tap-escape.mjs @@ -3,15 +3,13 @@ import '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; import { spawnAndAssert, - transform, - replaceWindowsLineEndings, - replaceTestDuration, + defaultTransform, ensureCwdIsProjectRoot, } from '../common/assertSnapshot.js'; ensureCwdIsProjectRoot(); await spawnAndAssert( fixtures.path('test-runner/output/tap_escape.js'), - transform(replaceWindowsLineEndings, replaceTestDuration), + defaultTransform, { flags: ['--test-reporter=tap'] }, ); diff --git a/test/wpt/status/FileAPI/blob.json b/test/wpt/status/FileAPI/blob.json index 8ea03bbc019992..3bbd15087a02ac 100644 --- a/test/wpt/status/FileAPI/blob.json +++ b/test/wpt/status/FileAPI/blob.json @@ -4,38 +4,20 @@ }, "Blob-constructor.any.js": { "fail": { - "note": "Depends on File API", "expected": [ - "A plain object with @@iterator should be treated as a sequence for the blobParts argument.", - "A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.", - "A String object should be treated as a sequence for the blobParts argument.", - "A Uint8Array object should be treated as a sequence for the blobParts argument.", + "blobParts not an object: boolean with Boolean.prototype[Symbol.iterator]", + "blobParts not an object: number with Number.prototype[Symbol.iterator]", + "blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]", + "blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]", "Getters and value conversions should happen in order until an exception is thrown.", - "Changes to the blobParts array should be reflected in the returned Blob (pop).", - "Changes to the blobParts array should be reflected in the returned Blob (unshift).", - "ToString should be called on elements of the blobParts array.", - "ArrayBuffer elements of the blobParts array should be supported.", + "options properties should be accessed in lexicographic order.", + "Arguments should be evaluated from left to right." + ], + "flaky": [ "Passing typed arrays as elements of the blobParts array should work.", + "Passing a Float16Array as element of the blobParts array should work.", "Passing a Float64Array as element of the blobParts array should work.", - "Passing BigInt typed arrays as elements of the blobParts array should work.", - "Array with two blobs", - "Array with two buffers", - "Array with two bufferviews", - "Array with mixed types", - "options properties should be accessed in lexicographic order.", - "Arguments should be evaluated from left to right.", - "Passing null (index 0) for options should use the defaults.", - "Passing null (index 0) for options should use the defaults (with newlines).", - "Passing undefined (index 1) for options should use the defaults.", - "Passing undefined (index 1) for options should use the defaults (with newlines).", - "Passing object \"[object Object]\" (index 2) for options should use the defaults.", - "Passing object \"[object Object]\" (index 2) for options should use the defaults (with newlines).", - "Passing object \"[object Object]\" (index 3) for options should use the defaults.", - "Passing object \"[object Object]\" (index 3) for options should use the defaults (with newlines).", - "Passing object \"/regex/\" (index 4) for options should use the defaults.", - "Passing object \"/regex/\" (index 4) for options should use the defaults (with newlines).", - "Passing function \"function() {}\" (index 5) for options should use the defaults.", - "Passing function \"function() {}\" (index 5) for options should use the defaults (with newlines)." + "Passing BigInt typed arrays as elements of the blobParts array should work." ] } }, @@ -43,6 +25,15 @@ "skip": "Depends on Web Workers API" }, "Blob-slice.any.js": { - "skip": "Depends on File API" + "fail": { + "expected": [ + "Slicing test: slice (1,1).", + "Slicing test: slice (1,3).", + "Slicing test: slice (1,5).", + "Slicing test: slice (1,7).", + "Slicing test: slice (1,8).", + "Slicing test: slice (1,9)." + ] + } } } diff --git a/tools/bootstrap/README.md b/tools/bootstrap/README.md deleted file mode 100644 index 0b93055811d2ac..00000000000000 --- a/tools/bootstrap/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Refer to [BUILDING.md](../../BUILDING.md#option-3-automated-install-with-boxstarter) for -instructions on how to build Node.js with boxstarter. diff --git a/tools/bootstrap/windows_boxstarter b/tools/bootstrap/windows_boxstarter deleted file mode 100644 index fc860180aab36f..00000000000000 --- a/tools/bootstrap/windows_boxstarter +++ /dev/null @@ -1,24 +0,0 @@ -# Boxstarter (http://boxstarter.org/) script for Node.js prerequisites -# -# To install either open this link in IE or Edge: -# http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter -# -# Or run those commands in an elevated Powershell terminal: -# iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')) -# get-boxstarter -Force -# Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter -DisableReboots -# -# For more detail see -# https://github.com/nodejs/node/blob/HEAD/tools/bootstrap/README.md -# - -# Git and Unix tools will be added to the PATH -choco install git -params /GitAndUnixToolsOnPath -y -choco install python3 -y - -# Installs VS 2022 Build Tools -choco install visualstudio2022buildtools -y -choco install visualstudio2022-workload-vctools -y --params="--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.NetCore.Component.SDK --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset" - -# NASM -choco install nasm -y diff --git a/tools/dep_updaters/update-test426-fixtures.sh b/tools/dep_updaters/update-test426-fixtures.sh new file mode 100755 index 00000000000000..730e7b67e35aa1 --- /dev/null +++ b/tools/dep_updaters/update-test426-fixtures.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +set -ex + +BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) + +TARGET_DIR="$BASE_DIR/test/fixtures/test426" +README="$BASE_DIR/test/test426/README.md" +TARBALL_URL=$(curl -fsIo /dev/null -w '%header{Location}' https://github.com/tc39/source-map-tests/archive/HEAD.tar.gz) +SHA=$(basename "$TARBALL_URL") + +CURRENT_SHA=$(sed -n 's#^.*https://github.com/tc39/source-map-tests/commit/\([0-9a-f]*\).*$#\1#p' "$README") + +if [ "$CURRENT_SHA" = "$SHA" ]; then + echo "Already up-to-date" + exit 0 +fi + +rm -rf "$TARGET_DIR" +mkdir "$TARGET_DIR" +curl -f "$TARBALL_URL" | tar -xz --strip-components 1 -C "$TARGET_DIR" + +TMP_FILE=$(mktemp) +sed "s/$CURRENT_SHA/$SHA/" "$README" > "$TMP_FILE" +mv "$TMP_FILE" "$README" + +# The last line of the script should always print the new version, +# as we need to add it to $GITHUB_ENV variable. +echo "NEW_VERSION=$SHA" diff --git a/tools/doc/package-lock.json b/tools/doc/package-lock.json index dc3a589436d012..dfaf0b9a084ef3 100644 --- a/tools/doc/package-lock.json +++ b/tools/doc/package-lock.json @@ -1695,9 +1695,9 @@ } }, "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index b6cb05dea5c3f9..6b0f01c1e614b5 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -8,24 +8,24 @@ "name": "eslint-tools", "version": "0.0.0", "dependencies": { - "@babel/core": "^7.28.5", - "@babel/eslint-parser": "^7.28.5", - "@babel/plugin-syntax-import-source": "^7.27.1", + "@babel/core": "^7.28.6", + "@babel/eslint-parser": "^7.28.6", + "@babel/plugin-syntax-import-source": "^7.28.6", "@eslint/markdown": "^7.5.1", - "@stylistic/eslint-plugin": "^5.6.1", + "@stylistic/eslint-plugin": "^5.7.1", "eslint": "^9.39.2", "eslint-formatter-tap": "^9.0.1", - "eslint-plugin-jsdoc": "^61.5.0", - "globals": "^16.5.0" + "eslint-plugin-jsdoc": "^62.4.1", + "globals": "^17.2.0" } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -34,30 +34,29 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.6.tgz", + "integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/generator": "^7.28.6", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -74,9 +73,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.5.tgz", - "integrity": "sha512-fcdRcWahONYo+JRnJg1/AekOacGvKx12Gu0qXJXFi2WBqQA1i7+O5PaxRB7kxE/Op94dExnCiiar6T09pvdHpA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.6.tgz", + "integrity": "sha512-QGmsKi2PBO/MHSQk+AAgA9R6OHQr+VqnniFE0eMWZcVcfBZoA2dKn2hUsl3Csg/Plt9opRUWdY7//VXsrIlEiA==", "license": "MIT", "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -92,13 +91,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.0.tgz", + "integrity": "sha512-vSH118/wwM/pLR38g/Sgk05sNtro6TlTJKuiMXDaZqPUfjTFcudpCOt00IhOfj+1BFAX+UFAlzCU+6WXr3GLFQ==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -108,12 +107,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -133,27 +132,27 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -163,9 +162,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -199,25 +198,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -227,12 +226,12 @@ } }, "node_modules/@babel/plugin-syntax-import-source": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-source/-/plugin-syntax-import-source-7.27.1.tgz", - "integrity": "sha512-8MOQQZ+gIKsoB0RK9rpVsX+EXgiLHDAf4gH8ko4dIki5w1VeM6uBLv7dPZb5gGFVxoo0135wmpZ930HPqMrINw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-source/-/plugin-syntax-import-source-7.28.6.tgz", + "integrity": "sha512-lprDfFvdnplRDO3BZOXM/LuWQPLyYQ7M31HgjVOpmh+XLHakpDJOi8t4+2T/dk5ozlyz4nByIgE+0Xb4unYiOg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -242,31 +241,31 @@ } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -274,9 +273,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", @@ -287,19 +286,19 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.76.0.tgz", - "integrity": "sha512-g+RihtzFgGTx2WYCuTHbdOXJeAlGnROws0TeALx9ow/ZmOROOZkVg5wp/B44n0WJgI4SQFP1eWM2iRPlU2Y14w==", + "version": "0.83.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.83.0.tgz", + "integrity": "sha512-e1MHSEPJ4m35zkBvNT6kcdeH1SvMaJDsPC3Xhfseg3hvF50FUE3f46Yn36jgbrPYYXezlWUQnevv23c+lx2MCA==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.8", - "@typescript-eslint/types": "^8.46.0", - "comment-parser": "1.4.1", - "esquery": "^1.6.0", - "jsdoc-type-pratt-parser": "~6.10.0" + "@typescript-eslint/types": "^8.53.1", + "comment-parser": "1.4.5", + "esquery": "^1.7.0", + "jsdoc-type-pratt-parser": "~7.1.0" }, "engines": { - "node": ">=20.11.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, "node_modules/@es-joy/resolve.exports": { @@ -312,9 +311,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" @@ -595,13 +594,13 @@ } }, "node_modules/@stylistic/eslint-plugin": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.6.1.tgz", - "integrity": "sha512-JCs+MqoXfXrRPGbGmho/zGS/jMcn3ieKl/A8YImqib76C8kjgZwq5uUFzc30lJkMvcchuRn6/v8IApLxli3Jyw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.7.1.tgz", + "integrity": "sha512-zjTUwIsEfT+k9BmXwq1QEFYsb4afBlsI1AXFyWQBgggMzwBFOuu92pGrE5OFx90IOjNl+lUbQoTG7f8S0PkOdg==", "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.9.0", - "@typescript-eslint/types": "^8.47.0", + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/types": "^8.53.1", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "estraverse": "^5.3.0", @@ -669,9 +668,9 @@ "license": "MIT" }, "node_modules/@typescript-eslint/types": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.0.tgz", - "integrity": "sha512-cQMcGQQH7kwKoVswD1xdOytxQR60MWKM1di26xSUtxehaDs/32Zpqsu5WJlXTtTTqyAVK8R7hvsUnIXRS+bjvA==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.54.0.tgz", + "integrity": "sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -686,7 +685,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -756,9 +754,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.32", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz", - "integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==", + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -775,9 +773,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", - "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", "funding": [ { "type": "opencollective", @@ -793,13 +791,12 @@ } ], "license": "MIT", - "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.8.25", - "caniuse-lite": "^1.0.30001754", - "electron-to-chromium": "^1.5.249", + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", - "update-browserslist-db": "^1.1.4" + "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" @@ -818,9 +815,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001757", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", - "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", + "version": "1.0.30001766", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001766.tgz", + "integrity": "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA==", "funding": [ { "type": "opencollective", @@ -892,9 +889,9 @@ "license": "MIT" }, "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.5.tgz", + "integrity": "sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==", "license": "MIT", "engines": { "node": ">= 12.0.0" @@ -985,9 +982,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.262", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.262.tgz", - "integrity": "sha512-NlAsMteRHek05jRUxUR0a5jpjYq9ykk6+kO0yRaMi5moe7u0fVIOeQ3Y30A8dIiWFBNUoQGi1ljb1i5VtS9WQQ==", + "version": "1.5.283", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.283.tgz", + "integrity": "sha512-3vifjt1HgrGW/h76UEeny+adYApveS9dH2h3p57JYzBSXJIKUJAvtmIytDKjcSCt9xHfrNCFJ7gts6vkhuq++w==", "license": "ISC" }, "node_modules/escalade": { @@ -1016,7 +1013,6 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -1084,19 +1080,19 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "61.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-61.5.0.tgz", - "integrity": "sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==", + "version": "62.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-62.4.1.tgz", + "integrity": "sha512-HgX2iN4j104D/mCUqRbhtzSZbph+KO9jfMHiIJjJ19Q+IwLQ5Na2IqvOJYq4S+4kgvEk1w6KYF4vVus6H2wcHg==", "license": "BSD-3-Clause", "dependencies": { - "@es-joy/jsdoccomment": "~0.76.0", + "@es-joy/jsdoccomment": "~0.83.0", "@es-joy/resolve.exports": "1.2.0", "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", + "comment-parser": "1.4.5", "debug": "^4.4.3", "escape-string-regexp": "^4.0.0", - "espree": "^10.4.0", - "esquery": "^1.6.0", + "espree": "^11.1.0", + "esquery": "^1.7.0", "html-entities": "^2.6.0", "object-deep-merge": "^2.0.0", "parse-imports-exports": "^0.2.4", @@ -1105,12 +1101,41 @@ "to-valid-identifier": "^1.0.0" }, "engines": { - "node": ">=20.11.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.0.tgz", + "integrity": "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==", + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/espree": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.0.tgz", + "integrity": "sha512-WFWYhO1fV4iYkqOOvq8FbqIhr2pYfoDY0kCotMkDeNtGpiGGkZ1iov2u8ydjtgM8yF8rzK7oaTbw2NAzbAbehw==", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", @@ -1212,9 +1237,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -1367,9 +1392,9 @@ } }, "node_modules/globals": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", - "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz", + "integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==", "license": "MIT", "engines": { "node": ">=18" @@ -1483,9 +1508,9 @@ } }, "node_modules/jsdoc-type-pratt-parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-6.10.0.tgz", - "integrity": "sha512-+LexoTRyYui5iOhJGn13N9ZazL23nAHGkXsa1p/C8yeq79WRfLBag6ZZ0FQG2aRoc9yfo59JT9EYCQonOkHKkQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-7.1.0.tgz", + "integrity": "sha512-SX7q7XyCwzM/MEDCYz0l8GgGbJAACGFII9+WfNYr5SLEKukHWRy2Jk3iWRe7P+lpYJNs7oQ+OSei4JtKGUjd7A==", "license": "MIT", "engines": { "node": ">=20.0.0" @@ -2760,9 +2785,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "funding": [ { "type": "opencollective", diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 5919c2e0930e43..b20e13bae8d2c1 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -3,14 +3,14 @@ "version": "0.0.0", "private": true, "dependencies": { - "@babel/core": "^7.28.5", - "@babel/eslint-parser": "^7.28.5", - "@babel/plugin-syntax-import-source": "^7.27.1", + "@babel/core": "^7.28.6", + "@babel/eslint-parser": "^7.28.6", + "@babel/plugin-syntax-import-source": "^7.28.6", "@eslint/markdown": "^7.5.1", - "@stylistic/eslint-plugin": "^5.6.1", + "@stylistic/eslint-plugin": "^5.7.1", "eslint": "^9.39.2", "eslint-formatter-tap": "^9.0.1", - "eslint-plugin-jsdoc": "^61.5.0", - "globals": "^16.5.0" + "eslint-plugin-jsdoc": "^62.4.1", + "globals": "^17.2.0" } } diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py index abd11e1dbda8d4..436767e633e1f4 100755 --- a/tools/generate_config_gypi.py +++ b/tools/generate_config_gypi.py @@ -58,7 +58,7 @@ def translate_config(out_dir, config, v8_config): 'llvm_version': 13, 'napi_build_version': config['napi_build_version'], 'node_builtin_shareable_builtins': - eval(config['node_builtin_shareable_builtins']), + json.loads(config['node_builtin_shareable_builtins']), 'node_module_version': int(config['node_module_version']), 'node_use_openssl': config['node_use_openssl'], 'node_use_amaro': config['node_use_amaro'], @@ -102,7 +102,8 @@ def main(): # Write output. with open(args.target, 'w') as f: - f.write(repr(translate_config(args.out_dir, config, v8_config))) + f.write(json.dumps(translate_config(args.out_dir, config, v8_config), + sort_keys=True)) # Write depfile. Force regenerating config.gypi when GN configs change. if args.dep_file: diff --git a/tools/nix/v8.nix b/tools/nix/v8.nix new file mode 100644 index 00000000000000..8a8ff478cf5204 --- /dev/null +++ b/tools/nix/v8.nix @@ -0,0 +1,127 @@ +# Derivation for Node.js CI (not officially supported for regular applications) +{ + pkgs ? import ./pkgs.nix { }, + buildInputs ? [ ], + configureFlags ? [ ], + needsRustCompiler ? false, +}: + +let + nodejs = pkgs.nodejs-slim_latest; + + version = + let + v8Version = builtins.match ( + ".*#define V8_MAJOR_VERSION ([0-9]+).*" + + "#define V8_MINOR_VERSION ([0-9]+).*" + + "#define V8_BUILD_NUMBER ([0-9]+).*" + + "#define V8_PATCH_LEVEL ([0-9]+).*" + ) (builtins.readFile ../../deps/v8/include/v8-version.h); + v8_embedder_string = builtins.match ".*'v8_embedder_string': '-(node.[0-9]+)'.*" ( + builtins.readFile ../../common.gypi + ); + in + if v8Version == null || v8_embedder_string == null then + throw "V8 version not found" + else + "${builtins.elemAt v8Version 0}.${builtins.elemAt v8Version 1}.${builtins.elemAt v8Version 2}.${builtins.elemAt v8Version 3}-${builtins.elemAt v8_embedder_string 0}"; +in +pkgs.stdenv.mkDerivation (finalAttrs: { + pname = "v8"; + inherit version; + src = + let + inherit (pkgs.lib) fileset; + in + fileset.toSource { + root = ../../.; + fileset = fileset.unions [ + ../../common.gypi + ../../configure + ../../configure.py + ../../deps/inspector_protocol/inspector_protocol.gyp + ../../deps/ncrypto/ncrypto.gyp + ../../deps/v8 + ../../node.gyp + ../../node.gypi + ../../src/inspector/node_inspector.gypi + ../../src/node_version.h + ../../tools/configure.d + ../../tools/getmoduleversion.py + ../../tools/getnapibuildversion.py + ../../tools/gyp + ../../tools/gyp_node.py + ../../tools/icu/icu_versions.json + ../../tools/icu/icu-system.gyp + ../../tools/utils.py + ../../tools/v8_gypfiles + ]; + }; + + # We need to patch tools/gyp/ to work from within Nix sandbox + patches = pkgs.lib.optional pkgs.stdenv.buildPlatform.isDarwin ( + pkgs.fetchpatch2 { + url = "https://github.com/NixOS/nixpkgs/raw/2343bbb58f99267223bc2aac4fc9ea301a155a16/pkgs/development/web/nodejs/gyp-patches-set-fallback-value-for-CLT-darwin.patch"; + hash = "sha256-BLF3mf3ME+ED1Qt84Qp9tswJ+3lVnEa10Zr/xdy+IhE="; + includes = [ "tools/gyp/*" ]; + } + ); + + inherit (nodejs) configureScript; + inherit configureFlags buildInputs; + + nativeBuildInputs = + nodejs.nativeBuildInputs + ++ [ + pkgs.patchutils + pkgs.validatePkgConfig + ] + ++ pkgs.lib.optionals needsRustCompiler [ + pkgs.cargo + pkgs.rustc + ]; + + buildPhase = '' + ninja -v -C out/Release v8_snapshot v8_libplatform + ''; + installPhase = '' + ${ + if pkgs.stdenv.buildPlatform.isDarwin then + # Darwin is excluded from creating thin archive in tools/gyp/pylib/gyp/generator/ninja.py:2488 + "install -Dm644 out/Release/lib* -t $out/lib" + else + # On other platforms, we need to create non-thin archive. + '' + mkdir -p $out/lib + for a in out/Release/obj/tools/v8_gypfiles/lib*; do + base=$(basename "$a") + dir=$(dirname "$a") + + ( + cd "$dir" + "$AR" rc "$out/lib/$base" $("$AR" t "$base") + ) + + "$RANLIB" "$out/lib/$base" + done + '' + } + libs=$(for f in $out/lib/lib*.a; do + b=$(basename "$f" .a) + printf " -l%s" "''${b#lib}" + done) + + # copy v8 headers + cp -r deps/v8/include $out/ + + # create a pkgconfig file for v8 + mkdir -p $out/lib/pkgconfig + cat -> $out/lib/pkgconfig/v8.pc << EOF + Name: v8 + Description: V8 JavaScript Engine build for Node.js CI + Version: ${version} + Libs: -L$out/lib $libs + Cflags: -I$out/include + EOF + ''; +}) diff --git a/vcbuild.bat b/vcbuild.bat index 81bdc64d1dfd23..1989557b5dc2a8 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -72,6 +72,7 @@ set doc= set extra_msbuild_args= set compile_commands= set cfg= +set v8temporal= set v8windbg= set exit_code=0 @@ -97,6 +98,7 @@ if /i "%1"=="sign" set sign=1&goto arg-ok if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok if /i "%1"=="nonpm" set nonpm=1&goto arg-ok if /i "%1"=="ltcg" set ltcg=1&goto arg-ok +if /i "%1"=="v8temporal" set v8temporal=1&goto arg-ok if /i "%1"=="v8windbg" set v8windbg=1&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok if /i "%1"=="test" set test_args=%test_args% %common_test_suites%&set lint_cpp=1&set lint_js=1&set lint_md=1&goto arg-ok @@ -214,6 +216,7 @@ if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose if defined ccache_path set configure_flags=%configure_flags% --use-ccache-win if defined compile_commands set configure_flags=%configure_flags% -C if defined cfg set configure_flags=%configure_flags% --control-flow-guard +if defined v8temporal set configure_flags=%configure_flags% --v8-enable-temporal-support if defined v8windbg set configure_flags=%configure_flags% --enable-v8windbg if "%target_arch%"=="x86" (