@@ -102,67 +102,16 @@ jobs:
102
102
- name : Run type tests with `moduleResolution Bundler`
103
103
run : rm -rf dist && yarn tsc -p . --moduleResolution Bundler --module ESNext --noEmit false --declaration --emitDeclarationOnly --outDir dist --target ESNext && rm -rf dist
104
104
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
-
156
105
test-types :
157
- name : Test Types with TypeScript ${{ matrix.ts }}
106
+ name : ' Test Types: TS ${{ matrix.ts }}'
158
107
159
108
needs : [build]
160
109
runs-on : ubuntu-latest
161
110
strategy :
162
111
fail-fast : false
163
112
matrix :
164
113
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' ]
166
115
steps :
167
116
- name : Checkout repo
168
117
uses : actions/checkout@v4
@@ -301,3 +250,54 @@ jobs:
301
250
302
251
- name : Run are-the-types-wrong
303
252
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
0 commit comments