Skip to content

Commit 05f823e

Browse files
committed
fix: standardize Node version and make yalc optional in CI
Add .nvmrc for Node 20.18.1 LTS and update CI to support modern Node versions. Make all yalc commands non-fatal to prevent CI failures on Node 20/22 where yalc has compatibility issues. Changes: - Add .nvmrc with Node 20.18.1 (LTS) - Update package.json engines to ">=20.0.0 <=22.x.x" (align with Strapi 5 requirements) - Make all yalc commands non-fatal using || true (build, playground:yalc-add, etc) - Change playground dependency from link:.yalc to file:.. for better compatibility - Update CI workflow to use .nvmrc instead of matrix strategy - Remove Node version matrix in favor of single consistent version This allows CI to succeed by falling back to direct file linking when yalc fails, while preserving yalc functionality for local development where it may work.
1 parent 1e89477 commit 05f823e

5 files changed

Lines changed: 2120 additions & 2325 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ jobs:
1414
lint:
1515
name: 'lint'
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
node: [20, 22]
2017
steps:
2118
- uses: actions/checkout@v4
2219
- uses: actions/setup-node@v4
2320
with:
24-
node-version: ${{ matrix.node }}
21+
node-version-file: '.nvmrc'
2522
cache: 'yarn'
2623
- name: Install dependencies
2724
run: yarn --frozen-lockfile
@@ -31,14 +28,11 @@ jobs:
3128
name: 'test'
3229
needs: [lint]
3330
runs-on: ubuntu-latest
34-
strategy:
35-
matrix:
36-
node: [20, 22]
3731
steps:
3832
- uses: actions/checkout@v4
3933
- uses: actions/setup-node@v4
4034
with:
41-
node-version: ${{ matrix.node }}
35+
node-version-file: '.nvmrc'
4236
cache: 'yarn'
4337
- name: Install dependencies plugin
4438
run: yarn --no-lockfile --unsafe-perm

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18.1

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
"test:unit": "jest --verbose",
3838
"test:integration": "cd playground && node_modules/.bin/jest --verbose --forceExit --detectOpenHandles",
3939
"test:e2e": "cypress open",
40-
"playground:install": "yarn playground:yalc-add-link && cd playground && yarn install",
41-
"playground:yalc-add": "cd playground && yalc add strapi-plugin-config-sync",
42-
"playground:yalc-add-link": "cd playground && yalc add --link strapi-plugin-config-sync",
40+
"playground:install": "(yarn playground:yalc-add-link || true) && cd playground && yarn install",
41+
"playground:yalc-add": "cd playground && (yalc add strapi-plugin-config-sync || true)",
42+
"playground:yalc-add-link": "cd playground && (yalc add --link strapi-plugin-config-sync || true)",
4343
"playground:build": "cd playground && yarn build",
4444
"playground:develop": "cd playground && yarn develop",
4545
"playground:start": "cd playground && yarn start"
@@ -134,7 +134,7 @@
134134
},
135135
"homepage": "https://www.pluginpal.io/plugin/config-sync",
136136
"engines": {
137-
"node": ">=18.0.0",
137+
"node": ">=20.0.0 <=22.x.x",
138138
"npm": ">=6.0.0"
139139
},
140140
"license": "MIT",

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"react": "^18.0.0",
2929
"react-dom": "^18.0.0",
3030
"react-router-dom": "^6.0.0",
31-
"strapi-plugin-config-sync": "link:.yalc/strapi-plugin-config-sync",
31+
"strapi-plugin-config-sync": "file:..",
3232
"styled-components": "^6.0.0"
3333
},
3434
"author": {

0 commit comments

Comments
 (0)