@@ -122,67 +122,16 @@ jobs:
122122 - name : Run type tests with `moduleResolution Bundler`
123123 run : rm -rf dist && yarn tsc -p . --moduleResolution Bundler --module ESNext --noEmit false --declaration --emitDeclarationOnly --outDir dist --target ESNext && rm -rf dist
124124
125- test-type-portability :
126- name : Test Type Portability with TypeScript ${{ matrix.ts }} and Node.js ${{ matrix.node }}
127- needs : [build]
128- runs-on : ubuntu-latest
129- strategy :
130- fail-fast : false
131- matrix :
132- node : ['20.x']
133- ts : ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', 'next']
134- example :
135- [
136- { name: 'bundler', moduleResolution: 'Bundler' },
137- { name: 'nodenext-cjs', moduleResolution: 'NodeNext' },
138- { name: 'nodenext-esm', moduleResolution: 'NodeNext' },
139- ]
140- steps :
141- - name : Checkout repo
142- uses : actions/checkout@v4
143-
144- - name : Use node ${{ matrix.node }}
145- uses : actions/setup-node@v4
146- with :
147- node-version : ${{ matrix.node }}
148- cache : ' yarn'
149-
150- - name : Install deps
151- run : yarn install
152-
153- - uses : actions/download-artifact@v4
154- with :
155- name : package
156- path : packages/toolkit
157-
158- - name : Install build artifact
159- run : yarn workspace @examples-type-portability/${{ matrix.example.name }} add $(pwd)/package.tgz
160-
161- - name : Install TypeScript ${{ matrix.ts }}
162- run : yarn workspace @examples-type-portability/${{ matrix.example.name }} add -D typescript@${{ matrix.ts }}
163-
164- - name : Test type portability with `moduleResolution ${{ matrix.example.moduleResolution }}`
165- run : yarn workspace @examples-type-portability/${{ matrix.example.name }} run test
166-
167- - name : Test type portability with `moduleResolution Node10`
168- run : yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module CommonJS --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
169-
170- - name : Test type portability with `moduleResolution Node10` and `type module` in `package.json`
171- if : matrix.example.name == 'nodenext-esm' || matrix.example.name == 'bundler'
172- run : |
173- npm --workspace=@examples-type-portability/${{ matrix.example.name }} pkg set type=module
174- yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module ESNext --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
175-
176125 test-types :
177- name : Test Types with TypeScript ${{ matrix.ts }} and React ${{ matrix.react.version }}
126+ name : ' Test Types: TS ${{ matrix.ts }}'
178127
179128 needs : [build]
180129 runs-on : ubuntu-latest
181130 strategy :
182131 fail-fast : false
183132 matrix :
184133 node : ['20.x']
185- ts : ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4']
134+ ts : ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5' ]
186135 react :
187136 [
188137 {
@@ -339,3 +288,54 @@ jobs:
339288
340289 - name : Run are-the-types-wrong
341290 run : yarn attw ./package.tgz --format table --ignore-rules false-cjs
291+
292+ test-type-portability :
293+ name : ' Test Type Portability: TS ${{ matrix.ts }} + Node ${{ matrix.node }}'
294+ needs : [build]
295+ runs-on : ubuntu-latest
296+ strategy :
297+ fail-fast : false
298+ matrix :
299+ node : ['20.x']
300+ ts : ['5.3', '5.4', '5.5', 'next']
301+ example :
302+ [
303+ { name: 'bundler', moduleResolution: 'Bundler' },
304+ { name: 'nodenext-cjs', moduleResolution: 'NodeNext' },
305+ { name: 'nodenext-esm', moduleResolution: 'NodeNext' },
306+ ]
307+ steps :
308+ - name : Checkout repo
309+ uses : actions/checkout@v4
310+
311+ - name : Use node ${{ matrix.node }}
312+ uses : actions/setup-node@v4
313+ with :
314+ node-version : ${{ matrix.node }}
315+ cache : ' yarn'
316+
317+ - name : Install deps
318+ run : yarn install
319+
320+ - uses : actions/download-artifact@v4
321+ with :
322+ name : package
323+ path : packages/toolkit
324+
325+ - name : Install build artifact
326+ run : yarn workspace @examples-type-portability/${{ matrix.example.name }} add $(pwd)/package.tgz
327+
328+ - name : Install TypeScript ${{ matrix.ts }}
329+ run : yarn workspace @examples-type-portability/${{ matrix.example.name }} add -D typescript@${{ matrix.ts }}
330+
331+ - name : Test type portability with `moduleResolution ${{ matrix.example.moduleResolution }}`
332+ run : yarn workspace @examples-type-portability/${{ matrix.example.name }} run test
333+
334+ - name : Test type portability with `moduleResolution Node10`
335+ run : yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module CommonJS --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
336+
337+ - name : Test type portability with `moduleResolution Node10` and `type module` in `package.json`
338+ if : matrix.example.name == 'nodenext-esm' || matrix.example.name == 'bundler'
339+ run : |
340+ npm --workspace=@examples-type-portability/${{ matrix.example.name }} pkg set type=module
341+ yarn workspace @examples-type-portability/${{ matrix.example.name }} run test --module ESNext --moduleResolution Node10 --preserveSymLinks --verbatimModuleSyntax false
0 commit comments