diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed051367..2e8d0be6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,6 +12,7 @@ defaults: env: NODE_OPTIONS: "--unhandled-rejections=strict" + VOLTA_FEATURE_PNPM: 1 concurrency: group: ci-${{ github.head_ref || github.ref }} @@ -59,9 +60,10 @@ jobs: - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'volta' ${{ matrix.volta-version }} - - run: volta install node@10.17.0 yarn@1.19.0 + - run: volta install node@10.17.0 yarn@1.19.0 pnpm@9.0.0 - run: ./action/tests/check-version.sh 'node' 'v10.17.0' - run: ./action/tests/check-version.sh 'yarn' '1.19.0' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' test-no-options: runs-on: "${{ matrix.os }}-latest" @@ -83,10 +85,11 @@ jobs: - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'volta' 'current' - - run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1 + - run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1 pnpm@9.0.0 - run: ./action/tests/check-version.sh 'node' 'v12.16.1' - run: ./action/tests/check-version.sh 'npm' '7.5.2' - run: ./action/tests/check-version.sh 'yarn' '1.19.1' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' test-specified-node-npm-yarn-overrides-pinned-versions: runs-on: "${{ matrix.os }}-latest" @@ -114,11 +117,13 @@ jobs: node-version: 12.14.0 npm-version: 7.5.2 yarn-version: 1.22.0 + pnpm-version: 9.0.0 - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'node' 'v12.14.0' - run: ./action/tests/check-version.sh 'npm' '7.5.2' - run: ./action/tests/check-version.sh 'yarn' '1.22.0' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' test-specific-volta-node-npm-yarn: runs-on: "${{ matrix.os }}-latest" @@ -141,12 +146,14 @@ jobs: node-version: 12.0.0 npm-version: 7.5.2 yarn-version: 1.22.0 + pnpm-version: 9.0.0 - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'volta' '1.0.8' - run: ./action/tests/check-version.sh 'node' 'v12.0.0' - run: ./action/tests/check-version.sh 'npm' '7.5.2' - run: ./action/tests/check-version.sh 'yarn' '1.22.0' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' test-specified-registry-url: runs-on: "${{ matrix.os }}-latest" @@ -171,9 +178,10 @@ jobs: - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'volta' 'current' - - run: volta install node@10.17.0 yarn@1.19.0 + - run: volta install node@10.17.0 yarn@1.19.0 pnpm@9.0.0 - run: ./action/tests/check-version.sh 'node' 'v10.17.0' - run: ./action/tests/check-version.sh 'yarn' '1.19.0' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' - run: ./action/tests/check-registry.sh 'https://some.path.here.com/lol/' test-specific-variant: @@ -194,10 +202,11 @@ jobs: - run: ./action/tests/log-info.sh - run: ./action/tests/check-version.sh 'volta' 'current' - - run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1 + - run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1 pnpm@9.0.0 - run: ./action/tests/check-version.sh 'node' 'v12.16.1' - run: ./action/tests/check-version.sh 'npm' '7.5.2' - run: ./action/tests/check-version.sh 'yarn' '1.19.1' + - run: ./action/tests/check-version.sh 'pnpm' '9.0.0' test-js-project-in-subdir-no-options: runs-on: "ubuntu-latest" diff --git a/README.md b/README.md index 46d19404..478786a8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ This action installs [volta](https://volta.sh) by: | `node-version` |
Version Spec of the node version to use. Examples: 10.6.x, 10.15.1, >=10.15.0
| `false` | `""` | | `npm-version` |Version Spec of the npm version to use. Examples: 7.5.x, 7.5.3, >=7.5.3
| `false` | `""` | | `yarn-version` |Version Spec of the yarn version to use. Examples: 1.6.x, 10.15.1, >=10.15.0
| `false` | `""` | +| `pnpm-version` |experimental. Version Spec of the pnpm version to use. Examples: ^8, 8.15.9, >=9. To enable it, ensure that the environment variable [VOLTA_FEATURE_PNPM](https://docs.volta.sh/advanced/pnpm) is set to 1
| `false` | `""` | | `package-json-path` |The path to the package.json to update when using an explicit node-version
| yarn-version
| npm-version
override. By default, we will use package.json
in the checkout root.
Specific variant to install. Example: providing the variant "linux-openssl-rhel", which will target installing the volta-${version}-linux-openssl-rhel.tar.gz tarball
| `false` | `""` | | `registry-url` |Optional registry to set up for auth. Will set the registry in a project level .npmrc file, and set up auth to read in from env.NODEAUTHTOKEN
| `false` | `""` | diff --git a/action.yml b/action.yml index e366f3f2..54c2cb3d 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,9 @@ inputs: yarn-version: description: 'Version Spec of the yarn version to use. Examples: 1.6.x, 10.15.1, >=10.15.0' default: '' + pnpm-version: + description: 'Version Spec of the pnpm version to use. Examples: ^8, 8.15.9, >=9. ensure that the environment variable VOLTA_FEATURE_PNPM is set to 1' + default: '' package-json-path: description: 'The path to the package.json to update when using an explicit `node-version` | `yarn-version` | `npm-version` override. By default, we will use `package.json` in the checkout root.' default: '' diff --git a/src/index.ts b/src/index.ts index 0440a5c2..a5636ab2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,6 +63,17 @@ async function run(): Promise