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..ba47b2d571a4a --- /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..afe81c81830c9 --- /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..f0cb981de5229 --- /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..e9f52fcd7cf72 --- /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..e46aa4942c351 --- /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..1a2d4488d0e23 --- /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..151026b141e73 --- /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..bd7a6f9a3f044 --- /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..575d71b913bdb --- /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..66ef02e4fe539 --- /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..4195300cae8ee --- /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..2a8c61d530827 --- /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/CHANGELOG.md b/CHANGELOG.md index 7eb21f3206a76..263481c74b285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,64 @@ +## v8.5.3 (2022-03-03) + +### Bug Fixes + +* [`defe79ad6`](https://github.com/npm/cli/commit/defe79ad6f2f4216bf5e0188256c77b49164eb94) + [#4480](https://github.com/npm/cli/pull/4480) + fix: publish of tarballs includes README in packument + ([@fritzy](https://github.com/fritzy)) +* [`45fc297f1`](https://github.com/npm/cli/commit/45fc297f12e63c026715945a186ba0ec4efbdedb) + [#4479](https://github.com/npm/cli/pull/4479) + fix: ignore implict workspace for some commands + ([@fritzy](https://github.com/fritzy)) +* [`a0900bdf1`](https://github.com/npm/cli/commit/a0900bdf1ab7a68988984735f1f3885d02ffb67f) + [#4481](https://github.com/npm/cli/pull/4481) + fix(ls): respect `--include-workspace-root` + ([@fritzy](https://github.com/fritzy)) +* [`0cfc155db`](https://github.com/npm/cli/commit/0cfc155db5f11ce23419e440111d99a63bf39754) + [#4476](https://github.com/npm/cli/pull/4476) + fix: set proper workspace repo urls in package.json + ([@ljharb](https://github.com/ljharb)) +* [`9e43de8a5`](https://github.com/npm/cli/commit/9e43de8a59e5bf354a9595ed8a79fedcec085aaa) + [#4493](https://github.com/npm/cli/pull/4493) + fix: ignore implicit workspace for whoami + ([@nlf](https://github.com/nlf)) + +### Dependencies + +* [`d13f067d9`](https://github.com/npm/cli/commit/d13f067d91283e1dec94780a3c007883de9edc46) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `@npmcli/run-script@3.0.1` + ([@wraithgar](https://github.com/wraithgar)) +* [`ce9a6eac0`](https://github.com/npm/cli/commit/ce9a6eac0c8329871664167c37f4982c5e443a2a) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `node-gyp@9.0.0` + ([@wraithgar](https://github.com/wraithgar)) +* [`bd660f5f1`](https://github.com/npm/cli/commit/bd660f5f1ccc1d9fa88085b168ea05b6dcf5826a) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `@npmcli/config@4.0.1` +* [`3c17b6965`](https://github.com/npm/cli/commit/3c17b6965f0c5fffd5ac908388568a307466a73f) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `make-fetch-happen@10.0.4` +* [`e9b69c4c5`](https://github.com/npm/cli/commit/e9b69c4c5454cc8b7d6cf2cbf1f09313f0d20afc) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `npm-registry-fetch@13.0.1` +* [`cf27ca888`](https://github.com/npm/cli/commit/cf27ca8884387f2b82f8f6900a29e4e41693e774) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `write-file-atomic@4.0.1` +* [`f3421921a`](https://github.com/npm/cli/commit/f3421921aa72ef570105474cdb2e48cec80de796) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `gauge@4.0.2` +* [`1dd2f7ee1`](https://github.com/npm/cli/commit/1dd2f7ee16a61024e520b3efa54f8cdba5458a16) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `socks@2.6.2` +* [`236e3b403`](https://github.com/npm/cli/commit/236e3b4030dd91397713eb02cdf2737dcc988fd7) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `minimatch@3.1.2` + ([@wraithgar](https://github.com/wraithgar)) +* [`10e1326d2`](https://github.com/npm/cli/commit/10e1326d2eb7ff2c70ee19907991b369476ccdd0) + [#4490](https://github.com/npm/cli/pull/4490) + deps: `lru-cache@7.4.0` + ## v8.5.2 (2022-02-24) ### Bug Fixes diff --git a/docs/package.json b/docs/package.json index be36f202f3a1f..0e52bf2d42fd7 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,7 +9,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/npm/cli" + "url": "https://github.com/npm/cli", + "directory": "workspaces/docs" }, "devDependencies": { "@mdx-js/mdx": "^1.6.22", diff --git a/lib/arborist-cmd.js b/lib/arborist-cmd.js index 931ead8143dff..6518e91e0ad9d 100644 --- a/lib/arborist-cmd.js +++ b/lib/arborist-cmd.js @@ -14,6 +14,8 @@ class ArboristCmd extends BaseCommand { 'include-workspace-root', ] + static ignoreImplicitWorkspace = false + async execWorkspaces (args, filters) { await this.setWorkspaces(filters) return this.exec(args) diff --git a/lib/base-command.js b/lib/base-command.js index f67f99f36367c..b6e3d6d231860 100644 --- a/lib/base-command.js +++ b/lib/base-command.js @@ -20,6 +20,10 @@ class BaseCommand { return this.constructor.description } + get ignoreImplicitWorkspace () { + return this.constructor.ignoreImplicitWorkspace + } + get usage () { let usage = `npm ${this.constructor.name}\n\n` if (this.constructor.description) { diff --git a/lib/commands/access.js b/lib/commands/access.js index 206d6de9c22c4..bc8ce48bacdad 100644 --- a/lib/commands/access.js +++ b/lib/commands/access.js @@ -27,6 +27,8 @@ class Access extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = true + static usage = [ 'public []', 'restricted []', diff --git a/lib/commands/adduser.js b/lib/commands/adduser.js index cbeaaaf0f28be..755abea8eb9eb 100644 --- a/lib/commands/adduser.js +++ b/lib/commands/adduser.js @@ -16,6 +16,8 @@ class AddUser extends BaseCommand { 'scope', ] + static ignoreImplicitWorkspace = true + async exec (args) { const { scope } = this.npm.flatOptions const registry = this.getRegistry(this.npm.flatOptions) diff --git a/lib/commands/bin.js b/lib/commands/bin.js index bb700d45a8f1b..77028f06dd49a 100644 --- a/lib/commands/bin.js +++ b/lib/commands/bin.js @@ -5,6 +5,7 @@ class Bin extends BaseCommand { static description = 'Display npm bin folder' static name = 'bin' static params = ['global'] + static ignoreImplicitWorkspace = true async exec (args) { const b = this.npm.bin diff --git a/lib/commands/birthday.js b/lib/commands/birthday.js index 27fe2c50cab02..e889b39f25377 100644 --- a/lib/commands/birthday.js +++ b/lib/commands/birthday.js @@ -2,6 +2,8 @@ const BaseCommand = require('../base-command.js') class Birthday extends BaseCommand { static name = 'birthday' + static ignoreImplicitWorkspace = true + async exec () { this.npm.config.set('yes', true) return this.npm.exec('exec', ['@npmcli/npm-birthday']) diff --git a/lib/commands/bugs.js b/lib/commands/bugs.js index 5dfd1eb918959..f6218f033f3d3 100644 --- a/lib/commands/bugs.js +++ b/lib/commands/bugs.js @@ -9,6 +9,7 @@ class Bugs extends BaseCommand { static name = 'bugs' static usage = ['[]'] static params = ['browser', 'registry'] + static ignoreImplicitWorkspace = true async exec (args) { if (!args || !args.length) { diff --git a/lib/commands/cache.js b/lib/commands/cache.js index ecb34cb8916c4..b8f84abc1d941 100644 --- a/lib/commands/cache.js +++ b/lib/commands/cache.js @@ -81,6 +81,8 @@ class Cache extends BaseCommand { 'verify', ] + static ignoreImplicitWorkspace = true + async completion (opts) { const argv = opts.conf.argv.remain if (argv.length === 2) { diff --git a/lib/commands/completion.js b/lib/commands/completion.js index 4ded2de385afb..0317753a15aaf 100644 --- a/lib/commands/completion.js +++ b/lib/commands/completion.js @@ -47,6 +47,7 @@ const BaseCommand = require('../base-command.js') class Completion extends BaseCommand { static description = 'Tab Completion for npm' static name = 'completion' + static ignoreImplicitWorkspace = false // completion for the completion command async completion (opts) { diff --git a/lib/commands/config.js b/lib/commands/config.js index 96524e00817f5..690a69a3233e4 100644 --- a/lib/commands/config.js +++ b/lib/commands/config.js @@ -61,6 +61,8 @@ class Config extends BaseCommand { 'long', ] + static ignoreImplicitWorkspace = false + async completion (opts) { const argv = opts.conf.argv.remain if (argv[1] !== 'config') { diff --git a/lib/commands/deprecate.js b/lib/commands/deprecate.js index 839e974caf09b..88eb320c32a52 100644 --- a/lib/commands/deprecate.js +++ b/lib/commands/deprecate.js @@ -15,6 +15,8 @@ class Deprecate extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = false + async completion (opts) { if (opts.conf.argv.remain.length > 1) { return [] diff --git a/lib/commands/diff.js b/lib/commands/diff.js index d737a58dc43d8..ff942cc44e946 100644 --- a/lib/commands/diff.js +++ b/lib/commands/diff.js @@ -32,6 +32,8 @@ class Diff extends BaseCommand { 'include-workspace-root', ] + static ignoreImplicitWorkspace = false + async exec (args) { const specs = this.npm.config.get('diff').filter(d => d) if (specs.length > 2) { diff --git a/lib/commands/dist-tag.js b/lib/commands/dist-tag.js index bb36f3f72bfb2..3b82c5194cca8 100644 --- a/lib/commands/dist-tag.js +++ b/lib/commands/dist-tag.js @@ -16,6 +16,8 @@ class DistTag extends BaseCommand { 'ls []', ] + static ignoreImplicitWorkspace = false + async completion (opts) { const argv = opts.conf.argv.remain if (argv.length === 2) { diff --git a/lib/commands/docs.js b/lib/commands/docs.js index 19cd735642262..631615acc56b3 100644 --- a/lib/commands/docs.js +++ b/lib/commands/docs.js @@ -15,6 +15,7 @@ class Docs extends BaseCommand { ] static usage = ['[ [ ...]]'] + static ignoreImplicitWorkspace = false async exec (args) { if (!args || !args.length) { diff --git a/lib/commands/doctor.js b/lib/commands/doctor.js index 508faa57aa5e9..9af4c4cd6ffbf 100644 --- a/lib/commands/doctor.js +++ b/lib/commands/doctor.js @@ -41,6 +41,7 @@ class Doctor extends BaseCommand { static description = 'Check your npm environment' static name = 'doctor' static params = ['registry'] + static ignoreImplicitWorkspace = false async exec (args) { log.info('Running checkup') diff --git a/lib/commands/edit.js b/lib/commands/edit.js index 5f069c4f132e5..ce74ff79b2b7e 100644 --- a/lib/commands/edit.js +++ b/lib/commands/edit.js @@ -13,6 +13,7 @@ class Edit extends BaseCommand { static name = 'edit' static usage = ['[/...]'] static params = ['editor'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/lib/commands/exec.js b/lib/commands/exec.js index 52fb1f8eb7229..6b402c856ab1e 100644 --- a/lib/commands/exec.js +++ b/lib/commands/exec.js @@ -45,6 +45,8 @@ class Exec extends BaseCommand { '--package=foo -c \' [args...]\'', ] + static ignoreImplicitWorkspace = false + async exec (_args, { locationMsg, path, runPath } = {}) { if (!path) { path = this.npm.localPrefix diff --git a/lib/commands/explain.js b/lib/commands/explain.js index fd62b87fc869d..ca6ee7540bc91 100644 --- a/lib/commands/explain.js +++ b/lib/commands/explain.js @@ -16,6 +16,8 @@ class Explain extends ArboristWorkspaceCmd { 'workspace', ] + static ignoreImplicitWorkspace = false + // TODO /* istanbul ignore next */ async completion (opts) { diff --git a/lib/commands/explore.js b/lib/commands/explore.js index 90e6af69fe57c..5b97673b90eaa 100644 --- a/lib/commands/explore.js +++ b/lib/commands/explore.js @@ -13,6 +13,7 @@ class Explore extends BaseCommand { static name = 'explore' static usage = [' [ -- ]'] static params = ['shell'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/lib/commands/get.js b/lib/commands/get.js index 7583ade23d600..5e92e85a66382 100644 --- a/lib/commands/get.js +++ b/lib/commands/get.js @@ -4,6 +4,7 @@ class Get extends BaseCommand { static description = 'Get a value from the npm configuration' static name = 'get' static usage = ['[ ...] (See `npm config`)'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/lib/commands/help-search.js b/lib/commands/help-search.js index 6025a6dabd74b..9422b83561cc8 100644 --- a/lib/commands/help-search.js +++ b/lib/commands/help-search.js @@ -11,6 +11,7 @@ class HelpSearch extends BaseCommand { static name = 'help-search' static usage = [''] static params = ['long'] + static ignoreImplicitWorkspace = true async exec (args) { if (!args.length) { diff --git a/lib/commands/help.js b/lib/commands/help.js index f94178dd5d1d6..40f5ad9b30092 100644 --- a/lib/commands/help.js +++ b/lib/commands/help.js @@ -17,6 +17,7 @@ class Help extends BaseCommand { static name = 'help' static usage = [' []'] static params = ['viewer'] + static ignoreImplicitWorkspace = true async completion (opts) { if (opts.conf.argv.remain.length > 2) { diff --git a/lib/commands/hook.js b/lib/commands/hook.js index 2ff6ac01ce527..a4619802d8429 100644 --- a/lib/commands/hook.js +++ b/lib/commands/hook.js @@ -19,6 +19,8 @@ class Hook extends BaseCommand { 'update ', ] + static ignoreImplicitWorkspace = true + async exec (args) { return otplease({ ...this.npm.flatOptions, diff --git a/lib/commands/init.js b/lib/commands/init.js index 367533f8259f5..2a6b6aaddc7e6 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -22,6 +22,8 @@ class Init extends BaseCommand { '[<@scope>/] (same as `npx [<@scope>/]create-`)', ] + static ignoreImplicitWorkspace = false + async exec (args) { // npm exec style if (args.length) { diff --git a/lib/commands/logout.js b/lib/commands/logout.js index aea5e93652b0e..7c2a7f0b2f830 100644 --- a/lib/commands/logout.js +++ b/lib/commands/logout.js @@ -11,6 +11,8 @@ class Logout extends BaseCommand { 'scope', ] + static ignoreImplicitWorkspace = true + async exec (args) { const registry = this.npm.config.get('registry') const scope = this.npm.config.get('scope') diff --git a/lib/commands/ls.js b/lib/commands/ls.js index 8c338c0647586..e56c90dae16ea 100644 --- a/lib/commands/ls.js +++ b/lib/commands/ls.js @@ -95,10 +95,15 @@ class LS extends ArboristWorkspaceCmd { return true } + if (this.npm.flatOptions.includeWorkspaceRoot + && !edge.to.isWorkspace) { + return true + } + if (edge.from.isProjectRoot) { - return edge.to && - edge.to.isWorkspace && - wsNodes.includes(edge.to.target) + return (edge.to + && edge.to.isWorkspace + && wsNodes.includes(edge.to.target)) } return true diff --git a/lib/commands/org.js b/lib/commands/org.js index f3d344ca33e3d..e2202a9e9cf3b 100644 --- a/lib/commands/org.js +++ b/lib/commands/org.js @@ -13,6 +13,7 @@ class Org extends BaseCommand { ] static params = ['registry', 'otp', 'json', 'parseable'] + static ignoreImplicitWorkspace = true async completion (opts) { const argv = opts.conf.argv.remain diff --git a/lib/commands/owner.js b/lib/commands/owner.js index effaaa6a53d3a..93e0a45ad1e27 100644 --- a/lib/commands/owner.js +++ b/lib/commands/owner.js @@ -20,6 +20,8 @@ class Owner extends BaseCommand { 'ls [<@scope>/]', ] + static ignoreImplicitWorkspace = false + async completion (opts) { const argv = opts.conf.argv.remain if (argv.length > 3) { diff --git a/lib/commands/pack.js b/lib/commands/pack.js index 74c29699a05c9..41fef5cb45a47 100644 --- a/lib/commands/pack.js +++ b/lib/commands/pack.js @@ -18,6 +18,7 @@ class Pack extends BaseCommand { ] static usage = ['[[<@scope>/]...]'] + static ignoreImplicitWorkspace = false async exec (args) { if (args.length === 0) { diff --git a/lib/commands/ping.js b/lib/commands/ping.js index 5a651c4a6ab09..22039214689a9 100644 --- a/lib/commands/ping.js +++ b/lib/commands/ping.js @@ -6,6 +6,7 @@ class Ping extends BaseCommand { static description = 'Ping npm registry' static params = ['registry'] static name = 'ping' + static ignoreImplicitWorkspace = true async exec (args) { log.notice('PING', this.npm.config.get('registry')) diff --git a/lib/commands/pkg.js b/lib/commands/pkg.js index 6ca892293cebe..3a8e01f65bc92 100644 --- a/lib/commands/pkg.js +++ b/lib/commands/pkg.js @@ -20,6 +20,8 @@ class Pkg extends BaseCommand { 'workspaces', ] + static ignoreImplicitWorkspace = false + async exec (args, { prefix } = {}) { if (!prefix) { this.prefix = this.npm.localPrefix diff --git a/lib/commands/prefix.js b/lib/commands/prefix.js index 264b819fc7692..dd0e34c3d3bd9 100644 --- a/lib/commands/prefix.js +++ b/lib/commands/prefix.js @@ -5,6 +5,7 @@ class Prefix extends BaseCommand { static name = 'prefix' static params = ['global'] static usage = ['[-g]'] + static ignoreImplicitWorkspace = true async exec (args) { return this.npm.output(this.npm.prefix) diff --git a/lib/commands/profile.js b/lib/commands/profile.js index 6b4d1407f7919..a82d31fd443a9 100644 --- a/lib/commands/profile.js +++ b/lib/commands/profile.js @@ -54,6 +54,8 @@ class Profile extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = true + async completion (opts) { var argv = opts.conf.argv.remain diff --git a/lib/commands/publish.js b/lib/commands/publish.js index d1f0ee743cfcc..1f26370e89a56 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -39,6 +39,7 @@ class Publish extends BaseCommand { ] static usage = ['[]'] + static ignoreImplicitWorkspace = false async exec (args) { if (args.length === 0) { @@ -195,7 +196,11 @@ class Publish extends BaseCommand { if (spec.type === 'directory') { return readJson(`${spec.fetchSpec}/package.json`) } - return pacote.manifest(spec, { ...opts, fullMetadata: true }) + return pacote.manifest(spec, { + ...opts, + fullMetadata: true, + fullReadJson: true, + }) } } module.exports = Publish diff --git a/lib/commands/repo.js b/lib/commands/repo.js index 8ac4178f261ee..b8dccc209ff87 100644 --- a/lib/commands/repo.js +++ b/lib/commands/repo.js @@ -10,6 +10,7 @@ class Repo extends BaseCommand { static name = 'repo' static params = ['browser', 'workspace', 'workspaces', 'include-workspace-root'] static usage = ['[ [ ...]]'] + static ignoreImplicitWorkspace = false async exec (args) { if (!args || !args.length) { diff --git a/lib/commands/restart.js b/lib/commands/restart.js index a12368644a13b..575928b2202cc 100644 --- a/lib/commands/restart.js +++ b/lib/commands/restart.js @@ -8,5 +8,7 @@ class Restart extends LifecycleCmd { 'ignore-scripts', 'script-shell', ] + + static ignoreImplicitWorkspace = false } module.exports = Restart diff --git a/lib/commands/root.js b/lib/commands/root.js index 7749c602456b7..b814034def5ab 100644 --- a/lib/commands/root.js +++ b/lib/commands/root.js @@ -3,6 +3,7 @@ class Root extends BaseCommand { static description = 'Display npm root' static name = 'root' static params = ['global'] + static ignoreImplicitWorkspace = true async exec () { this.npm.output(this.npm.dir) diff --git a/lib/commands/run-script.js b/lib/commands/run-script.js index edba95821b44c..74757e984aeed 100644 --- a/lib/commands/run-script.js +++ b/lib/commands/run-script.js @@ -40,6 +40,7 @@ class RunScript extends BaseCommand { static name = 'run-script' static usage = [' [-- ]'] + static ignoreImplicitWorkspace = false async completion (opts) { const argv = opts.conf.argv.remain diff --git a/lib/commands/search.js b/lib/commands/search.js index bdeeffe816980..a06ba4031443b 100644 --- a/lib/commands/search.js +++ b/lib/commands/search.js @@ -44,6 +44,7 @@ class Search extends BaseCommand { ] static usage = ['[search terms ...]'] + static ignoreImplicitWorkspace = true async exec (args) { const opts = { diff --git a/lib/commands/set-script.js b/lib/commands/set-script.js index 7c73ff01b9396..a6b7c3a50cdaf 100644 --- a/lib/commands/set-script.js +++ b/lib/commands/set-script.js @@ -9,6 +9,7 @@ class SetScript extends BaseCommand { static params = ['workspace', 'workspaces', 'include-workspace-root'] static name = 'set-script' static usage = ['[