@nx/react-native 18.1.0-beta.2 → 18.1.0-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react-native",
3
- "version": "18.1.0-beta.2",
3
+ "version": "18.1.0-beta.3",
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": [
@@ -35,13 +35,13 @@
35
35
  "node-fetch": "^2.6.7",
36
36
  "tsconfig-paths": "^4.1.2",
37
37
  "tslib": "^2.3.0",
38
- "@nx/devkit": "18.1.0-beta.2",
39
- "@nx/jest": "18.1.0-beta.2",
40
- "@nx/js": "18.1.0-beta.2",
41
- "@nx/eslint": "18.1.0-beta.2",
42
- "@nx/react": "18.1.0-beta.2",
43
- "@nx/workspace": "18.1.0-beta.2",
44
- "@nrwl/react-native": "18.1.0-beta.2"
38
+ "@nx/devkit": "18.1.0-beta.3",
39
+ "@nx/jest": "18.1.0-beta.3",
40
+ "@nx/js": "18.1.0-beta.3",
41
+ "@nx/eslint": "18.1.0-beta.3",
42
+ "@nx/react": "18.1.0-beta.3",
43
+ "@nx/workspace": "18.1.0-beta.3",
44
+ "@nrwl/react-native": "18.1.0-beta.3"
45
45
  },
46
46
  "executors": "./executors.json",
47
47
  "ng-update": {
package/plugin.d.ts CHANGED
@@ -1 +1 @@
1
- export { createNodes, ReactNativePluginOptions } from './plugins/plugin';
1
+ export { createNodes, createDependencies, ReactNativePluginOptions, } from './plugins/plugin';
package/plugin.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNodes = void 0;
3
+ exports.createDependencies = exports.createNodes = void 0;
4
4
  var plugin_1 = require("./plugins/plugin");
5
5
  Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
6
+ Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
@@ -12,7 +12,10 @@ async function normalizeOptions(host, options) {
12
12
  callingGenerator: '@nx/react-native:application',
13
13
  });
14
14
  options.projectNameAndRootFormat = projectNameAndRootFormat;
15
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
15
+ const nxJson = (0, devkit_1.readNxJson)(host);
16
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
17
+ nxJson.useInferencePlugins !== false;
18
+ options.addPlugin ??= addPluginDefault;
16
19
  const { className, fileName } = (0, devkit_1.names)(options.name);
17
20
  const iosProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'ios');
18
21
  const androidProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'android');
@@ -15,7 +15,10 @@ function reactNativeInitGenerator(host, schema) {
15
15
  exports.reactNativeInitGenerator = reactNativeInitGenerator;
16
16
  async function reactNativeInitGeneratorInternal(host, schema) {
17
17
  (0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
18
- schema.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
18
+ const nxJson = (0, devkit_1.readNxJson)(host);
19
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
20
+ nxJson.useInferencePlugins !== false;
21
+ schema.addPlugin ??= addPluginDefault;
19
22
  if (schema.addPlugin) {
20
23
  addPlugin(host);
21
24
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nx/devkit");
4
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
6
  async function normalizeOptions(host, options) {
6
7
  const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
@@ -11,7 +12,10 @@ async function normalizeOptions(host, options) {
11
12
  projectNameAndRootFormat: options.projectNameAndRootFormat,
12
13
  callingGenerator: '@nx/react-native:library',
13
14
  });
14
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
15
+ const nxJson = (0, devkit_1.readNxJson)(host);
16
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
17
+ nxJson.useInferencePlugins !== false;
18
+ options.addPlugin ??= addPluginDefault;
15
19
  const parsedTags = options.tags
16
20
  ? options.tags.split(',').map((s) => s.trim())
17
21
  : [];
@@ -16,7 +16,10 @@ exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
16
16
  */
17
17
  async function storybookConfigurationGeneratorInternal(host, schema) {
18
18
  devkit_1.logger.warn(`Please run 'nx run @nx/react:storybook-configuration ${schema.project}' instead.`);
19
- schema.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
19
+ const nxJson = (0, devkit_1.readNxJson)(host);
20
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
21
+ nxJson.useInferencePlugins !== false;
22
+ schema.addPlugin ??= addPluginDefault;
20
23
  return (0, react_1.storybookConfigurationGenerator)(host, schema);
21
24
  }
22
25
  exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;