@nx/react-native 19.0.3 → 19.0.4
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/package.json +8 -8
- package/src/executors/storybook/schema.d.ts +1 -0
- package/src/executors/storybook/storybook.impl.js +2 -1
- package/src/executors/storybook/storybook.impl.ts +3 -1
- package/src/generators/application/application.spec.ts +2 -0
- package/src/generators/init/init.js +1 -1
- package/src/generators/init/init.spec.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.4",
|
|
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.
|
|
40
|
-
"@nx/jest": "19.0.
|
|
41
|
-
"@nx/js": "19.0.
|
|
42
|
-
"@nx/eslint": "19.0.
|
|
43
|
-
"@nx/react": "19.0.
|
|
44
|
-
"@nx/workspace": "19.0.
|
|
45
|
-
"@nrwl/react-native": "19.0.
|
|
39
|
+
"@nx/devkit": "19.0.4",
|
|
40
|
+
"@nx/jest": "19.0.4",
|
|
41
|
+
"@nx/js": "19.0.4",
|
|
42
|
+
"@nx/eslint": "19.0.4",
|
|
43
|
+
"@nx/react": "19.0.4",
|
|
44
|
+
"@nx/workspace": "19.0.4",
|
|
45
|
+
"@nrwl/react-native": "19.0.4"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
|
@@ -13,6 +13,7 @@ const fs_extra_1 = require("fs-extra");
|
|
|
13
13
|
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
14
14
|
*/
|
|
15
15
|
async function* reactNativeStorybookExecutor(options, context) {
|
|
16
|
+
const { syncDeps: isSyncDepsEnabled = true } = options;
|
|
16
17
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
17
18
|
devkit_1.logger.info(`${chalk.bold.cyan('info')} To see your Storybook stories on the device, you should start your mobile app for the <platform> of your choice (typically ios or android).`);
|
|
18
19
|
// add storybook addons to app's package.json
|
|
@@ -20,7 +21,7 @@ async function* reactNativeStorybookExecutor(options, context) {
|
|
|
20
21
|
const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
|
|
21
22
|
const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
|
|
22
23
|
const projectPackageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
|
|
23
|
-
if ((0, fileutils_1.fileExists)(packageJsonPath))
|
|
24
|
+
if (isSyncDepsEnabled && (0, fileutils_1.fileExists)(packageJsonPath))
|
|
24
25
|
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(context.projectName, projectPackageJson, packageJsonPath, workspacePackageJson, context.projectGraph, [
|
|
25
26
|
`@storybook/react-native`,
|
|
26
27
|
'@storybook/addon-ondevice-actions',
|
|
@@ -20,6 +20,8 @@ export default async function* reactNativeStorybookExecutor(
|
|
|
20
20
|
options: ReactNativeStorybookOptions,
|
|
21
21
|
context: ExecutorContext
|
|
22
22
|
): AsyncGenerator<{ success: boolean }> {
|
|
23
|
+
const { syncDeps: isSyncDepsEnabled = true } = options;
|
|
24
|
+
|
|
23
25
|
const projectRoot =
|
|
24
26
|
context.projectsConfigurations.projects[context.projectName].root;
|
|
25
27
|
logger.info(
|
|
@@ -37,7 +39,7 @@ export default async function* reactNativeStorybookExecutor(
|
|
|
37
39
|
);
|
|
38
40
|
const projectPackageJson = readJsonFile<PackageJson>(packageJsonPath);
|
|
39
41
|
|
|
40
|
-
if (fileExists(packageJsonPath))
|
|
42
|
+
if (isSyncDepsEnabled && fileExists(packageJsonPath))
|
|
41
43
|
displayNewlyAddedDepsMessage(
|
|
42
44
|
context.projectName,
|
|
43
45
|
await syncDeps(
|
|
@@ -20,7 +20,7 @@ async function reactNativeInitGeneratorInternal(host, schema) {
|
|
|
20
20
|
nxJson.useInferencePlugins !== false;
|
|
21
21
|
schema.addPlugin ??= addPluginDefault;
|
|
22
22
|
if (schema.addPlugin) {
|
|
23
|
-
await (0, add_plugin_1.addPlugin)(host, '@nx/react-native/plugin', plugin_1.createNodes, {
|
|
23
|
+
await (0, add_plugin_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react-native/plugin', plugin_1.createNodes, {
|
|
24
24
|
startTargetName: ['start', 'react-native:start', 'react-native-start'],
|
|
25
25
|
upgradeTargetname: [
|
|
26
26
|
'update',
|