2828 - checkout :
2929 depth : 1
3030 - run :
31- name : examples use local packages
31+ name : Add examples/* to yarn workspace
3232 command : |
3333 npm pkg set 'workspaces[]'='examples/*'
3434 - restore_cache :
4646 - .yarn/install-state.gz
4747 key : v13-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }}-{{ checksum "examples/todo-app/package.json" }}
4848 - run : yarn run ci:build:types
49- - run : yarn run ci:build
49+ - run : yarn run ci:build-test-lib
5050 - persist_to_workspace :
5151 root : ~/
5252 paths :
6969
7070 lint :
7171 executor : node
72- resource_class : medium+
72+ resource_class : medium
7373 steps :
7474 - attach_workspace :
7575 at : ~/
@@ -127,6 +127,7 @@ jobs:
127127 parameters :
128128 node-version :
129129 type : string
130+ executor : node
130131 docker :
131132 - image : cimg/node:<< parameters.node-version >>
132133 steps :
@@ -140,16 +141,20 @@ jobs:
140141 command : |
141142 ANANSI_JEST_TYPECHECK=false npm test --ci --maxWorkers=2 --selectProjects Node
142143
143- non-app-examples :
144+ setup-esmodule-types :
144145 executor : node
145- resource_class : small
146+ resource_class : large
146147 steps :
147148 - attach_workspace :
148149 at : ~/
149150 - run :
150- command : |
151- cd examples/normalizr-relationships
152- yarn run start
151+ name : Build Legacy Types
152+ command : yarn run ci:build:legacy-types
153+ - persist_to_workspace :
154+ root : ~/
155+ paths :
156+ # explicitly list so we can ignore some directories that are not needed
157+ - project/packages/*/ts*
153158
154159 esmodule-types :
155160 parameters :
@@ -162,51 +167,43 @@ jobs:
162167 - run :
163168 name : Install TypeScript Version
164169 command : |
165- if [ "<< parameters.typescript-version >>" != "latest" ]; then
166- yarn up typescript@~<< parameters.typescript-version >>
167- fi
170+ yarn up typescript@~<< parameters.typescript-version >>
168171 if [[ "<< parameters.typescript-version >>" == "4.0" || \
169172 "<< parameters.typescript-version >>" == "4.1" || \
170173 "<< parameters.typescript-version >>" == "4.3" ]]; then
171- sed -i '/"@types\/react":/d' package.json
172- sed -i '/"@types\/react-dom":/d' package.json
173174 yarn up @types/react@ts<< parameters.typescript-version >>
174175 fi
175176 - run :
176177 name : Run Typecheck
177178 command : |
178- if [ "<< parameters.typescript-version >>" == "latest" ] || [ "<< parameters.typescript-version >>" == " 5.3" ] || [ "<< parameters.typescript-version >>" == "4.8" ]; then
179+ if [ "<< parameters.typescript-version >>" == "5.3" ] || [ "<< parameters.typescript-version >>" == "4.8" ]; then
179180 yarn run tsc --project examples/todo-app/tsconfig.json
180181 yarn run tsc --project examples/github-app/tsconfig.json
181182 fi
182- yarn run tsc --project examples/todo-app/tsconfig.typetest.json
183- yarn run tsc --project examples/github-app/tsconfig.typetest.json
184183 if [ "<< parameters.typescript-version >>" != "4.0" ]; then
185184 yarn run tsc --project examples/todo-app/tsconfig.typetest41.json
186185 fi
186+ yarn run tsc --project examples/todo-app/tsconfig.typetest.json
187+ yarn run tsc --project examples/github-app/tsconfig.typetest.json
187188
188- esmodule-loosenulltypes :
189+ esmodule-types-latest :
189190 executor : node
190191 steps :
191192 - attach_workspace :
192193 at : ~/
193194 - run :
194195 name : Run Typecheck
195196 command : |
197+ yarn run tsc --project examples/todo-app/tsconfig.json
198+ yarn run tsc --project examples/github-app/tsconfig.json
199+ yarn run tsc --project examples/todo-app/tsconfig.typetest.json
200+ yarn run tsc --project examples/github-app/tsconfig.typetest.json
201+ yarn run tsc --project examples/todo-app/tsconfig.typetest41.json
196202 yarn run tsc --project examples/todo-app/tsconfig.json --strictNullChecks false
197203 yarn run tsc --project examples/github-app/tsconfig.json --strictNullChecks false
198204 yarn run tsc --project examples/todo-app/tsconfig.typetest.json --strictNullChecks false
199205 yarn run tsc --project examples/github-app/tsconfig.typetest.json --strictNullChecks false
200206 yarn run tsc --project examples/todo-app/tsconfig.typetest41.json --strictNullChecks false
201-
202- esmodule-exactOptionalPropertyTypes :
203- executor : node
204- steps :
205- - attach_workspace :
206- at : ~/
207- - run :
208- name : Run Typecheck
209- command : |
210207 yarn run tsc --project examples/todo-app/tsconfig.typetest.json --exactOptionalPropertyTypes true
211208 yarn run tsc --project examples/github-app/tsconfig.typetest.json --exactOptionalPropertyTypes true
212209 yarn run tsc --project examples/todo-app/tsconfig.typetest41.json --exactOptionalPropertyTypes true
@@ -216,10 +213,15 @@ jobs:
216213 steps :
217214 - attach_workspace :
218215 at : ~/
216+ - run : yarn run ci:build:esmodule
219217 - run :
220218 command : |
221219 cd examples/todo-app
222220 npm run build:browser -- --env readable
221+ - run :
222+ command : |
223+ cd examples/normalizr-relationships
224+ yarn run start
223225
224226workflows :
225227 version : 2
@@ -244,10 +246,13 @@ workflows:
244246 - typecheck :
245247 requires :
246248 - setup
247- - non-app-examples :
249+ - validate-esmodule-browser-build :
248250 requires :
249251 - setup
250- - validate-esmodule-browser-build :
252+ - esmodule-types-latest :
253+ requires :
254+ - setup
255+ - setup-esmodule-types :
251256 requires :
252257 - setup
253258 - esmodule-types :
@@ -258,12 +263,6 @@ workflows:
258263 # 4.1 is min version for rest package working well
259264 # 4.3
260265 # 4.7 (but its broken so we do 4.8) lets you apply a generic type to a function type to see its return value
261- typescript-version : ["4.0", "4.1", "4.3", "4.8", "5.3", "latest" ]
266+ typescript-version : ["4.0", "4.1", "4.3", "4.8", "5.3"]
262267 requires :
263- - setup
264- - esmodule-loosenulltypes :
265- requires :
266- - setup
267- - esmodule-exactOptionalPropertyTypes :
268- requires :
269- - setup
268+ - setup-esmodule-types
0 commit comments