@nx/expo 19.8.0 → 19.8.1

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
@@ -41,6 +41,18 @@
41
41
  }
42
42
  ]
43
43
  }
44
+ },
45
+ {
46
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
47
+ "rules": {
48
+ "no-restricted-imports": [
49
+ "error",
50
+ {
51
+ "name": "chalk",
52
+ "message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
53
+ }
54
+ ]
55
+ }
44
56
  }
45
57
  ]
46
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "19.8.0",
3
+ "version": "19.8.1",
4
4
  "private": false,
5
5
  "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
6
6
  "keywords": [
@@ -28,22 +28,22 @@
28
28
  "main": "./index",
29
29
  "types": "index.d.ts",
30
30
  "dependencies": {
31
- "@nx/devkit": "19.8.0",
32
- "chalk": "^4.1.0",
31
+ "@nx/devkit": "19.8.1",
32
+ "@nx/eslint": "19.8.1",
33
+ "@nx/jest": "19.8.1",
34
+ "@nx/js": "19.8.1",
35
+ "@nx/react": "19.8.1",
36
+ "@nx/web": "19.8.1",
37
+ "@nx/webpack": "19.8.1",
33
38
  "enhanced-resolve": "^5.8.3",
34
39
  "fs-extra": "^11.1.0",
35
40
  "metro-config": "~0.80.4",
36
41
  "metro-resolver": "~0.80.4",
37
42
  "node-fetch": "^2.6.7",
38
- "tslib": "^2.3.0",
43
+ "picocolors": "^1.1.0",
39
44
  "tsconfig-paths": "^4.1.2",
40
- "@nx/jest": "19.8.0",
41
- "@nx/js": "19.8.0",
42
- "@nx/eslint": "19.8.0",
43
- "@nx/react": "19.8.0",
44
- "@nx/web": "19.8.0",
45
- "@nx/webpack": "19.8.0",
46
- "@nrwl/expo": "19.8.0"
45
+ "tslib": "^2.3.0",
46
+ "@nrwl/expo": "19.8.1"
47
47
  },
48
48
  "executors": "./executors.json",
49
49
  "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
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = startExecutor;
4
- const chalk = require("chalk");
4
+ const pc = require("picocolors");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const child_process_1 = require("child_process");
7
7
  const path_1 = require("path");
@@ -10,7 +10,7 @@ async function* startExecutor(options, context) {
10
10
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
11
11
  try {
12
12
  const baseUrl = `http://localhost:${options.port}`;
13
- devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
13
+ devkit_1.logger.info(pc.cyan(`Packager is ready at ${baseUrl}`));
14
14
  await startAsync(context.root, projectRoot, options);
15
15
  yield {
16
16
  baseUrl,
@@ -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
  }
@@ -4,19 +4,19 @@ exports.runPodInstall = runPodInstall;
4
4
  exports.podInstall = podInstall;
5
5
  const child_process_1 = require("child_process");
6
6
  const os_1 = require("os");
7
- const chalk = require("chalk");
7
+ const pc = require("picocolors");
8
8
  const devkit_1 = require("@nx/devkit");
9
9
  const fs_extra_1 = require("fs-extra");
10
10
  const path_1 = require("path");
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
@@ -51,11 +51,13 @@ function podInstall(iosDirectory, options = {
51
51
  (0, child_process_1.execSync)('touch .xcode.env', {
52
52
  cwd: iosDirectory,
53
53
  stdio: 'inherit',
54
+ windowsHide: true,
54
55
  });
55
56
  }
56
57
  (0, child_process_1.execSync)(`pod install ${options.repoUpdate ? '--repo-update' : ''} ${options.deployment ? '--deployment' : ''}`, {
57
58
  cwd: iosDirectory,
58
59
  stdio: 'inherit',
60
+ windowsHide: true,
59
61
  });
60
62
  }
61
63
  catch (e) {
@@ -11,14 +11,14 @@ function resolveEas(workspaceRoot) {
11
11
  }
12
12
  let npmGlobalPath, yarnGlobalPath;
13
13
  try {
14
- npmGlobalPath = (0, child_process_1.execSync)('npm root -g')
14
+ npmGlobalPath = (0, child_process_1.execSync)('npm root -g', { windowsHide: true })
15
15
  ?.toString()
16
16
  ?.trim()
17
17
  ?.replace('\u001b[2K\u001b[1G', ''); // strip out ansi codes
18
18
  }
19
19
  catch { }
20
20
  try {
21
- yarnGlobalPath = (0, child_process_1.execSync)('yarn global dir')
21
+ yarnGlobalPath = (0, child_process_1.execSync)('yarn global dir', { windowsHide: true })
22
22
  ?.toString()
23
23
  ?.trim()
24
24
  ?.replace('\u001b[2K\u001b[1G', ''); // strip out ansi codes