From 1741e919a123a485668154bad45c1a2ac31c52b3 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 10:44:52 -0700 Subject: [PATCH 01/16] First passthrough --- .github/actions/setup-node/action.yml | 28 ++++++++++++ .github/workflows/ci.yml | 63 +++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/actions/setup-node/action.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 0000000..f2c9c43 --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,28 @@ +name: Setup Node.js +description: Setup Node.js with yarn and restore cached dependencies + +inputs: + restore-cache: + description: "Whether to restore node_modules cache" + required: false + default: "false" + +runs: + using: composite + steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + + - name: Enable corepack + shell: bash + run: corepack enable + + - name: Restore node_modules + if: inputs.restore-cache == 'true' + uses: actions/cache/restore@v4 + with: + path: node_modules + key: node-modules-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..adce6a6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + install: + name: Install dependencies + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: ./.github/actions/setup-node + + - name: Yarn install + run: yarn install --immutable + + - name: Cache node_modules + uses: actions/cache/save@v4 + with: + path: node_modules + key: node-modules-${{ hashFiles('yarn.lock') }} + + format: + name: Format + needs: install + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: ./.github/actions/setup-node + with: + restore-cache: true + + - name: Check formatting + run: yarn format + + lint: + name: Lint + needs: install + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: ./.github/actions/setup-node + with: + restore-cache: true + + - name: Run lint + run: yarn lint + + build: + name: Build + needs: install + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: ./.github/actions/setup-node + with: + restore-cache: true + + - name: Run build + run: yarn build From 7b58712e1217b9c71b01f0c327ac3140967bb02e Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 13:29:43 -0700 Subject: [PATCH 02/16] missed checkout --- .github/actions/setup-node/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index f2c9c43..7161eaa 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -10,6 +10,9 @@ inputs: runs: using: composite steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Node.js uses: actions/setup-node@v4 with: From d23cbabb97f225e16092a8461e7ebae34203fd12 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 13:36:29 -0700 Subject: [PATCH 03/16] fan out checkout steps and make cache node_modules default true --- .github/actions/setup-node/action.yml | 5 +---- .github/workflows/ci.yml | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 7161eaa..2d6d7d1 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -5,14 +5,11 @@ inputs: restore-cache: description: "Whether to restore node_modules cache" required: false - default: "false" + default: "true" runs: using: composite steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adce6a6..1d67cf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,13 @@ jobs: name: Install dependencies runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node uses: ./.github/actions/setup-node + with: + restore-cache: false - name: Yarn install run: yarn install --immutable @@ -28,10 +33,11 @@ jobs: needs: install runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node uses: ./.github/actions/setup-node - with: - restore-cache: true - name: Check formatting run: yarn format @@ -41,10 +47,11 @@ jobs: needs: install runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node uses: ./.github/actions/setup-node - with: - restore-cache: true - name: Run lint run: yarn lint @@ -54,10 +61,11 @@ jobs: needs: install runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node uses: ./.github/actions/setup-node - with: - restore-cache: true - name: Run build run: yarn build From b30da2107f7048c7537642ac5d7b962f3910e902 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:23:18 -0700 Subject: [PATCH 04/16] corepack first for correct yarn version --- .github/actions/setup-node/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 2d6d7d1..44ec339 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -10,16 +10,16 @@ inputs: runs: using: composite steps: + - name: Enable corepack + shell: bash + run: corepack enable + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" - - name: Enable corepack - shell: bash - run: corepack enable - - name: Restore node_modules if: inputs.restore-cache == 'true' uses: actions/cache/restore@v4 From 3fb78f337354abfb04ad114cf96c2d0dc807acc0 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:26:11 -0700 Subject: [PATCH 05/16] include previously missed yarn lock diff --- yarn.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yarn.lock b/yarn.lock index 266b08d..d10cff2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,6 +1115,11 @@ __metadata: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true languageName: unknown linkType: soft From c265c0ba75204df2506f16d422ac967b740825d5 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:29:10 -0700 Subject: [PATCH 06/16] remove cache field --- .github/actions/setup-node/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 44ec339..bc3668d 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -18,7 +18,6 @@ runs: uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - cache: "yarn" - name: Restore node_modules if: inputs.restore-cache == 'true' From 2466be5d06c1d9fa81b210bae369198a49ce1bb5 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:35:12 -0700 Subject: [PATCH 07/16] clean up some names, pin actions to commits, and update versions --- .github/actions/setup-node/action.yml | 8 ++++---- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/semgrep.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index bc3668d..58acd31 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,5 +1,5 @@ -name: Setup Node.js -description: Setup Node.js with yarn and restore cached dependencies +name: Setup Node +description: Setup Node with yarn and restore cached dependencies inputs: restore-cache: @@ -15,13 +15,13 @@ runs: run: corepack enable - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: node-version-file: ".nvmrc" - name: Restore node_modules if: inputs.restore-cache == 'true' - uses: actions/cache/restore@v4 + uses: actions/cache/restore@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5 with: path: node_modules key: node-modules-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d67cf9..048f135 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Setup node uses: ./.github/actions/setup-node @@ -23,7 +23,7 @@ jobs: run: yarn install --immutable - name: Cache node_modules - uses: actions/cache/save@v4 + uses: actions/cache/save@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5 with: path: node_modules key: node-modules-${{ hashFiles('yarn.lock') }} @@ -34,12 +34,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Setup node uses: ./.github/actions/setup-node - - name: Check formatting + - name: Run format run: yarn format lint: @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Setup node uses: ./.github/actions/setup-node @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Setup node uses: ./.github/actions/setup-node diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index ca0ff26..8abb507 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -12,7 +12,7 @@ jobs: # A Docker image with Semgrep installed. Do not change this. image: returntocorp/semgrep steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - run: semgrep ci env: SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN_PUBLIC }} From 795af9e7fac41be52ee3c66219f3604bf1c87570 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:39:11 -0700 Subject: [PATCH 08/16] bump node version --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 016e34b..a3b7a31 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.17.0 +v24.14.1 From 93c556aca9e1514216730074bfadc67725494413 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:41:11 -0700 Subject: [PATCH 09/16] example runtime breakage --- src/react/hooks.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/react/hooks.ts b/src/react/hooks.ts index 0f1c4c3..6436d88 100644 --- a/src/react/hooks.ts +++ b/src/react/hooks.ts @@ -14,6 +14,8 @@ import { deepEqual } from '../utils/deepEqual'; import { PluginContext } from './Context'; +a + /** * Gets the entire plugin instance * @returns {PluginInstance} Context for the current plugin instance From 321605e661b26915dbe96627998f79bd06afea9c Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:45:13 -0700 Subject: [PATCH 10/16] fix lint setup & add a check flag to format --- .github/workflows/ci.yml | 2 +- .oxlintrc.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 048f135..f188042 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: uses: ./.github/actions/setup-node - name: Run format - run: yarn format + run: yarn format --check lint: name: Lint diff --git a/.oxlintrc.json b/.oxlintrc.json index 7fbc6ee..2bd70fd 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,3 +1,6 @@ { - "plugins": ["eslint", "import", "oxc", "react", "typescript"] + "plugins": ["eslint", "import", "oxc", "react", "typescript"], + "categories": { + "correctness": "error" + } } From 17387427e9360a2e79621fb297bf839b35a5547a Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:46:54 -0700 Subject: [PATCH 11/16] remove breakage --- src/react/hooks.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/react/hooks.ts b/src/react/hooks.ts index 6436d88..0f1c4c3 100644 --- a/src/react/hooks.ts +++ b/src/react/hooks.ts @@ -14,8 +14,6 @@ import { deepEqual } from '../utils/deepEqual'; import { PluginContext } from './Context'; -a - /** * Gets the entire plugin instance * @returns {PluginInstance} Context for the current plugin instance From 05078299b075e222181878209c1a2a2561c343d7 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 14:46:59 -0700 Subject: [PATCH 12/16] run format --- .github/actions/setup-node/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 58acd31..36418de 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -3,9 +3,9 @@ description: Setup Node with yarn and restore cached dependencies inputs: restore-cache: - description: "Whether to restore node_modules cache" + description: 'Whether to restore node_modules cache' required: false - default: "true" + default: 'true' runs: using: composite @@ -17,7 +17,7 @@ runs: - name: Setup Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: - node-version-file: ".nvmrc" + node-version-file: '.nvmrc' - name: Restore node_modules if: inputs.restore-cache == 'true' From 781d3d24dbdccd6e2305b2d2eab8db60287ec5cf Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Mar 2026 15:06:31 -0700 Subject: [PATCH 13/16] move caching from actions/cache to actions/setup-node --- .github/actions/setup-node/action.yml | 14 +------------- .github/workflows/ci.yml | 8 -------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 36418de..04c5e82 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,12 +1,6 @@ name: Setup Node description: Setup Node with yarn and restore cached dependencies -inputs: - restore-cache: - description: 'Whether to restore node_modules cache' - required: false - default: 'true' - runs: using: composite steps: @@ -18,10 +12,4 @@ runs: uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: node-version-file: '.nvmrc' - - - name: Restore node_modules - if: inputs.restore-cache == 'true' - uses: actions/cache/restore@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5 - with: - path: node_modules - key: node-modules-${{ hashFiles('yarn.lock') }} + cache: 'yarn' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f188042..5e203e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,18 +16,10 @@ jobs: - name: Setup node uses: ./.github/actions/setup-node - with: - restore-cache: false - name: Yarn install run: yarn install --immutable - - name: Cache node_modules - uses: actions/cache/save@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5 - with: - path: node_modules - key: node-modules-${{ hashFiles('yarn.lock') }} - format: name: Format needs: install From 924e78cb5184d0ca71b14e235d64ca3c77a13a93 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 25 Mar 2026 16:04:52 -0700 Subject: [PATCH 14/16] run install before other jobs --- .github/actions/setup-node/action.yml | 9 +++++++++ .github/workflows/ci.yml | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 04c5e82..74056e2 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,6 +1,12 @@ name: Setup Node description: Setup Node with yarn and restore cached dependencies +inputs: + immutable-install: + description: Whether to run `yarn install --immutable` + required: false + default: 'false' + runs: using: composite steps: @@ -13,3 +19,6 @@ runs: with: node-version-file: '.nvmrc' cache: 'yarn' + + - name: Install dependencies + run: yarn install ${{ inputs.immutable-install == 'true' && '--immutable' || '' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e203e0..aa605b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,8 @@ jobs: - name: Setup node uses: ./.github/actions/setup-node - - - name: Yarn install - run: yarn install --immutable + with: + immutable-install: true format: name: Format From 99cabdf92feba563283410d955443dd8d441040f Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 25 Mar 2026 16:06:39 -0700 Subject: [PATCH 15/16] missed shell --- .github/actions/setup-node/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 74056e2..9e65196 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -21,4 +21,5 @@ runs: cache: 'yarn' - name: Install dependencies + shell: bash run: yarn install ${{ inputs.immutable-install == 'true' && '--immutable' || '' }} From f6a734d48d497e9f211e51f4859fff738d67107a Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 25 Mar 2026 16:13:40 -0700 Subject: [PATCH 16/16] make all installs immutable --- .github/actions/setup-node/action.yml | 10 ++-------- .github/workflows/ci.yml | 15 --------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 9e65196..323d881 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,11 +1,5 @@ name: Setup Node -description: Setup Node with yarn and restore cached dependencies - -inputs: - immutable-install: - description: Whether to run `yarn install --immutable` - required: false - default: 'false' +description: Setup Node with yarn and install dependencies runs: using: composite @@ -22,4 +16,4 @@ runs: - name: Install dependencies shell: bash - run: yarn install ${{ inputs.immutable-install == 'true' && '--immutable' || '' }} + run: yarn install --immutable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa605b2..6643890 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,21 +7,8 @@ on: pull_request: jobs: - install: - name: Install dependencies - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - - name: Setup node - uses: ./.github/actions/setup-node - with: - immutable-install: true - format: name: Format - needs: install runs-on: ubuntu-latest steps: - name: Checkout @@ -35,7 +22,6 @@ jobs: lint: name: Lint - needs: install runs-on: ubuntu-latest steps: - name: Checkout @@ -49,7 +35,6 @@ jobs: build: name: Build - needs: install runs-on: ubuntu-latest steps: - name: Checkout