Skip to content

Commit 7ac2d04

Browse files
authored
Merge pull request #4567 from aryaemami59/ts-5.5
2 parents 602f012 + dabe3be commit 7ac2d04

File tree

5 files changed

+62
-102
lines changed

5 files changed

+62
-102
lines changed

.github/workflows/test-codegen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Did we fail?
6969
if: failure()
70-
run: ls -R
70+
run: ls -lR
7171

7272
test:
7373
needs: build

.github/workflows/tests.yml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -102,67 +102,16 @@ jobs:
102102
- name: Run type tests with `moduleResolution Bundler`
103103
run: rm -rf dist && yarn tsc -p . --moduleResolution Bundler --module ESNext --noEmit false --declaration --emitDeclarationOnly --outDir dist --target ESNext && rm -rf dist
104104

105-
test-type-portability:
106-
name: Test Type Portability with TypeScript ${{ matrix.ts }} and Node.js ${{ matrix.node }}
107-
needs: [build]
108-
runs-on: ubuntu-latest
109-
strategy:
110-
fail-fast: false
111-
matrix:
112-
node: ['20.x']
113-
ts: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', 'next']
114-
example:
115-
[
116-
{ name: 'bundler', moduleResolution: 'Bundler' },
117-
{ name: 'nodenext-cjs', moduleResolution: 'NodeNext' },
118-
{ name: 'nodenext-esm', moduleResolution: 'NodeNext' },
119-
]
120-
steps:
121-
- name: Checkout repo
122-
uses: actions/checkout@v4
123-
124-
- name: Use node ${{ matrix.node }}
125-
uses: actions/setup-node@v4
126-
with:
127-
node-version: ${{ matrix.node }}
128-
cache: 'yarn'
129-
130-
- name: Install deps
131-
run: yarn install
132-
133-
- uses: actions/download-artifact@v4
134-
with:
135-
name: package
136-
path: packages/toolkit
137-
138-
- name: Install build artifact
139-
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} add $(pwd)/package.tgz
140-
141-
- name: Install TypeScript ${{ matrix.ts }}
142-
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} add -D typescript@${{ matrix.ts }}
143-
144-
- name: Test type portability with `moduleResolution ${{ matrix.example.moduleResolution }}`
145-
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} run test
146-
147-
- name: Test type portability with `moduleResolution Node10`
148-
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module CommonJS --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
149-
150-
- name: Test type portability with `moduleResolution Node10` and `type module` in `package.json`
151-
if: matrix.example.name == 'nodenext-esm' || matrix.example.name == 'bundler'
152-
run: |
153-
npm --workspace=@examples-type-portability/${{ matrix.example.name }} pkg set type=module
154-
yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module ESNext --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
155-
156105
test-types:
157-
name: Test Types with TypeScript ${{ matrix.ts }}
106+
name: 'Test Types: TS ${{ matrix.ts }}'
158107

159108
needs: [build]
160109
runs-on: ubuntu-latest
161110
strategy:
162111
fail-fast: false
163112
matrix:
164113
node: ['20.x']
165-
ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4']
114+
ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
166115
steps:
167116
- name: Checkout repo
168117
uses: actions/checkout@v4
@@ -301,3 +250,54 @@ jobs:
301250

302251
- name: Run are-the-types-wrong
303252
run: yarn attw ./package.tgz --format table --ignore-rules false-cjs
253+
254+
test-type-portability:
255+
name: 'Test Type Portability: TS ${{ matrix.ts }} + Node ${{ matrix.node }}'
256+
needs: [build]
257+
runs-on: ubuntu-latest
258+
strategy:
259+
fail-fast: false
260+
matrix:
261+
node: ['20.x']
262+
ts: ['5.3', '5.4', '5.5', 'next']
263+
example:
264+
[
265+
{ name: 'bundler', moduleResolution: 'Bundler' },
266+
{ name: 'nodenext-cjs', moduleResolution: 'NodeNext' },
267+
{ name: 'nodenext-esm', moduleResolution: 'NodeNext' },
268+
]
269+
steps:
270+
- name: Checkout repo
271+
uses: actions/checkout@v4
272+
273+
- name: Use node ${{ matrix.node }}
274+
uses: actions/setup-node@v4
275+
with:
276+
node-version: ${{ matrix.node }}
277+
cache: 'yarn'
278+
279+
- name: Install deps
280+
run: yarn install
281+
282+
- uses: actions/download-artifact@v4
283+
with:
284+
name: package
285+
path: packages/toolkit
286+
287+
- name: Install build artifact
288+
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} add $(pwd)/package.tgz
289+
290+
- name: Install TypeScript ${{ matrix.ts }}
291+
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} add -D typescript@${{ matrix.ts }}
292+
293+
- name: Test type portability with `moduleResolution ${{ matrix.example.moduleResolution }}`
294+
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} run test
295+
296+
- name: Test type portability with `moduleResolution Node10`
297+
run: yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module CommonJS --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
298+
299+
- name: Test type portability with `moduleResolution Node10` and `type module` in `package.json`
300+
if: matrix.example.name == 'nodenext-esm' || matrix.example.name == 'bundler'
301+
run: |
302+
npm --workspace=@examples-type-portability/${{ matrix.example.name }} pkg set type=module
303+
yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module ESNext --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"release-it": "^14.12.5",
5252
"serve": "^14.2.0",
5353
"ts-node": "^10.9.2",
54-
"typescript": "^5.4.3"
54+
"typescript": "^5.5.4"
5555
},
5656
"resolutions": {
5757
"jest-snapshot": "29.3.1"

packages/toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"tslib": "^1.10.0",
9696
"tsup": "^8.2.3",
9797
"tsx": "^4.16.2",
98-
"typescript": "^5.4.5",
98+
"typescript": "^5.5.4",
9999
"vite-tsconfig-paths": "^4.3.1",
100100
"vitest": "^1.6.0",
101101
"yargs": "^15.3.1"

yarn.lock

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7956,7 +7956,7 @@ __metadata:
79567956
tslib: "npm:^1.10.0"
79577957
tsup: "npm:^8.2.3"
79587958
tsx: "npm:^4.16.2"
7959-
typescript: "npm:^5.4.5"
7959+
typescript: "npm:^5.5.4"
79607960
vite-tsconfig-paths: "npm:^4.3.1"
79617961
vitest: "npm:^1.6.0"
79627962
yargs: "npm:^15.3.1"
@@ -26478,7 +26478,7 @@ __metadata:
2647826478
release-it: "npm:^14.12.5"
2647926479
serve: "npm:^14.2.0"
2648026480
ts-node: "npm:^10.9.2"
26481-
typescript: "npm:^5.4.3"
26481+
typescript: "npm:^5.5.4"
2648226482
languageName: unknown
2648326483
linkType: soft
2648426484

@@ -29105,7 +29105,7 @@ __metadata:
2910529105
languageName: node
2910629106
linkType: hard
2910729107

29108-
"typescript@npm:5.3.3, typescript@npm:^5.3.3":
29108+
"typescript@npm:5.3.3":
2910929109
version: 5.3.3
2911029110
resolution: "typescript@npm:5.3.3"
2911129111
bin:
@@ -29125,27 +29125,7 @@ __metadata:
2912529125
languageName: node
2912629126
linkType: hard
2912729127

29128-
"typescript@npm:^5.4.3":
29129-
version: 5.4.3
29130-
resolution: "typescript@npm:5.4.3"
29131-
bin:
29132-
tsc: bin/tsc
29133-
tsserver: bin/tsserver
29134-
checksum: 10/de4c69f49a7ad4b1ea66a6dcc8b055ac34eb56af059a069d8988dd811c5e649be07e042e5bf573e8d0ac3ec2f30e6c999aa651cd09f6e9cbc6113749e8b6be20
29135-
languageName: node
29136-
linkType: hard
29137-
29138-
"typescript@npm:^5.4.5":
29139-
version: 5.4.5
29140-
resolution: "typescript@npm:5.4.5"
29141-
bin:
29142-
tsc: bin/tsc
29143-
tsserver: bin/tsserver
29144-
checksum: 10/d04a9e27e6d83861f2126665aa8d84847e8ebabcea9125b9ebc30370b98cb38b5dff2508d74e2326a744938191a83a69aa9fddab41f193ffa43eabfdf3f190a5
29145-
languageName: node
29146-
linkType: hard
29147-
29148-
"typescript@npm:^5.5.4":
29128+
"typescript@npm:^5.3.3, typescript@npm:^5.5.4":
2914929129
version: 5.5.4
2915029130
resolution: "typescript@npm:5.5.4"
2915129131
bin:
@@ -29185,7 +29165,7 @@ __metadata:
2918529165
languageName: node
2918629166
linkType: hard
2918729167

29188-
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>":
29168+
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>":
2918929169
version: 5.3.3
2919029170
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
2919129171
bin:
@@ -29205,27 +29185,7 @@ __metadata:
2920529185
languageName: node
2920629186
linkType: hard
2920729187

29208-
"typescript@patch:typescript@npm%3A^5.4.3#optional!builtin<compat/typescript>":
29209-
version: 5.4.3
29210-
resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin<compat/typescript>::version=5.4.3&hash=d69c25"
29211-
bin:
29212-
tsc: bin/tsc
29213-
tsserver: bin/tsserver
29214-
checksum: 10/3abea475798fdf7ee46e75dafc50c85f30fd1e7061559ec2af61646f23d16c91742703f04f0ac55be52f58ca05c02f77404b7b94bbad16278c9a54c9eeb4f4ea
29215-
languageName: node
29216-
linkType: hard
29217-
29218-
"typescript@patch:typescript@npm%3A^5.4.5#optional!builtin<compat/typescript>":
29219-
version: 5.4.5
29220-
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>::version=5.4.5&hash=d69c25"
29221-
bin:
29222-
tsc: bin/tsc
29223-
tsserver: bin/tsserver
29224-
checksum: 10/584be8bac7112ad49a9eb9992f71d542b1ff2fafb5bb315e1c196145e8feab589f1d7223cfb2d5df6770789582e6918f8287d1f2f89911b38eb80e29c560ad00
29225-
languageName: node
29226-
linkType: hard
29227-
29228-
"typescript@patch:typescript@npm%3A^5.5.4#optional!builtin<compat/typescript>":
29188+
"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.5.4#optional!builtin<compat/typescript>":
2922929189
version: 5.5.4
2923029190
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=d69c25"
2923129191
bin:

0 commit comments

Comments
 (0)