@nx/expo 19.0.0-beta.0 → 19.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations.json +59 -307
- package/package.json +9 -10
- package/plugins/plugin.js +4 -17
- package/project.json +0 -2
- package/src/generators/application/schema.d.ts +1 -1
- package/src/generators/application/schema.json +2 -2
- package/src/migrations/update-19-0-0/change-webpack-to-metro.d.ts +7 -0
- package/src/migrations/{update-15-8-3 → update-19-0-0}/change-webpack-to-metro.js +4 -5
- package/src/utils/versions.d.ts +12 -12
- package/src/utils/versions.js +12 -12
- package/plugins/with-nx-webpack.d.ts +0 -5
- package/plugins/with-nx-webpack.js +0 -51
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.d.ts +0 -9
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +0 -61
- package/src/migrations/update-15-0-3/change-jest-preset.d.ts +0 -8
- package/src/migrations/update-15-0-3/change-jest-preset.js +0 -69
- package/src/migrations/update-15-8-3/change-webpack-to-metro.d.ts +0 -8
package/migrations.json
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"change-expo-jest-preset": {
|
|
4
|
-
"version": "15.0.3-beta.0",
|
|
5
|
-
"cli": "nx",
|
|
6
|
-
"description": "Change jest config preset tof expo projects",
|
|
7
|
-
"factory": "./src/migrations/update-15-0-3/change-jest-preset"
|
|
8
|
-
},
|
|
9
|
-
"add-new-expo-cli-targets": {
|
|
10
|
-
"version": "15.0.3-beta.0",
|
|
11
|
-
"cli": "nx",
|
|
12
|
-
"description": "Add targets for @expo/cli and replace eject target",
|
|
13
|
-
"factory": "./src/migrations/update-15-0-3/add-new-expo-cli-targets"
|
|
14
|
-
},
|
|
15
|
-
"change-webpack-to-metro": {
|
|
16
|
-
"version": "15.8.3-beta.0",
|
|
17
|
-
"cli": "nx",
|
|
18
|
-
"description": "Change webpack to metro in expo projects",
|
|
19
|
-
"factory": "./src/migrations/update-15-8-3/change-webpack-to-metro"
|
|
20
|
-
},
|
|
21
3
|
"remove-deprecated-expo-targets": {
|
|
22
4
|
"version": "16.0.0-beta.0",
|
|
23
5
|
"cli": "nx",
|
|
@@ -83,298 +65,15 @@
|
|
|
83
65
|
"version": "18.0.0-beta.0",
|
|
84
66
|
"description": "Remove the offset from the outputDir of the export target",
|
|
85
67
|
"implementation": "./src/migrations/update-18-0-0/change-outputDir-export-target"
|
|
68
|
+
},
|
|
69
|
+
"update-19-0-0-change-webpack-to-metro": {
|
|
70
|
+
"version": "19.0.0-beta.9",
|
|
71
|
+
"cli": "nx",
|
|
72
|
+
"description": "Change webpack to metro in expo projects",
|
|
73
|
+
"factory": "./src/migrations/update-19-0-0/change-webpack-to-metro"
|
|
86
74
|
}
|
|
87
75
|
},
|
|
88
76
|
"packageJsonUpdates": {
|
|
89
|
-
"15.0.0": {
|
|
90
|
-
"version": "15.0.0-beta.0",
|
|
91
|
-
"packages": {
|
|
92
|
-
"metro-resolver": {
|
|
93
|
-
"version": "0.72.3",
|
|
94
|
-
"alwaysAddToPackageJson": false
|
|
95
|
-
},
|
|
96
|
-
"@testing-library/react-native": {
|
|
97
|
-
"version": "11.2.0",
|
|
98
|
-
"alwaysAddToPackageJson": false
|
|
99
|
-
},
|
|
100
|
-
"@testing-library/jest-native": {
|
|
101
|
-
"version": "4.0.13",
|
|
102
|
-
"alwaysAddToPackageJson": false
|
|
103
|
-
},
|
|
104
|
-
"expo": {
|
|
105
|
-
"version": "46.0.13",
|
|
106
|
-
"alwaysAddToPackageJson": false
|
|
107
|
-
},
|
|
108
|
-
"expo-cli": {
|
|
109
|
-
"version": "6.0.6",
|
|
110
|
-
"alwaysAddToPackageJson": false
|
|
111
|
-
},
|
|
112
|
-
"react-native": {
|
|
113
|
-
"version": "0.69.6",
|
|
114
|
-
"alwaysAddToPackageJson": false
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"15.0.3": {
|
|
119
|
-
"version": "15.0.3-beta.0",
|
|
120
|
-
"packages": {
|
|
121
|
-
"@testing-library/react-native": {
|
|
122
|
-
"version": "11.3.0",
|
|
123
|
-
"alwaysAddToPackageJson": false
|
|
124
|
-
},
|
|
125
|
-
"@testing-library/jest-native": {
|
|
126
|
-
"version": "5.0.0",
|
|
127
|
-
"alwaysAddToPackageJson": false
|
|
128
|
-
},
|
|
129
|
-
"expo": {
|
|
130
|
-
"version": "46.0.16",
|
|
131
|
-
"alwaysAddToPackageJson": false
|
|
132
|
-
},
|
|
133
|
-
"expo-cli": {
|
|
134
|
-
"version": "6.0.6",
|
|
135
|
-
"alwaysAddToPackageJson": false
|
|
136
|
-
},
|
|
137
|
-
"eas-cli": {
|
|
138
|
-
"version": "2.4.1",
|
|
139
|
-
"alwaysAddToPackageJson": false
|
|
140
|
-
},
|
|
141
|
-
"@expo/cli": {
|
|
142
|
-
"version": "0.3.2",
|
|
143
|
-
"alwaysAddToPackageJson": false,
|
|
144
|
-
"addToPackageJson": "devDependencies"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"15.2.2": {
|
|
149
|
-
"version": "15.2.2-beta.0",
|
|
150
|
-
"packages": {
|
|
151
|
-
"metro-resolver": {
|
|
152
|
-
"version": "0.73.3",
|
|
153
|
-
"alwaysAddToPackageJson": false
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
"15.3.0": {
|
|
158
|
-
"version": "15.3.0-beta.0",
|
|
159
|
-
"packages": {
|
|
160
|
-
"@testing-library/react-native": {
|
|
161
|
-
"version": "11.5.0",
|
|
162
|
-
"alwaysAddToPackageJson": false
|
|
163
|
-
},
|
|
164
|
-
"@testing-library/jest-native": {
|
|
165
|
-
"version": "5.3.0",
|
|
166
|
-
"alwaysAddToPackageJson": false
|
|
167
|
-
},
|
|
168
|
-
"expo": {
|
|
169
|
-
"version": "47.0.8",
|
|
170
|
-
"alwaysAddToPackageJson": false
|
|
171
|
-
},
|
|
172
|
-
"@expo/metro-config": {
|
|
173
|
-
"version": "0.5.1",
|
|
174
|
-
"alwaysAddToPackageJson": false
|
|
175
|
-
},
|
|
176
|
-
"expo-splash-screen": {
|
|
177
|
-
"version": "~0.17.5",
|
|
178
|
-
"alwaysAddToPackageJson": false
|
|
179
|
-
},
|
|
180
|
-
"expo-cli": {
|
|
181
|
-
"version": "6.0.8",
|
|
182
|
-
"alwaysAddToPackageJson": false
|
|
183
|
-
},
|
|
184
|
-
"@expo/cli": {
|
|
185
|
-
"version": "0.4.10",
|
|
186
|
-
"alwaysAddToPackageJson": false
|
|
187
|
-
},
|
|
188
|
-
"eas-cli": {
|
|
189
|
-
"version": "2.8.0",
|
|
190
|
-
"alwaysAddToPackageJson": false
|
|
191
|
-
},
|
|
192
|
-
"babel-preset-expo": {
|
|
193
|
-
"version": "~9.2.2",
|
|
194
|
-
"alwaysAddToPackageJson": false
|
|
195
|
-
},
|
|
196
|
-
"react-native": {
|
|
197
|
-
"version": "0.70.5",
|
|
198
|
-
"alwaysAddToPackageJson": false
|
|
199
|
-
},
|
|
200
|
-
"@types/react-native": {
|
|
201
|
-
"version": "0.70.7",
|
|
202
|
-
"alwaysAddToPackageJson": false
|
|
203
|
-
},
|
|
204
|
-
"react-native-svg": {
|
|
205
|
-
"version": "13.3.0",
|
|
206
|
-
"alwaysAddToPackageJson": false
|
|
207
|
-
},
|
|
208
|
-
"@svgr/webpack": {
|
|
209
|
-
"version": "^6.5.1",
|
|
210
|
-
"alwaysAddToPackageJson": false
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
"15.4.3": {
|
|
215
|
-
"version": "15.4.3-beta.0",
|
|
216
|
-
"packages": {
|
|
217
|
-
"expo": {
|
|
218
|
-
"version": "47.0.9",
|
|
219
|
-
"alwaysAddToPackageJson": false
|
|
220
|
-
},
|
|
221
|
-
"@expo/metro-config": {
|
|
222
|
-
"version": "0.5.2",
|
|
223
|
-
"alwaysAddToPackageJson": false
|
|
224
|
-
},
|
|
225
|
-
"@expo/webpack-config": {
|
|
226
|
-
"version": "~0.17.3",
|
|
227
|
-
"alwaysAddToPackageJson": false,
|
|
228
|
-
"addToPackageJson": "dependencies"
|
|
229
|
-
},
|
|
230
|
-
"eas-cli": {
|
|
231
|
-
"version": "3.1.1",
|
|
232
|
-
"alwaysAddToPackageJson": false
|
|
233
|
-
},
|
|
234
|
-
"react-native-web": {
|
|
235
|
-
"version": "~0.18.10",
|
|
236
|
-
"alwaysAddToPackageJson": false
|
|
237
|
-
},
|
|
238
|
-
"react-native-svg": {
|
|
239
|
-
"version": "13.4.0",
|
|
240
|
-
"alwaysAddToPackageJson": false
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
"15.6.2": {
|
|
245
|
-
"version": "15.6.2-beta.0",
|
|
246
|
-
"packages": {
|
|
247
|
-
"expo": {
|
|
248
|
-
"version": "47.0.13",
|
|
249
|
-
"alwaysAddToPackageJson": false
|
|
250
|
-
},
|
|
251
|
-
"@expo/webpack-config": {
|
|
252
|
-
"version": "~0.17.4",
|
|
253
|
-
"alwaysAddToPackageJson": false
|
|
254
|
-
},
|
|
255
|
-
"eas-cli": {
|
|
256
|
-
"version": "3.3.2",
|
|
257
|
-
"alwaysAddToPackageJson": false
|
|
258
|
-
},
|
|
259
|
-
"expo-cli": {
|
|
260
|
-
"version": "6.1.0",
|
|
261
|
-
"alwaysAddToPackageJson": false
|
|
262
|
-
},
|
|
263
|
-
"@expo/cli": {
|
|
264
|
-
"version": "0.4.11",
|
|
265
|
-
"alwaysAddToPackageJson": false
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
"15.7.2": {
|
|
270
|
-
"version": "15.7.2-beta.0",
|
|
271
|
-
"packages": {
|
|
272
|
-
"@expo/webpack-config": {
|
|
273
|
-
"version": "~18.0.1",
|
|
274
|
-
"alwaysAddToPackageJson": false
|
|
275
|
-
},
|
|
276
|
-
"eas-cli": {
|
|
277
|
-
"version": "3.5.2",
|
|
278
|
-
"alwaysAddToPackageJson": false
|
|
279
|
-
},
|
|
280
|
-
"expo-cli": {
|
|
281
|
-
"version": "6.3.0",
|
|
282
|
-
"alwaysAddToPackageJson": false
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
"15.8.3": {
|
|
287
|
-
"version": "15.8.3-beta.0",
|
|
288
|
-
"packages": {
|
|
289
|
-
"expo": {
|
|
290
|
-
"version": "48.0.4",
|
|
291
|
-
"alwaysAddToPackageJson": false
|
|
292
|
-
},
|
|
293
|
-
"@expo/metro-config": {
|
|
294
|
-
"version": "0.7.1",
|
|
295
|
-
"alwaysAddToPackageJson": false
|
|
296
|
-
},
|
|
297
|
-
"expo-splash-screen": {
|
|
298
|
-
"version": "~0.18.1",
|
|
299
|
-
"alwaysAddToPackageJson": false
|
|
300
|
-
},
|
|
301
|
-
"expo-status-bar": {
|
|
302
|
-
"version": "~1.4.4",
|
|
303
|
-
"alwaysAddToPackageJson": false
|
|
304
|
-
},
|
|
305
|
-
"expo-cli": {
|
|
306
|
-
"version": "6.3.2",
|
|
307
|
-
"alwaysAddToPackageJson": false
|
|
308
|
-
},
|
|
309
|
-
"@expo/cli": {
|
|
310
|
-
"version": "0.6.2",
|
|
311
|
-
"alwaysAddToPackageJson": false
|
|
312
|
-
},
|
|
313
|
-
"eas-cli": {
|
|
314
|
-
"version": "3.7.2",
|
|
315
|
-
"alwaysAddToPackageJson": false
|
|
316
|
-
},
|
|
317
|
-
"babel-preset-expo": {
|
|
318
|
-
"version": "~9.3.0",
|
|
319
|
-
"alwaysAddToPackageJson": false
|
|
320
|
-
},
|
|
321
|
-
"react": {
|
|
322
|
-
"version": "18.2.0",
|
|
323
|
-
"alwaysAddToPackageJson": false
|
|
324
|
-
},
|
|
325
|
-
"react-dom": {
|
|
326
|
-
"version": "18.2.0",
|
|
327
|
-
"alwaysAddToPackageJson": false
|
|
328
|
-
},
|
|
329
|
-
"react-test-renderer": {
|
|
330
|
-
"version": "18.2.0",
|
|
331
|
-
"alwaysAddToPackageJson": false
|
|
332
|
-
},
|
|
333
|
-
"@types/react": {
|
|
334
|
-
"version": "18.0.28",
|
|
335
|
-
"alwaysAddToPackageJson": false
|
|
336
|
-
},
|
|
337
|
-
"react-native": {
|
|
338
|
-
"version": "0.71.3",
|
|
339
|
-
"alwaysAddToPackageJson": false
|
|
340
|
-
},
|
|
341
|
-
"@types/react-native": {
|
|
342
|
-
"version": "0.71.3",
|
|
343
|
-
"alwaysAddToPackageJson": false
|
|
344
|
-
},
|
|
345
|
-
"react-native-web": {
|
|
346
|
-
"version": "~0.18.12",
|
|
347
|
-
"alwaysAddToPackageJson": false
|
|
348
|
-
},
|
|
349
|
-
"metro": {
|
|
350
|
-
"version": "0.74.1",
|
|
351
|
-
"alwaysAddToPackageJson": false,
|
|
352
|
-
"addToPackageJson": "devDependencies"
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
"15.8.6": {
|
|
357
|
-
"version": "15.8.6-beta.0",
|
|
358
|
-
"packages": {
|
|
359
|
-
"expo": {
|
|
360
|
-
"version": "48.0.6",
|
|
361
|
-
"alwaysAddToPackageJson": false
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
"15.9.0": {
|
|
366
|
-
"version": "15.9.0-beta.0",
|
|
367
|
-
"packages": {
|
|
368
|
-
"react-native": {
|
|
369
|
-
"version": "0.71.4",
|
|
370
|
-
"alwaysAddToPackageJson": false
|
|
371
|
-
},
|
|
372
|
-
"@types/react-native": {
|
|
373
|
-
"version": "0.71.4",
|
|
374
|
-
"alwaysAddToPackageJson": false
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
77
|
"16.0.0": {
|
|
379
78
|
"version": "16.0.0-beta.0",
|
|
380
79
|
"packages": {
|
|
@@ -684,6 +383,59 @@
|
|
|
684
383
|
"alwaysAddToPackageJson": false
|
|
685
384
|
}
|
|
686
385
|
}
|
|
386
|
+
},
|
|
387
|
+
"19.0.0": {
|
|
388
|
+
"version": "19.0.0-beta.7",
|
|
389
|
+
"packages": {
|
|
390
|
+
"expo": {
|
|
391
|
+
"version": "~50.0.14",
|
|
392
|
+
"alwaysAddToPackageJson": false
|
|
393
|
+
},
|
|
394
|
+
"expo-splash-screen": {
|
|
395
|
+
"version": "~0.26.4",
|
|
396
|
+
"alwaysAddToPackageJson": false
|
|
397
|
+
},
|
|
398
|
+
"@expo/cli": {
|
|
399
|
+
"version": "~0.17.8",
|
|
400
|
+
"alwaysAddToPackageJson": false
|
|
401
|
+
},
|
|
402
|
+
"babel-preset-expo": {
|
|
403
|
+
"version": "~10.0.1",
|
|
404
|
+
"alwaysAddToPackageJson": false
|
|
405
|
+
},
|
|
406
|
+
"react-native": {
|
|
407
|
+
"version": "~0.73.6",
|
|
408
|
+
"alwaysAddToPackageJson": false
|
|
409
|
+
},
|
|
410
|
+
"react-native-web": {
|
|
411
|
+
"version": "~0.19.10",
|
|
412
|
+
"alwaysAddToPackageJson": false
|
|
413
|
+
},
|
|
414
|
+
"@expo/metro-config": {
|
|
415
|
+
"version": "~0.17.6",
|
|
416
|
+
"alwaysAddToPackageJson": false
|
|
417
|
+
},
|
|
418
|
+
"@expo/metro-runtime": {
|
|
419
|
+
"version": "~3.1.3",
|
|
420
|
+
"alwaysAddToPackageJson": false
|
|
421
|
+
},
|
|
422
|
+
"react-native-svg-transformer": {
|
|
423
|
+
"version": "1.3.0",
|
|
424
|
+
"alwaysAddToPackageJson": false
|
|
425
|
+
},
|
|
426
|
+
"react-native-svg": {
|
|
427
|
+
"version": "15.1.0",
|
|
428
|
+
"alwaysAddToPackageJson": false
|
|
429
|
+
},
|
|
430
|
+
"@testing-library/react-native": {
|
|
431
|
+
"version": "~12.4.5",
|
|
432
|
+
"alwaysAddToPackageJson": false
|
|
433
|
+
},
|
|
434
|
+
"jest-expo": {
|
|
435
|
+
"version": "~50.0.4",
|
|
436
|
+
"alwaysAddToPackageJson": false
|
|
437
|
+
}
|
|
438
|
+
}
|
|
687
439
|
}
|
|
688
440
|
}
|
|
689
441
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"main": "./index.js",
|
|
27
27
|
"types": "index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nx/devkit": "19.0.0-beta.
|
|
29
|
+
"@nx/devkit": "19.0.0-beta.10",
|
|
30
30
|
"chalk": "^4.1.0",
|
|
31
31
|
"enhanced-resolve": "^5.8.3",
|
|
32
32
|
"fs-extra": "^11.1.0",
|
|
@@ -35,14 +35,13 @@
|
|
|
35
35
|
"node-fetch": "^2.6.7",
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
|
-
"
|
|
39
|
-
"@nx/
|
|
40
|
-
"@nx/
|
|
41
|
-
"@nx/
|
|
42
|
-
"@nx/
|
|
43
|
-
"@nx/
|
|
44
|
-
"@
|
|
45
|
-
"@nrwl/expo": "19.0.0-beta.0"
|
|
38
|
+
"@nx/jest": "19.0.0-beta.10",
|
|
39
|
+
"@nx/js": "19.0.0-beta.10",
|
|
40
|
+
"@nx/eslint": "19.0.0-beta.10",
|
|
41
|
+
"@nx/react": "19.0.0-beta.10",
|
|
42
|
+
"@nx/web": "19.0.0-beta.10",
|
|
43
|
+
"@nx/webpack": "19.0.0-beta.10",
|
|
44
|
+
"@nrwl/expo": "19.0.0-beta.10"
|
|
46
45
|
},
|
|
47
46
|
"executors": "./executors.json",
|
|
48
47
|
"ng-update": {
|
package/plugins/plugin.js
CHANGED
|
@@ -8,6 +8,7 @@ const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
10
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
11
|
+
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
11
12
|
const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'expo.hash');
|
|
12
13
|
const targetsCache = (0, fs_1.existsSync)(cachePath) ? readTargetsCache() : {};
|
|
13
14
|
const calculatedTargets = {};
|
|
@@ -24,7 +25,7 @@ const createDependencies = () => {
|
|
|
24
25
|
exports.createDependencies = createDependencies;
|
|
25
26
|
exports.createNodes = [
|
|
26
27
|
'**/app.{json,config.js}',
|
|
27
|
-
(configFilePath, options, context) => {
|
|
28
|
+
async (configFilePath, options, context) => {
|
|
28
29
|
options = normalizeOptions(options);
|
|
29
30
|
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
30
31
|
// Do not create a project if package.json or project.json or metro.config.js isn't there.
|
|
@@ -33,7 +34,7 @@ exports.createNodes = [
|
|
|
33
34
|
!siblingFiles.includes('metro.config.js')) {
|
|
34
35
|
return {};
|
|
35
36
|
}
|
|
36
|
-
const appConfig = getAppConfig(configFilePath, context);
|
|
37
|
+
const appConfig = await getAppConfig(configFilePath, context);
|
|
37
38
|
// if appConfig.expo is not defined
|
|
38
39
|
if (!appConfig.expo) {
|
|
39
40
|
return {};
|
|
@@ -101,8 +102,7 @@ function buildExpoTargets(projectRoot, options, context) {
|
|
|
101
102
|
}
|
|
102
103
|
function getAppConfig(configFilePath, context) {
|
|
103
104
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
104
|
-
|
|
105
|
-
return module.default ?? module;
|
|
105
|
+
return (0, config_utils_1.loadConfigFile)(resolvedPath);
|
|
106
106
|
}
|
|
107
107
|
function getInputs(namedInputs) {
|
|
108
108
|
return [
|
|
@@ -122,19 +122,6 @@ function getOutputs(projectRoot, dir) {
|
|
|
122
122
|
return `{workspaceRoot}/${projectRoot}/${dir}`;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Load the module after ensuring that the require cache is cleared.
|
|
127
|
-
*/
|
|
128
|
-
function load(path) {
|
|
129
|
-
// Clear cache if the path is in the cache
|
|
130
|
-
if (require.cache[path]) {
|
|
131
|
-
for (const k of Object.keys(require.cache)) {
|
|
132
|
-
delete require.cache[k];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Then require
|
|
136
|
-
return require(path);
|
|
137
|
-
}
|
|
138
125
|
function normalizeOptions(options) {
|
|
139
126
|
options ??= {};
|
|
140
127
|
options.startTargetName ??= 'start';
|
package/project.json
CHANGED
|
@@ -15,7 +15,7 @@ export interface Schema {
|
|
|
15
15
|
js: boolean; // default is false
|
|
16
16
|
linter: Linter; // default is eslint
|
|
17
17
|
setParserOptionsProject?: boolean; // default is false
|
|
18
|
-
e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is
|
|
18
|
+
e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is playwright
|
|
19
19
|
standaloneConfig?: boolean;
|
|
20
20
|
skipPackageJson?: boolean; // default is false
|
|
21
21
|
addPlugin?: boolean;
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"e2eTestRunner": {
|
|
76
76
|
"description": "Adds the specified e2e test runner",
|
|
77
77
|
"type": "string",
|
|
78
|
-
"enum": ["
|
|
79
|
-
"default": "
|
|
78
|
+
"enum": ["playwright", "cypress", "detox", "none"],
|
|
79
|
+
"default": "playwright"
|
|
80
80
|
},
|
|
81
81
|
"standaloneConfig": {
|
|
82
82
|
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const devkit_1 = require("@nx/devkit");
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* - change target export-web
|
|
7
|
-
* -
|
|
8
|
-
* - delete @expo/webpack-config dependency
|
|
5
|
+
* Migration:
|
|
6
|
+
* - change target 'export-web'
|
|
7
|
+
* - change bundler to 'metro'
|
|
9
8
|
*/
|
|
10
9
|
async function update(tree) {
|
|
11
10
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
11
|
for (const [name, config] of projects.entries()) {
|
|
13
|
-
if (config.targets?.['start']?.executor === '@
|
|
12
|
+
if (config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
14
13
|
if (config.targets['web']) {
|
|
15
14
|
delete config.targets['web'];
|
|
16
15
|
}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const expoVersion = "~50.0.
|
|
3
|
-
export declare const expoSplashScreenVersion = "~0.26.
|
|
2
|
+
export declare const expoVersion = "~50.0.14";
|
|
3
|
+
export declare const expoSplashScreenVersion = "~0.26.4";
|
|
4
4
|
export declare const expoStatusBarVersion = "~1.11.1";
|
|
5
|
-
export declare const expoCliVersion = "~0.
|
|
6
|
-
export declare const babelPresetExpoVersion = "~10.0.
|
|
5
|
+
export declare const expoCliVersion = "~0.17.8";
|
|
6
|
+
export declare const babelPresetExpoVersion = "~10.0.1";
|
|
7
7
|
export declare const reactVersion = "18.2.0";
|
|
8
8
|
export declare const reactDomVersion = "18.2.0";
|
|
9
9
|
export declare const reactTestRendererVersion = "18.2.0";
|
|
10
10
|
export declare const typesReactVersion = "~18.2.45";
|
|
11
|
-
export declare const reactNativeVersion = "0.73.
|
|
12
|
-
export declare const reactNativeWebVersion = "~0.19.
|
|
13
|
-
export declare const expoMetroConfigVersion = "~0.17.
|
|
14
|
-
export declare const expoMetroRuntimeVersion = "~3.1.
|
|
15
|
-
export declare const reactNativeSvgTransformerVersion = "1.
|
|
16
|
-
export declare const reactNativeSvgVersion = "
|
|
17
|
-
export declare const testingLibraryReactNativeVersion = "~12.4.
|
|
11
|
+
export declare const reactNativeVersion = "0.73.6";
|
|
12
|
+
export declare const reactNativeWebVersion = "~0.19.10";
|
|
13
|
+
export declare const expoMetroConfigVersion = "~0.17.6";
|
|
14
|
+
export declare const expoMetroRuntimeVersion = "~3.1.3";
|
|
15
|
+
export declare const reactNativeSvgTransformerVersion = "1.3.0";
|
|
16
|
+
export declare const reactNativeSvgVersion = "15.1.0";
|
|
17
|
+
export declare const testingLibraryReactNativeVersion = "~12.4.5";
|
|
18
18
|
export declare const testingLibraryJestNativeVersion = "~5.4.3";
|
|
19
|
-
export declare const jestExpoVersion = "~50.0.
|
|
19
|
+
export declare const jestExpoVersion = "~50.0.4";
|
|
20
20
|
export declare const babelRuntimeVersion = "7.22.6";
|
package/src/utils/versions.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.babelRuntimeVersion = exports.jestExpoVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.expoMetroRuntimeVersion = exports.expoMetroConfigVersion = exports.reactNativeWebVersion = exports.reactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.babelPresetExpoVersion = exports.expoCliVersion = exports.expoStatusBarVersion = exports.expoSplashScreenVersion = exports.expoVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.expoVersion = '~50.0.
|
|
6
|
-
exports.expoSplashScreenVersion = '~0.26.
|
|
5
|
+
exports.expoVersion = '~50.0.14';
|
|
6
|
+
exports.expoSplashScreenVersion = '~0.26.4';
|
|
7
7
|
exports.expoStatusBarVersion = '~1.11.1';
|
|
8
|
-
exports.expoCliVersion = '~0.
|
|
9
|
-
exports.babelPresetExpoVersion = '~10.0.
|
|
8
|
+
exports.expoCliVersion = '~0.17.8'; // @expo/cli
|
|
9
|
+
exports.babelPresetExpoVersion = '~10.0.1';
|
|
10
10
|
exports.reactVersion = '18.2.0';
|
|
11
11
|
exports.reactDomVersion = '18.2.0';
|
|
12
12
|
exports.reactTestRendererVersion = '18.2.0';
|
|
13
13
|
exports.typesReactVersion = '~18.2.45';
|
|
14
|
-
exports.reactNativeVersion = '0.73.
|
|
15
|
-
exports.reactNativeWebVersion = '~0.19.
|
|
16
|
-
exports.expoMetroConfigVersion = '~0.17.
|
|
17
|
-
exports.expoMetroRuntimeVersion = '~3.1.
|
|
18
|
-
exports.reactNativeSvgTransformerVersion = '1.
|
|
19
|
-
exports.reactNativeSvgVersion = '
|
|
20
|
-
exports.testingLibraryReactNativeVersion = '~12.4.
|
|
14
|
+
exports.reactNativeVersion = '0.73.6';
|
|
15
|
+
exports.reactNativeWebVersion = '~0.19.10';
|
|
16
|
+
exports.expoMetroConfigVersion = '~0.17.6';
|
|
17
|
+
exports.expoMetroRuntimeVersion = '~3.1.3';
|
|
18
|
+
exports.reactNativeSvgTransformerVersion = '1.3.0';
|
|
19
|
+
exports.reactNativeSvgVersion = '15.1.0';
|
|
20
|
+
exports.testingLibraryReactNativeVersion = '~12.4.5';
|
|
21
21
|
exports.testingLibraryJestNativeVersion = '~5.4.3';
|
|
22
|
-
exports.jestExpoVersion = '~50.0.
|
|
22
|
+
exports.jestExpoVersion = '~50.0.4';
|
|
23
23
|
exports.babelRuntimeVersion = '7.22.6';
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withNxWebpack = void 0;
|
|
4
|
-
const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated TODO(v19) use bundler: 'metro' instead, will be removed in v19
|
|
8
|
-
* This function add additional rules to expo's webpack config to make expo web working
|
|
9
|
-
*/
|
|
10
|
-
async function withNxWebpack(config) {
|
|
11
|
-
// add additional rule to load files under libs
|
|
12
|
-
const rules = config.module.rules.find((rule) => Array.isArray(rule.oneOf))?.oneOf;
|
|
13
|
-
if (rules) {
|
|
14
|
-
rules.push({
|
|
15
|
-
test: /\.(mjs|[jt]sx?)$/,
|
|
16
|
-
exclude: /node_modules/,
|
|
17
|
-
use: {
|
|
18
|
-
loader: require.resolve('@nx/webpack/src/utils/web-babel-loader.js'),
|
|
19
|
-
options: {
|
|
20
|
-
presets: [
|
|
21
|
-
[
|
|
22
|
-
'@nx/react/babel',
|
|
23
|
-
{
|
|
24
|
-
runtime: 'automatic',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
if (!config.resolve) {
|
|
33
|
-
config.resolve = {};
|
|
34
|
-
}
|
|
35
|
-
if (!config.resolve.plugins) {
|
|
36
|
-
config.resolve.plugins = [];
|
|
37
|
-
}
|
|
38
|
-
const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
|
|
39
|
-
const tsConfigPath = (0, path_1.resolve)(__dirname, 'tsconfig.json');
|
|
40
|
-
config.resolve.plugins.push(new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({
|
|
41
|
-
configFile: tsConfigPath,
|
|
42
|
-
extensions,
|
|
43
|
-
}));
|
|
44
|
-
config.resolve.fallback = {
|
|
45
|
-
...config.resolve.fallback,
|
|
46
|
-
crypto: require.resolve('crypto-browserify'),
|
|
47
|
-
stream: require.resolve('stream-browserify'),
|
|
48
|
-
};
|
|
49
|
-
return config;
|
|
50
|
-
}
|
|
51
|
-
exports.withNxWebpack = withNxWebpack;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
/**
|
|
5
|
-
* Add new @expo/cli targets:
|
|
6
|
-
* - add target prebuild
|
|
7
|
-
* - add target install
|
|
8
|
-
* - add target update
|
|
9
|
-
* - replace target eject
|
|
10
|
-
*/
|
|
11
|
-
async function update(tree) {
|
|
12
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
13
|
-
for (const [name, config] of projects.entries()) {
|
|
14
|
-
if (config.targets?.['start']?.executor === '@nrwl/expo:start') {
|
|
15
|
-
if (!config.targets['prebuild']) {
|
|
16
|
-
config.targets['prebuild'] = {
|
|
17
|
-
executor: '@nrwl/expo:prebuild',
|
|
18
|
-
options: {},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (!config.targets['install']) {
|
|
22
|
-
config.targets['install'] = {
|
|
23
|
-
executor: '@nrwl/expo:install',
|
|
24
|
-
options: {},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
if (!config.targets['update']) {
|
|
28
|
-
config.targets['update'] = {
|
|
29
|
-
executor: '@nrwl/expo:update',
|
|
30
|
-
options: {},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
if (!config.targets['export']) {
|
|
34
|
-
config.targets['export'] = {
|
|
35
|
-
executor: '@nrwl/expo:export',
|
|
36
|
-
options: {
|
|
37
|
-
platform: 'all',
|
|
38
|
-
outputDir: `${(0, devkit_1.offsetFromRoot)(config.root)}dist/${config.root}`,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (!config.targets['export-web']) {
|
|
43
|
-
config.targets['export-web'] = {
|
|
44
|
-
executor: '@nrwl/expo:export',
|
|
45
|
-
options: {
|
|
46
|
-
bundler: 'webpack',
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
config.targets['eject'] = {
|
|
51
|
-
executor: 'nx:run-commands',
|
|
52
|
-
options: {
|
|
53
|
-
command: `nx prebuild ${name}`,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
58
|
-
}
|
|
59
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
60
|
-
}
|
|
61
|
-
exports.default = update;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
/**
|
|
3
|
-
* Change the preset in expo's jest config
|
|
4
|
-
* - remove transform and testRunner from jest config
|
|
5
|
-
* - changes preset from jest-expo to react-native
|
|
6
|
-
* - change to babel.config.json
|
|
7
|
-
*/
|
|
8
|
-
export default function update(tree: Tree): Promise<void>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
5
|
-
const jest_1 = require("@nx/jest");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
/**
|
|
8
|
-
* Change the preset in expo's jest config
|
|
9
|
-
* - remove transform and testRunner from jest config
|
|
10
|
-
* - changes preset from jest-expo to react-native
|
|
11
|
-
* - change to babel.config.json
|
|
12
|
-
*/
|
|
13
|
-
async function update(tree) {
|
|
14
|
-
let useJestExpo = false;
|
|
15
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/jest:jest', (options, projectName) => {
|
|
16
|
-
if (options.jestConfig && tree.exists(options.jestConfig)) {
|
|
17
|
-
const jestConfig = tree.read(options.jestConfig, 'utf-8');
|
|
18
|
-
if (jestConfig.includes(`preset: 'jest-expo'`)) {
|
|
19
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
20
|
-
changePreset(tree, project);
|
|
21
|
-
renameBabelJson(tree, project);
|
|
22
|
-
useJestExpo = true;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
if (useJestExpo) {
|
|
27
|
-
removeJestExpoFromPackageJson(tree);
|
|
28
|
-
}
|
|
29
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
30
|
-
}
|
|
31
|
-
exports.default = update;
|
|
32
|
-
function changePreset(host, project) {
|
|
33
|
-
const jestConfigPath = project.targets?.test?.options?.jestConfig;
|
|
34
|
-
if (!jestConfigPath || !host.exists(jestConfigPath))
|
|
35
|
-
return;
|
|
36
|
-
try {
|
|
37
|
-
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'transform');
|
|
38
|
-
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'testRunner');
|
|
39
|
-
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'preset');
|
|
40
|
-
(0, jest_1.addPropertyToJestConfig)(host, jestConfigPath, 'preset', 'react-native');
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${project.root}.`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function renameBabelJson(host, project) {
|
|
47
|
-
const babelrcPath = (0, path_1.join)(project.root, '.babelrc');
|
|
48
|
-
const babelJsonPath = (0, path_1.join)(project.root, 'babel.config.json');
|
|
49
|
-
if (!host.exists(babelrcPath)) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
const buffer = host.read(babelrcPath);
|
|
54
|
-
if (!buffer) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
host.write(babelJsonPath, buffer);
|
|
58
|
-
host.delete(babelrcPath);
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to rename from ${babelrcPath} to ${babelJsonPath} for project ${project.root}.`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function removeJestExpoFromPackageJson(tree) {
|
|
65
|
-
(0, devkit_1.updateJson)(tree, 'package.json', (packageJson) => {
|
|
66
|
-
delete packageJson.devDependencies['jest-expo'];
|
|
67
|
-
return packageJson;
|
|
68
|
-
});
|
|
69
|
-
}
|