@nx/react-native 17.3.0-beta.6 → 17.3.0-beta.8

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": "17.3.0-beta.6",
3
+ "version": "17.3.0-beta.8",
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,14 +36,14 @@
36
36
  "node-fetch": "^2.6.7",
37
37
  "tsconfig-paths": "^4.1.2",
38
38
  "tslib": "^2.3.0",
39
- "@nx/detox": "17.3.0-beta.6",
40
- "@nx/devkit": "17.3.0-beta.6",
41
- "@nx/jest": "17.3.0-beta.6",
42
- "@nx/js": "17.3.0-beta.6",
43
- "@nx/eslint": "17.3.0-beta.6",
44
- "@nx/react": "17.3.0-beta.6",
45
- "@nx/workspace": "17.3.0-beta.6",
46
- "@nrwl/react-native": "17.3.0-beta.6"
39
+ "@nx/detox": "17.3.0-beta.8",
40
+ "@nx/devkit": "17.3.0-beta.8",
41
+ "@nx/jest": "17.3.0-beta.8",
42
+ "@nx/js": "17.3.0-beta.8",
43
+ "@nx/eslint": "17.3.0-beta.8",
44
+ "@nx/react": "17.3.0-beta.8",
45
+ "@nx/workspace": "17.3.0-beta.8",
46
+ "@nrwl/react-native": "17.3.0-beta.8"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react-native": ">= 0.72.0 < 0.73.0"
@@ -26,7 +26,7 @@ export function <%= className %>(props: <%= className %>Props) {
26
26
  <Text>Welcome to <%= name %>!</Text>
27
27
  </View>
28
28
  );
29
- };
29
+ }
30
30
  <% } %>
31
31
 
32
32
  export default <%= className %>;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateDependencies = exports.reactNativeInitGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const update_package_scripts_1 = require("@nx/devkit/src/utils/update-package-scripts");
6
+ const plugin_1 = require("../../../plugins/plugin");
5
7
  const versions_1 = require("../../utils/versions");
6
8
  const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
7
9
  async function reactNativeInitGenerator(host, schema) {
@@ -14,6 +16,9 @@ async function reactNativeInitGenerator(host, schema) {
14
16
  tasks.push(moveDependency(host));
15
17
  tasks.push(updateDependencies(host, schema));
16
18
  }
19
+ if (schema.updatePackageScripts) {
20
+ await (0, update_package_scripts_1.updatePackageScripts)(host, plugin_1.createNodes);
21
+ }
17
22
  if (!schema.skipFormat) {
18
23
  await (0, devkit_1.formatFiles)(host);
19
24
  }
@@ -2,4 +2,5 @@ export interface Schema {
2
2
  skipFormat?: boolean;
3
3
  skipPackageJson?: boolean; //default is false
4
4
  keepExistingVersions?: boolean; //default is false
5
+ updatePackageScripts?: boolean;
5
6
  }
@@ -23,6 +23,12 @@
23
23
  "x-priority": "internal",
24
24
  "description": "Keep existing dependencies versions",
25
25
  "default": false
26
+ },
27
+ "updatePackageScripts": {
28
+ "type": "boolean",
29
+ "x-priority": "internal",
30
+ "description": "Update `package.json` scripts with inferred targets",
31
+ "default": false
26
32
  }
27
33
  },
28
34
  "required": []
@@ -15,8 +15,8 @@ describe('Add Linting', () => {
15
15
  });
16
16
  });
17
17
 
18
- it('should add update configuration when eslint is passed', () => {
19
- addLinting(tree, {
18
+ it('should add update configuration when eslint is passed', async () => {
19
+ await addLinting(tree, {
20
20
  projectName: 'my-lib',
21
21
  linter: Linter.EsLint,
22
22
  tsConfigPaths: ['libs/my-lib/tsconfig.lib.json'],
@@ -29,7 +29,7 @@ describe('Add Linting', () => {
29
29
  });
30
30
 
31
31
  it('should not add lint target when "none" is passed', async () => {
32
- addLinting(tree, {
32
+ await addLinting(tree, {
33
33
  projectName: 'my-lib',
34
34
  linter: Linter.None,
35
35
  tsConfigPaths: ['libs/my-lib/tsconfig.lib.json'],