28
28
- checkout :
29
29
depth : 1
30
30
- run :
31
- name : examples use local packages
31
+ name : Add examples/* to yarn workspace
32
32
command : |
33
33
npm pkg set 'workspaces[]'='examples/*'
34
34
- restore_cache :
46
46
- .yarn/install-state.gz
47
47
key : v13-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }}-{{ checksum "examples/todo-app/package.json" }}
48
48
- run : yarn run ci:build:types
49
- - run : yarn run ci:build
49
+ - run : yarn run ci:build-test-lib
50
50
- persist_to_workspace :
51
51
root : ~/
52
52
paths :
69
69
70
70
lint :
71
71
executor : node
72
- resource_class : medium+
72
+ resource_class : medium
73
73
steps :
74
74
- attach_workspace :
75
75
at : ~/
@@ -127,6 +127,7 @@ jobs:
127
127
parameters :
128
128
node-version :
129
129
type : string
130
+ executor : node
130
131
docker :
131
132
- image : cimg/node:<< parameters.node-version >>
132
133
steps :
@@ -140,16 +141,20 @@ jobs:
140
141
command : |
141
142
ANANSI_JEST_TYPECHECK=false npm test --ci --maxWorkers=2 --selectProjects Node
142
143
143
- non-app-examples :
144
+ setup-esmodule-types :
144
145
executor : node
145
- resource_class : small
146
+ resource_class : large
146
147
steps :
147
148
- attach_workspace :
148
149
at : ~/
149
150
- 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*
153
158
154
159
esmodule-types :
155
160
parameters :
@@ -162,51 +167,43 @@ jobs:
162
167
- run :
163
168
name : Install TypeScript Version
164
169
command : |
165
- if [ "<< parameters.typescript-version >>" != "latest" ]; then
166
- yarn up typescript@~<< parameters.typescript-version >>
167
- fi
170
+ yarn up typescript@~<< parameters.typescript-version >>
168
171
if [[ "<< parameters.typescript-version >>" == "4.0" || \
169
172
"<< parameters.typescript-version >>" == "4.1" || \
170
173
"<< parameters.typescript-version >>" == "4.3" ]]; then
171
- sed -i '/"@types\/react":/d' package.json
172
- sed -i '/"@types\/react-dom":/d' package.json
173
174
yarn up @types/react@ts<< parameters.typescript-version >>
174
175
fi
175
176
- run :
176
177
name : Run Typecheck
177
178
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
179
180
yarn run tsc --project examples/todo-app/tsconfig.json
180
181
yarn run tsc --project examples/github-app/tsconfig.json
181
182
fi
182
- yarn run tsc --project examples/todo-app/tsconfig.typetest.json
183
- yarn run tsc --project examples/github-app/tsconfig.typetest.json
184
183
if [ "<< parameters.typescript-version >>" != "4.0" ]; then
185
184
yarn run tsc --project examples/todo-app/tsconfig.typetest41.json
186
185
fi
186
+ yarn run tsc --project examples/todo-app/tsconfig.typetest.json
187
+ yarn run tsc --project examples/github-app/tsconfig.typetest.json
187
188
188
- esmodule-loosenulltypes :
189
+ esmodule-types-latest :
189
190
executor : node
190
191
steps :
191
192
- attach_workspace :
192
193
at : ~/
193
194
- run :
194
195
name : Run Typecheck
195
196
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
196
202
yarn run tsc --project examples/todo-app/tsconfig.json --strictNullChecks false
197
203
yarn run tsc --project examples/github-app/tsconfig.json --strictNullChecks false
198
204
yarn run tsc --project examples/todo-app/tsconfig.typetest.json --strictNullChecks false
199
205
yarn run tsc --project examples/github-app/tsconfig.typetest.json --strictNullChecks false
200
206
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 : |
210
207
yarn run tsc --project examples/todo-app/tsconfig.typetest.json --exactOptionalPropertyTypes true
211
208
yarn run tsc --project examples/github-app/tsconfig.typetest.json --exactOptionalPropertyTypes true
212
209
yarn run tsc --project examples/todo-app/tsconfig.typetest41.json --exactOptionalPropertyTypes true
@@ -216,10 +213,15 @@ jobs:
216
213
steps :
217
214
- attach_workspace :
218
215
at : ~/
216
+ - run : yarn run ci:build:esmodule
219
217
- run :
220
218
command : |
221
219
cd examples/todo-app
222
220
npm run build:browser -- --env readable
221
+ - run :
222
+ command : |
223
+ cd examples/normalizr-relationships
224
+ yarn run start
223
225
224
226
workflows :
225
227
version : 2
@@ -244,10 +246,13 @@ workflows:
244
246
- typecheck :
245
247
requires :
246
248
- setup
247
- - non-app-examples :
249
+ - validate-esmodule-browser-build :
248
250
requires :
249
251
- setup
250
- - validate-esmodule-browser-build :
252
+ - esmodule-types-latest :
253
+ requires :
254
+ - setup
255
+ - setup-esmodule-types :
251
256
requires :
252
257
- setup
253
258
- esmodule-types :
@@ -258,12 +263,6 @@ workflows:
258
263
# 4.1 is min version for rest package working well
259
264
# 4.3
260
265
# 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"]
262
267
requires :
263
- - setup
264
- - esmodule-loosenulltypes :
265
- requires :
266
- - setup
267
- - esmodule-exactOptionalPropertyTypes :
268
- requires :
269
- - setup
268
+ - setup-esmodule-types
0 commit comments