@nx/react-native 19.0.0-beta.1 → 19.0.0-beta.11
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 +41 -287
- package/package.json +8 -8
- package/plugins/plugin.js +4 -17
- package/project.json +0 -2
- package/src/generators/application/files/app/Gemfile.template +4 -2
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/application/lib/normalize-options.spec.ts +5 -5
- package/src/generators/application/schema.json +2 -2
- package/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ +3 -3
- package/src/utils/versions.d.ts +9 -9
- package/src/utils/versions.js +9 -9
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -9
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +0 -73
- package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +0 -5
- package/src/migrations/update-15-9-1/add-build-ios-target.js +0 -29
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +0 -36
package/migrations.json
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"add-babel-inputs": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "15.0.0-beta.0",
|
|
6
|
-
"description": "Adds babel.config.json to the hash of all tasks",
|
|
7
|
-
"factory": "./src/migrations/update-15-0-0/add-babel-inputs"
|
|
8
|
-
},
|
|
9
|
-
"add-build-ios-target": {
|
|
10
|
-
"cli": "nx",
|
|
11
|
-
"version": "15.9.1-beta.0",
|
|
12
|
-
"description": "Add target build-ios and pod-install for react native apps",
|
|
13
|
-
"factory": "./src/migrations/update-15-9-1/add-build-ios-target"
|
|
14
|
-
},
|
|
15
3
|
"update-16-0-0-add-nx-packages": {
|
|
16
4
|
"cli": "nx",
|
|
17
5
|
"version": "16.0.0-beta.1",
|
|
@@ -80,281 +68,6 @@
|
|
|
80
68
|
}
|
|
81
69
|
},
|
|
82
70
|
"packageJsonUpdates": {
|
|
83
|
-
"15.0.0": {
|
|
84
|
-
"version": "15.0.0-beta.0",
|
|
85
|
-
"packages": {
|
|
86
|
-
"metro": {
|
|
87
|
-
"version": "0.72.3",
|
|
88
|
-
"alwaysAddToPackageJson": false
|
|
89
|
-
},
|
|
90
|
-
"metro-resolver": {
|
|
91
|
-
"version": "0.72.3",
|
|
92
|
-
"alwaysAddToPackageJson": false
|
|
93
|
-
},
|
|
94
|
-
"metro-babel-register": {
|
|
95
|
-
"version": "0.72.3",
|
|
96
|
-
"alwaysAddToPackageJson": false
|
|
97
|
-
},
|
|
98
|
-
"metro-config": {
|
|
99
|
-
"version": "0.72.3",
|
|
100
|
-
"alwaysAddToPackageJson": false
|
|
101
|
-
},
|
|
102
|
-
"metro-react-native-babel-preset": {
|
|
103
|
-
"version": "0.72.3",
|
|
104
|
-
"alwaysAddToPackageJson": false
|
|
105
|
-
},
|
|
106
|
-
"metro-react-native-babel-transformer": {
|
|
107
|
-
"version": "0.72.3",
|
|
108
|
-
"alwaysAddToPackageJson": false
|
|
109
|
-
},
|
|
110
|
-
"@types/react-native": {
|
|
111
|
-
"version": "0.70.4",
|
|
112
|
-
"alwaysAddToPackageJson": false
|
|
113
|
-
},
|
|
114
|
-
"@testing-library/react-native": {
|
|
115
|
-
"version": "11.2.0",
|
|
116
|
-
"alwaysAddToPackageJson": false
|
|
117
|
-
},
|
|
118
|
-
"@testing-library/jest-native": {
|
|
119
|
-
"version": "4.0.13",
|
|
120
|
-
"alwaysAddToPackageJson": false
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"15.2.2": {
|
|
125
|
-
"version": "15.2.2-beta.0",
|
|
126
|
-
"packages": {
|
|
127
|
-
"react-native": {
|
|
128
|
-
"version": "0.70.6",
|
|
129
|
-
"alwaysAddToPackageJson": false
|
|
130
|
-
},
|
|
131
|
-
"@types/react-native": {
|
|
132
|
-
"version": "0.70.6",
|
|
133
|
-
"alwaysAddToPackageJson": false
|
|
134
|
-
},
|
|
135
|
-
"metro-resolver": {
|
|
136
|
-
"version": "0.73.3",
|
|
137
|
-
"alwaysAddToPackageJson": false
|
|
138
|
-
},
|
|
139
|
-
"metro-babel-register": {
|
|
140
|
-
"version": "0.73.3",
|
|
141
|
-
"alwaysAddToPackageJson": false
|
|
142
|
-
},
|
|
143
|
-
"metro-config": {
|
|
144
|
-
"version": "0.73.3",
|
|
145
|
-
"alwaysAddToPackageJson": false
|
|
146
|
-
},
|
|
147
|
-
"metro-react-native-babel-preset": {
|
|
148
|
-
"version": "0.73.3",
|
|
149
|
-
"alwaysAddToPackageJson": false
|
|
150
|
-
},
|
|
151
|
-
"metro-react-native-babel-transformer": {
|
|
152
|
-
"version": "0.73.3",
|
|
153
|
-
"alwaysAddToPackageJson": false
|
|
154
|
-
},
|
|
155
|
-
"react-native-config": {
|
|
156
|
-
"version": "1.4.11",
|
|
157
|
-
"alwaysAddToPackageJson": false
|
|
158
|
-
},
|
|
159
|
-
"@testing-library/react-native": {
|
|
160
|
-
"version": "11.5.0",
|
|
161
|
-
"alwaysAddToPackageJson": false
|
|
162
|
-
},
|
|
163
|
-
"@testing-library/jest-native": {
|
|
164
|
-
"version": "5.3.0",
|
|
165
|
-
"alwaysAddToPackageJson": false
|
|
166
|
-
},
|
|
167
|
-
"react-native-svg": {
|
|
168
|
-
"version": "13.6.0",
|
|
169
|
-
"alwaysAddToPackageJson": false
|
|
170
|
-
},
|
|
171
|
-
"@babel/runtime": {
|
|
172
|
-
"version": "7.20.1",
|
|
173
|
-
"alwaysAddToPackageJson": false
|
|
174
|
-
},
|
|
175
|
-
"@react-native-community/cli": {
|
|
176
|
-
"version": "9.3.2",
|
|
177
|
-
"alwaysAddToPackageJson": false
|
|
178
|
-
},
|
|
179
|
-
"@react-native-community/cli-platform-android": {
|
|
180
|
-
"version": "9.3.1",
|
|
181
|
-
"alwaysAddToPackageJson": false
|
|
182
|
-
},
|
|
183
|
-
"@react-native-community/cli-platform-ios": {
|
|
184
|
-
"version": "9.3.0",
|
|
185
|
-
"alwaysAddToPackageJson": false
|
|
186
|
-
},
|
|
187
|
-
"@react-native-async-storage/async-storage": {
|
|
188
|
-
"version": "1.17.11",
|
|
189
|
-
"alwaysAddToPackageJson": false
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"15.6.2": {
|
|
194
|
-
"version": "15.6.2-beta.0",
|
|
195
|
-
"packages": {
|
|
196
|
-
"react-native": {
|
|
197
|
-
"version": "0.71.1",
|
|
198
|
-
"alwaysAddToPackageJson": false
|
|
199
|
-
},
|
|
200
|
-
"@types/react-native": {
|
|
201
|
-
"version": "0.71.0",
|
|
202
|
-
"alwaysAddToPackageJson": false
|
|
203
|
-
},
|
|
204
|
-
"metro-resolver": {
|
|
205
|
-
"version": "0.74.1",
|
|
206
|
-
"alwaysAddToPackageJson": false
|
|
207
|
-
},
|
|
208
|
-
"metro-babel-register": {
|
|
209
|
-
"version": "0.74.1",
|
|
210
|
-
"alwaysAddToPackageJson": false
|
|
211
|
-
},
|
|
212
|
-
"metro-config": {
|
|
213
|
-
"version": "0.74.1",
|
|
214
|
-
"alwaysAddToPackageJson": false
|
|
215
|
-
},
|
|
216
|
-
"metro-react-native-babel-preset": {
|
|
217
|
-
"version": "0.74.1",
|
|
218
|
-
"alwaysAddToPackageJson": false
|
|
219
|
-
},
|
|
220
|
-
"metro-react-native-babel-transformer": {
|
|
221
|
-
"version": "0.74.1",
|
|
222
|
-
"alwaysAddToPackageJson": false
|
|
223
|
-
},
|
|
224
|
-
"react-native-config": {
|
|
225
|
-
"version": "1.4.12",
|
|
226
|
-
"alwaysAddToPackageJson": false
|
|
227
|
-
},
|
|
228
|
-
"@testing-library/jest-native": {
|
|
229
|
-
"version": "5.4.1",
|
|
230
|
-
"alwaysAddToPackageJson": false
|
|
231
|
-
},
|
|
232
|
-
"react-native-svg": {
|
|
233
|
-
"version": "13.7.0",
|
|
234
|
-
"alwaysAddToPackageJson": false
|
|
235
|
-
},
|
|
236
|
-
"@babel/runtime": {
|
|
237
|
-
"version": "7.20.7",
|
|
238
|
-
"alwaysAddToPackageJson": false
|
|
239
|
-
},
|
|
240
|
-
"@react-native-community/cli": {
|
|
241
|
-
"version": "10.1.3",
|
|
242
|
-
"alwaysAddToPackageJson": false
|
|
243
|
-
},
|
|
244
|
-
"@react-native-community/cli-platform-android": {
|
|
245
|
-
"version": "10.1.3",
|
|
246
|
-
"alwaysAddToPackageJson": false
|
|
247
|
-
},
|
|
248
|
-
"@react-native-community/cli-platform-ios": {
|
|
249
|
-
"version": "10.1.1",
|
|
250
|
-
"alwaysAddToPackageJson": false
|
|
251
|
-
},
|
|
252
|
-
"@types/node": {
|
|
253
|
-
"version": "18.11.18",
|
|
254
|
-
"alwaysAddToPackageJson": false
|
|
255
|
-
},
|
|
256
|
-
"react": {
|
|
257
|
-
"version": "18.2.0",
|
|
258
|
-
"alwaysAddToPackageJson": false
|
|
259
|
-
},
|
|
260
|
-
"react-dom": {
|
|
261
|
-
"version": "18.2.0",
|
|
262
|
-
"alwaysAddToPackageJson": false
|
|
263
|
-
},
|
|
264
|
-
"react-test-renderer": {
|
|
265
|
-
"version": "18.2.0",
|
|
266
|
-
"alwaysAddToPackageJson": false
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
"15.7.1": {
|
|
271
|
-
"version": "15.7.1-beta.0",
|
|
272
|
-
"packages": {
|
|
273
|
-
"react-native": {
|
|
274
|
-
"version": "0.71.2",
|
|
275
|
-
"alwaysAddToPackageJson": false
|
|
276
|
-
},
|
|
277
|
-
"@types/react-native": {
|
|
278
|
-
"version": "0.71.2",
|
|
279
|
-
"alwaysAddToPackageJson": false
|
|
280
|
-
},
|
|
281
|
-
"react-native-config": {
|
|
282
|
-
"version": "1.5.0",
|
|
283
|
-
"alwaysAddToPackageJson": false
|
|
284
|
-
},
|
|
285
|
-
"@testing-library/react-native": {
|
|
286
|
-
"version": "11.5.2",
|
|
287
|
-
"alwaysAddToPackageJson": false
|
|
288
|
-
},
|
|
289
|
-
"react-native-svg": {
|
|
290
|
-
"version": "13.8.0",
|
|
291
|
-
"alwaysAddToPackageJson": false
|
|
292
|
-
},
|
|
293
|
-
"@babel/runtime": {
|
|
294
|
-
"version": "7.20.13",
|
|
295
|
-
"alwaysAddToPackageJson": false
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
"15.8.3": {
|
|
300
|
-
"version": "15.8.3-beta.0",
|
|
301
|
-
"packages": {
|
|
302
|
-
"react-native": {
|
|
303
|
-
"version": "0.71.3",
|
|
304
|
-
"alwaysAddToPackageJson": false
|
|
305
|
-
},
|
|
306
|
-
"@types/react-native": {
|
|
307
|
-
"version": "0.71.3",
|
|
308
|
-
"alwaysAddToPackageJson": false
|
|
309
|
-
},
|
|
310
|
-
"@types/node": {
|
|
311
|
-
"version": "18.14.4",
|
|
312
|
-
"alwaysAddToPackageJson": false
|
|
313
|
-
},
|
|
314
|
-
"@react-native-community/cli": {
|
|
315
|
-
"version": "10.2.0",
|
|
316
|
-
"alwaysAddToPackageJson": false
|
|
317
|
-
},
|
|
318
|
-
"@react-native-community/cli-platform-android": {
|
|
319
|
-
"version": "10.2.0",
|
|
320
|
-
"alwaysAddToPackageJson": false
|
|
321
|
-
},
|
|
322
|
-
"@react-native-community/cli-platform-ios": {
|
|
323
|
-
"version": "10.2.0",
|
|
324
|
-
"alwaysAddToPackageJson": false
|
|
325
|
-
},
|
|
326
|
-
"@testing-library/jest-native": {
|
|
327
|
-
"version": "5.4.2",
|
|
328
|
-
"alwaysAddToPackageJson": false
|
|
329
|
-
},
|
|
330
|
-
"@babel/runtime": {
|
|
331
|
-
"version": "7.21.0",
|
|
332
|
-
"alwaysAddToPackageJson": false
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
"15.8.6": {
|
|
337
|
-
"version": "15.8.6-beta.0",
|
|
338
|
-
"packages": {
|
|
339
|
-
"react-native": {
|
|
340
|
-
"version": "0.71.4",
|
|
341
|
-
"alwaysAddToPackageJson": false
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
"15.9.1": {
|
|
346
|
-
"version": "15.9.1-beta.0",
|
|
347
|
-
"packages": {
|
|
348
|
-
"@react-native-community/cli": {
|
|
349
|
-
"version": "10.2.1",
|
|
350
|
-
"alwaysAddToPackageJson": false
|
|
351
|
-
},
|
|
352
|
-
"@react-native-community/cli-platform-ios": {
|
|
353
|
-
"version": "10.2.1",
|
|
354
|
-
"alwaysAddToPackageJson": false
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
71
|
"16.0.0": {
|
|
359
72
|
"version": "16.0.0-beta.0",
|
|
360
73
|
"packages": {
|
|
@@ -627,6 +340,47 @@
|
|
|
627
340
|
"alwaysAddToPackageJson": false
|
|
628
341
|
}
|
|
629
342
|
}
|
|
343
|
+
},
|
|
344
|
+
"19.0.0": {
|
|
345
|
+
"version": "19.0.0-beta.7",
|
|
346
|
+
"packages": {
|
|
347
|
+
"react-native": {
|
|
348
|
+
"version": "0.73.6",
|
|
349
|
+
"alwaysAddToPackageJson": false
|
|
350
|
+
},
|
|
351
|
+
"@react-native-community/cli-platform-android": {
|
|
352
|
+
"version": "~12.3.6",
|
|
353
|
+
"alwaysAddToPackageJson": false
|
|
354
|
+
},
|
|
355
|
+
"@react-native/babel-preset": {
|
|
356
|
+
"version": "^0.73.21",
|
|
357
|
+
"alwaysAddToPackageJson": false
|
|
358
|
+
},
|
|
359
|
+
"@react-native/metro-config": {
|
|
360
|
+
"version": "^0.73.5",
|
|
361
|
+
"alwaysAddToPackageJson": false
|
|
362
|
+
},
|
|
363
|
+
"react-native-web": {
|
|
364
|
+
"version": "^0.19.10",
|
|
365
|
+
"alwaysAddToPackageJson": false
|
|
366
|
+
},
|
|
367
|
+
"@testing-library/react-native": {
|
|
368
|
+
"version": "~12.4.5",
|
|
369
|
+
"alwaysAddToPackageJson": false
|
|
370
|
+
},
|
|
371
|
+
"react-native-svg-transformer": {
|
|
372
|
+
"version": "1.3.0",
|
|
373
|
+
"alwaysAddToPackageJson": false
|
|
374
|
+
},
|
|
375
|
+
"react-native-svg": {
|
|
376
|
+
"version": "15.1.0",
|
|
377
|
+
"alwaysAddToPackageJson": false
|
|
378
|
+
},
|
|
379
|
+
"@babel/runtime": {
|
|
380
|
+
"version": "7.24.4",
|
|
381
|
+
"alwaysAddToPackageJson": false
|
|
382
|
+
}
|
|
383
|
+
}
|
|
630
384
|
}
|
|
631
385
|
}
|
|
632
386
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "19.0.0-beta.
|
|
40
|
-
"@nx/jest": "19.0.0-beta.
|
|
41
|
-
"@nx/js": "19.0.0-beta.
|
|
42
|
-
"@nx/eslint": "19.0.0-beta.
|
|
43
|
-
"@nx/react": "19.0.0-beta.
|
|
44
|
-
"@nx/workspace": "19.0.0-beta.
|
|
45
|
-
"@nrwl/react-native": "19.0.0-beta.
|
|
39
|
+
"@nx/devkit": "19.0.0-beta.11",
|
|
40
|
+
"@nx/jest": "19.0.0-beta.11",
|
|
41
|
+
"@nx/js": "19.0.0-beta.11",
|
|
42
|
+
"@nx/eslint": "19.0.0-beta.11",
|
|
43
|
+
"@nx/react": "19.0.0-beta.11",
|
|
44
|
+
"@nx/workspace": "19.0.0-beta.11",
|
|
45
|
+
"@nrwl/react-native": "19.0.0-beta.11"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"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, 'react-native.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) {
|
|
38
39
|
return {};
|
|
39
40
|
}
|
|
@@ -113,8 +114,7 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
113
114
|
}
|
|
114
115
|
function getAppConfig(configFilePath, context) {
|
|
115
116
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
116
|
-
|
|
117
|
-
return module.default ?? module;
|
|
117
|
+
return (0, config_utils_1.loadConfigFile)(resolvedPath);
|
|
118
118
|
}
|
|
119
119
|
function getInputs(namedInputs) {
|
|
120
120
|
return [
|
|
@@ -134,19 +134,6 @@ function getOutputs(projectRoot, dir) {
|
|
|
134
134
|
return `{workspaceRoot}/${projectRoot}/${dir}`;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Load the module after ensuring that the require cache is cleared.
|
|
139
|
-
*/
|
|
140
|
-
function load(path) {
|
|
141
|
-
// Clear cache if the path is in the cache
|
|
142
|
-
if (require.cache[path]) {
|
|
143
|
-
for (const k of Object.keys(require.cache)) {
|
|
144
|
-
delete require.cache[k];
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// Then require
|
|
148
|
-
return require(path);
|
|
149
|
-
}
|
|
150
137
|
function normalizeOptions(options) {
|
|
151
138
|
options ??= {};
|
|
152
139
|
options.startTargetName ??= 'start';
|
package/project.json
CHANGED
|
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
|
|
|
3
3
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
4
|
ruby ">= 2.6.10"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
|
|
7
|
+
# bound in the template on Cocoapods with next React Native release.
|
|
8
|
+
gem 'cocoapods', '>= 1.13', '< 1.15'
|
|
9
|
+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
|
@@ -20,14 +20,14 @@ async function normalizeOptions(host, options) {
|
|
|
20
20
|
const iosProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'ios');
|
|
21
21
|
const androidProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'android');
|
|
22
22
|
const rootProject = appProjectRoot === '.';
|
|
23
|
-
let e2eWebServerTarget = '
|
|
23
|
+
let e2eWebServerTarget = 'serve';
|
|
24
24
|
if (options.addPlugin) {
|
|
25
25
|
if (nxJson.plugins) {
|
|
26
26
|
for (const plugin of nxJson.plugins) {
|
|
27
27
|
if (options.bundler === 'vite' &&
|
|
28
28
|
typeof plugin === 'object' &&
|
|
29
|
-
plugin.plugin === '@nx/
|
|
30
|
-
plugin.options.
|
|
29
|
+
plugin.plugin === '@nx/vite/plugin' &&
|
|
30
|
+
plugin.options.serveTargetName) {
|
|
31
31
|
e2eWebServerTarget = plugin.options
|
|
32
32
|
.startTargetName;
|
|
33
33
|
}
|
|
@@ -46,7 +46,7 @@ describe('Normalize Options', () => {
|
|
|
46
46
|
e2eProjectRoot: 'my-app-e2e',
|
|
47
47
|
e2ePort: 4200,
|
|
48
48
|
e2eWebServerAddress: 'http://localhost:4200',
|
|
49
|
-
e2eWebServerTarget: '
|
|
49
|
+
e2eWebServerTarget: 'serve',
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
|
|
@@ -85,7 +85,7 @@ describe('Normalize Options', () => {
|
|
|
85
85
|
e2eProjectRoot: 'myApp-e2e',
|
|
86
86
|
e2ePort: 4200,
|
|
87
87
|
e2eWebServerAddress: 'http://localhost:4200',
|
|
88
|
-
e2eWebServerTarget: '
|
|
88
|
+
e2eWebServerTarget: 'serve',
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
|
|
@@ -126,7 +126,7 @@ describe('Normalize Options', () => {
|
|
|
126
126
|
e2eProjectRoot: 'directory/my-app-e2e',
|
|
127
127
|
e2ePort: 4200,
|
|
128
128
|
e2eWebServerAddress: 'http://localhost:4200',
|
|
129
|
-
e2eWebServerTarget: '
|
|
129
|
+
e2eWebServerTarget: 'serve',
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
|
|
@@ -165,7 +165,7 @@ describe('Normalize Options', () => {
|
|
|
165
165
|
e2eProjectRoot: 'directory/my-app-e2e',
|
|
166
166
|
e2ePort: 4200,
|
|
167
167
|
e2eWebServerAddress: 'http://localhost:4200',
|
|
168
|
-
e2eWebServerTarget: '
|
|
168
|
+
e2eWebServerTarget: 'serve',
|
|
169
169
|
});
|
|
170
170
|
});
|
|
171
171
|
|
|
@@ -205,7 +205,7 @@ describe('Normalize Options', () => {
|
|
|
205
205
|
e2eProjectRoot: 'my-app-e2e',
|
|
206
206
|
e2ePort: 4200,
|
|
207
207
|
e2eWebServerAddress: 'http://localhost:4200',
|
|
208
|
-
e2eWebServerTarget: '
|
|
208
|
+
e2eWebServerTarget: 'serve',
|
|
209
209
|
});
|
|
210
210
|
});
|
|
211
211
|
});
|
|
@@ -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
|
"install": {
|
|
82
82
|
"type": "boolean",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if (webpackPluginOptions) { %>
|
|
2
|
-
const {
|
|
3
|
-
const { NxReactWebpackPlugin } = require('@nx/react');
|
|
2
|
+
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
|
3
|
+
const { NxReactWebpackPlugin } = require('@nx/react/webpack-plugin');
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
resolve: {
|
|
@@ -13,7 +13,7 @@ module.exports = {
|
|
|
13
13
|
port: 4200
|
|
14
14
|
},
|
|
15
15
|
plugins: [
|
|
16
|
-
new
|
|
16
|
+
new NxAppWebpackPlugin({
|
|
17
17
|
tsConfig: '<%= webpackPluginOptions.tsConfig %>',
|
|
18
18
|
compiler: '<%= webpackPluginOptions.compiler %>',
|
|
19
19
|
main: '<%= webpackPluginOptions.main %>',
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const reactNativeVersion = "0.73.
|
|
2
|
+
export declare const reactNativeVersion = "0.73.6";
|
|
3
3
|
export declare const typesNodeVersion = "18.16.9";
|
|
4
|
-
export declare const reactNativeCommunityCliPlatformAndroidVersion = "12.3.
|
|
5
|
-
export declare const reactNativeBabelPresetVersion = "^0.73.
|
|
6
|
-
export declare const reactNativeMetroConfigVersion = "^0.73.
|
|
7
|
-
export declare const reactNativeWebVersion = "^0.19.
|
|
4
|
+
export declare const reactNativeCommunityCliPlatformAndroidVersion = "~12.3.6";
|
|
5
|
+
export declare const reactNativeBabelPresetVersion = "^0.73.21";
|
|
6
|
+
export declare const reactNativeMetroConfigVersion = "^0.73.5";
|
|
7
|
+
export declare const reactNativeWebVersion = "^0.19.10";
|
|
8
8
|
export declare const reactVersion = "18.2.0";
|
|
9
9
|
export declare const reactDomVersion = "18.2.0";
|
|
10
10
|
export declare const reactTestRendererVersion = "18.2.0";
|
|
11
11
|
export declare const typesReactVersion = "~18.2.45";
|
|
12
|
-
export declare const testingLibraryReactNativeVersion = "~12.4.
|
|
12
|
+
export declare const testingLibraryReactNativeVersion = "~12.4.5";
|
|
13
13
|
export declare const testingLibraryJestNativeVersion = "~5.4.3";
|
|
14
14
|
export declare const jestReactNativeVersion = "18.0.0";
|
|
15
|
-
export declare const reactNativeSvgTransformerVersion = "1.
|
|
16
|
-
export declare const reactNativeSvgVersion = "
|
|
17
|
-
export declare const babelRuntimeVersion = "7.
|
|
15
|
+
export declare const reactNativeSvgTransformerVersion = "1.3.0";
|
|
16
|
+
export declare const reactNativeSvgVersion = "15.1.0";
|
|
17
|
+
export declare const babelRuntimeVersion = "7.24.4";
|
package/src/utils/versions.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.reactNativeWebVersion = exports.reactNativeMetroConfigVersion = exports.reactNativeBabelPresetVersion = exports.reactNativeCommunityCliPlatformAndroidVersion = exports.typesNodeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.reactNativeVersion = '0.73.
|
|
5
|
+
exports.reactNativeVersion = '0.73.6';
|
|
6
6
|
exports.typesNodeVersion = '18.16.9';
|
|
7
|
-
exports.reactNativeCommunityCliPlatformAndroidVersion = '12.3.
|
|
8
|
-
exports.reactNativeBabelPresetVersion = '^0.73.
|
|
9
|
-
exports.reactNativeMetroConfigVersion = '^0.73.
|
|
10
|
-
exports.reactNativeWebVersion = '^0.19.
|
|
7
|
+
exports.reactNativeCommunityCliPlatformAndroidVersion = '~12.3.6'; // anddroid refers files from this package
|
|
8
|
+
exports.reactNativeBabelPresetVersion = '^0.73.21';
|
|
9
|
+
exports.reactNativeMetroConfigVersion = '^0.73.5';
|
|
10
|
+
exports.reactNativeWebVersion = '^0.19.10';
|
|
11
11
|
exports.reactVersion = '18.2.0';
|
|
12
12
|
exports.reactDomVersion = '18.2.0';
|
|
13
13
|
exports.reactTestRendererVersion = '18.2.0';
|
|
14
14
|
exports.typesReactVersion = '~18.2.45';
|
|
15
|
-
exports.testingLibraryReactNativeVersion = '~12.4.
|
|
15
|
+
exports.testingLibraryReactNativeVersion = '~12.4.5';
|
|
16
16
|
exports.testingLibraryJestNativeVersion = '~5.4.3';
|
|
17
17
|
exports.jestReactNativeVersion = '18.0.0';
|
|
18
|
-
exports.reactNativeSvgTransformerVersion = '1.
|
|
19
|
-
exports.reactNativeSvgVersion = '
|
|
20
|
-
exports.babelRuntimeVersion = '7.
|
|
18
|
+
exports.reactNativeSvgTransformerVersion = '1.3.0';
|
|
19
|
+
exports.reactNativeSvgVersion = '15.1.0';
|
|
20
|
+
exports.babelRuntimeVersion = '7.24.4';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const add_babel_inputs_1 = require("@nx/js/src/utils/add-babel-inputs");
|
|
5
|
-
async function default_1(tree) {
|
|
6
|
-
(0, add_babel_inputs_1.addBabelInputs)(tree);
|
|
7
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
8
|
-
}
|
|
9
|
-
exports.default = default_1;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
|
2
|
-
import { Tree, readNxJson, updateNxJson } from '@nx/devkit';
|
|
3
|
-
import addBabelInputs from './add-babel-inputs';
|
|
4
|
-
|
|
5
|
-
describe('15.0.0 migration (add-babel-inputs)', () => {
|
|
6
|
-
let tree: Tree;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('should add babel.config.json to sharedGlobals', async () => {
|
|
13
|
-
updateNxJson(tree, {
|
|
14
|
-
namedInputs: {
|
|
15
|
-
default: ['{projectRoot}/**/*', 'sharedGlobals'],
|
|
16
|
-
sharedGlobals: [],
|
|
17
|
-
production: ['default'],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
tree.write('babel.config.json', '');
|
|
21
|
-
|
|
22
|
-
await addBabelInputs(tree);
|
|
23
|
-
|
|
24
|
-
const updated = readNxJson(tree);
|
|
25
|
-
expect(updated).toMatchInlineSnapshot(`
|
|
26
|
-
{
|
|
27
|
-
"namedInputs": {
|
|
28
|
-
"default": [
|
|
29
|
-
"{projectRoot}/**/*",
|
|
30
|
-
"sharedGlobals",
|
|
31
|
-
],
|
|
32
|
-
"production": [
|
|
33
|
-
"default",
|
|
34
|
-
],
|
|
35
|
-
"sharedGlobals": [
|
|
36
|
-
"{workspaceRoot}/babel.config.json",
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
`);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should add babel.config.js', async () => {
|
|
44
|
-
updateNxJson(tree, {
|
|
45
|
-
namedInputs: {
|
|
46
|
-
default: ['{projectRoot}/**/*', 'sharedGlobals'],
|
|
47
|
-
sharedGlobals: [],
|
|
48
|
-
production: ['default'],
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
tree.write('babel.config.js', '');
|
|
52
|
-
|
|
53
|
-
await addBabelInputs(tree);
|
|
54
|
-
|
|
55
|
-
const updated = readNxJson(tree);
|
|
56
|
-
expect(updated).toMatchInlineSnapshot(`
|
|
57
|
-
{
|
|
58
|
-
"namedInputs": {
|
|
59
|
-
"default": [
|
|
60
|
-
"{projectRoot}/**/*",
|
|
61
|
-
"sharedGlobals",
|
|
62
|
-
],
|
|
63
|
-
"production": [
|
|
64
|
-
"default",
|
|
65
|
-
],
|
|
66
|
-
"sharedGlobals": [
|
|
67
|
-
"{workspaceRoot}/babel.config.js",
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
`);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
/**
|
|
5
|
-
* Add build-ios target for react-native
|
|
6
|
-
*/
|
|
7
|
-
async function update(tree) {
|
|
8
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
-
for (const [name, config] of projects.entries()) {
|
|
10
|
-
if (config.targets?.['start']?.executor === '@nrwl/react-native:start') {
|
|
11
|
-
if (!config.targets['build-ios']) {
|
|
12
|
-
config.targets['build-ios'] = {
|
|
13
|
-
executor: '@nrwl/react-native:build-ios',
|
|
14
|
-
outputs: ['{projectRoot}/ios/build/Build'],
|
|
15
|
-
options: {},
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
if (!config.targets['pod-install']) {
|
|
19
|
-
config.targets['pod-install'] = {
|
|
20
|
-
executor: '@nrwl/react-native:pod-install',
|
|
21
|
-
options: {},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
28
|
-
}
|
|
29
|
-
exports.default = update;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { addProjectConfiguration, getProjects, Tree } from '@nx/devkit';
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
|
3
|
-
import update from './add-build-ios-target';
|
|
4
|
-
|
|
5
|
-
describe('add-build-ios-target', () => {
|
|
6
|
-
let tree: Tree;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
10
|
-
addProjectConfiguration(tree, 'product', {
|
|
11
|
-
root: 'apps/product',
|
|
12
|
-
sourceRoot: 'apps/product/src',
|
|
13
|
-
targets: {
|
|
14
|
-
start: {
|
|
15
|
-
executor: '@nrwl/react-native:start',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it(`should update project.json with target build-ios and pod-install`, async () => {
|
|
22
|
-
await update(tree);
|
|
23
|
-
|
|
24
|
-
getProjects(tree).forEach((project) => {
|
|
25
|
-
expect(project.targets['build-ios']).toEqual({
|
|
26
|
-
executor: '@nrwl/react-native:build-ios',
|
|
27
|
-
outputs: ['{projectRoot}/ios/build/Build'],
|
|
28
|
-
options: {},
|
|
29
|
-
});
|
|
30
|
-
expect(project.targets['pod-install']).toEqual({
|
|
31
|
-
executor: '@nrwl/react-native:pod-install',
|
|
32
|
-
options: {},
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|