@nx/react-native 0.0.0-pr-29705-bc2a0dd → 0.0.0-pr-29408-73bb882

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/.eslintrc.json CHANGED
@@ -52,6 +52,10 @@
52
52
  {
53
53
  "name": "fs-extra",
54
54
  "message": "Please use equivalent utilities from `node:fs` instead."
55
+ },
56
+ {
57
+ "name": "chalk",
58
+ "message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
55
59
  }
56
60
  ]
57
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react-native",
3
- "version": "0.0.0-pr-29705-bc2a0dd",
3
+ "version": "0.0.0-pr-29408-73bb882",
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": [
@@ -27,21 +27,21 @@
27
27
  "types": "index.d.ts",
28
28
  "dependencies": {
29
29
  "ajv": "^8.12.0",
30
- "chalk": "^4.1.0",
31
30
  "enhanced-resolve": "^5.8.3",
32
31
  "glob": "7.1.4",
33
32
  "ignore": "^5.0.4",
34
33
  "metro-config": "~0.80.4",
35
34
  "metro-resolver": "~0.80.4",
36
35
  "node-fetch": "^2.6.7",
36
+ "picocolors": "^1.1.0",
37
37
  "tsconfig-paths": "^4.1.2",
38
38
  "tslib": "^2.3.0",
39
- "@nx/devkit": "0.0.0-pr-29705-bc2a0dd",
40
- "@nx/jest": "0.0.0-pr-29705-bc2a0dd",
41
- "@nx/js": "0.0.0-pr-29705-bc2a0dd",
42
- "@nx/eslint": "0.0.0-pr-29705-bc2a0dd",
43
- "@nx/react": "0.0.0-pr-29705-bc2a0dd",
44
- "@nx/workspace": "0.0.0-pr-29705-bc2a0dd"
39
+ "@nx/devkit": "0.0.0-pr-29408-73bb882",
40
+ "@nx/jest": "0.0.0-pr-29408-73bb882",
41
+ "@nx/js": "0.0.0-pr-29408-73bb882",
42
+ "@nx/eslint": "0.0.0-pr-29408-73bb882",
43
+ "@nx/react": "0.0.0-pr-29408-73bb882",
44
+ "@nx/workspace": "0.0.0-pr-29408-73bb882"
45
45
  },
46
46
  "executors": "./executors.json",
47
47
  "ng-update": {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getResolveRequest = getResolveRequest;
4
4
  const metroResolver = require("metro-resolver");
5
5
  const tsconfig_paths_1 = require("tsconfig-paths");
6
- const chalk = require("chalk");
6
+ const pc = require("picocolors");
7
7
  const enhanced_resolve_1 = require("enhanced-resolve");
8
8
  const path_1 = require("path");
9
9
  const fs = require("fs");
@@ -26,9 +26,9 @@ function getResolveRequest(extensions, exportsConditionNames = [], mainFields =
26
26
  return resolvedPath;
27
27
  }
28
28
  if (debug) {
29
- console.log(chalk.red(`[Nx] Unable to resolve with any resolver: ${realModuleName}`));
29
+ console.log(pc.red(`[Nx] Unable to resolve with any resolver: ${realModuleName}`));
30
30
  }
31
- throw new Error(`Cannot resolve ${chalk.bold(realModuleName)}`);
31
+ throw new Error(`Cannot resolve ${pc.bold(realModuleName)}`);
32
32
  };
33
33
  }
34
34
  function resolveRequestFromContext(resolveRequest, context, realModuleName, platform, debug) {
@@ -37,7 +37,7 @@ function resolveRequestFromContext(resolveRequest, context, realModuleName, plat
37
37
  }
38
38
  catch {
39
39
  if (debug)
40
- console.log(chalk.cyan(`[Nx] Unable to resolve with default resolveRequest: ${realModuleName}`));
40
+ console.log(pc.cyan(`[Nx] Unable to resolve with default resolveRequest: ${realModuleName}`));
41
41
  }
42
42
  }
43
43
  /**
@@ -50,7 +50,7 @@ function defaultMetroResolver(context, realModuleName, platform, debug) {
50
50
  }
51
51
  catch {
52
52
  if (debug)
53
- console.log(chalk.cyan(`[Nx] Unable to resolve with default Metro resolver: ${realModuleName}`));
53
+ console.log(pc.cyan(`[Nx] Unable to resolve with default Metro resolver: ${realModuleName}`));
54
54
  }
55
55
  }
56
56
  /**
@@ -69,7 +69,7 @@ function pnpmResolver(extensions, context, realModuleName, debug, exportsConditi
69
69
  }
70
70
  catch {
71
71
  if (debug)
72
- console.log(chalk.cyan(`[Nx] Unable to resolve with default PNPM resolver: ${realModuleName}`));
72
+ console.log(pc.cyan(`[Nx] Unable to resolve with default PNPM resolver: ${realModuleName}`));
73
73
  }
74
74
  }
75
75
  /**
@@ -84,8 +84,8 @@ function tsconfigPathsResolver(context, extensions, realModuleName, platform, de
84
84
  }
85
85
  catch {
86
86
  if (debug) {
87
- console.log(chalk.cyan(`[Nx] Failed to resolve ${chalk.bold(realModuleName)}`));
88
- console.log(chalk.cyan(`[Nx] The following tsconfig paths was used:\n:${chalk.bold(JSON.stringify(paths, null, 2))}`));
87
+ console.log(pc.cyan(`[Nx] Failed to resolve ${pc.bold(realModuleName)}`));
88
+ console.log(pc.cyan(`[Nx] The following tsconfig paths was used:\n:${pc.bold(JSON.stringify(paths, null, 2))}`));
89
89
  }
90
90
  }
91
91
  }
@@ -99,13 +99,13 @@ function getMatcher(debug) {
99
99
  absoluteBaseUrl = result.absoluteBaseUrl;
100
100
  paths = result.paths;
101
101
  if (debug) {
102
- console.log(chalk.cyan(`[Nx] Located tsconfig at ${chalk.bold(absoluteBaseUrl)}`));
103
- console.log(chalk.cyan(`[Nx] Found the following paths:\n:${chalk.bold(JSON.stringify(paths, null, 2))}`));
102
+ console.log(pc.cyan(`[Nx] Located tsconfig at ${pc.bold(absoluteBaseUrl)}`));
103
+ console.log(pc.cyan(`[Nx] Found the following paths:\n:${pc.bold(JSON.stringify(paths, null, 2))}`));
104
104
  }
105
105
  matcher = (0, tsconfig_paths_1.createMatchPath)(absoluteBaseUrl, paths);
106
106
  }
107
107
  else {
108
- console.log(chalk.cyan(`[Nx] Failed to locate tsconfig}`));
108
+ console.log(pc.cyan(`[Nx] Failed to locate tsconfig}`));
109
109
  throw new Error(`Could not load tsconfig for project`);
110
110
  }
111
111
  }
@@ -6,7 +6,7 @@ const node_fs_1 = require("node:fs");
6
6
  const path_1 = require("path");
7
7
  const devkit_1 = require("@nx/devkit");
8
8
  const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
9
- const chalk = require("chalk");
9
+ const pc = require("picocolors");
10
10
  const glob_1 = require("glob");
11
11
  const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
12
12
  /**
@@ -16,7 +16,7 @@ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
16
16
  async function* reactNativeStorybookExecutor(options, context) {
17
17
  const { syncDeps: isSyncDepsEnabled = true } = options;
18
18
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
19
- 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).`);
19
+ devkit_1.logger.info(`${pc.bold(pc.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).`);
20
20
  // add storybook addons to app's package.json
21
21
  const packageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
22
22
  const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
@@ -44,7 +44,7 @@ function runCliStorybook(workspaceRoot, options) {
44
44
  });
45
45
  });
46
46
  if (storiesFiles.length === 0) {
47
- devkit_1.logger.warn(`${chalk.bold.yellow('warn')} No stories found.`);
47
+ devkit_1.logger.warn(`${pc.bold(pc.yellow('warn'))} No stories found.`);
48
48
  }
49
49
  const newContents = `// Auto-generated file created by nx
50
50
  // DO NOT EDIT.
@@ -4,7 +4,7 @@ exports.default = syncDepsExecutor;
4
4
  exports.syncDeps = syncDeps;
5
5
  exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
6
6
  const path_1 = require("path");
7
- const chalk = require("chalk");
7
+ const pc = require("picocolors");
8
8
  const devkit_1 = require("@nx/devkit");
9
9
  const find_all_npm_dependencies_1 = require("../../utils/find-all-npm-dependencies");
10
10
  async function* syncDepsExecutor(options, context) {
@@ -68,10 +68,10 @@ async function syncDeps(projectName, projectPackageJson, projectPackageJsonPath,
68
68
  }
69
69
  function displayNewlyAddedDepsMessage(projectName, deps) {
70
70
  if (deps.length > 0) {
71
- devkit_1.logger.info(`${chalk.bold.cyan('info')} Added entries to 'package.json' for '${projectName}' (for autolink):
72
- ${deps.map((d) => chalk.bold.cyan(`"${d}": "*"`)).join('\n ')}`);
71
+ devkit_1.logger.info(`${pc.bold(pc.cyan('info'))} Added entries to 'package.json' for '${projectName}' (for autolink):
72
+ ${deps.map((d) => pc.bold(pc.cyan(`"${d}": "*"`))).join('\n ')}`);
73
73
  }
74
74
  else {
75
- devkit_1.logger.info(`${chalk.bold.cyan('info')} Dependencies for '${projectName}' are up to date! No changes made.`);
75
+ devkit_1.logger.info(`${pc.bold(pc.cyan('info'))} Dependencies for '${projectName}' are up to date! No changes made.`);
76
76
  }
77
77
  }
@@ -6,17 +6,17 @@ const child_process_1 = require("child_process");
6
6
  const node_fs_1 = require("node:fs");
7
7
  const os_1 = require("os");
8
8
  const path_1 = require("path");
9
- const chalk = require("chalk");
9
+ const pc = require("picocolors");
10
10
  const devkit_1 = require("@nx/devkit");
11
11
  const podInstallErrorMessage = `
12
- Running ${chalk.bold('pod install')} failed, see above.
12
+ Running ${pc.bold('pod install')} failed, see above.
13
13
  Do you have CocoaPods (https://cocoapods.org/) installed?
14
14
 
15
15
  Check that your XCode path is correct:
16
- ${chalk.bold('sudo xcode-select --print-path')}
16
+ ${pc.bold('sudo xcode-select --print-path')}
17
17
 
18
18
  If the path is wrong, switch the path: (your path may be different)
19
- ${chalk.bold('sudo xcode-select --switch /Applications/Xcode.app')}
19
+ ${pc.bold('sudo xcode-select --switch /Applications/Xcode.app')}
20
20
  `;
21
21
  /**
22
22
  * Run pod install on ios directory