Skip to content

Commit

Permalink
Upgrade tsx to v4.x and use it directly to fix issue with Node v18.19 (
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Dec 8, 2023
1 parent 33a3b0b commit bc5e7f2
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 74 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ jobs:

- uses: actions/checkout@v4

# Temporarily pinned to `18.18` because `18.19` has a breaking change
# related to loaders affecting one of our tests.
- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ jobs:
with:
fetch-depth: 0

# Temporarily pinned to `18.18` because `18.19` has a breaking change
# related to loaders affecting one of our tests.
- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ jobs:
# This is required because lerna uses tags to determine the version.
fetch-depth: 0

# Temporarily pinned to `18.18` because `18.19` has a breaking change
# related to loaders affecting one of our tests.
- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"prompts": "2.4.2",
"rimraf": "5.0.5",
"tstyche": "1.0.0-beta.3",
"tsx": "3.12.7",
"tsx": "4.6.2",
"typescript": "5.3.2",
"yargs": "17.7.2",
"zx": "7.2.3"
Expand Down
5 changes: 3 additions & 2 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"build:types": "tsc --build --verbose",
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
"prepublishOnly": "NODE_ENV=production yarn build",
"test": "glob './src/**/__tests__/*.test.ts' --cmd='node --loader tsx --no-warnings --test' && echo",
"test:watch": "glob './src/**/__tests__/*.test.ts' --cmd='node --loader tsx --no-warnings --test --watch'"
"test": "glob './src/**/__tests__/*.test.ts' --cmd='tsx --no-warnings --test' && echo",
"test:watch": "glob './src/**/__tests__/*.test.ts' --cmd='tsx --no-warnings --test --watch'"
},
"dependencies": {
"@typescript-eslint/utils": "5.62.0",
Expand All @@ -31,6 +31,7 @@
"esbuild": "0.19.5",
"fast-glob": "3.3.2",
"glob": "10.3.10",
"tsx": "4.6.2",
"typescript": "5.3.2"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@types/fs-extra": "11.0.4",
"graphql-tag": "2.12.6",
"jest": "29.7.0",
"tsx": "3.12.7"
"tsx": "4.6.2"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
4 changes: 2 additions & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"build:js": "babel src -d dist --extensions \".js,.jsx,.ts,.tsx\"",
"build:types": "tsc --build --verbose",
"test": "yarn test:node && echo",
"test:node": "glob './src/**/__tests__/*.test.mts' --cmd='node --loader tsx --no-warnings --test'",
"test:watch": "glob './src/**/__tests__/*.test.mts' --cmd='node --loader tsx --no-warnings --test --watch'"
"test:node": "glob './src/**/__tests__/*.test.mts' --cmd='tsx --no-warnings --test'",
"test:watch": "glob './src/**/__tests__/*.test.mts' --cmd='tsx --no-warnings --test --watch'"
},
"dependencies": {
"@babel/runtime-corejs3": "7.23.5",
Expand Down
13 changes: 2 additions & 11 deletions tasks/release/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,8 @@ async function doChecks() {
if (nodeVersion.startsWith('v20')) {
throw new Error(
[
'The framework is currently built for v18; running QA with v20 may cause issues.',
'Switch to v18.18.2.',
].join('\n')
)
}

if (nodeVersion.startsWith('v18.19')) {
throw new Error(
[
'Node.js v18.19 currently has a breaking change that makes one of our tests fail.',
'Switch to v18.18.2.',
'The framework is currently built for Node v18; running QA with v20 may cause issues.',
'Please switch to Node v18.',
].join('\n')
)
}
Expand Down
85 changes: 37 additions & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2370,36 +2370,6 @@ __metadata:
languageName: node
linkType: hard

"@esbuild-kit/cjs-loader@npm:^2.4.2":
version: 2.4.2
resolution: "@esbuild-kit/cjs-loader@npm:2.4.2"
dependencies:
"@esbuild-kit/core-utils": ^3.0.0
get-tsconfig: ^4.4.0
checksum: 44502097eb9287dc4f25d5c34acdbf5462228a91a348d08fe315939f14ac29fa47704cdcee9f6fca3db4ace93ed63825f06187325e45381a78ecbf3a65eaf759
languageName: node
linkType: hard

"@esbuild-kit/core-utils@npm:^3.0.0":
version: 3.2.2
resolution: "@esbuild-kit/core-utils@npm:3.2.2"
dependencies:
esbuild: ~0.18.20
source-map-support: ^0.5.21
checksum: 0e973190d1b40a6166b4741d43d7a20552efae289a92629999f68609550cd4bbd7e6b0438f027ba1291815bf9803db17bb6dbab4a041cc317ea973c6d4147b70
languageName: node
linkType: hard

"@esbuild-kit/esm-loader@npm:^2.5.5":
version: 2.5.5
resolution: "@esbuild-kit/esm-loader@npm:2.5.5"
dependencies:
"@esbuild-kit/core-utils": ^3.0.0
get-tsconfig: ^4.4.0
checksum: 6133f784322e617cac5649e9489c580047e7095cd9ad9e693b03b1cd3df9809e02e224d488d93c1a889441d01e4210c66d01adf53383eefbbe9a585dcbccacc2
languageName: node
linkType: hard

"@esbuild/android-arm64@npm:0.18.20":
version: 0.18.20
resolution: "@esbuild/android-arm64@npm:0.18.20"
Expand Down Expand Up @@ -8691,6 +8661,7 @@ __metadata:
eslint: 8.55.0
fast-glob: 3.3.2
glob: 10.3.10
tsx: 4.6.2
typescript: 5.3.2
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8835,7 +8806,7 @@ __metadata:
systeminformation: 5.21.20
terminal-link: 2.1.1
ts-node: 10.9.1
tsx: 3.12.7
tsx: 4.6.2
typescript: 5.3.2
bin:
rw-gen: ./dist/generate/generate.js
Expand Down Expand Up @@ -20450,7 +20421,7 @@ __metadata:
languageName: node
linkType: hard

"fsevents@npm:2.3.2, fsevents@npm:^2.3.2, fsevents@npm:~2.3.2":
"fsevents@npm:2.3.2":
version: 2.3.2
resolution: "fsevents@npm:2.3.2"
dependencies:
Expand All @@ -20471,7 +20442,17 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@^2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.2#~builtin<compat/fsevents>":
"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2, fsevents@npm:~2.3.3":
version: 2.3.3
resolution: "fsevents@npm:2.3.3"
dependencies:
node-gyp: latest
checksum: a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60
conditions: os=darwin
languageName: node
linkType: hard

"fsevents@patch:fsevents@2.3.2#~builtin<compat/fsevents>":
version: 2.3.2
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=df0bf1"
dependencies:
Expand All @@ -20490,6 +20471,15 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@^2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.3#~builtin<compat/fsevents>":
version: 2.3.3
resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin<compat/fsevents>::version=2.3.3&hash=df0bf1"
dependencies:
node-gyp: latest
conditions: os=darwin
languageName: node
linkType: hard

"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2":
version: 1.1.2
resolution: "function-bind@npm:1.1.2"
Expand Down Expand Up @@ -20744,12 +20734,12 @@ __metadata:
languageName: node
linkType: hard

"get-tsconfig@npm:^4.4.0":
version: 4.7.0
resolution: "get-tsconfig@npm:4.7.0"
"get-tsconfig@npm:^4.7.2":
version: 4.7.2
resolution: "get-tsconfig@npm:4.7.2"
dependencies:
resolve-pkg-maps: ^1.0.0
checksum: 5844d18a705535808cf535010d9443b47b462c6e91ed00d94500602f220ecb8e518325d5b1f9e0c515c67025819c3df193194144a456e1d8f1cd70b5d48b52aa
checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65
languageName: node
linkType: hard

Expand Down Expand Up @@ -31219,7 +31209,7 @@ __metadata:
prompts: 2.4.2
rimraf: 5.0.5
tstyche: 1.0.0-beta.3
tsx: 3.12.7
tsx: 4.6.2
typescript: 5.3.2
yargs: 17.7.2
zx: 7.2.3
Expand Down Expand Up @@ -32124,7 +32114,7 @@ __metadata:
languageName: node
linkType: hard

"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20":
"source-map-support@npm:^0.5.16, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20":
version: 0.5.21
resolution: "source-map-support@npm:0.5.21"
dependencies:
Expand Down Expand Up @@ -33864,20 +33854,19 @@ __metadata:
languageName: node
linkType: hard

"tsx@npm:3.12.7":
version: 3.12.7
resolution: "tsx@npm:3.12.7"
"tsx@npm:4.6.2":
version: 4.6.2
resolution: "tsx@npm:4.6.2"
dependencies:
"@esbuild-kit/cjs-loader": ^2.4.2
"@esbuild-kit/core-utils": ^3.0.0
"@esbuild-kit/esm-loader": ^2.5.5
fsevents: ~2.3.2
esbuild: ~0.18.20
fsevents: ~2.3.3
get-tsconfig: ^4.7.2
dependenciesMeta:
fsevents:
optional: true
bin:
tsx: dist/cli.js
checksum: fe25121ecc05637be0b38912c1629c968277cda41855947bc57333bb02016d77610d7289ea5f32b7589a800d6b071635ce6797ff425470e1afc60ca6986f73b4
tsx: dist/cli.mjs
checksum: df47757e1df80bdd425be220636d4ba1da1e512dc14837573576a4d68cf93e36626862f69085ac29b04c127a74e0084939be1f15189a12e26480131176693d61
languageName: node
linkType: hard

Expand Down

0 comments on commit bc5e7f2

Please sign in to comment.