nx 19.2.0-canary.20240525-af463c4 → 19.2.0-canary.20240528-7f11a1d
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -12
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +8 -0
- package/src/command-line/init/implementation/add-nx-to-nest.js +4 -0
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +4 -0
- package/src/command-line/init/implementation/angular/index.js +4 -0
- package/src/command-line/init/init-v2.js +4 -0
- package/src/command-line/show/project.js +7 -1
- package/src/command-line/yargs-utils/shared-options.js +9 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/daemon/server/server.js +1 -0
- package/src/plugins/js/index.js +6 -2
- package/src/plugins/js/lock-file/pnpm-parser.js +220 -89
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +7 -25
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +567 -287
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
- package/src/plugins/package-json-workspaces/create-nodes.js +1 -0
- package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.js +1 -0
- package/src/tasks-runner/create-task-graph.d.ts +3 -3
- package/src/tasks-runner/create-task-graph.js +5 -5
- package/src/tasks-runner/run-command.js +3 -4
- package/src/tasks-runner/utils.d.ts +1 -2
- package/src/tasks-runner/utils.js +4 -8
- package/src/utils/package-json.d.ts +2 -1
- package/src/utils/package-json.js +11 -1
- package/src/utils/params.d.ts +1 -1
- package/src/utils/params.js +5 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.2.0-canary.
|
3
|
+
"version": "19.2.0-canary.20240528-7f11a1d",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -69,7 +69,7 @@
|
|
69
69
|
"yargs-parser": "21.1.1",
|
70
70
|
"node-machine-id": "1.1.12",
|
71
71
|
"ora": "5.3.0",
|
72
|
-
"@nrwl/tao": "19.2.0-canary.
|
72
|
+
"@nrwl/tao": "19.2.0-canary.20240528-7f11a1d"
|
73
73
|
},
|
74
74
|
"peerDependencies": {
|
75
75
|
"@swc-node/register": "^1.8.0",
|
@@ -84,16 +84,16 @@
|
|
84
84
|
}
|
85
85
|
},
|
86
86
|
"optionalDependencies": {
|
87
|
-
"@nx/nx-darwin-x64": "19.2.0-canary.
|
88
|
-
"@nx/nx-darwin-arm64": "19.2.0-canary.
|
89
|
-
"@nx/nx-linux-x64-gnu": "19.2.0-canary.
|
90
|
-
"@nx/nx-linux-x64-musl": "19.2.0-canary.
|
91
|
-
"@nx/nx-win32-x64-msvc": "19.2.0-canary.
|
92
|
-
"@nx/nx-linux-arm64-gnu": "19.2.0-canary.
|
93
|
-
"@nx/nx-linux-arm64-musl": "19.2.0-canary.
|
94
|
-
"@nx/nx-linux-arm-gnueabihf": "19.2.0-canary.
|
95
|
-
"@nx/nx-win32-arm64-msvc": "19.2.0-canary.
|
96
|
-
"@nx/nx-freebsd-x64": "19.2.0-canary.
|
87
|
+
"@nx/nx-darwin-x64": "19.2.0-canary.20240528-7f11a1d",
|
88
|
+
"@nx/nx-darwin-arm64": "19.2.0-canary.20240528-7f11a1d",
|
89
|
+
"@nx/nx-linux-x64-gnu": "19.2.0-canary.20240528-7f11a1d",
|
90
|
+
"@nx/nx-linux-x64-musl": "19.2.0-canary.20240528-7f11a1d",
|
91
|
+
"@nx/nx-win32-x64-msvc": "19.2.0-canary.20240528-7f11a1d",
|
92
|
+
"@nx/nx-linux-arm64-gnu": "19.2.0-canary.20240528-7f11a1d",
|
93
|
+
"@nx/nx-linux-arm64-musl": "19.2.0-canary.20240528-7f11a1d",
|
94
|
+
"@nx/nx-linux-arm-gnueabihf": "19.2.0-canary.20240528-7f11a1d",
|
95
|
+
"@nx/nx-win32-arm64-msvc": "19.2.0-canary.20240528-7f11a1d",
|
96
|
+
"@nx/nx-freebsd-x64": "19.2.0-canary.20240528-7f11a1d"
|
97
97
|
},
|
98
98
|
"nx-migrations": {
|
99
99
|
"migrations": "./migrations.json",
|
@@ -28,6 +28,10 @@ async function addNxToMonorepo(options) {
|
|
28
28
|
name: 'targetDefaults',
|
29
29
|
message: 'Which scripts need to be run in order? (e.g. before building a project, dependent projects must be built)',
|
30
30
|
choices: scripts,
|
31
|
+
/**
|
32
|
+
* limit is missing from the interface but it limits the amount of options shown
|
33
|
+
*/
|
34
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
31
35
|
},
|
32
36
|
])).targetDefaults;
|
33
37
|
cacheableOperations = (await (0, enquirer_1.prompt)([
|
@@ -36,6 +40,10 @@ async function addNxToMonorepo(options) {
|
|
36
40
|
name: 'cacheableOperations',
|
37
41
|
message: 'Which scripts are cacheable? (Produce the same output given the same input, e.g. build, test and lint usually are, serve and start are not)',
|
38
42
|
choices: scripts,
|
43
|
+
/**
|
44
|
+
* limit is missing from the interface but it limits the amount of options shown
|
45
|
+
*/
|
46
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
39
47
|
},
|
40
48
|
])).cacheableOperations;
|
41
49
|
for (const scriptName of cacheableOperations) {
|
@@ -51,6 +51,10 @@ async function addNxToNest(options, packageJson) {
|
|
51
51
|
name: 'cacheableOperations',
|
52
52
|
message: 'Which of the following scripts are cacheable? (Produce the same output given the same input, e.g. build, test and lint usually are, serve and start are not)',
|
53
53
|
choices: scripts,
|
54
|
+
/**
|
55
|
+
* limit is missing from the interface but it limits the amount of options shown
|
56
|
+
*/
|
57
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
54
58
|
},
|
55
59
|
])).cacheableOperations;
|
56
60
|
for (const scriptName of cacheableOperations) {
|
@@ -26,6 +26,10 @@ async function addNxToNpmRepo(options) {
|
|
26
26
|
name: 'cacheableOperations',
|
27
27
|
message: 'Which of the following scripts are cacheable? (Produce the same output given the same input, e.g. build, test and lint usually are, serve and start are not). You can use spacebar to select one or more scripts.',
|
28
28
|
choices: scripts,
|
29
|
+
/**
|
30
|
+
* limit is missing from the interface but it limits the amount of options shown
|
31
|
+
*/
|
32
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
29
33
|
},
|
30
34
|
])).cacheableOperations;
|
31
35
|
for (const scriptName of cacheableOperations) {
|
@@ -64,6 +64,10 @@ async function collectCacheableOperations(options) {
|
|
64
64
|
message: 'Which of the following targets are cacheable? (Produce the same output given the same input, e.g. build, test and lint usually are, serve and start are not)',
|
65
65
|
// enquirer mutates the array below, create a new one to avoid it
|
66
66
|
choices: [...workspaceTargets],
|
67
|
+
/**
|
68
|
+
* limit is missing from the interface but it limits the amount of options shown
|
69
|
+
*/
|
70
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
67
71
|
},
|
68
72
|
])).cacheableOperations;
|
69
73
|
}
|
@@ -167,6 +167,10 @@ async function detectPlugins() {
|
|
167
167
|
type: 'multiselect',
|
168
168
|
message: `Which plugins would you like to add? Press <Space> to select and <Enter> to submit.`,
|
169
169
|
choices: plugins.map((p) => ({ name: p, value: p })),
|
170
|
+
/**
|
171
|
+
* limit is missing from the interface but it limits the amount of options shown
|
172
|
+
*/
|
173
|
+
limit: process.stdout.rows - 4, // 4 leaves room for the header above, the prompt and some whitespace
|
170
174
|
},
|
171
175
|
]).then((r) => r.plugins);
|
172
176
|
if (pluginsToInstall?.length === 0)
|
@@ -40,7 +40,13 @@ async function showProjectHandler(args) {
|
|
40
40
|
if (targets.length > 0) {
|
41
41
|
console.log(`${chalk.bold('Targets')}: `);
|
42
42
|
for (const [target, targetConfig] of targets) {
|
43
|
-
|
43
|
+
const executorCommandText = targetConfig.metadata?.scriptContent ??
|
44
|
+
targetConfig?.options?.command ??
|
45
|
+
(targetConfig?.options?.commands?.length === 1
|
46
|
+
? targetConfig.options.commands[0]
|
47
|
+
: targetConfig?.executor) ??
|
48
|
+
'';
|
49
|
+
console.log(`- ${chalk.bold((target + ':').padEnd(maxTargetNameLength + 2))} ${executorCommandText.padEnd(maxExecutorNameLength + 2)} ${(() => {
|
44
50
|
const configurations = Object.keys(targetConfig.configurations ?? {});
|
45
51
|
if (configurations.length) {
|
46
52
|
return chalk.dim(configurations.join(', '));
|
@@ -202,7 +202,15 @@ function withOutputStyleOption(yargs, choices = [
|
|
202
202
|
'stream-without-prefixes',
|
203
203
|
]) {
|
204
204
|
return yargs.option('output-style', {
|
205
|
-
describe:
|
205
|
+
describe: `Defines how Nx emits outputs tasks logs
|
206
|
+
|
207
|
+
| option | description |
|
208
|
+
| --- | --- |
|
209
|
+
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
|
210
|
+
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
|
211
|
+
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
|
212
|
+
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
|
213
|
+
`,
|
206
214
|
type: 'string',
|
207
215
|
choices,
|
208
216
|
});
|