Skip to content
Merged
Show file tree
Hide file tree
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
60 changes: 42 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
- name: Check out the repository
uses: actions/checkout@v7

- name: Set up pnpm and Node.js, install dependencies
uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
with:
node-version: "24"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm format:check
- run: pnpm build
node-version-file: .nvmrc
cache: true
require-lockfile: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pnpm/setup ignores Node version file

Medium Severity

pnpm/setup does not accept node-version-file, so the new .nvmrc is ignored and CI, release, and schema jobs no longer pin Node 24. The action only honors runtime or devEngines.runtime, neither of which is set, so these workflows stay on the runner default instead of the >=24 engines pin.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 501d0dd. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lockfile input is not valid

Low Severity

require-lockfile is not an input of pnpm/setup, so the runner ignores it. The previous explicit pnpm install --frozen-lockfile step was removed, and this flag does not ask the action to enforce a lockfile.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7998b37. Configure here.


- name: Lint
run: pnpm lint

- name: Check formatting
run: pnpm format:check

- name: Build
run: pnpm build

# The build regenerates the SDK from the committed schema, so any diff means a generated file
# was edited by hand or not regenerated after a schema or generator change.
- name: Check generated files are up to date
Expand All @@ -28,29 +41,40 @@ jobs:
echo "::error::Generated files are out of date. Run pnpm build and commit the result."
exit 1
fi
- run: pnpm typecheck
- run: pnpm test

- name: Typecheck
run: pnpm typecheck

- name: Test
run: pnpm test

package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
- name: Check out the repository
uses: actions/checkout@v7

- name: Set up pnpm and Node.js, install dependencies
uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
with:
node-version: "24"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build
node-version-file: .nvmrc
cache: true
require-lockfile: true

- name: Build
run: pnpm build

# Raw size, not compressed: an unminified build can be twice the size and gzip the same.
- name: Check the built JS stays within its size limits
run: pnpm exec size-limit

- name: Check exports and types resolve in every module mode
run: |
for pkg in graphql ui-components webhooks; do
pnpm exec attw --pack "packages/$pkg"
pnpm exec publint "packages/$pkg"
done

- name: Install the packed packages and load them
run: |
mkdir -p "$RUNNER_TEMP/packs"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ jobs:
language: [actions, javascript-typescript]

steps:
- uses: actions/checkout@v7
- name: Check out the repository
uses: actions/checkout@v7

# build-mode none reads the sources directly, so there is no pnpm install in this job.
- uses: github/codeql-action/init@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
Expand All @@ -44,6 +46,7 @@ jobs:
# Generated from webhook-schema.json: types only.
- packages/webhooks/src/webhook-schema.ts

- uses: github/codeql-action/analyze@v4
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}
27 changes: 19 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,34 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check out the repository
uses: actions/checkout@v7
with:
persist-credentials: false
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7

- name: Set up pnpm and Node.js, install dependencies
uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
with:
node-version-file: .nvmrc
cache: true
require-lockfile: true

# changesets/action does not configure npm auth, so publishing relies on the .npmrc this writes
# for NODE_AUTH_TOKEN. Without node-version it keeps the Node.js installed above.
- name: Configure npm registry auth
uses: actions/setup-node@v7
with:
node-version: "24"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- uses: actions/create-github-app-token@v3

- name: Generate a GitHub App token
uses: actions/create-github-app-token@v3
id: generate-token
with:
app-id: ${{ secrets.GH_WORKFLOW_APP_ID }}
private-key: ${{ secrets.GH_WORKFLOW_APP_PRIVATE_KEY }}

- name: Create Release PR or publish to npm
uses: changesets/action@v2.1.2
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
github-token: ${{ steps.generate-token.outputs.token }}
version-script: pnpm version-packages
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/update-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,32 @@ jobs:
timeout-minutes: 15
steps:
# Pull requests opened with the default token don't trigger CI, so push and open them as the app.
- uses: actions/create-github-app-token@v3
- name: Generate a GitHub App token
uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ secrets.GH_WORKFLOW_APP_ID }}
private-key: ${{ secrets.GH_WORKFLOW_APP_PRIVATE_KEY }}
- uses: actions/checkout@v7

- name: Check out the repository
uses: actions/checkout@v7
with:
token: ${{ steps.app-token.outputs.token }}
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7

- name: Set up pnpm and Node.js, install dependencies
uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
with:
node-version: "24"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @team-plain/graphql-codegen-plugin build
- id: update
node-version-file: .nvmrc
cache: true
require-lockfile: true

- name: Build the codegen plugin
run: pnpm --filter @team-plain/graphql-codegen-plugin build

- name: Download the schema and regenerate
id: update
run: pnpm --filter @team-plain/graphql update-schema

- name: Open or update the pull request
if: steps.update.outputs.changed == 'true'
env:
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
Loading