Closed zkochan closed 1 year ago
Amendment:
You intend to drop support for pnpm versions without self-contained binary, correct? If that's the case, why even bother running the self-installer and install it via the npm registry at all? Why not just download the binary directly from GitHub release?
GitHub Release does not support version ranges (e.g. ^6.17.1
), so we must resolve to the correct version ourselves. Or just fallback to npm. Or drop support for version ranges entirely.
@zkochan When will you resolve my requests for change in this PR?
I have to think about it. Not soon.
Curious if this would be easier to move forward with if it's opt-in via an option (eg. binary: true
)?
I agree with @privatenumber . Since this branch is very old and differs significantly from the latest master, I forked this action and implemented an option to install a self-contained binary.
I will post another PR after I add the test and update the readme.
Good job @tksst .
I think adding a node-version
option, detect it and auto switch pnpm@version
to @pnpm/exe@version
is better.
e.g.
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
os: [ubuntu-latest, windows-latest]
steps:
- name: Install pnpm
uses: pnpm/action-setup@v3.0.0
with:
# in the node 14.x env, we auto install `@pnpm/exe` instead of `pnpm`
# refer: https://pnpm.io/installation#compatibility
node-version: ${{ matrix.node-version }}
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
@fz6m
I think adding a
node-version
option, detect it and auto switchpnpm@version
to@pnpm/exe@version
is better.
That is a nice feature, but a bit complicated.
I may try to implement it when I have time.
After thinking about how to implement this feature, I gave up trying to implement it.
The node-version
option of setup-node can take various values. For example, "^18.0.0", ">=18.0.0", "lts/*", etc.
I need to implement the same logic to determine the version as actions/setup-node. This is difficult.
This is a breaking change because the binary version of pnpm is only available from v6.17.1. Also, it doesn't ship
pnpx
.close #18