Explorar o código

Require pnpm release age and Node 24 (#293)

* Require pnpm release age and Node 24

- Set pnpm minimumReleaseAge to 2880 minutes and enforce engine checks.

- Pin the workspace to pnpm 11 and require Node 24+ via package metadata.

- Teach CI and release workflows to use the checked-in .node-version.

* Approve pnpm build scripts for CI

- Add the pnpm 11 build-script allowlist needed for frozen CI installs.

- Allow only the dependency install scripts already required by the current lockfile.

* Deny dependency build scripts

- Match the agent-browser pnpm 11 policy by explicitly denying known dependency build scripts.

- Keep minimumReleaseAge enforcement without approving postinstall script execution.
Chris Tate hai 1 mes
pai
achega
91833e9225
Modificáronse 5 ficheiros con 23 adicións e 7 borrados
  1. 4 4
      .github/workflows/ci.yml
  2. 6 1
      .github/workflows/release.yml
  3. 1 0
      .node-version
  4. 3 2
      package.json
  5. 9 0
      pnpm-workspace.yaml

+ 4 - 4
.github/workflows/ci.yml

@@ -21,7 +21,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: 22
+          node-version-file: .node-version
       - name: Check version sync
         run: node scripts/check-version-sync.js
 
@@ -33,7 +33,7 @@ jobs:
       - uses: pnpm/action-setup@v4
       - uses: actions/setup-node@v4
         with:
-          node-version: 20
+          node-version-file: .node-version
           cache: pnpm
       - run: pnpm install --frozen-lockfile
       - run: pnpm lint
@@ -46,7 +46,7 @@ jobs:
       - uses: pnpm/action-setup@v4
       - uses: actions/setup-node@v4
         with:
-          node-version: 20
+          node-version-file: .node-version
           cache: pnpm
       - run: pnpm install --frozen-lockfile
       - name: Build packages
@@ -61,7 +61,7 @@ jobs:
       - uses: pnpm/action-setup@v4
       - uses: actions/setup-node@v4
         with:
-          node-version: 20
+          node-version-file: .node-version
           cache: pnpm
       - run: pnpm install --frozen-lockfile
       - run: pnpm type-check

+ 6 - 1
.github/workflows/release.yml

@@ -26,6 +26,11 @@ jobs:
       - name: Checkout repository
         uses: actions/checkout@v4
 
+      - name: Setup Node.js
+        uses: actions/setup-node@v4
+        with:
+          node-version-file: .node-version
+
       - name: Compare package.json version to npm and check GitHub release
         id: check
         run: |
@@ -76,7 +81,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: 24
+          node-version-file: .node-version
           cache: pnpm
           registry-url: "https://registry.npmjs.org"
 

+ 1 - 0
.node-version

@@ -0,0 +1 @@
+24

+ 3 - 2
package.json

@@ -50,9 +50,10 @@
     "vite-plugin-solid": "^2.11.10",
     "vitest": "^4.0.17"
   },
-  "packageManager": "pnpm@10.29.3",
+  "packageManager": "pnpm@11.1.3",
   "engines": {
-    "node": ">=18"
+    "node": ">=24",
+    "pnpm": ">=11"
   },
   "lint-staged": {
     "*.{ts,tsx}": "prettier --write"

+ 9 - 0
pnpm-workspace.yaml

@@ -1,3 +1,12 @@
+minimumReleaseAge: 2880
+engineStrict: true
+allowBuilds:
+  "@mongodb-js/zstd": false
+  esbuild: false
+  msw: false
+  node-liblzma: false
+  sharp: false
+
 packages:
   - "apps/*"
   - "examples/*"