nx 21.0.0-beta.6 → 21.0.0-beta.7
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 +11 -11
- package/src/command-line/init/configure-plugins.js +5 -3
- package/src/command-line/init/implementation/utils.d.ts +2 -1
- package/src/command-line/init/implementation/utils.js +2 -1
- package/src/command-line/init/init-v2.js +8 -7
- package/src/core/graph/main.js +1 -1
- package/src/executors/run-commands/run-commands.impl.d.ts +1 -2
- package/src/executors/run-commands/run-commands.impl.js +1 -1
- package/src/executors/run-commands/running-tasks.d.ts +5 -2
- package/src/executors/run-commands/running-tasks.js +42 -6
- package/src/native/index.d.ts +2 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/life-cycle.d.ts +4 -0
- package/src/tasks-runner/life-cycle.js +14 -0
- package/src/tasks-runner/running-tasks/running-task.d.ts +1 -0
- package/src/tasks-runner/task-orchestrator.js +22 -6
- package/src/tasks-runner/utils.js +2 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.0.0-beta.
|
3
|
+
"version": "21.0.0-beta.7",
|
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": {
|
@@ -83,16 +83,16 @@
|
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"optionalDependencies": {
|
86
|
-
"@nx/nx-darwin-arm64": "21.0.0-beta.
|
87
|
-
"@nx/nx-darwin-x64": "21.0.0-beta.
|
88
|
-
"@nx/nx-freebsd-x64": "21.0.0-beta.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.0.0-beta.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.0.0-beta.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.0.0-beta.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.0.0-beta.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.0.0-beta.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.0.0-beta.
|
86
|
+
"@nx/nx-darwin-arm64": "21.0.0-beta.7",
|
87
|
+
"@nx/nx-darwin-x64": "21.0.0-beta.7",
|
88
|
+
"@nx/nx-freebsd-x64": "21.0.0-beta.7",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.7",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.0.0-beta.7",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.0.0-beta.7",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.0.0-beta.7",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.0.0-beta.7",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.0.0-beta.7",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.0.0-beta.7"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
@@ -65,9 +65,11 @@ async function runPluginInitGenerator(plugin, repoRoot = workspace_root_1.worksp
|
|
65
65
|
}
|
66
66
|
catch {
|
67
67
|
// init generator does not exist, so this function should noop
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
69
|
+
output_1.output.log({
|
70
|
+
title: `No "init" generator found in ${plugin}. Skipping initialization.`,
|
71
|
+
});
|
72
|
+
}
|
71
73
|
return;
|
72
74
|
}
|
73
75
|
}
|
@@ -12,8 +12,9 @@ export declare function initCloud(installationSource: 'nx-init' | 'nx-init-angul
|
|
12
12
|
export declare function addVsCodeRecommendedExtensions(repoRoot: string, extensions: string[]): void;
|
13
13
|
export declare function markRootPackageJsonAsNxProjectLegacy(repoRoot: string, cacheableScripts: string[], pmc: PackageManagerCommands): void;
|
14
14
|
export declare function markPackageJsonAsNxProject(packageJsonPath: string): void;
|
15
|
-
export declare function printFinalMessage({ learnMoreLink, }: {
|
15
|
+
export declare function printFinalMessage({ learnMoreLink, appendLines, }: {
|
16
16
|
learnMoreLink?: string;
|
17
|
+
appendLines?: string[];
|
17
18
|
}): void;
|
18
19
|
export declare function isMonorepo(packageJson: PackageJson): boolean;
|
19
20
|
export declare function isCRA(packageJson: PackageJson): boolean;
|
@@ -248,7 +248,7 @@ function markPackageJsonAsNxProject(packageJsonPath) {
|
|
248
248
|
json.nx = {};
|
249
249
|
(0, fileutils_1.writeJsonFile)(packageJsonPath, json);
|
250
250
|
}
|
251
|
-
function printFinalMessage({ learnMoreLink, }) {
|
251
|
+
function printFinalMessage({ learnMoreLink, appendLines, }) {
|
252
252
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
253
253
|
output_1.output.success({
|
254
254
|
title: '🎉 Done!',
|
@@ -256,6 +256,7 @@ function printFinalMessage({ learnMoreLink, }) {
|
|
256
256
|
`- Run "${(0, child_process_2.getRunNxBaseCommand)(pmc)} run-many -t build" to run the build target for every project in the workspace. Run it again to replay the cached computation. https://nx.dev/features/cache-task-results`,
|
257
257
|
`- Run "${(0, child_process_2.getRunNxBaseCommand)(pmc)} graph" to see the graph of projects and tasks in your workspace. https://nx.dev/core-features/explore-graph`,
|
258
258
|
learnMoreLink ? `- Learn more at ${learnMoreLink}.` : undefined,
|
259
|
+
...(appendLines ?? []),
|
259
260
|
].filter(Boolean),
|
260
261
|
});
|
261
262
|
}
|
@@ -45,11 +45,6 @@ async function initHandler(options) {
|
|
45
45
|
const _isTurborepo = (0, fs_1.existsSync)('turbo.json');
|
46
46
|
const _isMonorepo = _isNonJs ? false : (0, utils_1.isMonorepo)(packageJson);
|
47
47
|
const _isCRA = _isNonJs ? false : (0, utils_1.isCRA)(packageJson);
|
48
|
-
const learnMoreLink = _isTurborepo
|
49
|
-
? 'https://nx.dev/recipes/adopting-nx/from-turborepo'
|
50
|
-
: _isMonorepo
|
51
|
-
? 'https://nx.dev/getting-started/tutorials/npm-workspaces-tutorial'
|
52
|
-
: 'https://nx.dev/recipes/adopting-nx/adding-to-existing-project';
|
53
48
|
/**
|
54
49
|
* Turborepo users must have set up individual scripts already, and we keep the transition as minimal as possible.
|
55
50
|
* We log a message during the conversion process in addNxToTurborepo about how they can learn more about the power
|
@@ -61,7 +56,7 @@ async function initHandler(options) {
|
|
61
56
|
interactive: options.interactive,
|
62
57
|
});
|
63
58
|
(0, utils_1.printFinalMessage)({
|
64
|
-
learnMoreLink,
|
59
|
+
learnMoreLink: 'https://nx.dev/recipes/adopting-nx/from-turborepo',
|
65
60
|
});
|
66
61
|
return;
|
67
62
|
}
|
@@ -118,7 +113,13 @@ async function initHandler(options) {
|
|
118
113
|
await (0, utils_1.initCloud)('nx-init');
|
119
114
|
}
|
120
115
|
(0, utils_1.printFinalMessage)({
|
121
|
-
|
116
|
+
appendLines: _isMonorepo
|
117
|
+
? [
|
118
|
+
`- Learn how Nx helps manage your TypeScript monorepo at https://nx.dev/features/maintain-ts-monorepos.`,
|
119
|
+
]
|
120
|
+
: [
|
121
|
+
`- Learn how Nx works with any type of project at https://nx.dev/recipes/adopting-nx/adding-to-existing-project.`,
|
122
|
+
],
|
122
123
|
});
|
123
124
|
}
|
124
125
|
const npmPackageToPluginMap = {
|