@nx/workspace 23.1.0-beta.3 → 23.1.0-beta.5

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.
@@ -178,13 +178,8 @@ function createNxJson(tree, { directory, defaultBase, preset, analytics }) {
178
178
  defaultBase,
179
179
  targetDefaults: process.env.NX_ADD_PLUGINS === 'false'
180
180
  ? {
181
- build: {
182
- cache: true,
183
- dependsOn: ['^build'],
184
- },
185
- lint: {
186
- cache: true,
187
- },
181
+ build: { cache: true, dependsOn: ['^build'] },
182
+ lint: { cache: true },
188
183
  }
189
184
  : undefined,
190
185
  analytics,
@@ -199,7 +194,10 @@ function createNxJson(tree, { directory, defaultBase, preset, analytics }) {
199
194
  sharedGlobals: [],
200
195
  };
201
196
  if (process.env.NX_ADD_PLUGINS === 'false') {
202
- nxJson.targetDefaults.build.inputs = ['production', '^production'];
197
+ const build = nxJson.targetDefaults?.build;
198
+ if (build && !Array.isArray(build)) {
199
+ build.inputs = ['production', '^production'];
200
+ }
203
201
  nxJson.useInferencePlugins = false;
204
202
  }
205
203
  }
@@ -1,4 +1,4 @@
1
- import * as chalk from 'chalk';
1
+ import chalk from 'chalk';
2
2
  export interface CLIErrorMessageConfig {
3
3
  title: string;
4
4
  bodyLines?: string[];
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.output = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const chalk = tslib_1.__importStar(require("chalk"));
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  /**
7
7
  * Automatically disable styling applied by chalk if CI=true
8
8
  */
9
9
  if (process.env.CI === 'true') {
10
- chalk.level = 0;
10
+ chalk_1.default.level = 0;
11
11
  }
12
12
  class CLIOutput {
13
13
  constructor() {
14
- this.NX_PREFIX = chalk.reset.inverse.bold.cyan(' NX ');
14
+ this.NX_PREFIX = chalk_1.default.reset.inverse.bold.cyan(' NX ');
15
15
  /**
16
16
  * Longer dash character which forms more of a continuous line when place side to side
17
17
  * with itself, unlike the standard dash character
@@ -23,10 +23,10 @@ class CLIOutput {
23
23
  * implementation.
24
24
  */
25
25
  this.colors = {
26
- gray: chalk.gray,
26
+ gray: chalk_1.default.gray,
27
27
  };
28
- this.bold = chalk.bold;
29
- this.underline = chalk.underline;
28
+ this.bold = chalk_1.default.bold;
29
+ this.underline = chalk_1.default.underline;
30
30
  }
31
31
  writeToStdOut(str) {
32
32
  process.stdout.write(str);
@@ -52,16 +52,16 @@ class CLIOutput {
52
52
  this.writeToStdOut('\n');
53
53
  }
54
54
  addVerticalSeparator() {
55
- this.writeToStdOut(`\n${chalk.gray(this.VERTICAL_SEPARATOR)}\n\n`);
55
+ this.writeToStdOut(`\n${chalk_1.default.gray(this.VERTICAL_SEPARATOR)}\n\n`);
56
56
  }
57
57
  addVerticalSeparatorWithoutNewLines() {
58
- this.writeToStdOut(`${chalk.gray(this.VERTICAL_SEPARATOR)}\n`);
58
+ this.writeToStdOut(`${chalk_1.default.gray(this.VERTICAL_SEPARATOR)}\n`);
59
59
  }
60
60
  error({ title, slug, bodyLines }) {
61
61
  this.addNewline();
62
62
  this.writeOutputTitle({
63
- label: chalk.reset.inverse.bold.red(' ERROR '),
64
- title: chalk.bold.red(title),
63
+ label: chalk_1.default.reset.inverse.bold.red(' ERROR '),
64
+ title: chalk_1.default.bold.red(title),
65
65
  });
66
66
  this.writeOptionalOutputBody(bodyLines);
67
67
  /**
@@ -69,15 +69,15 @@ class CLIOutput {
69
69
  */
70
70
  if (slug && typeof slug === 'string') {
71
71
  this.addNewline();
72
- this.writeToStdOut(`${chalk.grey(' Learn more about this error: ')}https://errors.nx.dev/${slug}\n`);
72
+ this.writeToStdOut(`${chalk_1.default.grey(' Learn more about this error: ')}https://errors.nx.dev/${slug}\n`);
73
73
  }
74
74
  this.addNewline();
75
75
  }
76
76
  warn({ title, slug, bodyLines }) {
77
77
  this.addNewline();
78
78
  this.writeOutputTitle({
79
- label: chalk.reset.inverse.bold.yellow(' WARNING '),
80
- title: chalk.bold.yellow(title),
79
+ label: chalk_1.default.reset.inverse.bold.yellow(' WARNING '),
80
+ title: chalk_1.default.bold.yellow(title),
81
81
  });
82
82
  this.writeOptionalOutputBody(bodyLines);
83
83
  /**
@@ -85,15 +85,15 @@ class CLIOutput {
85
85
  */
86
86
  if (slug && typeof slug === 'string') {
87
87
  this.addNewline();
88
- this.writeToStdOut(`${chalk.grey(' Learn more about this warning: ')}https://errors.nx.dev/${slug}\n`);
88
+ this.writeToStdOut(`${chalk_1.default.grey(' Learn more about this warning: ')}https://errors.nx.dev/${slug}\n`);
89
89
  }
90
90
  this.addNewline();
91
91
  }
92
92
  note({ title, bodyLines }) {
93
93
  this.addNewline();
94
94
  this.writeOutputTitle({
95
- label: chalk.reset.inverse.bold.keyword('orange')(' NOTE '),
96
- title: chalk.bold.keyword('orange')(title),
95
+ label: chalk_1.default.reset.inverse.bold.keyword('orange')(' NOTE '),
96
+ title: chalk_1.default.bold.keyword('orange')(title),
97
97
  });
98
98
  this.writeOptionalOutputBody(bodyLines);
99
99
  this.addNewline();
@@ -101,8 +101,8 @@ class CLIOutput {
101
101
  success({ title, bodyLines }) {
102
102
  this.addNewline();
103
103
  this.writeOutputTitle({
104
- label: chalk.reset.inverse.bold.green(' SUCCESS '),
105
- title: chalk.bold.green(title),
104
+ label: chalk_1.default.reset.inverse.bold.green(' SUCCESS '),
105
+ title: chalk_1.default.bold.green(title),
106
106
  });
107
107
  this.writeOptionalOutputBody(bodyLines);
108
108
  this.addNewline();
@@ -116,16 +116,16 @@ class CLIOutput {
116
116
  }
117
117
  logCommand(message, isCached = false) {
118
118
  this.addNewline();
119
- this.writeToStdOut(chalk.bold(`> ${message} `));
119
+ this.writeToStdOut(chalk_1.default.bold(`> ${message} `));
120
120
  if (isCached) {
121
- this.writeToStdOut(chalk.bold.grey(`[retrieved from cache]`));
121
+ this.writeToStdOut(chalk_1.default.bold.grey(`[retrieved from cache]`));
122
122
  }
123
123
  this.addNewline();
124
124
  }
125
125
  log({ title, bodyLines }) {
126
126
  this.addNewline();
127
127
  this.writeOutputTitle({
128
- title: chalk.white(title),
128
+ title: chalk_1.default.white(title),
129
129
  });
130
130
  this.writeOptionalOutputBody(bodyLines);
131
131
  this.addNewline();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "23.1.0-beta.3",
3
+ "version": "23.1.0-beta.5",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -85,11 +85,11 @@
85
85
  "semver": "^7.6.3",
86
86
  "tslib": "^2.3.0",
87
87
  "yargs-parser": "21.1.1",
88
- "nx": "23.1.0-beta.3",
89
- "@nx/devkit": "23.1.0-beta.3"
88
+ "nx": "23.1.0-beta.5",
89
+ "@nx/devkit": "23.1.0-beta.5"
90
90
  },
91
91
  "devDependencies": {
92
- "nx": "23.1.0-beta.3"
92
+ "nx": "23.1.0-beta.5"
93
93
  },
94
94
  "publishConfig": {
95
95
  "access": "public"