Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pnpm 9 #24

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- 6
- 7
- 8
- 9
node:
- 10
- 12
Expand All @@ -28,6 +29,15 @@ jobs:
- 18
- 20
exclude:
# pnpm >= v9 does not support node <= v16
- node: 10
version: 9
- node: 12
version: 9
- node: 14
version: 9
- node: 16
version: 9
# pnpm >= v8 does not support node <= v14
- node: 10
version: 8
Expand All @@ -46,26 +56,37 @@ jobs:
name: plugin-test (pnpm v${{ matrix.version }}, Node.js v${{ matrix.node }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/github-script@v7
id: calculate_architecture
with:
result-encoding: string
script: |
if ('${{ matrix.os }}' === 'macos-latest' && ['10', '12', '14'].includes('${{ matrix.node }}')) {
return "x64"
} else {
return ''
}
Comment on lines +59 to +68
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some context:

So we fallback to x64 on those versions.

Step is copied from webpack: webpack/webpack#18359

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ steps.calculate_architecture.outputs.result }}
- name: Test pnpm
uses: asdf-vm/actions/plugin-test@v2
uses: asdf-vm/actions/plugin-test@v3
with:
command: pnpm --version
version: latest:${{ matrix.version }}
- name: Test pnpx
if: matrix.version < 7
uses: asdf-vm/actions/plugin-test@v2
uses: asdf-vm/actions/plugin-test@v3
with:
command: pnpx --version
version: latest:${{ matrix.version }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run ShellCheck
run: shellcheck bin/*
shfmt:
Expand All @@ -75,7 +96,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: reviewdog/action-shfmt@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down