diff --git a/.github/workflows/ci-libnpmaccess.yml b/.github/workflows/ci-libnpmaccess.yml index b25bc613a9885..d0cac65dc7913 100644 --- a/.github/workflows/ci-libnpmaccess.yml +++ b/.github/workflows/ci-libnpmaccess.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmaccess/** - branches: - - '*' push: paths: - workspaces/libnpmaccess/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmaccess - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmaccess test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmaccess --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmaccess diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml index 5ff0fdc9ff7aa..0ff657222c834 100644 --- a/.github/workflows/ci-libnpmdiff.yml +++ b/.github/workflows/ci-libnpmdiff.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmdiff/** - branches: - - '*' push: paths: - workspaces/libnpmdiff/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmdiff - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmdiff test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmdiff --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmdiff diff --git a/.github/workflows/ci-libnpmexec.yml b/.github/workflows/ci-libnpmexec.yml index 011ae630ed678..a802c068e7dc0 100644 --- a/.github/workflows/ci-libnpmexec.yml +++ b/.github/workflows/ci-libnpmexec.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmexec/** - branches: - - '*' push: paths: - workspaces/libnpmexec/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmexec - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmexec test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmexec --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmexec diff --git a/.github/workflows/ci-libnpmfund.yml b/.github/workflows/ci-libnpmfund.yml index 3ce4de532cb7a..f00891ddb55ae 100644 --- a/.github/workflows/ci-libnpmfund.yml +++ b/.github/workflows/ci-libnpmfund.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmfund/** - branches: - - '*' push: paths: - workspaces/libnpmfund/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmfund - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmfund test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmfund --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmfund diff --git a/.github/workflows/ci-libnpmhook.yml b/.github/workflows/ci-libnpmhook.yml index 1cd823a430139..f10badea15496 100644 --- a/.github/workflows/ci-libnpmhook.yml +++ b/.github/workflows/ci-libnpmhook.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmhook/** - branches: - - '*' push: paths: - workspaces/libnpmhook/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmhook - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmhook test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmhook --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmhook diff --git a/.github/workflows/ci-libnpmorg.yml b/.github/workflows/ci-libnpmorg.yml index e36adeda1fa88..3f43b206f3f57 100644 --- a/.github/workflows/ci-libnpmorg.yml +++ b/.github/workflows/ci-libnpmorg.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmorg/** - branches: - - '*' push: paths: - workspaces/libnpmorg/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmorg - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmorg test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmorg --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmorg diff --git a/.github/workflows/ci-libnpmpack.yml b/.github/workflows/ci-libnpmpack.yml index b2f1c3e1772e3..fd29289bc7410 100644 --- a/.github/workflows/ci-libnpmpack.yml +++ b/.github/workflows/ci-libnpmpack.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmpack/** - branches: - - '*' push: paths: - workspaces/libnpmpack/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmpack - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmpack test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmpack --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmpack diff --git a/.github/workflows/ci-libnpmpublish.yml b/.github/workflows/ci-libnpmpublish.yml index 3d26cf8cda264..efe1f1918bea0 100644 --- a/.github/workflows/ci-libnpmpublish.yml +++ b/.github/workflows/ci-libnpmpublish.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmpublish/** - branches: - - '*' push: paths: - workspaces/libnpmpublish/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmpublish - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmpublish test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmpublish --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmpublish diff --git a/.github/workflows/ci-libnpmsearch.yml b/.github/workflows/ci-libnpmsearch.yml index 08c45451df000..832f850d390ea 100644 --- a/.github/workflows/ci-libnpmsearch.yml +++ b/.github/workflows/ci-libnpmsearch.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmsearch/** - branches: - - '*' push: paths: - workspaces/libnpmsearch/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmsearch - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmsearch test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmsearch --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmsearch diff --git a/.github/workflows/ci-libnpmteam.yml b/.github/workflows/ci-libnpmteam.yml index 18a37df8c25ee..fa6c5929e3063 100644 --- a/.github/workflows/ci-libnpmteam.yml +++ b/.github/workflows/ci-libnpmteam.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmteam/** - branches: - - '*' push: paths: - workspaces/libnpmteam/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmteam - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmteam test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmteam --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmteam diff --git a/.github/workflows/ci-libnpmversion.yml b/.github/workflows/ci-libnpmversion.yml index 5b4719d8b3b64..0b0c0fcf780a9 100644 --- a/.github/workflows/ci-libnpmversion.yml +++ b/.github/workflows/ci-libnpmversion.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/libnpmversion/** - branches: - - '*' push: paths: - workspaces/libnpmversion/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmversion - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/libnpmversion test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/libnpmversion --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/libnpmversion diff --git a/.github/workflows/ci-npmcli-arborist.yml b/.github/workflows/ci-npmcli-arborist.yml index d0cfbe00a8b8f..c2fe8ca1dabdc 100644 --- a/.github/workflows/ci-npmcli-arborist.yml +++ b/.github/workflows/ci-npmcli-arborist.yml @@ -4,8 +4,6 @@ on: pull_request: paths: - workspaces/arborist/** - branches: - - '*' push: paths: - workspaces/arborist/** @@ -20,57 +18,46 @@ jobs: steps: # Checkout the npm/cli repo - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 + - uses: actions/setup-node@v2 with: - node-version: 16.x - cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest -w workspaces/arborist - env: - DEPLOY_VERSION: testing + node-version: '16' + - run: npm i --prefer-online -g npm@latest + - run: npm i + - run: npm run lint -w workspaces/arborist test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests, but not if we're just gonna do coveralls later anyway - - name: Run Tap tests - run: node ./bin/npm-cli.js run -w workspaces/arborist --ignore-scripts test -- -t600 -Rbase -c + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + - name: Update to workable npm (windows) + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i + - run: npm test --ignore-scripts -w workspaces/arborist diff --git a/.github/workflows/release-please-libnpmaccess.yml b/.github/workflows/release-please-libnpmaccess.yml new file mode 100644 index 0000000000000..564c71d82f3f0 --- /dev/null +++ b/.github/workflows/release-please-libnpmaccess.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmaccess + +on: + push: + paths: + - workspaces/libnpmaccess/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmaccess/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmdiff.yml b/.github/workflows/release-please-libnpmdiff.yml new file mode 100644 index 0000000000000..f1b1d2a6d4c6c --- /dev/null +++ b/.github/workflows/release-please-libnpmdiff.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmdiff + +on: + push: + paths: + - workspaces/libnpmdiff/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmdiff/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmexec.yml b/.github/workflows/release-please-libnpmexec.yml new file mode 100644 index 0000000000000..31818b73a2908 --- /dev/null +++ b/.github/workflows/release-please-libnpmexec.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmexec + +on: + push: + paths: + - workspaces/libnpmexec/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmexec/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmfund.yml b/.github/workflows/release-please-libnpmfund.yml new file mode 100644 index 0000000000000..6bde4c016c903 --- /dev/null +++ b/.github/workflows/release-please-libnpmfund.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmfund + +on: + push: + paths: + - workspaces/libnpmfund/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmfund/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmhook.yml b/.github/workflows/release-please-libnpmhook.yml new file mode 100644 index 0000000000000..6b8b864035808 --- /dev/null +++ b/.github/workflows/release-please-libnpmhook.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmhook + +on: + push: + paths: + - workspaces/libnpmhook/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmhook/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmorg.yml b/.github/workflows/release-please-libnpmorg.yml new file mode 100644 index 0000000000000..d2a757fb30cb0 --- /dev/null +++ b/.github/workflows/release-please-libnpmorg.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmorg + +on: + push: + paths: + - workspaces/libnpmorg/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmorg/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmpack.yml b/.github/workflows/release-please-libnpmpack.yml new file mode 100644 index 0000000000000..881b39809ca0d --- /dev/null +++ b/.github/workflows/release-please-libnpmpack.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmpack + +on: + push: + paths: + - workspaces/libnpmpack/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmpack/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmpublish.yml b/.github/workflows/release-please-libnpmpublish.yml new file mode 100644 index 0000000000000..c6763f199e5bd --- /dev/null +++ b/.github/workflows/release-please-libnpmpublish.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmpublish + +on: + push: + paths: + - workspaces/libnpmpublish/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmpublish/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmsearch.yml b/.github/workflows/release-please-libnpmsearch.yml new file mode 100644 index 0000000000000..d004ddcd8c816 --- /dev/null +++ b/.github/workflows/release-please-libnpmsearch.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmsearch + +on: + push: + paths: + - workspaces/libnpmsearch/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmsearch/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmteam.yml b/.github/workflows/release-please-libnpmteam.yml new file mode 100644 index 0000000000000..b4df1702571fa --- /dev/null +++ b/.github/workflows/release-please-libnpmteam.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmteam + +on: + push: + paths: + - workspaces/libnpmteam/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmteam/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-libnpmversion.yml b/.github/workflows/release-please-libnpmversion.yml new file mode 100644 index 0000000000000..bddb62d6a74a0 --- /dev/null +++ b/.github/workflows/release-please-libnpmversion.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please libnpmversion + +on: + push: + paths: + - workspaces/libnpmversion/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/libnpmversion/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/.github/workflows/release-please-npmcli-arborist.yml b/.github/workflows/release-please-npmcli-arborist.yml new file mode 100644 index 0000000000000..47ee0c86616a6 --- /dev/null +++ b/.github/workflows/release-please-npmcli-arborist.yml @@ -0,0 +1,29 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: Node Workspace Release Please @npmcli/arborist + +on: + push: + paths: + - workspaces/arborist/** + branches: + - release-next + - latest + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v2 + id: release + with: + release-type: node + monorepo-tags: true + path: workspaces/arborist/** + # If you change changelog-types be sure to also update commitlintrc.js + changelog-types: > + [{"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"deps","section":"Dependencies","hidden":false}, + {"type":"chore","hidden":true}] diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 10951adf348d8..cd30f5d275fbd 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -241,6 +241,7 @@ readme* /is-stream /is-string /is-symbol +/is-typedarray /is-weakref /is-whitespace-character /is-windows diff --git a/node_modules/@gar/promisify/LICENSE.md b/node_modules/@gar/promisify/LICENSE.md new file mode 100644 index 0000000000000..64f773240bed1 --- /dev/null +++ b/node_modules/@gar/promisify/LICENSE.md @@ -0,0 +1,10 @@ +The MIT License (MIT) + +Copyright © 2020-2022 Michael Garvin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/@gar/promisify/package.json b/node_modules/@gar/promisify/package.json index b5140876c2cb7..d0ce69b2f7c0e 100644 --- a/node_modules/@gar/promisify/package.json +++ b/node_modules/@gar/promisify/package.json @@ -1,6 +1,6 @@ { "name": "@gar/promisify", - "version": "1.1.2", + "version": "1.1.3", "description": "Promisify an entire class or object", "main": "index.js", "repository": { diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js index 82e369938db9c..7c34de8014b8e 100644 --- a/node_modules/@npmcli/config/lib/index.js +++ b/node_modules/@npmcli/config/lib/index.js @@ -566,6 +566,7 @@ class Config { } const cliWorkspaces = this[_get]('workspaces', 'cli') + const isGlobal = this[_get]('global') || this[_get]('location') === 'global' for (const p of walkUp(this.cwd)) { const hasNodeModules = await stat(resolve(p, 'node_modules')) @@ -579,8 +580,8 @@ class Config { if (!this.localPrefix && (hasNodeModules || hasPackageJson)) { this.localPrefix = p - // if workspaces are disabled, return now - if (cliWorkspaces === false) { + // if workspaces are disabled, or we're in global mode, return now + if (cliWorkspaces === false || isGlobal) { return } diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json index ea03f957f83c5..c36e06230a976 100644 --- a/node_modules/@npmcli/config/package.json +++ b/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "4.0.0", + "version": "4.0.1", "files": [ "bin", "lib" @@ -30,11 +30,11 @@ "coverage-map": "map.js" }, "devDependencies": { - "@npmcli/template-oss": "^2.7.1", + "@npmcli/template-oss": "^2.8.1", "tap": "^15.1.6" }, "dependencies": { - "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/map-workspaces": "^2.0.1", "ini": "^2.0.0", "mkdirp-infer-owner": "^2.0.0", "nopt": "^5.0.0", @@ -47,6 +47,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.7.1" + "version": "2.8.1" } } diff --git a/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.js b/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.js new file mode 100644 index 0000000000000..7eef327e92527 --- /dev/null +++ b/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.js @@ -0,0 +1 @@ +(()=>{var t={10:t=>{const i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,e=(t,i)=>{const s=`LRU_CACHE_OPTION_${t}`;l(s)&&o(s,`${t} option`,`options.${i}`,d)},h=(t,i)=>{const s=`LRU_CACHE_METHOD_${t}`;if(l(s)){const{prototype:e}=d,{get:h}=Object.getOwnPropertyDescriptor(e,t);o(s,`${t} method`,`cache.${i}()`,h)}},l=t=>!(process.noDeprecation||s.has(t)),o=(t,i,e,h)=>{s.add(t),process.emitWarning(`The ${i} is deprecated. Please use ${e} instead.`,"DeprecationWarning",t,h)},n=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>n(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?r:null:null;class r extends Array{constructor(t){super(t),this.fill(0)}}class p{constructor(t){const i=a(t);this.heap=new i(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class d{constructor(t={}){const{max:i,ttl:s,ttlResolution:h=1,ttlAutopurge:l,updateAgeOnGet:o,allowStale:r,dispose:c,disposeAfter:f,noDisposeOnSet:u,noUpdateTTL:z,maxSize:v,sizeCalculation:y}=t,{length:g,maxAge:m,stale:S}=t instanceof d?{}:t;if(!n(i))throw new TypeError("max option must be an integer");const x=a(i);if(!x)throw new Error("invalid max value: "+i);if(this.max=i,this.maxSize=v||0,this.sizeCalculation=y||g,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculating set to non-function")}if(this.keyMap=new Map,this.keyList=new Array(i).fill(null),this.valList=new Array(i).fill(null),this.next=new x(i),this.prev=new x(i),this.head=0,this.tail=0,this.free=new p(i),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!z,this.maxSize){if(!n(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!r||!!S,this.updateAgeOnGet=!!o,this.ttlResolution=n(h)||0===h?h:1,this.ttlAutopurge=!!l,this.ttl=s||m||0,this.ttl){if(!n(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}S&&e("stale","allowStale"),m&&e("maxAge","ttl"),g&&e("length","sizeCalculation")}initializeTTLTracking(){this.ttls=new r(this.max),this.starts=new r(this.max),this.setItemTTL=(t,s)=>{if(this.starts[t]=0!==s?i.now():0,this.ttls[t]=s,0!==s&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),s+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?i.now():0};let t=0;const s=()=>{const s=i.now();if(this.ttlResolution>0){t=s;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return s};this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||s())-this.starts[i]>this.ttls[i]}updateItemAge(t){}setItemTTL(t,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new r(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.addItemSize=(t,i,s,e,h)=>{const l=e||(h?h(i,s):0);this.sizes[t]=n(l)?l:0;const o=this.maxSize-this.sizes[t];for(;this.calculatedSize>o;)this.evict();this.calculatedSize+=this.sizes[t]},this.delete=t=>{if(0!==this.size){const i=this.keyMap.get(t);void 0!==i&&(this.calculatedSize-=this.sizes[i])}return d.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,i,s,e,h){}*indexes(){if(this.size)for(let t=this.tail;this.isStale(t)||(yield t),t!==this.head;t=this.prev[t]);}*rindexes(){if(this.size)for(let t=this.head;this.isStale(t)||(yield t),t!==this.tail;t=this.next[t]);}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,i={}){for(const s of this.indexes())if(t(this.valList[s],this.keyList[s],this))return this.get(this.keyList[s],i)}forEach(t,i=this){for(const s of this.indexes())t.call(i,this.valList[s],this.keyList[s],this)}rforEach(t,i=this){for(const s of this.rindexes())t.call(i,this.valList[s],this.keyList[s],this)}get prune(){return h("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;if(this.size)for(let i=this.head;;i=this.next[i]){const s=i===this.tail;if(this.isStale(i)&&(this.delete(this.keyList[i]),t=!0),s)break}return t}dump(){const t=[];for(const i of this.indexes()){const s=this.keyList[i],e={value:this.valList[i]};this.ttls&&(e.ttl=this.ttls[i]),this.sizes&&(e.size=this.sizes[i]),t.unshift([s,e])}return t}load(t){this.clear();for(const[i,s]of t)this.set(i,s.value,s)}dispose(t,i,s){}set(t,i,{ttl:s=this.ttl,noDisposeOnSet:e=this.noDisposeOnSet,size:h=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){let n=0===this.size?void 0:this.keyMap.get(t);if(void 0===n)n=this.newIndex(),this.keyList[n]=t,this.valList[n]=i,this.keyMap.set(t,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,i,t,h,l),o=!1;else{const s=this.valList[n];i!==s&&(e||(this.dispose(s,t,"set"),this.disposeAfter&&this.disposed.push([s,t,"set"])),this.removeItemSize(n),this.valList[n]=i,this.addItemSize(n,i,t,h,l)),this.moveToTail(n)}if(0===s||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(n,s),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max?this.evict():0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(),t}}evict(){const t=this.head,i=this.keyList[t],s=this.valList[t];return this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"]),this.removeItemSize(t),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:i=this.allowStale}={}){const s=this.keyMap.get(t);if(void 0!==s&&(i||!this.isStale(s)))return this.valList[s]}get(t,{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet}={}){const e=this.keyMap.get(t);if(void 0!==e){if(this.isStale(e)){const s=i?this.valList[e]:void 0;return this.delete(t),s}return this.moveToTail(e),s&&this.updateItemAge(e),this.valList[e]}}connect(t,i){this.prev[i]=t,this.next[t]=i}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return h("del","delete"),this.delete}delete(t){let i=!1;if(0!==this.size){const s=this.keyMap.get(t);void 0!==s&&(i=!0,1===this.size?this.clear():(this.removeItemSize(s),this.dispose(this.valList[s],t,"delete"),this.disposeAfter&&this.disposed.push([this.valList[s],t,"delete"]),this.keyMap.delete(t),this.keyList[s]=null,this.valList[s]=null,s===this.tail?this.tail=this.prev[s]:s===this.head?this.head=this.next[s]:(this.next[this.prev[s]]=this.next[s],this.prev[this.next[s]]=this.prev[s]),this.size--,this.free.push(s)))}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return i}clear(){if(this.dispose!==d.prototype.dispose)for(const t of this.rindexes())this.dispose(this.valList[t],this.keyList[t],"delete");if(this.disposeAfter)for(const t of this.rindexes())this.disposed.push([this.valList[t],this.keyList[t],"delete"]);if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return h("reset","clear"),this.clear}get length(){return((t,i)=>{const s="LRU_CACHE_PROPERTY_length";if(l(s)){const{prototype:i}=d,{get:e}=Object.getOwnPropertyDescriptor(i,t);o(s,"length property","cache.size",e)}})("length"),this.size}}t.exports=d}},i={},s=function s(e){var h=i[e];if(void 0!==h)return h.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,s),l.exports}(10);module.exports=s})(); \ No newline at end of file diff --git a/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.mjs b/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.mjs new file mode 100644 index 0000000000000..3a4d674c07a41 --- /dev/null +++ b/node_modules/@npmcli/git/node_modules/lru-cache/bundle/main.mjs @@ -0,0 +1 @@ +var t={10:t=>{const i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,e=(t,i)=>{const s=`LRU_CACHE_OPTION_${t}`;l(s)&&o(s,`${t} option`,`options.${i}`,d)},h=(t,i)=>{const s=`LRU_CACHE_METHOD_${t}`;if(l(s)){const{prototype:e}=d,{get:h}=Object.getOwnPropertyDescriptor(e,t);o(s,`${t} method`,`cache.${i}()`,h)}},l=t=>!(process.noDeprecation||s.has(t)),o=(t,i,e,h)=>{s.add(t),process.emitWarning(`The ${i} is deprecated. Please use ${e} instead.`,"DeprecationWarning",t,h)},n=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>n(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?r:null:null;class r extends Array{constructor(t){super(t),this.fill(0)}}class p{constructor(t){const i=a(t);this.heap=new i(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class d{constructor(t={}){const{max:i,ttl:s,ttlResolution:h=1,ttlAutopurge:l,updateAgeOnGet:o,allowStale:r,dispose:c,disposeAfter:f,noDisposeOnSet:u,noUpdateTTL:z,maxSize:v,sizeCalculation:y}=t,{length:g,maxAge:m,stale:S}=t instanceof d?{}:t;if(!n(i))throw new TypeError("max option must be an integer");const L=a(i);if(!L)throw new Error("invalid max value: "+i);if(this.max=i,this.maxSize=v||0,this.sizeCalculation=y||g,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculating set to non-function")}if(this.keyMap=new Map,this.keyList=new Array(i).fill(null),this.valList=new Array(i).fill(null),this.next=new L(i),this.prev=new L(i),this.head=0,this.tail=0,this.free=new p(i),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!z,this.maxSize){if(!n(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!r||!!S,this.updateAgeOnGet=!!o,this.ttlResolution=n(h)||0===h?h:1,this.ttlAutopurge=!!l,this.ttl=s||m||0,this.ttl){if(!n(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}S&&e("stale","allowStale"),m&&e("maxAge","ttl"),g&&e("length","sizeCalculation")}initializeTTLTracking(){this.ttls=new r(this.max),this.starts=new r(this.max),this.setItemTTL=(t,s)=>{if(this.starts[t]=0!==s?i.now():0,this.ttls[t]=s,0!==s&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),s+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?i.now():0};let t=0;const s=()=>{const s=i.now();if(this.ttlResolution>0){t=s;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return s};this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||s())-this.starts[i]>this.ttls[i]}updateItemAge(t){}setItemTTL(t,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new r(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.addItemSize=(t,i,s,e,h)=>{const l=e||(h?h(i,s):0);this.sizes[t]=n(l)?l:0;const o=this.maxSize-this.sizes[t];for(;this.calculatedSize>o;)this.evict();this.calculatedSize+=this.sizes[t]},this.delete=t=>{if(0!==this.size){const i=this.keyMap.get(t);void 0!==i&&(this.calculatedSize-=this.sizes[i])}return d.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,i,s,e,h){}*indexes(){if(this.size)for(let t=this.tail;this.isStale(t)||(yield t),t!==this.head;t=this.prev[t]);}*rindexes(){if(this.size)for(let t=this.head;this.isStale(t)||(yield t),t!==this.tail;t=this.next[t]);}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,i={}){for(const s of this.indexes())if(t(this.valList[s],this.keyList[s],this))return this.get(this.keyList[s],i)}forEach(t,i=this){for(const s of this.indexes())t.call(i,this.valList[s],this.keyList[s],this)}rforEach(t,i=this){for(const s of this.rindexes())t.call(i,this.valList[s],this.keyList[s],this)}get prune(){return h("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;if(this.size)for(let i=this.head;;i=this.next[i]){const s=i===this.tail;if(this.isStale(i)&&(this.delete(this.keyList[i]),t=!0),s)break}return t}dump(){const t=[];for(const i of this.indexes()){const s=this.keyList[i],e={value:this.valList[i]};this.ttls&&(e.ttl=this.ttls[i]),this.sizes&&(e.size=this.sizes[i]),t.unshift([s,e])}return t}load(t){this.clear();for(const[i,s]of t)this.set(i,s.value,s)}dispose(t,i,s){}set(t,i,{ttl:s=this.ttl,noDisposeOnSet:e=this.noDisposeOnSet,size:h=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){let n=0===this.size?void 0:this.keyMap.get(t);if(void 0===n)n=this.newIndex(),this.keyList[n]=t,this.valList[n]=i,this.keyMap.set(t,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,i,t,h,l),o=!1;else{const s=this.valList[n];i!==s&&(e||(this.dispose(s,t,"set"),this.disposeAfter&&this.disposed.push([s,t,"set"])),this.removeItemSize(n),this.valList[n]=i,this.addItemSize(n,i,t,h,l)),this.moveToTail(n)}if(0===s||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(n,s),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max?this.evict():0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(),t}}evict(){const t=this.head,i=this.keyList[t],s=this.valList[t];return this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"]),this.removeItemSize(t),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:i=this.allowStale}={}){const s=this.keyMap.get(t);if(void 0!==s&&(i||!this.isStale(s)))return this.valList[s]}get(t,{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet}={}){const e=this.keyMap.get(t);if(void 0!==e){if(this.isStale(e)){const s=i?this.valList[e]:void 0;return this.delete(t),s}return this.moveToTail(e),s&&this.updateItemAge(e),this.valList[e]}}connect(t,i){this.prev[i]=t,this.next[t]=i}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return h("del","delete"),this.delete}delete(t){let i=!1;if(0!==this.size){const s=this.keyMap.get(t);void 0!==s&&(i=!0,1===this.size?this.clear():(this.removeItemSize(s),this.dispose(this.valList[s],t,"delete"),this.disposeAfter&&this.disposed.push([this.valList[s],t,"delete"]),this.keyMap.delete(t),this.keyList[s]=null,this.valList[s]=null,s===this.tail?this.tail=this.prev[s]:s===this.head?this.head=this.next[s]:(this.next[this.prev[s]]=this.next[s],this.prev[this.next[s]]=this.prev[s]),this.size--,this.free.push(s)))}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return i}clear(){if(this.dispose!==d.prototype.dispose)for(const t of this.rindexes())this.dispose(this.valList[t],this.keyList[t],"delete");if(this.disposeAfter)for(const t of this.rindexes())this.disposed.push([this.valList[t],this.keyList[t],"delete"]);if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return h("reset","clear"),this.clear}get length(){return((t,i)=>{const s="LRU_CACHE_PROPERTY_length";if(l(s)){const{prototype:i}=d,{get:e}=Object.getOwnPropertyDescriptor(i,t);o(s,"length property","cache.size",e)}})("length"),this.size}}t.exports=d}},i={};!function s(e){var h=i[e];if(void 0!==h)return h.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,s),l.exports}(10); \ No newline at end of file diff --git a/node_modules/@npmcli/git/node_modules/lru-cache/index.js b/node_modules/@npmcli/git/node_modules/lru-cache/index.js index ede2f30cc4b23..e9b2f37013e72 100644 --- a/node_modules/@npmcli/git/node_modules/lru-cache/index.js +++ b/node_modules/@npmcli/git/node_modules/lru-cache/index.js @@ -2,32 +2,32 @@ const perf = typeof performance === 'object' && performance && typeof performance.now === 'function' ? performance : Date const warned = new Set() -const deprecatedOption = (opt, msg) => { +const deprecatedOption = (opt, instead) => { const code = `LRU_CACHE_OPTION_${opt}` if (shouldWarn(code)) { - warn(code, `The ${opt} option is deprecated. ${msg}`, LRUCache) + warn(code, `${opt} option`, `options.${instead}`, LRUCache) } } -const deprecatedMethod = (method, msg) => { +const deprecatedMethod = (method, instead) => { const code = `LRU_CACHE_METHOD_${method}` if (shouldWarn(code)) { const { prototype } = LRUCache const { get } = Object.getOwnPropertyDescriptor(prototype, method) - warn(code, `The ${method} method is deprecated. ${msg}`, get) + warn(code, `${method} method`, `cache.${instead}()`, get) } } -const deprecatedProperty = (field, msg) => { +const deprecatedProperty = (field, instead) => { const code = `LRU_CACHE_PROPERTY_${field}` if (shouldWarn(code)) { const { prototype } = LRUCache const { get } = Object.getOwnPropertyDescriptor(prototype, field) - warn(code, `The ${field} property is deprecated. ${msg}`, get) + warn(code, `${field} property`, `cache.${instead}`, get) } } const shouldWarn = (code) => !(process.noDeprecation || warned.has(code)) -const warn = (code, msg, fn) => { +const warn = (code, what, instead, fn) => { warned.add(code) - process.emitWarning(msg, 'DeprecationWarning', code, fn) + process.emitWarning(`The ${what} is deprecated. Please use ${instead} instead.`, 'DeprecationWarning', code, fn) } const isPosInt = n => n && n === Math.floor(n) && n > 0 && isFinite(n) @@ -80,6 +80,7 @@ class LRUCache { dispose, disposeAfter, noDisposeOnSet, + noUpdateTTL, maxSize, sizeCalculation, } = options @@ -134,6 +135,7 @@ class LRUCache { this.disposed = null } this.noDisposeOnSet = !!noDisposeOnSet + this.noUpdateTTL = !!noUpdateTTL if (this.maxSize) { if (!isPosInt(this.maxSize)) { @@ -156,13 +158,13 @@ class LRUCache { } if (stale) { - deprecatedOption('stale', 'please use options.allowStale instead') + deprecatedOption('stale', 'allowStale') } if (maxAge) { - deprecatedOption('maxAge', 'please use options.ttl instead') + deprecatedOption('maxAge', 'ttl') } if (length) { - deprecatedOption('length', 'please use options.sizeCalculation instead') + deprecatedOption('length', 'sizeCalculation') } } @@ -305,7 +307,7 @@ class LRUCache { } get prune () { - deprecatedMethod('prune', 'Please use cache.purgeStale() instead.') + deprecatedMethod('prune', 'purgeStale') return this.purgeStale } @@ -357,6 +359,7 @@ class LRUCache { noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, + noUpdateTTL = this.noUpdateTTL, } = {}) { let index = this.size === 0 ? undefined : this.keyMap.get(k) if (index === undefined) { @@ -370,6 +373,7 @@ class LRUCache { this.tail = index this.size ++ this.addItemSize(index, v, k, size, sizeCalculation) + noUpdateTTL = false } else { // update const oldVal = this.valList[index] @@ -389,7 +393,9 @@ class LRUCache { if (ttl !== 0 && this.ttl === 0 && !this.ttls) { this.initializeTTLTracking() } - this.setItemTTL(index, ttl) + if (!noUpdateTTL) { + this.setItemTTL(index, ttl) + } if (this.disposeAfter) { while (this.disposed.length) { this.disposeAfter(...this.disposed.shift()) @@ -493,7 +499,7 @@ class LRUCache { } get del () { - deprecatedMethod('del', 'Please use cache.delete() instead.') + deprecatedMethod('del', 'delete') return this.delete } delete (k) { @@ -568,12 +574,12 @@ class LRUCache { } } get reset () { - deprecatedMethod('reset', 'Please use cache.clear() instead.') + deprecatedMethod('reset', 'clear') return this.clear } get length () { - deprecatedProperty('length', 'Please use cache.size instead.') + deprecatedProperty('length', 'size') return this.size } } diff --git a/node_modules/@npmcli/git/node_modules/lru-cache/package.json b/node_modules/@npmcli/git/node_modules/lru-cache/package.json index 66dbbd9c11503..ae92116975dc9 100644 --- a/node_modules/@npmcli/git/node_modules/lru-cache/package.json +++ b/node_modules/@npmcli/git/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": "7.3.1", + "version": "7.4.0", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -9,26 +9,44 @@ "cache" ], "scripts": { + "prepare": "webpack-cli -o bundle ./index.js --node-env production", + "build": "npm run prepare", + "presize": "npm run prepare", "test": "tap", "snap": "tap", + "size": "size-limit", "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags" }, "main": "index.js", + "browser": "./bundle/main.js", + "exports": { + ".": "./index.js", + "./browser": "./bundle/main.js" + }, "repository": "git://github.com/isaacs/node-lru-cache.git", "devDependencies": { + "@size-limit/preset-small-lib": "^7.0.8", "benchmark": "^2.1.4", - "tap": "^15.1.6" + "size-limit": "^7.0.8", + "tap": "^15.1.6", + "webpack-cli": "^4.9.2" }, "license": "ISC", "files": [ - "index.js" + "index.js", + "bundle" ], "engines": { "node": ">=12" }, "tap": { "coverage-map": "map.js" - } + }, + "size-limit": [ + { + "path": "./bundle/main.js" + } + ] } diff --git a/node_modules/@npmcli/map-workspaces/lib/index.js b/node_modules/@npmcli/map-workspaces/lib/index.js index 26e597a2c20f4..a2401b565b335 100644 --- a/node_modules/@npmcli/map-workspaces/lib/index.js +++ b/node_modules/@npmcli/map-workspaces/lib/index.js @@ -56,6 +56,7 @@ function pkgPathmame (opts) { // make sure glob pattern only matches folders function getGlobPattern (pattern) { + pattern = pattern.replace(/\\/g, '/') return pattern.endsWith('/') ? pattern : `${pattern}/` diff --git a/node_modules/typedarray-to-buffer/LICENSE b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/LICENSE similarity index 85% rename from node_modules/typedarray-to-buffer/LICENSE rename to node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/LICENSE index 0c068ceecbd48..de3226673c387 100644 --- a/node_modules/typedarray-to-buffer/LICENSE +++ b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) Feross Aboukhadijeh +Copyright (c) 2013 Julian Gruber Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/index.js b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/index.js new file mode 100644 index 0000000000000..4af9ddee463f4 --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/index.js @@ -0,0 +1,203 @@ +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + } + + return expansions; +} + diff --git a/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/package.json b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/package.json new file mode 100644 index 0000000000000..7097d41e39de5 --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/brace-expansion/package.json @@ -0,0 +1,46 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "2.0.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0" + }, + "devDependencies": { + "@c4312/matcha": "^1.3.1", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/node_modules/@npmcli/map-workspaces/node_modules/minimatch/LICENSE b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/LICENSE new file mode 100644 index 0000000000000..9517b7d995bb0 --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@npmcli/map-workspaces/node_modules/minimatch/lib/path.js b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/lib/path.js new file mode 100644 index 0000000000000..ffe453d9e0557 --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/lib/path.js @@ -0,0 +1,4 @@ +const isWindows = typeof process === 'object' && + process && + process.platform === 'win32' +module.exports = isWindows ? { sep: '\\' } : { sep: '/' } diff --git a/node_modules/@npmcli/map-workspaces/node_modules/minimatch/minimatch.js b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000000000..f3b491dd1073e --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/minimatch.js @@ -0,0 +1,901 @@ +const minimatch = module.exports = (p, pattern, options = {}) => { + assertValidPattern(pattern) + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +module.exports = minimatch + +const path = require('./lib/path.js') +minimatch.sep = path.sep + +const GLOBSTAR = Symbol('globstar **') +minimatch.GLOBSTAR = GLOBSTAR +const expand = require('brace-expansion') + +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]' + +// * => any number of characters +const star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// "abc" -> { a:true, b:true, c:true } +const charSet = s => s.split('').reduce((set, c) => { + set[c] = true + return set +}, {}) + +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!') + +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.(') + +// normalizes slashes. +const slashSplit = /\/+/ + +minimatch.filter = (pattern, options = {}) => + (p, i, list) => minimatch(p, pattern, options) + +const ext = (a, b = {}) => { + const t = {} + Object.keys(a).forEach(k => t[k] = a[k]) + Object.keys(b).forEach(k => t[k] = b[k]) + return t +} + +minimatch.defaults = def => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + const orig = minimatch + + const m = (p, pattern, options) => orig(p, pattern, ext(def, options)) + m.Minimatch = class Minimatch extends orig.Minimatch { + constructor (pattern, options) { + super(pattern, ext(def, options)) + } + } + m.Minimatch.defaults = options => orig.defaults(ext(def, options)).Minimatch + m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)) + m.defaults = options => orig.defaults(ext(def, options)) + m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)) + m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)) + m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)) + + return m +} + + + + + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options) + +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +const MAX_PATTERN_LENGTH = 1024 * 64 +const assertValidPattern = pattern => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const SUBPARSE = Symbol('subparse') + +minimatch.makeRe = (pattern, options) => + new Minimatch(pattern, options || {}).makeRe() + +minimatch.match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options) + list = list.filter(f => mm.match(f)) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +// replace stuff like \* with * +const globUnescape = s => s.replace(/\\(.)/g, '$1') +const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') + +class Minimatch { + constructor (pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() + } + + debug () {} + + make () { + const pattern = this.pattern + const options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + let set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = (...args) => console.error(...args) + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(s => s.split(slashSplit)) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map((s, si, set) => s.map(this.parse, this)) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(s => s.indexOf(false) === -1) + + this.debug(this.pattern, set) + + this.set = set + } + + parseNegate () { + if (this.options.nonegate) return + + const pattern = this.pattern + let negate = false + let negateOffset = 0 + + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate + } + + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') + } + + braceExpand () { + return braceExpand(this.pattern, this.options) + } + + parse (pattern, isSub) { + assertValidPattern(pattern) + + const options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + let re = '' + let hasMagic = !!options.nocase + let escaping = false + // ? => one single character + const patternListStack = [] + const negativeLists = [] + let stateChar + let inClass = false + let reClassStart = -1 + let classStart = -1 + let cs + let pl + let sp + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + const patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + this.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (let i = 0, c; (i < pattern.length) && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping) { + /* istanbul ignore next - completely not allowed, even escaped. */ + if (c === '/') { + return false + } + + if (reSpecials[c]) { + re += '\\' + } + re += c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length) { + re += '\\|' + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + break + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail + tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + /* istanbul ignore else - should already be done */ + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + const t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)] + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n] + + const nlBefore = re.slice(0, nl.reStart) + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + let nlAfter = re.slice(nl.reEnd) + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const openParensBefore = nlBefore.split('(').length - 1 + let cleanAfter = nlAfter + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '$' : '' + re = nlBefore + nlFirst + nlAfter + dollar + nlLast + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + const flags = options.nocase ? 'i' : '' + try { + return Object.assign(new RegExp('^' + re + '$', flags), { + _glob: pattern, + _src: re, + }) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + } + + makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + const options = this.options + + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + const flags = options.nocase ? 'i' : '' + + // coalesce globstars and regexpify non-globstar patterns + // if it's the only item, then we just do one twoStar + // if it's the first, and there are more, prepend (\/|twoStar\/)? to next + // if it's the last, append (\/twoStar|) to previous + // if it's in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set.map(pattern => { + pattern = pattern.map(p => + typeof p === 'string' ? regExpEscape(p) + : p === GLOBSTAR ? GLOBSTAR + : p._src + ).reduce((set, p) => { + if (!(set[set.length - 1] === GLOBSTAR && p === GLOBSTAR)) { + set.push(p) + } + return set + }, []) + pattern.forEach((p, i) => { + if (p !== GLOBSTAR || pattern[i-1] === GLOBSTAR) { + return + } + if (i === 0) { + if (pattern.length > 1) { + pattern[i+1] = '(?:\\\/|' + twoStar + '\\\/)?' + pattern[i+1] + } else { + pattern[i] = twoStar + } + } else if (i === pattern.length - 1) { + pattern[i-1] += '(?:\\\/|' + twoStar + ')?' + } else { + pattern[i-1] += '(?:\\\/|\\\/' + twoStar + '\\\/)' + pattern[i+1] + pattern[i+1] = GLOBSTAR + } + }) + return pattern.filter(p => p !== GLOBSTAR).join('/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp + } + + match (f, partial = this.partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + const options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + const set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + let filename + for (let i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (let i = 0; i < set.length; i++) { + const pattern = set[i] + let file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + const hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate + } + + static defaults (def) { + return minimatch.defaults(def).Minimatch + } +} + +minimatch.Minimatch = Minimatch diff --git a/node_modules/@npmcli/map-workspaces/node_modules/minimatch/package.json b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/package.json new file mode 100644 index 0000000000000..2cc856968c0b2 --- /dev/null +++ b/node_modules/@npmcli/map-workspaces/node_modules/minimatch/package.json @@ -0,0 +1,32 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "5.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "engines": { + "node": ">=10" + }, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "devDependencies": { + "tap": "^15.1.6" + }, + "license": "ISC", + "files": [ + "minimatch.js", + "lib" + ] +} diff --git a/node_modules/@npmcli/map-workspaces/package.json b/node_modules/@npmcli/map-workspaces/package.json index 987298c3d93a0..aa46ad0f42f2d 100644 --- a/node_modules/@npmcli/map-workspaces/package.json +++ b/node_modules/@npmcli/map-workspaces/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/map-workspaces", - "version": "2.0.0", + "version": "2.0.1", "main": "lib/index.js", "files": [ "bin", @@ -31,7 +31,8 @@ "prepublishOnly": "git push origin --follow-tags", "postlint": "npm-template-check", "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" + "posttest": "npm run lint", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -42,16 +43,17 @@ ] }, "devDependencies": { - "eslint": "^8.0.0", - "require-inject": "^1.4.4", - "@npmcli/template-oss": "^2.0.0", - "tap": "^15.0.10" + "@npmcli/template-oss": "^2.7.1", + "eslint": "^8.9.0", + "tap": "^15.1.6" }, "dependencies": { "@npmcli/name-from-folder": "^1.0.1", - "glob": "^7.1.6", - "minimatch": "^3.0.4", - "read-package-json-fast": "^2.0.1" + "glob": "^7.2.0", + "minimatch": "^5.0.0", + "read-package-json-fast": "^2.0.3" }, - "templateVersion": "2.0.0" + "templateOSS": { + "version": "2.7.1" + } } diff --git a/node_modules/@npmcli/run-script/package.json b/node_modules/@npmcli/run-script/package.json index bb069a7a0a5c3..3f29f97113e53 100644 --- a/node_modules/@npmcli/run-script/package.json +++ b/node_modules/@npmcli/run-script/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/run-script", - "version": "3.0.0", + "version": "3.0.1", "description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", "author": "GitHub Inc.", "license": "ISC", @@ -22,15 +22,15 @@ "coverage-map": "map.js" }, "devDependencies": { - "@npmcli/template-oss": "^2.7.1", + "@npmcli/template-oss": "^2.9.1", "minipass": "^3.1.6", "require-inject": "^1.4.4", - "tap": "^15.0.4" + "tap": "^15.1.6" }, "dependencies": { "@npmcli/node-gyp": "^1.0.3", "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "read-package-json-fast": "^2.0.3" }, "files": [ @@ -46,6 +46,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.7.1" + "version": "2.9.1" } } diff --git a/node_modules/agentkeepalive/History.md b/node_modules/agentkeepalive/History.md index 00cb65f5db3c6..9db6e5576d42b 100644 --- a/node_modules/agentkeepalive/History.md +++ b/node_modules/agentkeepalive/History.md @@ -1,4 +1,10 @@ +4.2.1 / 2022-02-21 +================== + +**fixes** + * [[`8b13b5c`](http://github.com/node-modules/agentkeepalive/commit/8b13b5ca797f4779a0a8d393ad8ecb622cd27987)] - fix: explicitly set `| undefined` in type definitions (#99) (Benoit Lemoine <>) + 4.2.0 / 2021-12-31 ================== diff --git a/node_modules/agentkeepalive/index.d.ts b/node_modules/agentkeepalive/index.d.ts index 7840f9af423e1..c2ce7d207a64b 100644 --- a/node_modules/agentkeepalive/index.d.ts +++ b/node_modules/agentkeepalive/index.d.ts @@ -39,11 +39,11 @@ declare namespace AgentKeepAlive { } interface CommonHttpOption { - keepAlive?: boolean; - freeSocketTimeout?: number; - freeSocketKeepAliveTimeout?: number; - timeout?: number; - socketActiveTTL?: number; + keepAlive?: boolean | undefined; + freeSocketTimeout?: number | undefined; + freeSocketKeepAliveTimeout?: number | undefined; + timeout?: number | undefined; + socketActiveTTL?: number | undefined; } export interface HttpOptions extends http.AgentOptions, CommonHttpOption { } diff --git a/node_modules/agentkeepalive/package.json b/node_modules/agentkeepalive/package.json index aba00ea14847a..efa561d2c6d6c 100644 --- a/node_modules/agentkeepalive/package.json +++ b/node_modules/agentkeepalive/package.json @@ -1,6 +1,6 @@ { "name": "agentkeepalive", - "version": "4.2.0", + "version": "4.2.1", "description": "Missing keepalive http.Agent", "main": "index.js", "browser": "browser.js", diff --git a/node_modules/gauge/package.json b/node_modules/gauge/package.json index c51c2b13fb2b3..4a6ebf285b3ed 100644 --- a/node_modules/gauge/package.json +++ b/node_modules/gauge/package.json @@ -1,6 +1,6 @@ { "name": "gauge", - "version": "4.0.1", + "version": "4.0.2", "description": "A terminal based horizontal gauge", "main": "lib", "scripts": { @@ -33,18 +33,18 @@ "dependencies": { "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "wide-align": "^1.1.5" }, "devDependencies": { "@npmcli/template-oss": "^2.7.1", "readable-stream": "^3.6.0", - "tap": "^15.0.10" + "tap": "^15.1.6" }, "files": [ "bin", diff --git a/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.js b/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.js new file mode 100644 index 0000000000000..7eef327e92527 --- /dev/null +++ b/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.js @@ -0,0 +1 @@ +(()=>{var t={10:t=>{const i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,e=(t,i)=>{const s=`LRU_CACHE_OPTION_${t}`;l(s)&&o(s,`${t} option`,`options.${i}`,d)},h=(t,i)=>{const s=`LRU_CACHE_METHOD_${t}`;if(l(s)){const{prototype:e}=d,{get:h}=Object.getOwnPropertyDescriptor(e,t);o(s,`${t} method`,`cache.${i}()`,h)}},l=t=>!(process.noDeprecation||s.has(t)),o=(t,i,e,h)=>{s.add(t),process.emitWarning(`The ${i} is deprecated. Please use ${e} instead.`,"DeprecationWarning",t,h)},n=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>n(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?r:null:null;class r extends Array{constructor(t){super(t),this.fill(0)}}class p{constructor(t){const i=a(t);this.heap=new i(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class d{constructor(t={}){const{max:i,ttl:s,ttlResolution:h=1,ttlAutopurge:l,updateAgeOnGet:o,allowStale:r,dispose:c,disposeAfter:f,noDisposeOnSet:u,noUpdateTTL:z,maxSize:v,sizeCalculation:y}=t,{length:g,maxAge:m,stale:S}=t instanceof d?{}:t;if(!n(i))throw new TypeError("max option must be an integer");const x=a(i);if(!x)throw new Error("invalid max value: "+i);if(this.max=i,this.maxSize=v||0,this.sizeCalculation=y||g,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculating set to non-function")}if(this.keyMap=new Map,this.keyList=new Array(i).fill(null),this.valList=new Array(i).fill(null),this.next=new x(i),this.prev=new x(i),this.head=0,this.tail=0,this.free=new p(i),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!z,this.maxSize){if(!n(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!r||!!S,this.updateAgeOnGet=!!o,this.ttlResolution=n(h)||0===h?h:1,this.ttlAutopurge=!!l,this.ttl=s||m||0,this.ttl){if(!n(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}S&&e("stale","allowStale"),m&&e("maxAge","ttl"),g&&e("length","sizeCalculation")}initializeTTLTracking(){this.ttls=new r(this.max),this.starts=new r(this.max),this.setItemTTL=(t,s)=>{if(this.starts[t]=0!==s?i.now():0,this.ttls[t]=s,0!==s&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),s+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?i.now():0};let t=0;const s=()=>{const s=i.now();if(this.ttlResolution>0){t=s;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return s};this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||s())-this.starts[i]>this.ttls[i]}updateItemAge(t){}setItemTTL(t,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new r(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.addItemSize=(t,i,s,e,h)=>{const l=e||(h?h(i,s):0);this.sizes[t]=n(l)?l:0;const o=this.maxSize-this.sizes[t];for(;this.calculatedSize>o;)this.evict();this.calculatedSize+=this.sizes[t]},this.delete=t=>{if(0!==this.size){const i=this.keyMap.get(t);void 0!==i&&(this.calculatedSize-=this.sizes[i])}return d.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,i,s,e,h){}*indexes(){if(this.size)for(let t=this.tail;this.isStale(t)||(yield t),t!==this.head;t=this.prev[t]);}*rindexes(){if(this.size)for(let t=this.head;this.isStale(t)||(yield t),t!==this.tail;t=this.next[t]);}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,i={}){for(const s of this.indexes())if(t(this.valList[s],this.keyList[s],this))return this.get(this.keyList[s],i)}forEach(t,i=this){for(const s of this.indexes())t.call(i,this.valList[s],this.keyList[s],this)}rforEach(t,i=this){for(const s of this.rindexes())t.call(i,this.valList[s],this.keyList[s],this)}get prune(){return h("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;if(this.size)for(let i=this.head;;i=this.next[i]){const s=i===this.tail;if(this.isStale(i)&&(this.delete(this.keyList[i]),t=!0),s)break}return t}dump(){const t=[];for(const i of this.indexes()){const s=this.keyList[i],e={value:this.valList[i]};this.ttls&&(e.ttl=this.ttls[i]),this.sizes&&(e.size=this.sizes[i]),t.unshift([s,e])}return t}load(t){this.clear();for(const[i,s]of t)this.set(i,s.value,s)}dispose(t,i,s){}set(t,i,{ttl:s=this.ttl,noDisposeOnSet:e=this.noDisposeOnSet,size:h=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){let n=0===this.size?void 0:this.keyMap.get(t);if(void 0===n)n=this.newIndex(),this.keyList[n]=t,this.valList[n]=i,this.keyMap.set(t,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,i,t,h,l),o=!1;else{const s=this.valList[n];i!==s&&(e||(this.dispose(s,t,"set"),this.disposeAfter&&this.disposed.push([s,t,"set"])),this.removeItemSize(n),this.valList[n]=i,this.addItemSize(n,i,t,h,l)),this.moveToTail(n)}if(0===s||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(n,s),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max?this.evict():0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(),t}}evict(){const t=this.head,i=this.keyList[t],s=this.valList[t];return this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"]),this.removeItemSize(t),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:i=this.allowStale}={}){const s=this.keyMap.get(t);if(void 0!==s&&(i||!this.isStale(s)))return this.valList[s]}get(t,{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet}={}){const e=this.keyMap.get(t);if(void 0!==e){if(this.isStale(e)){const s=i?this.valList[e]:void 0;return this.delete(t),s}return this.moveToTail(e),s&&this.updateItemAge(e),this.valList[e]}}connect(t,i){this.prev[i]=t,this.next[t]=i}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return h("del","delete"),this.delete}delete(t){let i=!1;if(0!==this.size){const s=this.keyMap.get(t);void 0!==s&&(i=!0,1===this.size?this.clear():(this.removeItemSize(s),this.dispose(this.valList[s],t,"delete"),this.disposeAfter&&this.disposed.push([this.valList[s],t,"delete"]),this.keyMap.delete(t),this.keyList[s]=null,this.valList[s]=null,s===this.tail?this.tail=this.prev[s]:s===this.head?this.head=this.next[s]:(this.next[this.prev[s]]=this.next[s],this.prev[this.next[s]]=this.prev[s]),this.size--,this.free.push(s)))}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return i}clear(){if(this.dispose!==d.prototype.dispose)for(const t of this.rindexes())this.dispose(this.valList[t],this.keyList[t],"delete");if(this.disposeAfter)for(const t of this.rindexes())this.disposed.push([this.valList[t],this.keyList[t],"delete"]);if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return h("reset","clear"),this.clear}get length(){return((t,i)=>{const s="LRU_CACHE_PROPERTY_length";if(l(s)){const{prototype:i}=d,{get:e}=Object.getOwnPropertyDescriptor(i,t);o(s,"length property","cache.size",e)}})("length"),this.size}}t.exports=d}},i={},s=function s(e){var h=i[e];if(void 0!==h)return h.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,s),l.exports}(10);module.exports=s})(); \ No newline at end of file diff --git a/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.mjs b/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.mjs new file mode 100644 index 0000000000000..3a4d674c07a41 --- /dev/null +++ b/node_modules/make-fetch-happen/node_modules/lru-cache/bundle/main.mjs @@ -0,0 +1 @@ +var t={10:t=>{const i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,e=(t,i)=>{const s=`LRU_CACHE_OPTION_${t}`;l(s)&&o(s,`${t} option`,`options.${i}`,d)},h=(t,i)=>{const s=`LRU_CACHE_METHOD_${t}`;if(l(s)){const{prototype:e}=d,{get:h}=Object.getOwnPropertyDescriptor(e,t);o(s,`${t} method`,`cache.${i}()`,h)}},l=t=>!(process.noDeprecation||s.has(t)),o=(t,i,e,h)=>{s.add(t),process.emitWarning(`The ${i} is deprecated. Please use ${e} instead.`,"DeprecationWarning",t,h)},n=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>n(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?r:null:null;class r extends Array{constructor(t){super(t),this.fill(0)}}class p{constructor(t){const i=a(t);this.heap=new i(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class d{constructor(t={}){const{max:i,ttl:s,ttlResolution:h=1,ttlAutopurge:l,updateAgeOnGet:o,allowStale:r,dispose:c,disposeAfter:f,noDisposeOnSet:u,noUpdateTTL:z,maxSize:v,sizeCalculation:y}=t,{length:g,maxAge:m,stale:S}=t instanceof d?{}:t;if(!n(i))throw new TypeError("max option must be an integer");const L=a(i);if(!L)throw new Error("invalid max value: "+i);if(this.max=i,this.maxSize=v||0,this.sizeCalculation=y||g,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculating set to non-function")}if(this.keyMap=new Map,this.keyList=new Array(i).fill(null),this.valList=new Array(i).fill(null),this.next=new L(i),this.prev=new L(i),this.head=0,this.tail=0,this.free=new p(i),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!z,this.maxSize){if(!n(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!r||!!S,this.updateAgeOnGet=!!o,this.ttlResolution=n(h)||0===h?h:1,this.ttlAutopurge=!!l,this.ttl=s||m||0,this.ttl){if(!n(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}S&&e("stale","allowStale"),m&&e("maxAge","ttl"),g&&e("length","sizeCalculation")}initializeTTLTracking(){this.ttls=new r(this.max),this.starts=new r(this.max),this.setItemTTL=(t,s)=>{if(this.starts[t]=0!==s?i.now():0,this.ttls[t]=s,0!==s&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),s+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?i.now():0};let t=0;const s=()=>{const s=i.now();if(this.ttlResolution>0){t=s;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return s};this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||s())-this.starts[i]>this.ttls[i]}updateItemAge(t){}setItemTTL(t,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new r(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.addItemSize=(t,i,s,e,h)=>{const l=e||(h?h(i,s):0);this.sizes[t]=n(l)?l:0;const o=this.maxSize-this.sizes[t];for(;this.calculatedSize>o;)this.evict();this.calculatedSize+=this.sizes[t]},this.delete=t=>{if(0!==this.size){const i=this.keyMap.get(t);void 0!==i&&(this.calculatedSize-=this.sizes[i])}return d.prototype.delete.call(this,t)}}removeItemSize(t){}addItemSize(t,i,s,e,h){}*indexes(){if(this.size)for(let t=this.tail;this.isStale(t)||(yield t),t!==this.head;t=this.prev[t]);}*rindexes(){if(this.size)for(let t=this.head;this.isStale(t)||(yield t),t!==this.tail;t=this.next[t]);}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,i={}){for(const s of this.indexes())if(t(this.valList[s],this.keyList[s],this))return this.get(this.keyList[s],i)}forEach(t,i=this){for(const s of this.indexes())t.call(i,this.valList[s],this.keyList[s],this)}rforEach(t,i=this){for(const s of this.rindexes())t.call(i,this.valList[s],this.keyList[s],this)}get prune(){return h("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;if(this.size)for(let i=this.head;;i=this.next[i]){const s=i===this.tail;if(this.isStale(i)&&(this.delete(this.keyList[i]),t=!0),s)break}return t}dump(){const t=[];for(const i of this.indexes()){const s=this.keyList[i],e={value:this.valList[i]};this.ttls&&(e.ttl=this.ttls[i]),this.sizes&&(e.size=this.sizes[i]),t.unshift([s,e])}return t}load(t){this.clear();for(const[i,s]of t)this.set(i,s.value,s)}dispose(t,i,s){}set(t,i,{ttl:s=this.ttl,noDisposeOnSet:e=this.noDisposeOnSet,size:h=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){let n=0===this.size?void 0:this.keyMap.get(t);if(void 0===n)n=this.newIndex(),this.keyList[n]=t,this.valList[n]=i,this.keyMap.set(t,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,i,t,h,l),o=!1;else{const s=this.valList[n];i!==s&&(e||(this.dispose(s,t,"set"),this.disposeAfter&&this.disposed.push([s,t,"set"])),this.removeItemSize(n),this.valList[n]=i,this.addItemSize(n,i,t,h,l)),this.moveToTail(n)}if(0===s||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(n,s),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max?this.evict():0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(),t}}evict(){const t=this.head,i=this.keyList[t],s=this.valList[t];return this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"]),this.removeItemSize(t),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(t){return this.keyMap.has(t)&&!this.isStale(this.keyMap.get(t))}peek(t,{allowStale:i=this.allowStale}={}){const s=this.keyMap.get(t);if(void 0!==s&&(i||!this.isStale(s)))return this.valList[s]}get(t,{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet}={}){const e=this.keyMap.get(t);if(void 0!==e){if(this.isStale(e)){const s=i?this.valList[e]:void 0;return this.delete(t),s}return this.moveToTail(e),s&&this.updateItemAge(e),this.valList[e]}}connect(t,i){this.prev[i]=t,this.next[t]=i}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return h("del","delete"),this.delete}delete(t){let i=!1;if(0!==this.size){const s=this.keyMap.get(t);void 0!==s&&(i=!0,1===this.size?this.clear():(this.removeItemSize(s),this.dispose(this.valList[s],t,"delete"),this.disposeAfter&&this.disposed.push([this.valList[s],t,"delete"]),this.keyMap.delete(t),this.keyList[s]=null,this.valList[s]=null,s===this.tail?this.tail=this.prev[s]:s===this.head?this.head=this.next[s]:(this.next[this.prev[s]]=this.next[s],this.prev[this.next[s]]=this.prev[s]),this.size--,this.free.push(s)))}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return i}clear(){if(this.dispose!==d.prototype.dispose)for(const t of this.rindexes())this.dispose(this.valList[t],this.keyList[t],"delete");if(this.disposeAfter)for(const t of this.rindexes())this.disposed.push([this.valList[t],this.keyList[t],"delete"]);if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return h("reset","clear"),this.clear}get length(){return((t,i)=>{const s="LRU_CACHE_PROPERTY_length";if(l(s)){const{prototype:i}=d,{get:e}=Object.getOwnPropertyDescriptor(i,t);o(s,"length property","cache.size",e)}})("length"),this.size}}t.exports=d}},i={};!function s(e){var h=i[e];if(void 0!==h)return h.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,s),l.exports}(10); \ No newline at end of file diff --git a/node_modules/make-fetch-happen/node_modules/lru-cache/index.js b/node_modules/make-fetch-happen/node_modules/lru-cache/index.js index ede2f30cc4b23..e9b2f37013e72 100644 --- a/node_modules/make-fetch-happen/node_modules/lru-cache/index.js +++ b/node_modules/make-fetch-happen/node_modules/lru-cache/index.js @@ -2,32 +2,32 @@ const perf = typeof performance === 'object' && performance && typeof performance.now === 'function' ? performance : Date const warned = new Set() -const deprecatedOption = (opt, msg) => { +const deprecatedOption = (opt, instead) => { const code = `LRU_CACHE_OPTION_${opt}` if (shouldWarn(code)) { - warn(code, `The ${opt} option is deprecated. ${msg}`, LRUCache) + warn(code, `${opt} option`, `options.${instead}`, LRUCache) } } -const deprecatedMethod = (method, msg) => { +const deprecatedMethod = (method, instead) => { const code = `LRU_CACHE_METHOD_${method}` if (shouldWarn(code)) { const { prototype } = LRUCache const { get } = Object.getOwnPropertyDescriptor(prototype, method) - warn(code, `The ${method} method is deprecated. ${msg}`, get) + warn(code, `${method} method`, `cache.${instead}()`, get) } } -const deprecatedProperty = (field, msg) => { +const deprecatedProperty = (field, instead) => { const code = `LRU_CACHE_PROPERTY_${field}` if (shouldWarn(code)) { const { prototype } = LRUCache const { get } = Object.getOwnPropertyDescriptor(prototype, field) - warn(code, `The ${field} property is deprecated. ${msg}`, get) + warn(code, `${field} property`, `cache.${instead}`, get) } } const shouldWarn = (code) => !(process.noDeprecation || warned.has(code)) -const warn = (code, msg, fn) => { +const warn = (code, what, instead, fn) => { warned.add(code) - process.emitWarning(msg, 'DeprecationWarning', code, fn) + process.emitWarning(`The ${what} is deprecated. Please use ${instead} instead.`, 'DeprecationWarning', code, fn) } const isPosInt = n => n && n === Math.floor(n) && n > 0 && isFinite(n) @@ -80,6 +80,7 @@ class LRUCache { dispose, disposeAfter, noDisposeOnSet, + noUpdateTTL, maxSize, sizeCalculation, } = options @@ -134,6 +135,7 @@ class LRUCache { this.disposed = null } this.noDisposeOnSet = !!noDisposeOnSet + this.noUpdateTTL = !!noUpdateTTL if (this.maxSize) { if (!isPosInt(this.maxSize)) { @@ -156,13 +158,13 @@ class LRUCache { } if (stale) { - deprecatedOption('stale', 'please use options.allowStale instead') + deprecatedOption('stale', 'allowStale') } if (maxAge) { - deprecatedOption('maxAge', 'please use options.ttl instead') + deprecatedOption('maxAge', 'ttl') } if (length) { - deprecatedOption('length', 'please use options.sizeCalculation instead') + deprecatedOption('length', 'sizeCalculation') } } @@ -305,7 +307,7 @@ class LRUCache { } get prune () { - deprecatedMethod('prune', 'Please use cache.purgeStale() instead.') + deprecatedMethod('prune', 'purgeStale') return this.purgeStale } @@ -357,6 +359,7 @@ class LRUCache { noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, + noUpdateTTL = this.noUpdateTTL, } = {}) { let index = this.size === 0 ? undefined : this.keyMap.get(k) if (index === undefined) { @@ -370,6 +373,7 @@ class LRUCache { this.tail = index this.size ++ this.addItemSize(index, v, k, size, sizeCalculation) + noUpdateTTL = false } else { // update const oldVal = this.valList[index] @@ -389,7 +393,9 @@ class LRUCache { if (ttl !== 0 && this.ttl === 0 && !this.ttls) { this.initializeTTLTracking() } - this.setItemTTL(index, ttl) + if (!noUpdateTTL) { + this.setItemTTL(index, ttl) + } if (this.disposeAfter) { while (this.disposed.length) { this.disposeAfter(...this.disposed.shift()) @@ -493,7 +499,7 @@ class LRUCache { } get del () { - deprecatedMethod('del', 'Please use cache.delete() instead.') + deprecatedMethod('del', 'delete') return this.delete } delete (k) { @@ -568,12 +574,12 @@ class LRUCache { } } get reset () { - deprecatedMethod('reset', 'Please use cache.clear() instead.') + deprecatedMethod('reset', 'clear') return this.clear } get length () { - deprecatedProperty('length', 'Please use cache.size instead.') + deprecatedProperty('length', 'size') return this.size } } diff --git a/node_modules/make-fetch-happen/node_modules/lru-cache/package.json b/node_modules/make-fetch-happen/node_modules/lru-cache/package.json index 66dbbd9c11503..ae92116975dc9 100644 --- a/node_modules/make-fetch-happen/node_modules/lru-cache/package.json +++ b/node_modules/make-fetch-happen/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": "7.3.1", + "version": "7.4.0", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -9,26 +9,44 @@ "cache" ], "scripts": { + "prepare": "webpack-cli -o bundle ./index.js --node-env production", + "build": "npm run prepare", + "presize": "npm run prepare", "test": "tap", "snap": "tap", + "size": "size-limit", "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags" }, "main": "index.js", + "browser": "./bundle/main.js", + "exports": { + ".": "./index.js", + "./browser": "./bundle/main.js" + }, "repository": "git://github.com/isaacs/node-lru-cache.git", "devDependencies": { + "@size-limit/preset-small-lib": "^7.0.8", "benchmark": "^2.1.4", - "tap": "^15.1.6" + "size-limit": "^7.0.8", + "tap": "^15.1.6", + "webpack-cli": "^4.9.2" }, "license": "ISC", "files": [ - "index.js" + "index.js", + "bundle" ], "engines": { "node": ">=12" }, "tap": { "coverage-map": "map.js" - } + }, + "size-limit": [ + { + "path": "./bundle/main.js" + } + ] } diff --git a/node_modules/make-fetch-happen/package.json b/node_modules/make-fetch-happen/package.json index c01a09ac5d7aa..b871b18e09766 100644 --- a/node_modules/make-fetch-happen/package.json +++ b/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "10.0.3", + "version": "10.0.4", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ @@ -33,16 +33,16 @@ "author": "GitHub Inc.", "license": "ISC", "dependencies": { - "agentkeepalive": "^4.2.0", + "agentkeepalive": "^4.2.1", "cacache": "^15.3.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.3.1", + "lru-cache": "^7.4.0", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", @@ -51,8 +51,8 @@ "ssri": "^8.0.1" }, "devDependencies": { - "@npmcli/template-oss": "^2.7.1", - "eslint": "^8.9.0", + "@npmcli/template-oss": "^2.8.1", + "eslint": "^8.10.0", "mkdirp": "^1.0.4", "nock": "^13.2.4", "rimraf": "^3.0.2", @@ -69,6 +69,6 @@ "check-coverage": true }, "templateOSS": { - "version": "2.7.1" + "version": "2.8.1" } } diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js index 5b5f8cf444de2..fda45ade7cfc3 100644 --- a/node_modules/minimatch/minimatch.js +++ b/node_modules/minimatch/minimatch.js @@ -1,10 +1,10 @@ module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = require('brace-expansion') @@ -56,43 +56,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -101,9 +122,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -112,15 +130,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -131,6 +148,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -140,9 +158,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -162,7 +177,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -242,12 +257,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -255,6 +269,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -269,14 +294,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -332,10 +360,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -454,25 +484,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -556,9 +584,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -620,7 +646,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -678,7 +704,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -696,8 +722,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -779,6 +805,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -852,6 +879,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -865,11 +893,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -900,16 +924,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index c4514c807776d..566efdfe45cb8 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -2,14 +2,17 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "3.0.4", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" + }, "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "main": "minimatch.js", "scripts": { - "test": "tap test/*.js --cov", + "test": "tap", "preversion": "npm test", "postversion": "npm publish", "postpublish": "git push origin --all; git push origin --tags" @@ -21,7 +24,7 @@ "brace-expansion": "^1.1.7" }, "devDependencies": { - "tap": "^10.3.2" + "tap": "^15.1.6" }, "license": "ISC", "files": [ diff --git a/node_modules/minipass-fetch/index.js b/node_modules/minipass-fetch/index.js deleted file mode 100644 index 07efc17880fa0..0000000000000 --- a/node_modules/minipass-fetch/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/index.js') diff --git a/node_modules/minipass-fetch/lib/blob.js b/node_modules/minipass-fetch/lib/blob.js index 9225db6f6ac3f..efe69a34458af 100644 --- a/node_modules/minipass-fetch/lib/blob.js +++ b/node_modules/minipass-fetch/lib/blob.js @@ -18,10 +18,10 @@ class Blob { const buffer = element instanceof Buffer ? element : ArrayBuffer.isView(element) ? Buffer.from(element.buffer, element.byteOffset, element.byteLength) - : element instanceof ArrayBuffer ? Buffer.from(element) - : element instanceof Blob ? element[BUFFER] - : typeof element === 'string' ? Buffer.from(element) - : Buffer.from(String(element)) + : element instanceof ArrayBuffer ? Buffer.from(element) + : element instanceof Blob ? element[BUFFER] + : typeof element === 'string' ? Buffer.from(element) + : Buffer.from(String(element)) size += buffer.length buffers.push(buffer) } diff --git a/node_modules/minipass-fetch/lib/body.js b/node_modules/minipass-fetch/lib/body.js index fb7ffc356fb6d..2b8e3bd2f9e83 100644 --- a/node_modules/minipass-fetch/lib/body.js +++ b/node_modules/minipass-fetch/lib/body.js @@ -3,7 +3,7 @@ const Minipass = require('minipass') const MinipassSized = require('minipass-sized') const Blob = require('./blob.js') -const {BUFFER} = Blob +const { BUFFER } = Blob const FetchError = require('./fetch-error.js') // optional dependency on 'encoding' @@ -24,10 +24,10 @@ class Body { : Buffer.isBuffer(bodyArg) ? bodyArg : Object.prototype.toString.call(bodyArg) === '[object ArrayBuffer]' ? Buffer.from(bodyArg) - : ArrayBuffer.isView(bodyArg) - ? Buffer.from(bodyArg.buffer, bodyArg.byteOffset, bodyArg.byteLength) - : Minipass.isStream(bodyArg) ? bodyArg - : Buffer.from(String(bodyArg)) + : ArrayBuffer.isView(bodyArg) + ? Buffer.from(bodyArg.buffer, bodyArg.byteOffset, bodyArg.byteLength) + : Minipass.isStream(bodyArg) ? bodyArg + : Buffer.from(String(bodyArg)) this[INTERNALS] = { body, @@ -94,28 +94,32 @@ class Body { } [CONSUME_BODY] () { - if (this[INTERNALS].disturbed) + if (this[INTERNALS].disturbed) { return Promise.reject(new TypeError(`body used already for: ${ this.url}`)) + } this[INTERNALS].disturbed = true - if (this[INTERNALS].error) + if (this[INTERNALS].error) { return Promise.reject(this[INTERNALS].error) + } // body is null if (this.body === null) { return Promise.resolve(Buffer.alloc(0)) } - if (Buffer.isBuffer(this.body)) + if (Buffer.isBuffer(this.body)) { return Promise.resolve(this.body) + } const upstream = isBlob(this.body) ? this.body.stream() : this.body /* istanbul ignore if: should never happen */ - if (!Minipass.isStream(upstream)) + if (!Minipass.isStream(upstream)) { return Promise.resolve(Buffer.alloc(0)) + } const stream = this.size && upstream instanceof MinipassSized ? upstream : !this.size && upstream instanceof Minipass && @@ -132,7 +136,7 @@ class Body { // do not keep the process open just for this timeout, even // though we expect it'll get cleared eventually. - if (resTimeout) { + if (resTimeout && resTimeout.unref) { resTimeout.unref() } @@ -152,21 +156,23 @@ class Body { }).catch(er => { clearTimeout(resTimeout) // request was aborted, reject with this Error - if (er.name === 'AbortError' || er.name === 'FetchError') + if (er.name === 'AbortError' || er.name === 'FetchError') { throw er - else if (er.name === 'RangeError') + } else if (er.name === 'RangeError') { throw new FetchError(`Could not create Buffer from response body for ${ this.url}: ${er.message}`, 'system', er) - else + } else { // other errors, such as incorrect content-encoding or content-length throw new FetchError(`Invalid response body while trying to fetch ${ this.url}: ${er.message}`, 'system', er) + } }) } static clone (instance) { - if (instance.bodyUsed) + if (instance.bodyUsed) { throw new Error('cannot clone body after it is used') + } const body = instance.body @@ -190,8 +196,9 @@ class Body { // set instance body to one fork, return the other instance[INTERNALS].body = p1 return p2 - } else + } else { return instance.body + } } static extractContentType (body) { @@ -199,38 +206,38 @@ class Body { : typeof body === 'string' ? 'text/plain;charset=UTF-8' : isURLSearchParams(body) ? 'application/x-www-form-urlencoded;charset=UTF-8' - : isBlob(body) ? body.type || null - : Buffer.isBuffer(body) ? null - : Object.prototype.toString.call(body) === '[object ArrayBuffer]' ? null - : ArrayBuffer.isView(body) ? null - : typeof body.getBoundary === 'function' - ? `multipart/form-data;boundary=${body.getBoundary()}` - : Minipass.isStream(body) ? null - : 'text/plain;charset=UTF-8' + : isBlob(body) ? body.type || null + : Buffer.isBuffer(body) ? null + : Object.prototype.toString.call(body) === '[object ArrayBuffer]' ? null + : ArrayBuffer.isView(body) ? null + : typeof body.getBoundary === 'function' + ? `multipart/form-data;boundary=${body.getBoundary()}` + : Minipass.isStream(body) ? null + : 'text/plain;charset=UTF-8' } static getTotalBytes (instance) { - const {body} = instance + const { body } = instance return (body === null || body === undefined) ? 0 - : isBlob(body) ? body.size - : Buffer.isBuffer(body) ? body.length - : body && typeof body.getLengthSync === 'function' && ( + : isBlob(body) ? body.size + : Buffer.isBuffer(body) ? body.length + : body && typeof body.getLengthSync === 'function' && ( // detect form data input from form-data module body._lengthRetrievers && - /* istanbul ignore next */ body._lengthRetrievers.length == 0 || // 1.x + /* istanbul ignore next */ body._lengthRetrievers.length === 0 || // 1.x body.hasKnownLength && body.hasKnownLength()) // 2.x - ? body.getLengthSync() - : null + ? body.getLengthSync() + : null } static writeToStream (dest, instance) { - const {body} = instance + const { body } = instance - if (body === null || body === undefined) + if (body === null || body === undefined) { dest.end() - else if (Buffer.isBuffer(body) || typeof body === 'string') + } else if (Buffer.isBuffer(body) || typeof body === 'string') { dest.end(body) - else { + } else { // body is stream or blob const stream = isBlob(body) ? body.stream() : body stream.on('error', er => dest.emit('error', er)).pipe(dest) @@ -246,10 +253,9 @@ Object.defineProperties(Body.prototype, { arrayBuffer: { enumerable: true }, blob: { enumerable: true }, json: { enumerable: true }, - text: { enumerable: true } + text: { enumerable: true }, }) - const isURLSearchParams = obj => // Duck-typing as a necessary condition. (typeof obj !== 'object' || @@ -274,26 +280,28 @@ const isBlob = obj => /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]) - const convertBody = (buffer, headers) => { /* istanbul ignore if */ - if (typeof convert !== 'function') + if (typeof convert !== 'function') { throw new Error('The package `encoding` must be installed to use the textConverted() function') + } const ct = headers && headers.get('content-type') let charset = 'utf-8' - let res, str + let res // header - if (ct) + if (ct) { res = /charset=([^;]*)/i.exec(ct) + } // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString() + const str = buffer.slice(0, 1024).toString() // html5 - if (!res && str) + if (!res && str) { res = / { if (!res) { res = / { // prevent decode issues when sites use incorrect encoding // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') + if (charset === 'gb2312' || charset === 'gbk') { charset = 'gb18030' + } } // turn raw buffers into a single utf-8 buffer diff --git a/node_modules/minipass-fetch/lib/fetch-error.js b/node_modules/minipass-fetch/lib/fetch-error.js index b0445cf844094..85f6e98fb78d4 100644 --- a/node_modules/minipass-fetch/lib/fetch-error.js +++ b/node_modules/minipass-fetch/lib/fetch-error.js @@ -5,8 +5,9 @@ class FetchError extends Error { this.code = 'FETCH_ERROR' // pick up code, expected, path, ... - if (systemError) + if (systemError) { Object.assign(this, systemError) + } this.errno = this.code diff --git a/node_modules/minipass-fetch/lib/headers.js b/node_modules/minipass-fetch/lib/headers.js index 233675fb1f78d..dd6e854d5ba39 100644 --- a/node_modules/minipass-fetch/lib/headers.js +++ b/node_modules/minipass-fetch/lib/headers.js @@ -1,24 +1,27 @@ 'use strict' -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/ +const invalidTokenRegex = /[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/ const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/ const validateName = name => { name = `${name}` - if (invalidTokenRegex.test(name) || name === '') + if (invalidTokenRegex.test(name) || name === '') { throw new TypeError(`${name} is not a legal HTTP header name`) + } } const validateValue = value => { value = `${value}` - if (invalidHeaderCharRegex.test(value)) + if (invalidHeaderCharRegex.test(value)) { throw new TypeError(`${value} is not a legal HTTP header value`) + } } const find = (map, name) => { name = name.toLowerCase() for (const key in map) { - if (key.toLowerCase() === name) + if (key.toLowerCase() === name) { return key + } } return undefined } @@ -39,25 +42,29 @@ class Headers { } // no-op - if (init === undefined || init === null) + if (init === undefined || init === null) { return + } if (typeof init === 'object') { const method = init[Symbol.iterator] if (method !== null && method !== undefined) { - if (typeof method !== 'function') + if (typeof method !== 'function') { throw new TypeError('Header pairs must be iterable') + } // sequence> // Note: per spec we have to first exhaust the lists then process them const pairs = [] for (const pair of init) { if (typeof pair !== 'object' || - typeof pair[Symbol.iterator] !== 'function') + typeof pair[Symbol.iterator] !== 'function') { throw new TypeError('Each header pair must be iterable') + } const arrPair = Array.from(pair) - if (arrPair.length !== 2) + if (arrPair.length !== 2) { throw new TypeError('Each header pair must be a name/value tuple') + } pairs.push(arrPair) } @@ -70,16 +77,18 @@ class Headers { this.append(key, init[key]) } } - } else + } else { throw new TypeError('Provided initializer must be an object') + } } get (name) { name = `${name}` validateName(name) const key = find(this[MAP], name) - if (key === undefined) + if (key === undefined) { return null + } return this[MAP][key].join(', ') } @@ -109,10 +118,11 @@ class Headers { validateName(name) validateValue(value) const key = find(this[MAP], name) - if (key !== undefined) + if (key !== undefined) { this[MAP][key].push(value) - else + } else { this[MAP][name] = [value] + } } has (name) { @@ -125,8 +135,9 @@ class Headers { name = `${name}` validateName(name) const key = find(this[MAP], name) - if (key !== undefined) + if (key !== undefined) { delete this[MAP][key] + } } raw () { @@ -141,7 +152,7 @@ class Headers { return new HeadersIterator(this, 'value') } - [Symbol.iterator]() { + [Symbol.iterator] () { return new HeadersIterator(this, 'key+value') } @@ -159,8 +170,9 @@ class Headers { // http.request() only supports string as Host header. This hack makes // specifying custom Host header possible. const hostHeaderKey = find(headers[MAP], 'Host') - if (hostHeaderKey !== undefined) + if (hostHeaderKey !== undefined) { obj[hostHeaderKey] = obj[hostHeaderKey][0] + } return obj } @@ -168,21 +180,25 @@ class Headers { static createHeadersLenient (obj) { const headers = new Headers() for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) + if (invalidTokenRegex.test(name)) { continue + } if (Array.isArray(obj[name])) { for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) + if (invalidHeaderCharRegex.test(val)) { continue + } - if (headers[MAP][name] === undefined) + if (headers[MAP][name] === undefined) { headers[MAP][name] = [val] - else + } else { headers[MAP][name].push(val) + } } - } else if (!invalidHeaderCharRegex.test(obj[name])) + } else if (!invalidHeaderCharRegex.test(obj[name])) { headers[MAP][name] = [obj[name]] + } } return headers } @@ -224,8 +240,9 @@ class HeadersIterator { next () { /* istanbul ignore if: should be impossible */ - if (!this || Object.getPrototypeOf(this) !== HeadersIterator.prototype) + if (!this || Object.getPrototypeOf(this) !== HeadersIterator.prototype) { throw new TypeError('Value of `this` is not a HeadersIterator') + } const { target, kind, index } = this[INTERNAL] const values = getHeaders(target, kind) diff --git a/node_modules/minipass-fetch/lib/index.js b/node_modules/minipass-fetch/lib/index.js index 2ffcba8510554..473630e1a5857 100644 --- a/node_modules/minipass-fetch/lib/index.js +++ b/node_modules/minipass-fetch/lib/index.js @@ -1,5 +1,5 @@ 'use strict' -const Url = require('url') +const { URL } = require('url') const http = require('http') const https = require('https') const zlib = require('minizlib') @@ -15,25 +15,41 @@ const { getNodeRequestOptions } = Request const FetchError = require('./fetch-error.js') const AbortError = require('./abort-error.js') -const resolveUrl = Url.resolve - -const fetch = (url, opts) => { +// XXX this should really be split up and unit-ized for easier testing +// and better DRY implementation of data/http request aborting +const fetch = async (url, opts) => { if (/^data:/.test(url)) { const request = new Request(url, opts) - try { - const split = url.split(',') - const data = Buffer.from(split[1], 'base64') - const type = split[0].match(/^data:(.*);base64$/)[1] - return Promise.resolve(new Response(data, { - headers: { - 'Content-Type': type, - 'Content-Length': data.length, + // delay 1 promise tick so that the consumer can abort right away + return Promise.resolve().then(() => new Promise((resolve, reject) => { + let type, data + try { + const { pathname, search } = new URL(url) + const split = pathname.split(',') + if (split.length < 2) { + throw new Error('invalid data: URI') } - })) - } catch (er) { - return Promise.reject(new FetchError(`[${request.method}] ${ - request.url} invalid URL, ${er.message}`, 'system', er)) - } + const mime = split.shift() + const base64 = /;base64$/.test(mime) + type = base64 ? mime.slice(0, -1 * ';base64'.length) : mime + const rawData = decodeURIComponent(split.join(',') + search) + data = base64 ? Buffer.from(rawData, 'base64') : Buffer.from(rawData) + } catch (er) { + return reject(new FetchError(`[${request.method}] ${ + request.url} invalid URL, ${er.message}`, 'system', er)) + } + + const { signal } = request + if (signal && signal.aborted) { + return reject(new AbortError('The user aborted a request.')) + } + + const headers = { 'Content-Length': data.length } + if (type) { + headers['Content-Type'] = type + } + return resolve(new Response(data, { headers })) + })) } return new Promise((resolve, reject) => { @@ -61,8 +77,9 @@ const fetch = (url, opts) => { } } - if (signal && signal.aborted) + if (signal && signal.aborted) { return abort() + } const abortAndFinalize = () => { abort() @@ -71,16 +88,18 @@ const fetch = (url, opts) => { const finalize = () => { req.abort() - if (signal) + if (signal) { signal.removeEventListener('abort', abortAndFinalize) + } clearTimeout(reqTimeout) } // send request const req = send(options) - if (signal) + if (signal) { signal.addEventListener('abort', abortAndFinalize) + } let reqTimeout = null if (request.timeout) { @@ -105,8 +124,9 @@ const fetch = (url, opts) => { // exits without warning. // coverage skipped here due to the difficulty in testing // istanbul ignore next - if (req.res) + if (req.res) { req.res.emit('error', er) + } reject(new FetchError(`request to ${request.url} failed, reason: ${ er.message}`, 'system', er)) finalize() @@ -124,98 +144,95 @@ const fetch = (url, opts) => { // HTTP fetch step 5.3 const locationURL = location === null ? null - : resolveUrl(request.url, location) + : (new URL(location, request.url)).toString() // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${ - request.url}`, 'no-redirect')) + if (request.redirect === 'error') { + reject(new FetchError('uri requested responds with a redirect, ' + + `redirect mode is set to error: ${request.url}`, 'no-redirect')) + finalize() + return + } else if (request.redirect === 'manual') { + // node-fetch-specific step: make manual redirect a bit easier to + // use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL) + } catch (err) { + /* istanbul ignore next: nodejs server prevent invalid + response headers, we can't test this through normal + request */ + reject(err) + } + } + } else if (request.redirect === 'follow' && locationURL !== null) { + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${ + request.url}`, 'max-redirect')) finalize() return - - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to - // use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL) - } catch (err) { - /* istanbul ignore next: nodejs server prevent invalid - response headers, we can't test this through normal - request */ - reject(err) - } - } - break - - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${ - request.url}`, 'max-redirect')) - finalize() - return - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && - request.body && - getTotalBytes(request) === null) { - reject(new FetchError( - 'Cannot follow redirect with body being a readable stream', - 'unsupported-redirect' - )) - finalize() - return - } - - // Update host due to redirection - request.headers.set('host', Url.parse(locationURL).host) - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || ( - (res.statusCode === 301 || res.statusCode === 302) && - request.method === 'POST' - )) { - requestOpts.method = 'GET' - requestOpts.body = undefined - requestOpts.headers.delete('content-length') - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))) + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && + request.body && + getTotalBytes(request) === null) { + reject(new FetchError( + 'Cannot follow redirect with body being a readable stream', + 'unsupported-redirect' + )) finalize() return + } + + // Update host due to redirection + request.headers.set('host', (new URL(locationURL)).host) + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || ( + (res.statusCode === 301 || res.statusCode === 302) && + request.method === 'POST' + )) { + requestOpts.method = 'GET' + requestOpts.body = undefined + requestOpts.headers.delete('content-length') + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))) + finalize() + return } } // end if(isRedirect) - // prepare response res.once('end', () => signal && signal.removeEventListener('abort', abortAndFinalize)) const body = new Minipass() + // if an error occurs, either on the response stream itself, on one of the + // decoder streams, or a response length timeout from the Body class, we + // forward the error through to our internal body stream. If we see an + // error event on that, we call finalize to abort the request and ensure + // we don't leave a socket believing a request is in flight. + // this is difficult to test, so lacks specific coverage. + body.on('error', finalize) // exceedingly rare that the stream would have an error, // but just in case we proxy it to the stream in use. res.on('error', /* istanbul ignore next */ er => body.emit('error', er)) @@ -231,7 +248,7 @@ const fetch = (url, opts) => { timeout: request.timeout, counter: request.counter, trailer: new Promise(resolve => - res.on('end', () => resolve(createHeadersLenient(res.trailers)))) + res.on('end', () => resolve(createHeadersLenient(res.trailers)))), } // HTTP-network fetch step 12.1.1.3 @@ -255,7 +272,6 @@ const fetch = (url, opts) => { return } - // Be less strict when decoding compressed responses, since sometimes // servers send slightly invalid responses that are still accepted // by common browsers. @@ -266,7 +282,7 @@ const fetch = (url, opts) => { } // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { + if (codings === 'gzip' || codings === 'x-gzip') { const unzip = new zlib.Gunzip(zlibOptions) response = new Response( // exceedingly rare that the stream would have an error, @@ -279,7 +295,7 @@ const fetch = (url, opts) => { } // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { + if (codings === 'deflate' || codings === 'x-deflate') { // handle the infamous raw deflate response from old servers // a hack for old IIS and Apache servers const raw = res.pipe(new Minipass()) @@ -297,9 +313,8 @@ const fetch = (url, opts) => { return } - // for br - if (codings == 'br') { + if (codings === 'br') { // ignoring coverage so tests don't have to fake support (or lack of) for brotli // istanbul ignore next try { diff --git a/node_modules/minipass-fetch/lib/request.js b/node_modules/minipass-fetch/lib/request.js index 278b27874eaac..e620df6de2c01 100644 --- a/node_modules/minipass-fetch/lib/request.js +++ b/node_modules/minipass-fetch/lib/request.js @@ -1,5 +1,5 @@ 'use strict' -const Url = require('url') +const { URL } = require('url') const Minipass = require('minipass') const Headers = require('./headers.js') const { exportNodeCompatibleHeaders } = Headers @@ -12,8 +12,6 @@ const defaultUserAgent = const INTERNALS = Symbol('Request internals') -const { parse: parseUrl, format: formatUrl } = Url - const isRequest = input => typeof input === 'object' && typeof input[INTERNALS] === 'object' @@ -28,21 +26,23 @@ const isAbortSignal = signal => { class Request extends Body { constructor (input, init = {}) { - const parsedURL = isRequest(input) ? Url.parse(input.url) - : input && input.href ? Url.parse(input.href) - : Url.parse(`${input}`) + const parsedURL = isRequest(input) ? new URL(input.url) + : input && input.href ? new URL(input.href) + : new URL(`${input}`) - if (isRequest(input)) + if (isRequest(input)) { init = { ...input[INTERNALS], ...init } - else if (!input || typeof input === 'string') + } else if (!input || typeof input === 'string') { input = {} + } const method = (init.method || input.method || 'GET').toUpperCase() const isGETHEAD = method === 'GET' || method === 'HEAD' if ((init.body !== null && init.body !== undefined || - isRequest(input) && input.body !== null) && isGETHEAD) + isRequest(input) && input.body !== null) && isGETHEAD) { throw new TypeError('Request with GET/HEAD method cannot have body') + } const inputBody = init.body !== null && init.body !== undefined ? init.body : isRequest(input) && input.body !== null ? clone(input) @@ -58,15 +58,17 @@ class Request extends Body { if (inputBody !== null && inputBody !== undefined && !headers.has('Content-Type')) { const contentType = extractContentType(inputBody) - if (contentType) + if (contentType) { headers.append('Content-Type', contentType) + } } const signal = 'signal' in init ? init.signal : null - if (signal !== null && signal !== undefined && !isAbortSignal(signal)) + if (signal !== null && signal !== undefined && !isAbortSignal(signal)) { throw new TypeError('Expected signal must be an instanceof AbortSignal') + } // TLS specific options that are handled by node const { @@ -125,23 +127,23 @@ class Request extends Body { this.agent = init.agent || input.agent } - get method() { + get method () { return this[INTERNALS].method } - get url() { - return formatUrl(this[INTERNALS].parsedURL) + get url () { + return this[INTERNALS].parsedURL.toString() } - get headers() { + get headers () { return this[INTERNALS].headers } - get redirect() { + get redirect () { return this[INTERNALS].redirect } - get signal() { + get signal () { return this[INTERNALS].signal } @@ -158,15 +160,14 @@ class Request extends Body { const headers = new Headers(request[INTERNALS].headers) // fetch step 1.3 - if (!headers.has('Accept')) + if (!headers.has('Accept')) { headers.set('Accept', '*/*') + } // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) - throw new TypeError('Only absolute URLs are supported') - - if (!/^https?:$/.test(parsedURL.protocol)) + if (!/^https?:$/.test(parsedURL.protocol)) { throw new TypeError('Only HTTP(S) protocols are supported') + } if (request.signal && Minipass.isStream(request.body) && @@ -181,25 +182,29 @@ class Request extends Body { /^(POST|PUT)$/i.test(request.method) ? '0' : request.body !== null && request.body !== undefined ? getTotalBytes(request) - : null + : null - if (contentLengthValue) + if (contentLengthValue) { headers.set('Content-Length', contentLengthValue + '') + } // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) + if (!headers.has('User-Agent')) { headers.set('User-Agent', defaultUserAgent) + } // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) + if (request.compress && !headers.has('Accept-Encoding')) { headers.set('Accept-Encoding', 'gzip,deflate') + } const agent = typeof request.agent === 'function' ? request.agent(parsedURL) : request.agent - if (!headers.has('Connection') && !agent) + if (!headers.has('Connection') && !agent) { headers.set('Connection', 'close') + } // TLS specific options that are handled by node const { @@ -225,8 +230,21 @@ class Request extends Body { // HTTP-network fetch step 4.2 // chunked encoding is handled by Node.js + // we cannot spread parsedURL directly, so we have to read each property one-by-one + // and map them to the equivalent https?.request() method options + const urlProps = { + auth: parsedURL.username || parsedURL.password + ? `${parsedURL.username}:${parsedURL.password}` + : '', + host: parsedURL.host, + hostname: parsedURL.hostname, + path: `${parsedURL.pathname}${parsedURL.search}`, + port: parsedURL.port, + protocol: parsedURL.protocol, + } + return { - ...parsedURL, + ...urlProps, method: request.method, headers: exportNodeCompatibleHeaders(headers), agent, diff --git a/node_modules/minipass-fetch/lib/response.js b/node_modules/minipass-fetch/lib/response.js index 854f789f89cfa..54cb52db3594a 100644 --- a/node_modules/minipass-fetch/lib/response.js +++ b/node_modules/minipass-fetch/lib/response.js @@ -17,8 +17,9 @@ class Response extends Body { if (body !== null && body !== undefined && !headers.has('Content-Type')) { const contentType = extractContentType(body) - if (contentType) + if (contentType) { headers.append('Content-Type', contentType) + } } this[INTERNALS] = { @@ -43,7 +44,7 @@ class Response extends Body { return this[INTERNALS].status } - get ok () { + get ok () { return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300 } diff --git a/node_modules/minipass-fetch/package.json b/node_modules/minipass-fetch/package.json index 1d7d9e4756623..47e32dad6df8b 100644 --- a/node_modules/minipass-fetch/package.json +++ b/node_modules/minipass-fetch/package.json @@ -1,6 +1,6 @@ { "name": "minipass-fetch", - "version": "1.4.1", + "version": "2.0.2", "description": "An implementation of window.fetch in Node.js using Minipass streams", "license": "MIT", "main": "lib/index.js", @@ -9,29 +9,35 @@ "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "postpublish": "git push origin --follow-tags", + "lint": "eslint '**/*.js'", + "postlint": "npm-template-check", + "template-copy": "npm-template-copy --force", + "lintfix": "npm run lint -- --fix", + "prepublishOnly": "git push origin --follow-tags", + "posttest": "npm run lint" }, "tap": { "coverage-map": "map.js", "check-coverage": true }, "devDependencies": { - "@ungap/url-search-params": "^0.1.2", + "@npmcli/template-oss": "^2.8.1", + "@ungap/url-search-params": "^0.2.2", "abort-controller": "^3.0.0", - "abortcontroller-polyfill": "~1.3.0", - "form-data": "^2.5.1", + "abortcontroller-polyfill": "~1.7.3", + "form-data": "^4.0.0", "parted": "^0.1.1", "string-to-arraybuffer": "^1.0.2", - "tap": "^15.0.9", - "whatwg-url": "^7.0.0" + "tap": "^15.1.6" }, "dependencies": { - "minipass": "^3.1.0", + "minipass": "^3.1.6", "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "minizlib": "^2.1.2" }, "optionalDependencies": { - "encoding": "^0.1.12" + "encoding": "^0.1.13" }, "repository": { "type": "git", @@ -44,10 +50,14 @@ "window.fetch" ], "files": [ - "index.js", - "lib/*.js" + "bin", + "lib" ], "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16" + }, + "author": "GitHub Inc.", + "templateOSS": { + "version": "2.8.1" } } diff --git a/node_modules/node-gyp/SECURITY.md b/node_modules/node-gyp/SECURITY.md new file mode 100644 index 0000000000000..1e168d76e3b1b --- /dev/null +++ b/node_modules/node-gyp/SECURITY.md @@ -0,0 +1,2 @@ +If you believe you have found a security issue in the software in this +repository, please consult https://github.com/nodejs/node/blob/HEAD/SECURITY.md. \ No newline at end of file diff --git a/node_modules/node-gyp/docs/Common-issues.md b/node_modules/node-gyp/docs/Common-issues.md deleted file mode 100644 index ae05fe326a010..0000000000000 --- a/node_modules/node-gyp/docs/Common-issues.md +++ /dev/null @@ -1,14 +0,0 @@ -## Python Issues OSX - -Make sure you are using the native Python version in OSX. If you use a MacPorts of HomeBrew version, you may run into problems. - -If you have issues with `execvp`, be sure to check your `$PYTHON` environment variable. If it is not set to the native version, unset it and try again. - -Notes: https://gist.github.com/erichocean/5177582 - -## npm ERR! `node-gyp rebuild`(Windows) -* just install the build tools from [here](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) -Please note the version as is required in below command e.g **2017** -* Launch cmd, run `npm config set msvs_version 2017` -* close and open new CMD/terminal and all is well :100: - diff --git a/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md b/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md new file mode 100644 index 0000000000000..c6304e490a75d --- /dev/null +++ b/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md @@ -0,0 +1,47 @@ +# Force npm to use global installed node-gyp + +**Note: These instructions only work with npm 6 or older. For a solution that works with npm 8 (or older), see [Updating-npm-bundled-node-gyp.md](Updating-npm-bundled-node-gyp.md).** + +[Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are +not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases). + +npm bundles its own, internal, copy of node-gyp located at `npm/node_modules`, within npm's private dependencies which are separate from *globally* accessible packages. Therefore this internal copy of node-gyp is independent from any globally installed copy of node-gyp that +may have been installed via `npm install -g node-gyp`. + +So npm's internal copy of node-gyp **isn't** stored inside *global* `node_modules` and thus isn't available for use as a standalone package. npm uses it's *internal* copy of `node-gyp` to automatically build native addons. + +When you install a _new_ version of node-gyp outside of npm, it'll go into your *global* `node_modules`, but not under the `npm/node_modules` (where internal copy of node-gyp is stored). So it will get into your `$PATH` and you will be able to use this globally installed version (**but not internal node-gyp of npm**) as any other globally installed package. + +The catch is that npm **won't** use global version unless you tell it to, it'll keep on using the **internal one**. You need to instruct it to by setting the `node_gyp` config variable (which goes into your `~/.npmrc`). You do this by running the `npm config set` command as below. Then npm will use the command in the path you supply whenever it needs to build a native addon. + +**Important**: You also need to remember to unset this when you upgrade npm with a newer version of node-gyp, or you have to manually keep your globally installed node-gyp to date. See "Undo" below. + +## Linux and macOS +``` +npm install --global node-gyp@latest +npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js +``` + +`sudo` may be required for the first command if you get a permission error. + +## Windows + +### Windows Command Prompt +``` +npm install --global node-gyp@latest +for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js" +``` + +### Powershell +``` +npm install --global node-gyp@latest +npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} +``` + +## Undo +**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with, which may end up being newer. + +``` +npm config delete node_gyp +npm uninstall --global node-gyp +``` diff --git a/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md b/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md index 0777687c2267f..1d91af6bb26d5 100644 --- a/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md +++ b/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md @@ -1,45 +1,72 @@ # Updating the npm-bundled version of node-gyp +**Note: These instructions are (only) tested and known to work with npm 8 and older.** + +**Note: These instructions will be undone if you reinstall or upgrade npm or node! For a more permanent (and simpler) solution, see [Force-npm-to-use-global-node-gyp.md](Force-npm-to-use-global-node-gyp.md). (npm 6 or older only!)** + [Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases). `npm` bundles its own, internal, copy of `node-gyp`. This internal copy is independent of any globally installed copy of node-gyp that may have been installed via `npm install -g node-gyp`. -Generally, npm's library files are installed inside your global "node_modules", where npm is installed (run `npm prefix` and add `lib/node_modules`, or just `node_modules` for Windows). There are some exceptions to this. Inside this global `node_modules/` there will be an `npm/` directory and inside this you'll find a `node_modules/node-gyp/` directory. So it may look something like `/usr/local/lib/node_modules/npm/node_modules/node-gyp/`. This is the version of node-gyp that ships with npm. +This means that while `node-gyp` doesn't get installed into your `$PATH` by default, npm still keeps its own copy to invoke when you +attempt to `npm install` a native add-on. -When you install a _new_ version of node-gyp outside of npm, it'll go into your global node_modules, but not under the `npm/node_modules`. So that may look like `/usr/local/lib/node_modules/node-gyp/`. It'll have the `node-gyp` executable linked into your `PATH` so running `node-gyp` will use this version. +Sometimes, you may need to update npm's internal node-gyp to a newer version than what is installed. A simple `npm install -g node-gyp` +_won't_ do the trick since npm will still continue to use its internal copy over the global one. -The catch is that npm won't use this version unless you tell it to, it'll keep on using the one you have installed. You need to instruct it to by setting the `node_gyp` config variable (which goes into your `~/.npmrc`). You do this by running the `npm config set` command as below. Then npm will use the command in the path you supply whenever it needs to build a native addon. +So instead: -**Important**: You also need to remember to unset this when you upgrade npm with a newer version of node-gyp, or you have to manually keep your globally installed node-gyp to date. See "Undo" below. +## Version of npm -## Linux and macOS -``` -npm install --global node-gyp@latest -npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js +We need to start by knowing your version of `npm`: +```bash +npm --version ``` -`sudo` may be required for the first command if you get a permission error. +## Linux, macOS, Solaris, etc. -## Windows +Unix is easy. Just run the following command. -### Windows Command Prompt +If your npm is version ___7 or 8___, do: +```bash +$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest ``` -npm install --global node-gyp@latest -for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js" + +Else if your npm is version ___less than 7___, do: +```bash +$ npm explore npm/node_modules/npm-lifecycle -g -- npm install node-gyp@latest ``` -### Powershell +If the command fails with a permissions error, please try `sudo` and then the command. + +## Windows + +Windows is a bit trickier, since `npm` might be installed to the "Program Files" directory, which needs admin privileges in order to +modify on current Windows. Therefore, run the following commands __inside a `cmd.exe` started with "Run as Administrator"__: + +First we need to find the location of `node`. If you don't already know the location that `node.exe` got installed to, then run: +```bash +$ where node ``` -npm install --global node-gyp@latest -npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} + +Now `cd` to the directory that `node.exe` is contained in e.g.: +```bash +$ cd "C:\Program Files\nodejs" ``` -## Undo -**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with, which may end up being newer. +If your npm version is ___7 or 8___, do: +```bash +cd node_modules\npm\node_modules\@npmcli\run-script +``` +Else if your npm version is ___less than 7___, do: +```bash +cd node_modules\npm\node_modules\npm-lifecycle ``` -npm config delete node_gyp -npm uninstall --global node-gyp + +Finish by running: +```bash +$ npm install node-gyp@latest ``` diff --git a/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md b/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md index c4603dd3d1384..795d2fd2ec618 100644 --- a/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md +++ b/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md @@ -45,4 +45,5 @@ To add to this page, just add the link to the project's `binding.gyp` file below * [nodecv](https://github.com/xudafeng/nodecv/blob/master/binding.gyp) * [magick-cli](https://github.com/NickNaso/magick-cli/blob/master/binding.gyp) * [sharp](https://github.com/lovell/sharp/blob/master/binding.gyp) - * [krb5](https://github.com/adaltas/node-krb5/blob/master/binding.gyp) \ No newline at end of file + * [krb5](https://github.com/adaltas/node-krb5/blob/master/binding.gyp) + * [node-heapdump](https://github.com/bnoordhuis/node-heapdump/blob/master/binding.gyp) diff --git a/node_modules/node-gyp/lib/configure.js b/node_modules/node-gyp/lib/configure.js index d9b8fe340ecdd..17a6487fa9caf 100644 --- a/node_modules/node-gyp/lib/configure.js +++ b/node_modules/node-gyp/lib/configure.js @@ -169,6 +169,8 @@ function configure (gyp, argv, callback) { }) } else { candidates = [ + 'out/Release/lib.target/libnode', + 'out/Debug/lib.target/libnode', 'out/Release/obj.target/libnode', 'out/Debug/obj.target/libnode', 'lib/libnode' diff --git a/node_modules/node-gyp/lib/create-config-gypi.js b/node_modules/node-gyp/lib/create-config-gypi.js index dbcb8b485c5df..ced4911502733 100644 --- a/node_modules/node-gyp/lib/create-config-gypi.js +++ b/node_modules/node-gyp/lib/create-config-gypi.js @@ -19,7 +19,8 @@ async function getBaseConfigGypi ({ gyp, nodeDir }) { // try reading $nodeDir/include/node/config.gypi first when: // 1. --dist-url or --nodedir is specified // 2. and --force-process-config is not specified - const shouldReadConfigGypi = (gyp.opts.nodedir || gyp.opts['dist-url']) && !gyp.opts['force-process-config'] + const useCustomHeaders = gyp.opts.nodedir || gyp.opts.disturl || gyp.opts['dist-url'] + const shouldReadConfigGypi = useCustomHeaders && !gyp.opts['force-process-config'] if (shouldReadConfigGypi && nodeDir) { try { const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi') diff --git a/node_modules/node-gyp/lib/node-gyp.js b/node_modules/node-gyp/lib/node-gyp.js index 0f111856412dd..e492ec1026d9d 100644 --- a/node_modules/node-gyp/lib/node-gyp.js +++ b/node_modules/node-gyp/lib/node-gyp.js @@ -149,6 +149,10 @@ proto.parseArgv = function parseOpts (argv) { // gyp@741b7f1 enters an infinite loop when it encounters // zero-length options so ensure those don't get through. if (name) { + // convert names like force_process_config to force-process-config + if (name.includes('_')) { + name = name.replace(/_/g, '-') + } this.opts[name] = val } } diff --git a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.d.ts b/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.d.ts deleted file mode 100644 index a7efe943b2acb..0000000000000 --- a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { EventEmitter } from 'events'; -declare function once(emitter: EventEmitter, name: string): once.CancelablePromise; -declare namespace once { - interface CancelFunction { - (): void; - } - interface CancelablePromise extends Promise { - cancel: CancelFunction; - } - type CancellablePromise = CancelablePromise; - function spread(emitter: EventEmitter, name: string): once.CancelablePromise; -} -export = once; diff --git a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js b/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js deleted file mode 100644 index bfd0dc88f758b..0000000000000 --- a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -function noop() { } -function once(emitter, name) { - const o = once.spread(emitter, name); - const r = o.then((args) => args[0]); - r.cancel = o.cancel; - return r; -} -(function (once) { - function spread(emitter, name) { - let c = null; - const p = new Promise((resolve, reject) => { - function cancel() { - emitter.removeListener(name, onEvent); - emitter.removeListener('error', onError); - p.cancel = noop; - } - function onEvent(...args) { - cancel(); - resolve(args); - } - function onError(err) { - cancel(); - reject(err); - } - c = cancel; - emitter.on(name, onEvent); - emitter.on('error', onError); - }); - if (!c) { - throw new TypeError('Could not get `cancel()` function'); - } - p.cancel = c; - return p; - } - once.spread = spread; -})(once || (once = {})); -module.exports = once; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js.map b/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js.map deleted file mode 100644 index 30d20491dbca8..0000000000000 --- a/node_modules/node-gyp/node_modules/@tootallnate/once/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,IAAI,CACZ,OAAqB,EACrB,IAAY;IAEZ,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAM,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAA8B,CAAC;IACtE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACpB,OAAO,CAAC,CAAC;AACV,CAAC;AAED,WAAU,IAAI;IAWb,SAAgB,MAAM,CACrB,OAAqB,EACrB,IAAY;QAEZ,IAAI,CAAC,GAA+B,IAAI,CAAC;QACzC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,SAAS,MAAM;gBACd,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,SAAS,OAAO,CAAC,GAAG,IAAW;gBAC9B,MAAM,EAAE,CAAC;gBACT,OAAO,CAAC,IAAS,CAAC,CAAC;YACpB,CAAC;YACD,SAAS,OAAO,CAAC,GAAU;gBAC1B,MAAM,EAAE,CAAC;gBACT,MAAM,CAAC,GAAG,CAAC,CAAC;YACb,CAAC;YACD,CAAC,GAAG,MAAM,CAAC;YACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9B,CAAC,CAA8B,CAAC;QAChC,IAAI,CAAC,CAAC,EAAE;YACP,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;SACzD;QACD,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACb,OAAO,CAAC,CAAC;IACV,CAAC;IA5Be,WAAM,SA4BrB,CAAA;AACF,CAAC,EAxCS,IAAI,KAAJ,IAAI,QAwCb;AAED,iBAAS,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/@tootallnate/once/package.json b/node_modules/node-gyp/node_modules/@tootallnate/once/package.json deleted file mode 100644 index 8343f9fad73ab..0000000000000 --- a/node_modules/node-gyp/node_modules/@tootallnate/once/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@tootallnate/once", - "version": "1.1.2", - "description": "Creates a Promise that waits for a single event", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/once.git" - }, - "keywords": [], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/once/issues" - }, - "devDependencies": { - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "rimraf": "^3.0.0", - "typescript": "^3.7.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.d.ts b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 3f043f7f9f756..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { HttpProxyAgentOptions } from '.'; -interface HttpProxyAgentClientRequest extends ClientRequest { - path: string; - output?: string[]; - outputData?: { - data: string; - }[]; - _header?: string | null; - _implicitHeader(): void; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -export default class HttpProxyAgent extends Agent { - private secureProxy; - private proxy; - constructor(_opts: string | HttpProxyAgentOptions); - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req: HttpProxyAgentClientRequest, opts: RequestOptions): Promise; -} -export {}; diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js deleted file mode 100644 index 0252850516819..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js +++ /dev/null @@ -1,145 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(require("net")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const debug_1 = __importDefault(require("debug")); -const once_1 = __importDefault(require("@tootallnate/once")); -const agent_base_1 = require("agent-base"); -const debug = debug_1.default('http-proxy-agent'); -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('Creating new HttpProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - const parsed = url_1.default.parse(req.path); - if (!parsed.protocol) { - parsed.protocol = 'http:'; - } - if (!parsed.hostname) { - parsed.hostname = opts.hostname || opts.host || null; - } - if (parsed.port == null && typeof opts.port) { - parsed.port = String(opts.port); - } - if (parsed.port === '80') { - // if port is 80, then we can remove the port so that the - // ":80" portion is not on the produced URL - delete parsed.port; - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = url_1.default.format(parsed); - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); - } - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - if (req._header) { - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._header = null; - req._implicitHeader(); - if (req.output && req.output.length > 0) { - // Node < 12 - debug('Patching connection write() output buffer with updated header'); - first = req.output[0]; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.output[0] = req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.output); - } - else if (req.outputData && req.outputData.length > 0) { - // Node >= 12 - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - yield once_1.default(socket, 'connect'); - return socket; - }); - } -} -exports.default = HttpProxyAgent; -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js.map b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js.map deleted file mode 100644 index 7a407620d8e50..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,kDAAgC;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;oBACF,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBAC/B,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBAC7C,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;wBACrB,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;oBAC7C,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;iBACnD;aACD;YAED,mEAAmE;YACnE,mEAAmE;YACnE,qEAAqE;YACrE,qDAAqD;YACrD,MAAM,cAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAE9B,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;CACD;AA1ID,iCA0IC"} \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.d.ts b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.d.ts deleted file mode 100644 index 24bdb52efcedc..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// -import net from 'net'; -import tls from 'tls'; -import { Url } from 'url'; -import { AgentOptions } from 'agent-base'; -import _HttpProxyAgent from './agent'; -declare function createHttpProxyAgent(opts: string | createHttpProxyAgent.HttpProxyAgentOptions): _HttpProxyAgent; -declare namespace createHttpProxyAgent { - interface BaseHttpProxyAgentOptions { - secureProxy?: boolean; - host?: string | null; - path?: string | null; - port?: string | number | null; - } - export interface HttpProxyAgentOptions extends AgentOptions, BaseHttpProxyAgentOptions, Partial> { - } - export type HttpProxyAgent = _HttpProxyAgent; - export const HttpProxyAgent: typeof _HttpProxyAgent; - export {}; -} -export = createHttpProxyAgent; diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js deleted file mode 100644 index 0a71180594605..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(require("./agent")); -function createHttpProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpProxyAgent) { - createHttpProxyAgent.HttpProxyAgent = agent_1.default; - createHttpProxyAgent.prototype = agent_1.default.prototype; -})(createHttpProxyAgent || (createHttpProxyAgent = {})); -module.exports = createHttpProxyAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js.map b/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js.map deleted file mode 100644 index e07dae5b08455..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAsC;AAEtC,SAAS,oBAAoB,CAC5B,IAAyD;IAEzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,WAAU,oBAAoB;IAmBhB,mCAAc,GAAG,eAAe,CAAC;IAE9C,oBAAoB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5D,CAAC,EAtBS,oBAAoB,KAApB,oBAAoB,QAsB7B;AAED,iBAAS,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/node-gyp/node_modules/http-proxy-agent/package.json b/node_modules/node-gyp/node_modules/http-proxy-agent/package.json deleted file mode 100644 index 870dd5d8af267..0000000000000 --- a/node_modules/node-gyp/node_modules/http-proxy-agent/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "http-proxy-agent", - "version": "4.0.1", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-http-proxy-agent.git" - }, - "keywords": [ - "http", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues" - }, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE b/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE deleted file mode 100644 index 8d28acf866d93..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js deleted file mode 100644 index 3675dd8ae981a..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict' -const LRU = require('lru-cache') -const url = require('url') -const isLambda = require('is-lambda') - -const AGENT_CACHE = new LRU({ max: 50 }) -const HttpAgent = require('agentkeepalive') -const HttpsAgent = HttpAgent.HttpsAgent - -module.exports = getAgent - -const getAgentTimeout = timeout => - typeof timeout !== 'number' || !timeout ? 0 : timeout + 1 - -const getMaxSockets = maxSockets => maxSockets || 15 - -function getAgent (uri, opts) { - const parsedUri = new url.URL(typeof uri === 'string' ? uri : uri.url) - const isHttps = parsedUri.protocol === 'https:' - const pxuri = getProxyUri(parsedUri.href, opts) - - // If opts.timeout is zero, set the agentTimeout to zero as well. A timeout - // of zero disables the timeout behavior (OS limits still apply). Else, if - // opts.timeout is a non-zero value, set it to timeout + 1, to ensure that - // the node-fetch-npm timeout will always fire first, giving us more - // consistent errors. - const agentTimeout = getAgentTimeout(opts.timeout) - const agentMaxSockets = getMaxSockets(opts.maxSockets) - - const key = [ - `https:${isHttps}`, - pxuri - ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` - : '>no-proxy<', - `local-address:${opts.localAddress || '>no-local-address<'}`, - `strict-ssl:${isHttps ? opts.rejectUnauthorized : '>no-strict-ssl<'}`, - `ca:${(isHttps && opts.ca) || '>no-ca<'}`, - `cert:${(isHttps && opts.cert) || '>no-cert<'}`, - `key:${(isHttps && opts.key) || '>no-key<'}`, - `timeout:${agentTimeout}`, - `maxSockets:${agentMaxSockets}`, - ].join(':') - - if (opts.agent != null) { // `agent: false` has special behavior! - return opts.agent - } - - // keep alive in AWS lambda makes no sense - const lambdaAgent = !isLambda ? null - : isHttps ? require('https').globalAgent - : require('http').globalAgent - - if (isLambda && !pxuri) - return lambdaAgent - - if (AGENT_CACHE.peek(key)) - return AGENT_CACHE.get(key) - - if (pxuri) { - const pxopts = isLambda ? { - ...opts, - agent: lambdaAgent, - } : opts - const proxy = getProxy(pxuri, pxopts, isHttps) - AGENT_CACHE.set(key, proxy) - return proxy - } - - const agent = isHttps ? new HttpsAgent({ - maxSockets: agentMaxSockets, - ca: opts.ca, - cert: opts.cert, - key: opts.key, - localAddress: opts.localAddress, - rejectUnauthorized: opts.rejectUnauthorized, - timeout: agentTimeout, - }) : new HttpAgent({ - maxSockets: agentMaxSockets, - localAddress: opts.localAddress, - timeout: agentTimeout, - }) - AGENT_CACHE.set(key, agent) - return agent -} - -function checkNoProxy (uri, opts) { - const host = new url.URL(uri).hostname.split('.').reverse() - let noproxy = (opts.noProxy || getProcessEnv('no_proxy')) - if (typeof noproxy === 'string') - noproxy = noproxy.split(/\s*,\s*/g) - - return noproxy && noproxy.some(no => { - const noParts = no.split('.').filter(x => x).reverse() - if (!noParts.length) - return false - for (let i = 0; i < noParts.length; i++) { - if (host[i] !== noParts[i]) - return false - } - return true - }) -} - -module.exports.getProcessEnv = getProcessEnv - -function getProcessEnv (env) { - if (!env) - return - - let value - - if (Array.isArray(env)) { - for (const e of env) { - value = process.env[e] || - process.env[e.toUpperCase()] || - process.env[e.toLowerCase()] - if (typeof value !== 'undefined') - break - } - } - - if (typeof env === 'string') { - value = process.env[env] || - process.env[env.toUpperCase()] || - process.env[env.toLowerCase()] - } - - return value -} - -module.exports.getProxyUri = getProxyUri -function getProxyUri (uri, opts) { - const protocol = new url.URL(uri).protocol - - const proxy = opts.proxy || - ( - protocol === 'https:' && - getProcessEnv('https_proxy') - ) || - ( - protocol === 'http:' && - getProcessEnv(['https_proxy', 'http_proxy', 'proxy']) - ) - if (!proxy) - return null - - const parsedProxy = (typeof proxy === 'string') ? new url.URL(proxy) : proxy - - return !checkNoProxy(uri, opts) && parsedProxy -} - -const getAuth = u => - u.username && u.password ? decodeURIComponent(`${u.username}:${u.password}`) - : u.username ? decodeURIComponent(u.username) - : null - -const getPath = u => u.pathname + u.search + u.hash - -const HttpProxyAgent = require('http-proxy-agent') -const HttpsProxyAgent = require('https-proxy-agent') -const SocksProxyAgent = require('socks-proxy-agent') -module.exports.getProxy = getProxy -function getProxy (proxyUrl, opts, isHttps) { - const popts = { - host: proxyUrl.hostname, - port: proxyUrl.port, - protocol: proxyUrl.protocol, - path: getPath(proxyUrl), - auth: getAuth(proxyUrl), - ca: opts.ca, - cert: opts.cert, - key: opts.key, - timeout: getAgentTimeout(opts.timeout), - localAddress: opts.localAddress, - maxSockets: getMaxSockets(opts.maxSockets), - rejectUnauthorized: opts.rejectUnauthorized, - } - - if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') { - if (!isHttps) - return new HttpProxyAgent(popts) - else - return new HttpsProxyAgent(popts) - } else if (proxyUrl.protocol.startsWith('socks')) - return new SocksProxyAgent(popts) - else { - throw Object.assign( - new Error(`unsupported proxy protocol: '${proxyUrl.protocol}'`), - { - url: proxyUrl.href, - } - ) - } -} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js deleted file mode 100644 index a2acea156ee6f..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js +++ /dev/null @@ -1,460 +0,0 @@ -const { Request, Response } = require('minipass-fetch') -const Minipass = require('minipass') -const MinipassCollect = require('minipass-collect') -const MinipassFlush = require('minipass-flush') -const MinipassPipeline = require('minipass-pipeline') -const cacache = require('cacache') -const url = require('url') - -const CachePolicy = require('./policy.js') -const cacheKey = require('./key.js') -const remote = require('../remote.js') - -const hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) - -// maximum amount of data we will buffer into memory -// if we'll exceed this, we switch to streaming -const MAX_MEM_SIZE = 5 * 1024 * 1024 // 5MB - -// allow list for request headers that will be written to the cache index -// note: we will also store any request headers -// that are named in a response's vary header -const KEEP_REQUEST_HEADERS = [ - 'accept-charset', - 'accept-encoding', - 'accept-language', - 'accept', - 'cache-control', -] - -// allow list for response headers that will be written to the cache index -// note: we must not store the real response's age header, or when we load -// a cache policy based on the metadata it will think the cached response -// is always stale -const KEEP_RESPONSE_HEADERS = [ - 'cache-control', - 'content-encoding', - 'content-language', - 'content-type', - 'date', - 'etag', - 'expires', - 'last-modified', - 'location', - 'pragma', - 'vary', -] - -// return an object containing all metadata to be written to the index -const getMetadata = (request, response, options) => { - const metadata = { - time: Date.now(), - url: request.url, - reqHeaders: {}, - resHeaders: {}, - } - - // only save the status if it's not a 200 or 304 - if (response.status !== 200 && response.status !== 304) - metadata.status = response.status - - for (const name of KEEP_REQUEST_HEADERS) { - if (request.headers.has(name)) - metadata.reqHeaders[name] = request.headers.get(name) - } - - // if the request's host header differs from the host in the url - // we need to keep it, otherwise it's just noise and we ignore it - const host = request.headers.get('host') - const parsedUrl = new url.URL(request.url) - if (host && parsedUrl.host !== host) - metadata.reqHeaders.host = host - - // if the response has a vary header, make sure - // we store the relevant request headers too - if (response.headers.has('vary')) { - const vary = response.headers.get('vary') - // a vary of "*" means every header causes a different response. - // in that scenario, we do not include any additional headers - // as the freshness check will always fail anyway and we don't - // want to bloat the cache indexes - if (vary !== '*') { - // copy any other request headers that will vary the response - const varyHeaders = vary.trim().toLowerCase().split(/\s*,\s*/) - for (const name of varyHeaders) { - // explicitly ignore accept-encoding here - if (name !== 'accept-encoding' && request.headers.has(name)) - metadata.reqHeaders[name] = request.headers.get(name) - } - } - } - - for (const name of KEEP_RESPONSE_HEADERS) { - if (response.headers.has(name)) - metadata.resHeaders[name] = response.headers.get(name) - } - - // we only store accept-encoding and content-encoding if the user - // has disabled automatic compression and decompression in minipass-fetch - // since if it's enabled (the default) then the content will have - // already been decompressed making the header a lie - if (options.compress === false) { - metadata.reqHeaders['accept-encoding'] = request.headers.get('accept-encoding') - metadata.resHeaders['content-encoding'] = response.headers.get('content-encoding') - } - - return metadata -} - -// symbols used to hide objects that may be lazily evaluated in a getter -const _request = Symbol('request') -const _response = Symbol('response') -const _policy = Symbol('policy') - -class CacheEntry { - constructor ({ entry, request, response, options }) { - if (entry) { - this.key = entry.key - this.entry = entry - // previous versions of this module didn't write an explicit timestamp in - // the metadata, so fall back to the entry's timestamp. we can't use the - // entry timestamp to determine staleness because cacache will update it - // when it verifies its data - this.entry.metadata.time = this.entry.metadata.time || this.entry.time - } else - this.key = cacheKey(request) - - this.options = options - - // these properties are behind getters that lazily evaluate - this[_request] = request - this[_response] = response - this[_policy] = null - } - - // returns a CacheEntry instance that satisfies the given request - // or undefined if no existing entry satisfies - static async find (request, options) { - try { - // compacts the index and returns an array of unique entries - var matches = await cacache.index.compact(options.cachePath, cacheKey(request), (A, B) => { - const entryA = new CacheEntry({ entry: A, options }) - const entryB = new CacheEntry({ entry: B, options }) - return entryA.policy.satisfies(entryB.request) - }, { - validateEntry: (entry) => { - // if an integrity is null, it needs to have a status specified - if (entry.integrity === null) - return !!(entry.metadata && entry.metadata.status) - - return true - }, - }) - } catch (err) { - // if the compact request fails, ignore the error and return - return - } - - // a cache mode of 'reload' means to behave as though we have no cache - // on the way to the network. return undefined to allow cacheFetch to - // create a brand new request no matter what. - if (options.cache === 'reload') - return - - // find the specific entry that satisfies the request - let match - for (const entry of matches) { - const _entry = new CacheEntry({ - entry, - options, - }) - - if (_entry.policy.satisfies(request)) { - match = _entry - break - } - } - - return match - } - - // if the user made a PUT/POST/PATCH then we invalidate our - // cache for the same url by deleting the index entirely - static async invalidate (request, options) { - const key = cacheKey(request) - try { - await cacache.rm.entry(options.cachePath, key, { removeFully: true }) - } catch (err) { - // ignore errors - } - } - - get request () { - if (!this[_request]) { - this[_request] = new Request(this.entry.metadata.url, { - method: 'GET', - headers: this.entry.metadata.reqHeaders, - }) - } - - return this[_request] - } - - get response () { - if (!this[_response]) { - this[_response] = new Response(null, { - url: this.entry.metadata.url, - counter: this.options.counter, - status: this.entry.metadata.status || 200, - headers: { - ...this.entry.metadata.resHeaders, - 'content-length': this.entry.size, - }, - }) - } - - return this[_response] - } - - get policy () { - if (!this[_policy]) { - this[_policy] = new CachePolicy({ - entry: this.entry, - request: this.request, - response: this.response, - options: this.options, - }) - } - - return this[_policy] - } - - // wraps the response in a pipeline that stores the data - // in the cache while the user consumes it - async store (status) { - // if we got a status other than 200, 301, or 308, - // or the CachePolicy forbid storage, append the - // cache status header and return it untouched - if (this.request.method !== 'GET' || ![200, 301, 308].includes(this.response.status) || !this.policy.storable()) { - this.response.headers.set('x-local-cache-status', 'skip') - return this.response - } - - const size = this.response.headers.get('content-length') - const fitsInMemory = !!size && Number(size) < MAX_MEM_SIZE - const shouldBuffer = this.options.memoize !== false && fitsInMemory - const cacheOpts = { - algorithms: this.options.algorithms, - metadata: getMetadata(this.request, this.response, this.options), - size, - memoize: fitsInMemory && this.options.memoize, - } - - let body = null - // we only set a body if the status is a 200, redirects are - // stored as metadata only - if (this.response.status === 200) { - let cacheWriteResolve, cacheWriteReject - const cacheWritePromise = new Promise((resolve, reject) => { - cacheWriteResolve = resolve - cacheWriteReject = reject - }) - - body = new MinipassPipeline(new MinipassFlush({ - flush () { - return cacheWritePromise - }, - })) - - let abortStream, onResume - if (shouldBuffer) { - // if the result fits in memory, use a collect stream to gather - // the response and write it to cacache while also passing it through - // to the user - onResume = () => { - const collector = new MinipassCollect.PassThrough() - abortStream = collector - collector.on('collect', (data) => { - // TODO if the cache write fails, log a warning but return the response anyway - cacache.put(this.options.cachePath, this.key, data, cacheOpts).then(cacheWriteResolve, cacheWriteReject) - }) - body.unshift(collector) - body.unshift(this.response.body) - } - } else { - // if it does not fit in memory, create a tee stream and use - // that to pipe to both the cache and the user simultaneously - onResume = () => { - const tee = new Minipass() - const cacheStream = cacache.put.stream(this.options.cachePath, this.key, cacheOpts) - abortStream = cacheStream - tee.pipe(cacheStream) - // TODO if the cache write fails, log a warning but return the response anyway - cacheStream.promise().then(cacheWriteResolve, cacheWriteReject) - body.unshift(tee) - body.unshift(this.response.body) - } - } - - body.once('resume', onResume) - body.once('end', () => body.removeListener('resume', onResume)) - this.response.body.on('error', (err) => { - // the abortStream will either be a MinipassCollect if we buffer - // or a cacache write stream, either way be sure to listen for - // errors from the actual response and avoid writing data that we - // know to be invalid to the cache - abortStream.destroy(err) - }) - } else - await cacache.index.insert(this.options.cachePath, this.key, null, cacheOpts) - - // note: we do not set the x-local-cache-hash header because we do not know - // the hash value until after the write to the cache completes, which doesn't - // happen until after the response has been sent and it's too late to write - // the header anyway - this.response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - this.response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - this.response.headers.set('x-local-cache-mode', shouldBuffer ? 'buffer' : 'stream') - this.response.headers.set('x-local-cache-status', status) - this.response.headers.set('x-local-cache-time', new Date().toISOString()) - const newResponse = new Response(body, { - url: this.response.url, - status: this.response.status, - headers: this.response.headers, - counter: this.options.counter, - }) - return newResponse - } - - // use the cached data to create a response and return it - async respond (method, options, status) { - let response - const size = Number(this.response.headers.get('content-length')) - const fitsInMemory = !!size && size < MAX_MEM_SIZE - const shouldBuffer = this.options.memoize !== false && fitsInMemory - if (method === 'HEAD' || [301, 308].includes(this.response.status)) { - // if the request is a HEAD, or the response is a redirect, - // then the metadata in the entry already includes everything - // we need to build a response - response = this.response - } else { - // we're responding with a full cached response, so create a body - // that reads from cacache and attach it to a new Response - const body = new Minipass() - const removeOnResume = () => body.removeListener('resume', onResume) - let onResume - if (shouldBuffer) { - onResume = async () => { - removeOnResume() - try { - const content = await cacache.get.byDigest(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - body.end(content) - } catch (err) { - if (err.code === 'EINTEGRITY') - await cacache.rm.content(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') - await CacheEntry.invalidate(this.request, this.options) - body.emit('error', err) - } - } - } else { - onResume = () => { - const cacheStream = cacache.get.stream.byDigest(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - cacheStream.on('error', async (err) => { - cacheStream.pause() - if (err.code === 'EINTEGRITY') - await cacache.rm.content(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }) - if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') - await CacheEntry.invalidate(this.request, this.options) - body.emit('error', err) - cacheStream.resume() - }) - cacheStream.pipe(body) - } - } - - body.once('resume', onResume) - body.once('end', removeOnResume) - response = new Response(body, { - url: this.entry.metadata.url, - counter: options.counter, - status: 200, - headers: { - ...this.policy.responseHeaders(), - }, - }) - } - - response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - response.headers.set('x-local-cache-hash', encodeURIComponent(this.entry.integrity)) - response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - response.headers.set('x-local-cache-mode', shouldBuffer ? 'buffer' : 'stream') - response.headers.set('x-local-cache-status', status) - response.headers.set('x-local-cache-time', new Date(this.entry.metadata.time).toUTCString()) - return response - } - - // use the provided request along with this cache entry to - // revalidate the stored response. returns a response, either - // from the cache or from the update - async revalidate (request, options) { - const revalidateRequest = new Request(request, { - headers: this.policy.revalidationHeaders(request), - }) - - try { - // NOTE: be sure to remove the headers property from the - // user supplied options, since we have already defined - // them on the new request object. if they're still in the - // options then those will overwrite the ones from the policy - var response = await remote(revalidateRequest, { - ...options, - headers: undefined, - }) - } catch (err) { - // if the network fetch fails, return the stale - // cached response unless it has a cache-control - // of 'must-revalidate' - if (!this.policy.mustRevalidate) - return this.respond(request.method, options, 'stale') - - throw err - } - - if (this.policy.revalidated(revalidateRequest, response)) { - // we got a 304, write a new index to the cache and respond from cache - const metadata = getMetadata(request, response, options) - // 304 responses do not include headers that are specific to the response data - // since they do not include a body, so we copy values for headers that were - // in the old cache entry to the new one, if the new metadata does not already - // include that header - for (const name of KEEP_RESPONSE_HEADERS) { - if (!hasOwnProperty(metadata.resHeaders, name) && hasOwnProperty(this.entry.metadata.resHeaders, name)) - metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] - } - - try { - await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, { - size: this.entry.size, - metadata, - }) - } catch (err) { - // if updating the cache index fails, we ignore it and - // respond anyway - } - return this.respond(request.method, options, 'revalidated') - } - - // if we got a modified response, create a new entry based on it - const newEntry = new CacheEntry({ - request, - response, - options, - }) - - // respond with the new entry while writing it to the cache - return newEntry.store('updated') - } -} - -module.exports = CacheEntry diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js deleted file mode 100644 index 31e97c4b033c0..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js +++ /dev/null @@ -1,10 +0,0 @@ -class NotCachedError extends Error { - constructor (url) { - super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`) - this.code = 'ENOTCACHED' - } -} - -module.exports = { - NotCachedError, -} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js deleted file mode 100644 index cca93d9b4eb5d..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js +++ /dev/null @@ -1,45 +0,0 @@ -const { NotCachedError } = require('./errors.js') -const CacheEntry = require('./entry.js') -const remote = require('../remote.js') - -// do whatever is necessary to get a Response and return it -const cacheFetch = async (request, options) => { - // try to find a cached entry that satisfies this request - const entry = await CacheEntry.find(request, options) - if (!entry) { - // no cached result, if the cache mode is 'only-if-cached' that's a failure - if (options.cache === 'only-if-cached') - throw new NotCachedError(request.url) - - // otherwise, we make a request, store it and return it - const response = await remote(request, options) - const entry = new CacheEntry({ request, response, options }) - return entry.store('miss') - } - - // we have a cached response that satisfies this request, however if the cache - // mode is 'no-cache' then we send the revalidation request no matter what - if (options.cache === 'no-cache') - return entry.revalidate(request, options) - - // if the cached entry is not stale, or if the cache mode is 'force-cache' or - // 'only-if-cached' we can respond with the cached entry. set the status - // based on the result of needsRevalidation and respond - const _needsRevalidation = entry.policy.needsRevalidation(request) - if (options.cache === 'force-cache' || - options.cache === 'only-if-cached' || - !_needsRevalidation) - return entry.respond(request.method, options, _needsRevalidation ? 'stale' : 'hit') - - // if we got here, the cache entry is stale so revalidate it - return entry.revalidate(request, options) -} - -cacheFetch.invalidate = async (request, options) => { - if (!options.cachePath) - return - - return CacheEntry.invalidate(request, options) -} - -module.exports = cacheFetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js deleted file mode 100644 index f7684d562b7fa..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js +++ /dev/null @@ -1,17 +0,0 @@ -const { URL, format } = require('url') - -// options passed to url.format() when generating a key -const formatOptions = { - auth: false, - fragment: false, - search: true, - unicode: false, -} - -// returns a string to be used as the cache key for the Request -const cacheKey = (request) => { - const parsed = new URL(request.url) - return `make-fetch-happen:request-cache:${format(parsed, formatOptions)}` -} - -module.exports = cacheKey diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js deleted file mode 100644 index e0959f64ddf9d..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js +++ /dev/null @@ -1,161 +0,0 @@ -const CacheSemantics = require('http-cache-semantics') -const Negotiator = require('negotiator') -const ssri = require('ssri') - -// HACK: negotiator lazy loads several of its own modules -// as a micro optimization. we need to be sure that they're -// in memory as soon as possible at startup so that we do -// not try to lazy load them after the directory has been -// retired during a self update of the npm CLI, we do this -// by calling all of the methods that trigger a lazy load -// on a fake instance. -const preloadNegotiator = new Negotiator({ headers: {} }) -preloadNegotiator.charsets() -preloadNegotiator.encodings() -preloadNegotiator.languages() -preloadNegotiator.mediaTypes() - -// options passed to http-cache-semantics constructor -const policyOptions = { - shared: false, - ignoreCargoCult: true, -} - -// a fake empty response, used when only testing the -// request for storability -const emptyResponse = { status: 200, headers: {} } - -// returns a plain object representation of the Request -const requestObject = (request) => { - const _obj = { - method: request.method, - url: request.url, - headers: {}, - } - - request.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -// returns a plain object representation of the Response -const responseObject = (response) => { - const _obj = { - status: response.status, - headers: {}, - } - - response.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -class CachePolicy { - constructor ({ entry, request, response, options }) { - this.entry = entry - this.request = requestObject(request) - this.response = responseObject(response) - this.options = options - this.policy = new CacheSemantics(this.request, this.response, policyOptions) - - if (this.entry) { - // if we have an entry, copy the timestamp to the _responseTime - // this is necessary because the CacheSemantics constructor forces - // the value to Date.now() which means a policy created from a - // cache entry is likely to always identify itself as stale - this.policy._responseTime = this.entry.metadata.time - } - } - - // static method to quickly determine if a request alone is storable - static storable (request, options) { - // no cachePath means no caching - if (!options.cachePath) - return false - - // user explicitly asked not to cache - if (options.cache === 'no-store') - return false - - // we only cache GET and HEAD requests - if (!['GET', 'HEAD'].includes(request.method)) - return false - - // otherwise, let http-cache-semantics make the decision - // based on the request's headers - const policy = new CacheSemantics(requestObject(request), emptyResponse, policyOptions) - return policy.storable() - } - - // returns true if the policy satisfies the request - satisfies (request) { - const _req = requestObject(request) - if (this.request.headers.host !== _req.headers.host) - return false - - const negotiatorA = new Negotiator(this.request) - const negotiatorB = new Negotiator(_req) - - if (JSON.stringify(negotiatorA.mediaTypes()) !== JSON.stringify(negotiatorB.mediaTypes())) - return false - - if (JSON.stringify(negotiatorA.languages()) !== JSON.stringify(negotiatorB.languages())) - return false - - if (JSON.stringify(negotiatorA.encodings()) !== JSON.stringify(negotiatorB.encodings())) - return false - - if (this.options.integrity) - return ssri.parse(this.options.integrity).match(this.entry.integrity) - - return true - } - - // returns true if the request and response allow caching - storable () { - return this.policy.storable() - } - - // NOTE: this is a hack to avoid parsing the cache-control - // header ourselves, it returns true if the response's - // cache-control contains must-revalidate - get mustRevalidate () { - return !!this.policy._rescc['must-revalidate'] - } - - // returns true if the cached response requires revalidation - // for the given request - needsRevalidation (request) { - const _req = requestObject(request) - // force method to GET because we only cache GETs - // but can serve a HEAD from a cached GET - _req.method = 'GET' - return !this.policy.satisfiesWithoutRevalidation(_req) - } - - responseHeaders () { - return this.policy.responseHeaders() - } - - // returns a new object containing the appropriate headers - // to send a revalidation request - revalidationHeaders (request) { - const _req = requestObject(request) - return this.policy.revalidationHeaders(_req) - } - - // returns true if the request/response was revalidated - // successfully. returns false if a new response was received - revalidated (request, response) { - const _req = requestObject(request) - const _res = responseObject(response) - const policy = this.policy.revalidatedPolicy(_req, _res) - return !policy.modified - } -} - -module.exports = CachePolicy diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js deleted file mode 100644 index dfded79295da1..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict' - -const { FetchError, Request, isRedirect } = require('minipass-fetch') -const url = require('url') - -const CachePolicy = require('./cache/policy.js') -const cache = require('./cache/index.js') -const remote = require('./remote.js') - -// given a Request, a Response and user options -// return true if the response is a redirect that -// can be followed. we throw errors that will result -// in the fetch being rejected if the redirect is -// possible but invalid for some reason -const canFollowRedirect = (request, response, options) => { - if (!isRedirect(response.status)) - return false - - if (options.redirect === 'manual') - return false - - if (options.redirect === 'error') - throw new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect', { code: 'ENOREDIRECT' }) - - if (!response.headers.has('location')) - throw new FetchError(`redirect location header missing for: ${request.url}`, 'no-location', { code: 'EINVALIDREDIRECT' }) - - if (request.counter >= request.follow) - throw new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect', { code: 'EMAXREDIRECT' }) - - return true -} - -// given a Request, a Response, and the user's options return an object -// with a new Request and a new options object that will be used for -// following the redirect -const getRedirect = (request, response, options) => { - const _opts = { ...options } - const location = response.headers.get('location') - const redirectUrl = new url.URL(location, /^https?:/.test(location) ? undefined : request.url) - // Comment below is used under the following license: - // Copyright (c) 2010-2012 Mikeal Rogers - // Licensed under the Apache License, Version 2.0 (the "License"); - // you may not use this file except in compliance with the License. - // You may obtain a copy of the License at - // http://www.apache.org/licenses/LICENSE-2.0 - // Unless required by applicable law or agreed to in writing, - // software distributed under the License is distributed on an "AS - // IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - // express or implied. See the License for the specific language - // governing permissions and limitations under the License. - - // Remove authorization if changing hostnames (but not if just - // changing ports or protocols). This matches the behavior of request: - // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138 - if (new url.URL(request.url).hostname !== redirectUrl.hostname) - request.headers.delete('authorization') - - // for POST request with 301/302 response, or any request with 303 response, - // use GET when following redirect - if (response.status === 303 || (request.method === 'POST' && [301, 302].includes(response.status))) { - _opts.method = 'GET' - _opts.body = null - request.headers.delete('content-length') - } - - _opts.headers = {} - request.headers.forEach((value, key) => { - _opts.headers[key] = value - }) - - _opts.counter = ++request.counter - const redirectReq = new Request(url.format(redirectUrl), _opts) - return { - request: redirectReq, - options: _opts, - } -} - -const fetch = async (request, options) => { - const response = CachePolicy.storable(request, options) - ? await cache(request, options) - : await remote(request, options) - - // if the request wasn't a GET or HEAD, and the response - // status is between 200 and 399 inclusive, invalidate the - // request url - if (!['GET', 'HEAD'].includes(request.method) && - response.status >= 200 && - response.status <= 399) - await cache.invalidate(request, options) - - if (!canFollowRedirect(request, response, options)) - return response - - const redirect = getRedirect(request, response, options) - return fetch(redirect.request, redirect.options) -} - -module.exports = fetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js deleted file mode 100644 index 6028bc0725129..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js +++ /dev/null @@ -1,40 +0,0 @@ -const { FetchError, Headers, Request, Response } = require('minipass-fetch') - -const configureOptions = require('./options.js') -const fetch = require('./fetch.js') - -const makeFetchHappen = (url, opts) => { - const options = configureOptions(opts) - - const request = new Request(url, options) - return fetch(request, options) -} - -makeFetchHappen.defaults = (defaultUrl, defaultOptions = {}) => { - if (typeof defaultUrl === 'object') { - defaultOptions = defaultUrl - defaultUrl = null - } - - const defaultedFetch = (url, options = {}) => { - const finalUrl = url || defaultUrl - const finalOptions = { - ...defaultOptions, - ...options, - headers: { - ...defaultOptions.headers, - ...options.headers, - }, - } - return makeFetchHappen(finalUrl, finalOptions) - } - - defaultedFetch.defaults = makeFetchHappen.defaults - return defaultedFetch -} - -module.exports = makeFetchHappen -module.exports.FetchError = FetchError -module.exports.Headers = Headers -module.exports.Request = Request -module.exports.Response = Response diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js deleted file mode 100644 index f6138e6e1d13a..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js +++ /dev/null @@ -1,44 +0,0 @@ -const conditionalHeaders = [ - 'if-modified-since', - 'if-none-match', - 'if-unmodified-since', - 'if-match', - 'if-range', -] - -const configureOptions = (opts) => { - const {strictSSL, ...options} = { ...opts } - options.method = options.method ? options.method.toUpperCase() : 'GET' - options.rejectUnauthorized = strictSSL !== false - - if (!options.retry) - options.retry = { retries: 0 } - else if (typeof options.retry === 'string') { - const retries = parseInt(options.retry, 10) - if (isFinite(retries)) - options.retry = { retries } - else - options.retry = { retries: 0 } - } else if (typeof options.retry === 'number') - options.retry = { retries: options.retry } - else - options.retry = { retries: 0, ...options.retry } - - options.cache = options.cache || 'default' - if (options.cache === 'default') { - const hasConditionalHeader = Object.keys(options.headers || {}).some((name) => { - return conditionalHeaders.includes(name.toLowerCase()) - }) - if (hasConditionalHeader) - options.cache = 'no-store' - } - - // cacheManager is deprecated, but if it's set and - // cachePath is not we should copy it to the new field - if (options.cacheManager && !options.cachePath) - options.cachePath = options.cacheManager - - return options -} - -module.exports = configureOptions diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js deleted file mode 100644 index 7e4ed24edb530..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js +++ /dev/null @@ -1,102 +0,0 @@ -const Minipass = require('minipass') -const MinipassPipeline = require('minipass-pipeline') -const fetch = require('minipass-fetch') -const promiseRetry = require('promise-retry') -const ssri = require('ssri') - -const getAgent = require('./agent.js') -const pkg = require('../package.json') - -const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})` - -const RETRY_ERRORS = [ - 'ECONNRESET', // remote socket closed on us - 'ECONNREFUSED', // remote host refused to open connection - 'EADDRINUSE', // failed to bind to a local port (proxy?) - 'ETIMEDOUT', // someone in the transaction is WAY TOO SLOW - 'ERR_SOCKET_TIMEOUT', // same as above, but this one comes from agentkeepalive - // Known codes we do NOT retry on: - // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline) -] - -const RETRY_TYPES = [ - 'request-timeout', -] - -// make a request directly to the remote source, -// retrying certain classes of errors as well as -// following redirects (through the cache if necessary) -// and verifying response integrity -const remoteFetch = (request, options) => { - const agent = getAgent(request.url, options) - if (!request.headers.has('connection')) - request.headers.set('connection', agent ? 'keep-alive' : 'close') - - if (!request.headers.has('user-agent')) - request.headers.set('user-agent', USER_AGENT) - - // keep our own options since we're overriding the agent - // and the redirect mode - const _opts = { - ...options, - agent, - redirect: 'manual', - } - - return promiseRetry(async (retryHandler, attemptNum) => { - const req = new fetch.Request(request, _opts) - try { - let res = await fetch(req, _opts) - if (_opts.integrity && res.status === 200) { - // we got a 200 response and the user has specified an expected - // integrity value, so wrap the response in an ssri stream to verify it - const integrityStream = ssri.integrityStream({ integrity: _opts.integrity }) - res = new fetch.Response(new MinipassPipeline(res.body, integrityStream), res) - } - - res.headers.set('x-fetch-attempts', attemptNum) - - // do not retry POST requests, or requests with a streaming body - // do retry requests with a 408, 420, 429 or 500+ status in the response - const isStream = Minipass.isStream(req.body) - const isRetriable = req.method !== 'POST' && - !isStream && - ([408, 420, 429].includes(res.status) || res.status >= 500) - - if (isRetriable) { - if (typeof options.onRetry === 'function') - options.onRetry(res) - - return retryHandler(res) - } - - return res - } catch (err) { - const code = (err.code === 'EPROMISERETRY') - ? err.retried.code - : err.code - - // err.retried will be the thing that was thrown from above - // if it's a response, we just got a bad status code and we - // can re-throw to allow the retry - const isRetryError = err.retried instanceof fetch.Response || - (RETRY_ERRORS.includes(code) && RETRY_TYPES.includes(err.type)) - - if (req.method === 'POST' || isRetryError) - throw err - - if (typeof options.onRetry === 'function') - options.onRetry(err) - - return retryHandler(err) - } - }, options.retry).catch((err) => { - // don't reject for http errors, just return them - if (err.status >= 400 && err.type !== 'system') - return err - - throw err - }) -} - -module.exports = remoteFetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/package.json b/node_modules/node-gyp/node_modules/make-fetch-happen/package.json deleted file mode 100644 index dae7b37da4069..0000000000000 --- a/node_modules/node-gyp/node_modules/make-fetch-happen/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "make-fetch-happen", - "version": "9.1.0", - "description": "Opinionated, caching, retrying fetch client", - "main": "lib/index.js", - "files": [ - "lib" - ], - "scripts": { - "preversion": "npm t", - "postversion": "npm publish", - "prepublishOnly": "git push --follow-tags", - "test": "tap", - "posttest": "npm run lint", - "eslint": "eslint", - "lint": "npm run eslint -- lib test", - "lintfix": "npm run lint -- --fix" - }, - "repository": "https://github.com/npm/make-fetch-happen", - "keywords": [ - "http", - "request", - "fetch", - "mean girls", - "caching", - "cache", - "subresource integrity" - ], - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" - }, - "license": "ISC", - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "devDependencies": { - "eslint": "^7.26.0", - "eslint-plugin-import": "^2.23.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", - "eslint-plugin-standard": "^5.0.0", - "mkdirp": "^1.0.4", - "nock": "^13.0.11", - "npmlog": "^5.0.0", - "require-inject": "^1.4.2", - "rimraf": "^3.0.2", - "safe-buffer": "^5.2.1", - "standard-version": "^9.3.0", - "tap": "^15.0.9" - }, - "engines": { - "node": ">= 10" - }, - "tap": { - "color": 1, - "files": "test/*.js", - "check-coverage": true - } -} diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json index fbeae5e20dc2b..e795db1834538 100644 --- a/node_modules/node-gyp/package.json +++ b/node_modules/node-gyp/package.json @@ -11,7 +11,7 @@ "bindings", "gyp" ], - "version": "8.4.1", + "version": "9.0.0", "installVersion": 9, "author": "Nathan Rajlich (http://tootallnate.net)", "repository": { @@ -25,7 +25,7 @@ "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.3", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -34,7 +34,7 @@ "which": "^2.0.2" }, "engines": { - "node": ">= 10.12.0" + "node": "^12.22 || ^14.13 || >=16" }, "devDependencies": { "bindings": "^1.5.0", diff --git a/node_modules/node-gyp/test/test-options.js b/node_modules/node-gyp/test/test-options.js index b2ac62c874f06..8a634f0e0955d 100644 --- a/node_modules/node-gyp/test/test-options.js +++ b/node_modules/node-gyp/test/test-options.js @@ -29,3 +29,14 @@ test('options in environment', (t) => { t.deepEqual(Object.keys(g.opts).sort(), keys.sort()) }) + +test('options with spaces in environment', (t) => { + t.plan(1) + + process.env.npm_config_force_process_config = 'true' + + const g = gyp() + g.parseArgv(['rebuild']) // Also sets opts.argv. + + t.equal(g.opts['force-process-config'], 'true') +}) diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json index 9349619e99e61..75236be2a9015 100644 --- a/node_modules/npm-registry-fetch/package.json +++ b/node_modules/npm-registry-fetch/package.json @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "13.0.0", + "version": "13.0.1", "description": "Fetch-based http client for use with npm registry APIs", "main": "lib", "files": [ @@ -31,16 +31,16 @@ "author": "GitHub Inc.", "license": "ISC", "dependencies": { - "make-fetch-happen": "^10.0.2", + "make-fetch-happen": "^10.0.3", "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^9.0.0", "proc-log": "^2.0.0" }, "devDependencies": { - "@npmcli/template-oss": "^2.7.1", + "@npmcli/template-oss": "^2.8.1", "cacache": "^15.3.0", "nock": "^13.2.4", "require-inject": "^1.4.4", @@ -55,6 +55,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.7.1" + "version": "2.8.1" } } diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js index a79b1d2fedee4..93703f369265c 100644 --- a/node_modules/signal-exit/index.js +++ b/node_modules/signal-exit/index.js @@ -19,7 +19,9 @@ const processOk = function (process) { // some kind of non-node environment, just no-op /* istanbul ignore if */ if (!processOk(process)) { - module.exports = function () {} + module.exports = function () { + return function () {} + } } else { var assert = require('assert') var signals = require('./signals.js') @@ -52,7 +54,7 @@ if (!processOk(process)) { module.exports = function (cb, opts) { /* istanbul ignore if */ if (!processOk(global.process)) { - return + return function () {} } assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json index 3e6ee68c1bf63..e1a00311f9fbe 100644 --- a/node_modules/signal-exit/package.json +++ b/node_modules/signal-exit/package.json @@ -1,6 +1,6 @@ { "name": "signal-exit", - "version": "3.0.6", + "version": "3.0.7", "description": "when you want to fire an event no matter how a process exits.", "main": "index.js", "scripts": { diff --git a/node_modules/socks/build/client/socksclient.js b/node_modules/socks/build/client/socksclient.js index 8bda6f7e06c5d..40a82a53214a4 100644 --- a/node_modules/socks/build/client/socksclient.js +++ b/node_modules/socks/build/client/socksclient.js @@ -24,7 +24,7 @@ class SocksClient extends events_1.EventEmitter { super(); this.options = Object.assign({}, options); // Validate SocksClientOptions - helpers_1.validateSocksClientOptions(options); + (0, helpers_1.validateSocksClientOptions)(options); // Default state this.setState(constants_1.SocksClientState.Created); } @@ -40,7 +40,7 @@ class SocksClient extends events_1.EventEmitter { return new Promise((resolve, reject) => { // Validate SocksClientOptions try { - helpers_1.validateSocksClientOptions(options, ['connect']); + (0, helpers_1.validateSocksClientOptions)(options, ['connect']); } catch (err) { if (typeof callback === 'function') { @@ -89,7 +89,7 @@ class SocksClient extends events_1.EventEmitter { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { // Validate SocksClientChainOptions try { - helpers_1.validateSocksClientChainOptions(options); + (0, helpers_1.validateSocksClientChainOptions)(options); } catch (err) { if (typeof callback === 'function') { @@ -103,7 +103,7 @@ class SocksClient extends events_1.EventEmitter { let sock; // Shuffle proxies if (options.randomizeChain) { - util_1.shuffleArray(options.proxies); + (0, util_1.shuffleArray)(options.proxies); } try { // tslint:disable-next-line:no-increment-decrement @@ -113,7 +113,8 @@ class SocksClient extends events_1.EventEmitter { const nextDestination = i === options.proxies.length - 1 ? options.destination : { - host: options.proxies[i + 1].ipaddress, + host: options.proxies[i + 1].host || + options.proxies[i + 1].ipaddress, port: options.proxies[i + 1].port, }; // Creates the next connection in the chain. @@ -549,7 +550,8 @@ class SocksClient extends events_1.EventEmitter { } sendSocks5CustomAuthentication() { return __awaiter(this, void 0, void 0, function* () { - this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size; + this.nextRequiredPacketBufferSize = + this.options.proxy.custom_auth_response_size; this.socket.write(yield this.options.proxy.custom_auth_request_handler()); this.setState(constants_1.SocksClientState.SentAuthentication); }); @@ -581,7 +583,8 @@ class SocksClient extends events_1.EventEmitter { authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)); } else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) { - authResult = yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)); + authResult = + yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)); } else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) { authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size)); diff --git a/node_modules/socks/build/client/socksclient.js.map b/node_modules/socks/build/client/socksclient.js.map index 25843ac0ef21f..15d0b565ac33f 100644 --- a/node_modules/socks/build/client/socksclient.js.map +++ b/node_modules/socks/build/client/socksclient.js.map @@ -1 +1 @@ -{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAoC;AACpC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAAyC;AACzC,mDAkB6B;AAC7B,+CAG2B;AAC3B,2DAAsD;AACtD,yCAA8D;AA86B5D,iGA96BM,uBAA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AAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;YAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,OAAO,EACf;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file +{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAoC;AACpC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAAyC;AACzC,mDAkB6B;AAC7B,+CAG2B;AAC3B,2DAAsD;AACtD,yCAA8D;AAg7B5D,iGAh7BM,uBAAgB,OAg7BN;AAt5BlB,MAAM,WAAY,SAAQ,qBAAY;IAgBpC,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,qBACP,OAAO,CACX,CAAC;QAEF,8BAA8B;QAC9B,IAAA,oCAA0B,EAAC,OAAO,CAAC,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,OAA2B,EAC3B,QAAmB;QAEnB,OAAO,IAAI,OAAO,CAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,8BA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ACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,OAAO,EACf;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file diff --git a/node_modules/socks/package.json b/node_modules/socks/package.json index c518b1ef7cf06..61c3f1dcf17fd 100644 --- a/node_modules/socks/package.json +++ b/node_modules/socks/package.json @@ -1,7 +1,7 @@ { "name": "socks", "private": false, - "version": "2.6.1", + "version": "2.6.2", "description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", "main": "build/index.js", "typings": "typings/index.d.ts", @@ -34,21 +34,19 @@ "readmeFilename": "README.md", "devDependencies": { "@types/ip": "1.1.0", - "@types/mocha": "^8.2.2", - "@types/node": "^14.14.41", - "coveralls": "3.1.0", - "mocha": "^8.3.2", + "@types/mocha": "^9.1.0", + "@types/node": "^17.0.15", + "coveralls": "^3.1.1", + "mocha": "^9.2.0", "nyc": "15.1.0", - "prettier": "^2.2.1", + "prettier": "^2.5.1", "socks5-server": "^0.1.1", - "ts-node": "^9.1.1", - "tslint": "^6.1.3", - "tslint-config-airbnb": "^5.11.2", - "typescript": "^4.2.4" + "ts-node": "^10.4.0", + "typescript": "^4.5.5" }, "dependencies": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" }, "scripts": { "prepublish": "npm install -g typescript && npm run build", diff --git a/node_modules/typedarray-to-buffer/index.js b/node_modules/typedarray-to-buffer/index.js deleted file mode 100644 index fd1e192b2656b..0000000000000 --- a/node_modules/typedarray-to-buffer/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh */ -/** - * Convert a typed array to a Buffer without a copy - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install typedarray-to-buffer` - */ - -module.exports = function typedarrayToBuffer (arr) { - return ArrayBuffer.isView(arr) - // To avoid a copy, use the typed array's underlying ArrayBuffer to back - // new Buffer, respecting the "view", i.e. byteOffset and byteLength - ? Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength) - // Pass through all other types to `Buffer.from` - : Buffer.from(arr) -} diff --git a/node_modules/typedarray-to-buffer/package.json b/node_modules/typedarray-to-buffer/package.json deleted file mode 100644 index 502a322c6d746..0000000000000 --- a/node_modules/typedarray-to-buffer/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "typedarray-to-buffer", - "description": "Convert a typed array to a Buffer without a copy", - "version": "4.0.0", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/typedarray-to-buffer/issues" - }, - "dependencies": {}, - "devDependencies": { - "airtap": "^3.0.0", - "standard": "*", - "tape": "^5.0.1" - }, - "homepage": "http://feross.org", - "keywords": [ - "buffer", - "typed array", - "convert", - "no copy", - "uint8array", - "uint16array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/typedarray-to-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/write-file-atomic/lib/index.js b/node_modules/write-file-atomic/lib/index.js index 9a7d183aecb4c..118666d2ce6d8 100644 --- a/node_modules/write-file-atomic/lib/index.js +++ b/node_modules/write-file-atomic/lib/index.js @@ -8,8 +8,6 @@ const fs = require('fs') const MurmurHash3 = require('imurmurhash') const onExit = require('signal-exit') const path = require('path') -const isTypedArray = require('is-typedarray') -const typedArrayToBuffer = require('typedarray-to-buffer') const { promisify } = require('util') const activeFiles = {} @@ -110,10 +108,7 @@ async function writeFileAsync (filename, data, options = {}) { if (options.tmpfileCreated) { await options.tmpfileCreated(tmpfile) } - if (isTypedArray(data)) { - data = typedArrayToBuffer(data) - } - if (Buffer.isBuffer(data)) { + if (ArrayBuffer.isView(data)) { await promisify(fs.write)(fd, data, 0, data.length, 0) } else if (data != null) { await promisify(fs.write)(fd, String(data), 0, String(options.encoding || 'utf8')) @@ -215,10 +210,7 @@ function writeFileSync (filename, data, options) { if (options.tmpfileCreated) { options.tmpfileCreated(tmpfile) } - if (isTypedArray(data)) { - data = typedArrayToBuffer(data) - } - if (Buffer.isBuffer(data)) { + if (ArrayBuffer.isView(data)) { fs.writeSync(fd, data, 0, data.length, 0) } else if (data != null) { fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8')) diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json index 031eccdba8707..7219f90b97be0 100644 --- a/node_modules/write-file-atomic/package.json +++ b/node_modules/write-file-atomic/package.json @@ -1,6 +1,6 @@ { "name": "write-file-atomic", - "version": "4.0.0", + "version": "4.0.1", "description": "Write files in an atomic fashion w/configurable ownership", "main": "./lib/index.js", "scripts": { @@ -12,7 +12,8 @@ "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "lintfix": "npm run lint -- --fix", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "repository": { "type": "git", @@ -30,12 +31,10 @@ "homepage": "https://github.com/npm/write-file-atomic", "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^4.0.0" + "signal-exit": "^3.0.7" }, "devDependencies": { - "@npmcli/template-oss": "^2.5.1", + "@npmcli/template-oss": "^2.7.1", "mkdirp": "^1.0.4", "rimraf": "^3.0.2", "tap": "^15.1.6" @@ -49,6 +48,6 @@ }, "templateOSS": { "windowsCI": false, - "version": "2.5.1" + "version": "2.7.1" } } diff --git a/package-lock.json b/package-lock.json index 6913559537e72..61fd3016b39f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,10 +89,10 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^5.0.0", "@npmcli/ci-detect": "^2.0.0", - "@npmcli/config": "^4.0.0", + "@npmcli/config": "^4.0.1", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", - "@npmcli/run-script": "^3.0.0", + "@npmcli/run-script": "^3.0.1", "abbrev": "~1.1.1", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", @@ -122,20 +122,20 @@ "libnpmsearch": "^5.0.0", "libnpmteam": "^4.0.0", "libnpmversion": "^3.0.0", - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^10.0.4", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", "mkdirp-infer-owner": "^2.0.0", "ms": "^2.1.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "nopt": "^5.0.0", "npm-audit-report": "^2.1.5", "npm-install-checks": "^4.0.0", "npm-package-arg": "^9.0.0", "npm-pick-manifest": "^7.0.0", "npm-profile": "^6.0.2", - "npm-registry-fetch": "^13.0.0", + "npm-registry-fetch": "^13.0.1", "npm-user-validate": "^1.0.1", "npmlog": "^6.0.1", "opener": "^1.5.2", @@ -156,7 +156,7 @@ "treeverse": "^1.0.4", "validate-npm-package-name": "~3.0.0", "which": "^2.0.2", - "write-file-atomic": "^4.0.0" + "write-file-atomic": "^4.0.1" }, "bin": { "npm": "bin/npm-cli.js", @@ -164,7 +164,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^2.0.0", - "@npmcli/template-oss": "^2.4.3", + "@npmcli/template-oss": "^2.9.1", "eslint": "^8.3.0", "licensee": "^8.2.0", "spawk": "^1.7.1", @@ -625,9 +625,9 @@ } }, "node_modules/@gar/promisify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", - "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "inBundle": true }, "node_modules/@humanwhocodes/config-array": { @@ -815,12 +815,12 @@ } }, "node_modules/@npmcli/config": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.0.0.tgz", - "integrity": "sha512-iywEsUhkA6GSgTS3vHLxHttU6lovSYt7wCGD0MOsjfd1YAUlz8243TXUKhcJiPfWvQYB4FnZkn30m3KmZS8GuA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.0.1.tgz", + "integrity": "sha512-pd9lYWFuDARcfXyXJKm/aHy7p9bYDKfUh/7Kg1L+3YYgCmqtqe4exFSnEIDuFO361A8xcKnj2Edev/Cj1cWbgg==", "inBundle": true, "dependencies": { - "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/map-workspaces": "^2.0.1", "ini": "^2.0.0", "mkdirp-infer-owner": "^2.0.0", "nopt": "^5.0.0", @@ -897,9 +897,9 @@ } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.4.0.tgz", + "integrity": "sha512-YOfuyWa/Ee+PXbDm40j9WXyJrzQUynVbgn4Km643UYcWNcrSfRkKL0WaiUcxcIbkXcVTgNpDqSnPXntWXT75cw==", "inBundle": true, "engines": { "node": ">=12" @@ -922,20 +922,41 @@ } }, "node_modules/@npmcli/map-workspaces": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.0.tgz", - "integrity": "sha512-QBJfpCY1NOAkkW3lFfru9VTdqvMB2TN0/vrevl5xBCv5Fi0XDVcA6rqqSau4Ysi4Iw3fBzyXV7hzyTBDfadf7g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.1.tgz", + "integrity": "sha512-awwkB/tSWWaCD8F0IbawBdmoPFlbXMaEPN9LyTuJcyJz404/QhB4B/vhQntpk6uxOAkM+bxR7qWMJghYg0tcYQ==", "inBundle": true, "dependencies": { "@npmcli/name-from-folder": "^1.0.1", - "glob": "^7.1.6", - "minimatch": "^3.0.4", - "read-package-json-fast": "^2.0.1" + "glob": "^7.2.0", + "minimatch": "^5.0.0", + "read-package-json-fast": "^2.0.3" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" } }, + "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "inBundle": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "inBundle": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@npmcli/metavuln-calculator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-3.0.0.tgz", @@ -994,14 +1015,14 @@ } }, "node_modules/@npmcli/run-script": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.0.tgz", - "integrity": "sha512-jIdmUepw+kVP2WEE/+XrBIvrSF5miDutdGBrQ8May6uHVAvpAb0m3NRHcJ0lKWbQ1BxsRFsmTrjkdY99qTTVIw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", "inBundle": true, "dependencies": { "@npmcli/node-gyp": "^1.0.3", "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "read-package-json-fast": "^2.0.3" }, "engines": { @@ -1009,20 +1030,21 @@ } }, "node_modules/@npmcli/template-oss": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-2.4.3.tgz", - "integrity": "sha512-y+efKAT2WTw3c7ShDxpF9HOPH3XmruO0TPJlJrxMaJ7yPZ/vrrRcGCP00gOr4QHVFtbmfXVMU+kuVIkkKJt7xg==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-2.9.1.tgz", + "integrity": "sha512-cngaFvSSN7YveXW3jm5Q8t34ayUJnZci0D+dBjN/IcYCpj9nkXh8kfFx1TE5LNQX3YZeo6e8jZIDvMchV+iPRQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/fs": "^2.0.1", + "@npmcli/map-workspaces": "^2.0.1", "@npmcli/package-json": "^1.0.1", "json-parse-even-better-errors": "^2.3.1", "which": "^2.0.2" }, "bin": { - "npm-template-check": "bin/npm-template-check.js" + "npm-template-check": "bin/npm-template-check.js", + "npm-template-copy": "bin/postinstall.js" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" @@ -1032,6 +1054,19 @@ "tap": "^15.0.9" } }, + "node_modules/@npmcli/template-oss/node_modules/@npmcli/fs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.0.1.tgz", + "integrity": "sha512-vlaJ+kcURCo0SK1afdX5BQ9hgbXDKhpOxdIOg3jvn7wnKp8NcSDjvYc490VuJn2ciOgAFXV9qZzZPgHlcpXkxA==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -1136,9 +1171,9 @@ } }, "node_modules/agentkeepalive": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", - "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "inBundle": true, "dependencies": { "debug": "^4.1.0", @@ -3374,20 +3409,20 @@ "dev": true }, "node_modules/gauge": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", - "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.2.tgz", + "integrity": "sha512-aSPRm2CvA9R8QyU5eXMFPd+cYkyxLsXHd2l5/FOH2V/eml//M04G6KZOmTap07O1PvEwNcl2NndyLfK8g3QrKA==", "inBundle": true, "dependencies": { "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "wide-align": "^1.1.5" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" @@ -4335,7 +4370,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "inBundle": true + "dev": true }, "node_modules/is-weakref": { "version": "1.0.1", @@ -4951,21 +4986,21 @@ "peer": true }, "node_modules/make-fetch-happen": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", - "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.4.tgz", + "integrity": "sha512-CiReW6usy3UXby5N46XjWfLPFPq1glugCszh18I0NYJCwr129ZAx9j3Dlv+cRsK0q3VjlVysEzhdtdw2+NhdYA==", "inBundle": true, "dependencies": { - "agentkeepalive": "^4.2.0", + "agentkeepalive": "^4.2.1", "cacache": "^15.3.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.3.1", + "lru-cache": "^7.4.0", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", @@ -4978,9 +5013,9 @@ } }, "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.4.0.tgz", + "integrity": "sha512-YOfuyWa/Ee+PXbDm40j9WXyJrzQUynVbgn4Km643UYcWNcrSfRkKL0WaiUcxcIbkXcVTgNpDqSnPXntWXT75cw==", "inBundle": true, "engines": { "node": ">=12" @@ -5113,9 +5148,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "inBundle": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -5155,20 +5190,20 @@ } }, "node_modules/minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.2.tgz", + "integrity": "sha512-M63u5yWX0yxY1C3DcLVY1xWai0pNM3qa1xCMXFgdejY5F/NTmyzNVHGcBxKerX51lssqxwWWTjpg/ZPuD39gOQ==", "inBundle": true, "dependencies": { - "minipass": "^3.1.0", + "minipass": "^3.1.6", "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "minizlib": "^2.1.2" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16" }, "optionalDependencies": { - "encoding": "^0.1.12" + "encoding": "^0.1.13" } }, "node_modules/minipass-flush": { @@ -5335,15 +5370,15 @@ "dev": true }, "node_modules/node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", + "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", "inBundle": true, "dependencies": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.3", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -5355,57 +5390,7 @@ "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": ">= 10.12.0" - } - }, - "node_modules/node-gyp/node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "inBundle": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/node-gyp/node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "inBundle": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/node-gyp/node_modules/make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", - "inBundle": true, - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" + "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/node-modules-regexp": { @@ -5582,14 +5567,14 @@ } }, "node_modules/npm-registry-fetch": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", - "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", + "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", "inBundle": true, "dependencies": { - "make-fetch-happen": "^10.0.2", + "make-fetch-happen": "^10.0.3", "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^9.0.0", @@ -6938,9 +6923,9 @@ } }, "node_modules/signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "inBundle": true }, "node_modules/simple-concat": { @@ -6985,13 +6970,13 @@ } }, "node_modules/socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "inBundle": true, "dependencies": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" }, "engines": { "node": ">= 10.13.0", @@ -9599,26 +9584,6 @@ "node": ">=8" } }, - "node_modules/typedarray-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz", - "integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true - }, "node_modules/typescript": { "version": "3.9.10", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", @@ -10136,15 +10101,13 @@ "inBundle": true }, "node_modules/write-file-atomic": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz", - "integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "inBundle": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^4.0.0" + "signal-exit": "^3.0.7" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" @@ -11198,9 +11161,9 @@ } }, "@gar/promisify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", - "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, "@humanwhocodes/config-array": { "version": "0.6.0", @@ -11399,11 +11362,11 @@ "integrity": "sha512-8yQtQ9ArHh/TzdUDKQwEvwCgpDuhSWTDAbiKMl3854PcT+Dk4UmWaiawuFTLy9n5twzXOBXVflWe+90/ffXQrA==" }, "@npmcli/config": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.0.0.tgz", - "integrity": "sha512-iywEsUhkA6GSgTS3vHLxHttU6lovSYt7wCGD0MOsjfd1YAUlz8243TXUKhcJiPfWvQYB4FnZkn30m3KmZS8GuA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.0.1.tgz", + "integrity": "sha512-pd9lYWFuDARcfXyXJKm/aHy7p9bYDKfUh/7Kg1L+3YYgCmqtqe4exFSnEIDuFO361A8xcKnj2Edev/Cj1cWbgg==", "requires": { - "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/map-workspaces": "^2.0.1", "ini": "^2.0.0", "mkdirp-infer-owner": "^2.0.0", "nopt": "^5.0.0", @@ -11456,9 +11419,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.4.0.tgz", + "integrity": "sha512-YOfuyWa/Ee+PXbDm40j9WXyJrzQUynVbgn4Km643UYcWNcrSfRkKL0WaiUcxcIbkXcVTgNpDqSnPXntWXT75cw==" } } }, @@ -11472,14 +11435,32 @@ } }, "@npmcli/map-workspaces": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.0.tgz", - "integrity": "sha512-QBJfpCY1NOAkkW3lFfru9VTdqvMB2TN0/vrevl5xBCv5Fi0XDVcA6rqqSau4Ysi4Iw3fBzyXV7hzyTBDfadf7g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.1.tgz", + "integrity": "sha512-awwkB/tSWWaCD8F0IbawBdmoPFlbXMaEPN9LyTuJcyJz404/QhB4B/vhQntpk6uxOAkM+bxR7qWMJghYg0tcYQ==", "requires": { "@npmcli/name-from-folder": "^1.0.1", - "glob": "^7.1.6", - "minimatch": "^3.0.4", - "read-package-json-fast": "^2.0.1" + "glob": "^7.2.0", + "minimatch": "^5.0.0", + "read-package-json-fast": "^2.0.3" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "@npmcli/metavuln-calculator": { @@ -11529,27 +11510,39 @@ } }, "@npmcli/run-script": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.0.tgz", - "integrity": "sha512-jIdmUepw+kVP2WEE/+XrBIvrSF5miDutdGBrQ8May6uHVAvpAb0m3NRHcJ0lKWbQ1BxsRFsmTrjkdY99qTTVIw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", "requires": { "@npmcli/node-gyp": "^1.0.3", "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "read-package-json-fast": "^2.0.3" } }, "@npmcli/template-oss": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-2.4.3.tgz", - "integrity": "sha512-y+efKAT2WTw3c7ShDxpF9HOPH3XmruO0TPJlJrxMaJ7yPZ/vrrRcGCP00gOr4QHVFtbmfXVMU+kuVIkkKJt7xg==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-2.9.1.tgz", + "integrity": "sha512-cngaFvSSN7YveXW3jm5Q8t34ayUJnZci0D+dBjN/IcYCpj9nkXh8kfFx1TE5LNQX3YZeo6e8jZIDvMchV+iPRQ==", "dev": true, "requires": { - "@npmcli/fs": "^1.0.0", - "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/fs": "^2.0.1", + "@npmcli/map-workspaces": "^2.0.1", "@npmcli/package-json": "^1.0.1", "json-parse-even-better-errors": "^2.3.1", "which": "^2.0.2" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.0.1.tgz", + "integrity": "sha512-vlaJ+kcURCo0SK1afdX5BQ9hgbXDKhpOxdIOg3jvn7wnKp8NcSDjvYc490VuJn2ciOgAFXV9qZzZPgHlcpXkxA==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + } } }, "@tootallnate/once": { @@ -11636,9 +11629,9 @@ } }, "agentkeepalive": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", - "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "requires": { "debug": "^4.1.0", "depd": "^1.1.2", @@ -13315,19 +13308,19 @@ "dev": true }, "gauge": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", - "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.2.tgz", + "integrity": "sha512-aSPRm2CvA9R8QyU5eXMFPd+cYkyxLsXHd2l5/FOH2V/eml//M04G6KZOmTap07O1PvEwNcl2NndyLfK8g3QrKA==", "requires": { "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "wide-align": "^1.1.5" }, "dependencies": { "ansi-regex": { @@ -13962,7 +13955,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-weakref": { "version": "1.0.1", @@ -14666,20 +14660,20 @@ "peer": true }, "make-fetch-happen": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", - "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.4.tgz", + "integrity": "sha512-CiReW6usy3UXby5N46XjWfLPFPq1glugCszh18I0NYJCwr129ZAx9j3Dlv+cRsK0q3VjlVysEzhdtdw2+NhdYA==", "requires": { - "agentkeepalive": "^4.2.0", + "agentkeepalive": "^4.2.1", "cacache": "^15.3.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.3.1", + "lru-cache": "^7.4.0", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", @@ -14689,9 +14683,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.4.0.tgz", + "integrity": "sha512-YOfuyWa/Ee+PXbDm40j9WXyJrzQUynVbgn4Km643UYcWNcrSfRkKL0WaiUcxcIbkXcVTgNpDqSnPXntWXT75cw==" } } }, @@ -14783,9 +14777,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } @@ -14813,14 +14807,14 @@ } }, "minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.2.tgz", + "integrity": "sha512-M63u5yWX0yxY1C3DcLVY1xWai0pNM3qa1xCMXFgdejY5F/NTmyzNVHGcBxKerX51lssqxwWWTjpg/ZPuD39gOQ==", "requires": { - "encoding": "^0.1.12", - "minipass": "^3.1.0", + "encoding": "^0.1.13", + "minipass": "^3.1.6", "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "minizlib": "^2.1.2" } }, "minipass-flush": { @@ -14949,60 +14943,20 @@ "dev": true }, "node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", + "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", "requires": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.3", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", "tar": "^6.1.2", "which": "^2.0.2" - }, - "dependencies": { - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", - "requires": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - } - } } }, "node-modules-regexp": { @@ -15130,13 +15084,13 @@ } }, "npm-registry-fetch": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", - "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", + "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", "requires": { - "make-fetch-happen": "^10.0.2", + "make-fetch-happen": "^10.0.3", "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^9.0.0", @@ -16154,9 +16108,9 @@ } }, "signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "simple-concat": { "version": "1.0.1", @@ -16181,12 +16135,12 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, "socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "requires": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" } }, "socks-proxy-agent": { @@ -17987,11 +17941,6 @@ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, - "typedarray-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz", - "integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==" - }, "typescript": { "version": "3.9.10", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", @@ -18382,14 +18331,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz", - "integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^4.0.0" + "signal-exit": "^3.0.7" } }, "ws": { diff --git a/package.json b/package.json index d7574cb99e32b..5e72cb5f683b0 100644 --- a/package.json +++ b/package.json @@ -57,10 +57,10 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^5.0.0", "@npmcli/ci-detect": "^2.0.0", - "@npmcli/config": "^4.0.0", + "@npmcli/config": "^4.0.1", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", - "@npmcli/run-script": "^3.0.0", + "@npmcli/run-script": "^3.0.1", "abbrev": "~1.1.1", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", @@ -90,20 +90,20 @@ "libnpmsearch": "^5.0.0", "libnpmteam": "^4.0.0", "libnpmversion": "^3.0.0", - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^10.0.4", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", "mkdirp-infer-owner": "^2.0.0", "ms": "^2.1.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "nopt": "^5.0.0", "npm-audit-report": "^2.1.5", "npm-install-checks": "^4.0.0", "npm-package-arg": "^9.0.0", "npm-pick-manifest": "^7.0.0", "npm-profile": "^6.0.2", - "npm-registry-fetch": "^13.0.0", + "npm-registry-fetch": "^13.0.1", "npm-user-validate": "^1.0.1", "npmlog": "^6.0.1", "opener": "^1.5.2", @@ -124,7 +124,7 @@ "treeverse": "^1.0.4", "validate-npm-package-name": "~3.0.0", "which": "^2.0.2", - "write-file-atomic": "^4.0.0" + "write-file-atomic": "^4.0.1" }, "bundleDependencies": [ "@isaacs/string-locale-compare", @@ -201,7 +201,7 @@ ], "devDependencies": { "@npmcli/eslint-config": "^2.0.0", - "@npmcli/template-oss": "^2.4.3", + "@npmcli/template-oss": "^2.9.1", "eslint": "^8.3.0", "licensee": "^8.2.0", "spawk": "^1.7.1", @@ -255,7 +255,7 @@ "libnpmteam", "libnpmversion" ], - "version": "2.4.3" + "version": "2.9.1" }, "license": "Artistic-2.0", "engines": { diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index 520c4574872df..7a70ceca6c518 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -62,7 +62,8 @@ "benchmark": "node scripts/benchmark.js", "benchclean": "rm -rf scripts/benchmark/*/", "npmclilint": "npmcli-lint", - "postlint": "npm-template-check" + "postlint": "npm-template-check", + "template-copy": "npm-template-copy --force" }, "repository": { "type": "git", @@ -101,6 +102,6 @@ "!test/fixtures/*.js" ], "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json index 33085ffd7cc39..67b86cd4af110 100644 --- a/workspaces/libnpmaccess/package.json +++ b/workspaces/libnpmaccess/package.json @@ -15,7 +15,8 @@ "lintfix": "npm run lint -- --fix", "prepublishOnly": "git push origin --follow-tags", "snap": "tap", - "posttest": "npm run lint" + "posttest": "npm run lint", + "template-copy": "npm-template-copy --force" }, "devDependencies": { "@npmcli/template-oss": "^2.4.2", @@ -45,6 +46,6 @@ "lib" ], "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index fbfc1eaf9c0a2..282a8387a80da 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -37,7 +37,8 @@ "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", - "postlint": "npm-template-check" + "postlint": "npm-template-check", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -58,6 +59,6 @@ "tar": "^6.1.0" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 9ce05bf96885b..45f1218ac6b3c 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -37,7 +37,8 @@ "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "postlint": "npm-template-check", - "lintfix": "npm run lint -- --fix" + "lintfix": "npm run lint -- --fix", + "template-copy": "npm-template-copy --force" }, "tap": { "color": true, @@ -64,6 +65,6 @@ "walk-up-path": "^1.0.0" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index eae757f04e9e0..277a0a2df9be0 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -36,7 +36,8 @@ "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", - "postlint": "npm-template-check" + "postlint": "npm-template-check", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -52,6 +53,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmhook/package.json b/workspaces/libnpmhook/package.json index 8b749d1809d26..1038249e33128 100644 --- a/workspaces/libnpmhook/package.json +++ b/workspaces/libnpmhook/package.json @@ -18,7 +18,8 @@ "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "snap": "tap", - "posttest": "npm run lint" + "posttest": "npm run lint", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -45,6 +46,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json index 913030066ddf7..3c70819a9aab4 100644 --- a/workspaces/libnpmorg/package.json +++ b/workspaces/libnpmorg/package.json @@ -22,7 +22,8 @@ "posttest": "npm run lint", "postlint": "npm-template-check", "lintfix": "npm run lint -- --fix", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "files": [ "bin", @@ -51,6 +52,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index 579b4efa23085..330ed50a150d1 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -21,7 +21,8 @@ "posttest": "npm run lint", "postlint": "npm-template-check", "lintfix": "npm run lint -- --fix", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -46,6 +47,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index 2e15c08f17923..0b8f9d9fec0b8 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -23,7 +23,8 @@ "test": "tap", "posttest": "npm run lint", "postlint": "npm-template-check", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -52,6 +53,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json index ba296930c2e7d..695e90ffa64b0 100644 --- a/workspaces/libnpmsearch/package.json +++ b/workspaces/libnpmsearch/package.json @@ -24,7 +24,8 @@ "lint": "eslint '**/*.js'", "postlint": "npm-template-check", "lintfix": "npm run lint -- --fix", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "tap": { "check-coverage": true @@ -47,6 +48,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json index 1c4633accb828..5bb173a1f79f0 100644 --- a/workspaces/libnpmteam/package.json +++ b/workspaces/libnpmteam/package.json @@ -14,7 +14,8 @@ "posttest": "npm run lint", "postlint": "npm-template-check", "lintfix": "npm run lint -- --fix", - "snap": "tap" + "snap": "tap", + "template-copy": "npm-template-copy --force" }, "devDependencies": { "@npmcli/template-oss": "^2.4.2", @@ -41,6 +42,6 @@ "check-coverage": true }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } } diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json index e0f5097a3f22f..161f99d410433 100644 --- a/workspaces/libnpmversion/package.json +++ b/workspaces/libnpmversion/package.json @@ -22,7 +22,8 @@ "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "postlint": "npm-template-check", - "lintfix": "npm run lint -- --fix" + "lintfix": "npm run lint -- --fix", + "template-copy": "npm-template-copy --force" }, "tap": { "coverage-map": "map.js", @@ -45,6 +46,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" }, "templateOSS": { - "version": "2.4.3" + "version": "2.9.1" } }