nx 20.1.0-canary.20241023-12cbfc3 → 20.1.0-canary.20241025-1218502
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/add/add.js +9 -2
- package/src/command-line/graph/graph.js +5 -8
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/native/index.d.ts +4 -4
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/cache.d.ts +1 -0
- package/src/tasks-runner/cache.js +1 -0
- package/src/utils/db-connection.d.ts +1 -1
- package/src/migrations/update-15-0-0/migrate-to-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +0 -102
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.d.ts +0 -2
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +0 -21
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.1.0-canary.
|
3
|
+
"version": "20.1.0-canary.20241025-1218502",
|
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": {
|
@@ -80,16 +80,16 @@
|
|
80
80
|
}
|
81
81
|
},
|
82
82
|
"optionalDependencies": {
|
83
|
-
"@nx/nx-darwin-x64": "20.1.0-canary.
|
84
|
-
"@nx/nx-darwin-arm64": "20.1.0-canary.
|
85
|
-
"@nx/nx-linux-x64-gnu": "20.1.0-canary.
|
86
|
-
"@nx/nx-linux-x64-musl": "20.1.0-canary.
|
87
|
-
"@nx/nx-win32-x64-msvc": "20.1.0-canary.
|
88
|
-
"@nx/nx-linux-arm64-gnu": "20.1.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-musl": "20.1.0-canary.
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "20.1.0-canary.
|
91
|
-
"@nx/nx-win32-arm64-msvc": "20.1.0-canary.
|
92
|
-
"@nx/nx-freebsd-x64": "20.1.0-canary.
|
83
|
+
"@nx/nx-darwin-x64": "20.1.0-canary.20241025-1218502",
|
84
|
+
"@nx/nx-darwin-arm64": "20.1.0-canary.20241025-1218502",
|
85
|
+
"@nx/nx-linux-x64-gnu": "20.1.0-canary.20241025-1218502",
|
86
|
+
"@nx/nx-linux-x64-musl": "20.1.0-canary.20241025-1218502",
|
87
|
+
"@nx/nx-win32-x64-msvc": "20.1.0-canary.20241025-1218502",
|
88
|
+
"@nx/nx-linux-arm64-gnu": "20.1.0-canary.20241025-1218502",
|
89
|
+
"@nx/nx-linux-arm64-musl": "20.1.0-canary.20241025-1218502",
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "20.1.0-canary.20241025-1218502",
|
91
|
+
"@nx/nx-win32-arm64-msvc": "20.1.0-canary.20241025-1218502",
|
92
|
+
"@nx/nx-freebsd-x64": "20.1.0-canary.20241025-1218502"
|
93
93
|
},
|
94
94
|
"nx-migrations": {
|
95
95
|
"migrations": "./migrations.json",
|
@@ -17,6 +17,7 @@ const plugins_1 = require("../../utils/plugins");
|
|
17
17
|
const versions_1 = require("../../utils/versions");
|
18
18
|
const workspace_root_1 = require("../../utils/workspace-root");
|
19
19
|
const add_nx_scripts_1 = require("../init/implementation/dot-nx/add-nx-scripts");
|
20
|
+
const semver_1 = require("semver");
|
20
21
|
function addHandler(options) {
|
21
22
|
return (0, handle_errors_1.handleErrors)(options.verbose, async () => {
|
22
23
|
output_1.output.addNewline();
|
@@ -33,8 +34,14 @@ async function installPackage(pkgName, version, nxJson) {
|
|
33
34
|
const spinner = ora(`Installing ${pkgName}@${version}...`);
|
34
35
|
spinner.start();
|
35
36
|
if ((0, fs_1.existsSync)('package.json')) {
|
36
|
-
const
|
37
|
-
|
37
|
+
const pm = (0, package_manager_1.detectPackageManager)();
|
38
|
+
const pmv = (0, package_manager_1.getPackageManagerVersion)(pm);
|
39
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)(pm);
|
40
|
+
// if we explicitly specify latest in yarn berry, it won't resolve the version
|
41
|
+
const command = pm === 'yarn' && (0, semver_1.gte)(pmv, '2.0.0') && version === 'latest'
|
42
|
+
? `${pmc.addDev} ${pkgName}`
|
43
|
+
: `${pmc.addDev} ${pkgName}@${version}`;
|
44
|
+
await new Promise((resolve) => (0, child_process_1.exec)(command, {
|
38
45
|
windowsHide: false,
|
39
46
|
}, (error, stdout) => {
|
40
47
|
if (error) {
|
@@ -579,7 +579,7 @@ async function createTaskGraphClientResponse(pruneExternal = false) {
|
|
579
579
|
}
|
580
580
|
const nxJson = (0, configuration_1.readNxJson)();
|
581
581
|
perf_hooks_1.performance.mark('task graph generation:start');
|
582
|
-
const taskGraphs = getAllTaskGraphsForWorkspace(
|
582
|
+
const taskGraphs = getAllTaskGraphsForWorkspace(graph);
|
583
583
|
perf_hooks_1.performance.mark('task graph generation:end');
|
584
584
|
const planner = new native_1.HashPlanner(nxJson, (0, native_1.transferProjectGraph)((0, transform_objects_1.transformProjectGraphForRust)(graph)));
|
585
585
|
perf_hooks_1.performance.mark('task hash plan generation:start');
|
@@ -613,8 +613,7 @@ async function createExpandedTaskInputResponse(taskGraphClientResponse, depGraph
|
|
613
613
|
perf_hooks_1.performance.measure('task input static generation', 'task input static generation:start', 'task input static generation:end');
|
614
614
|
return response;
|
615
615
|
}
|
616
|
-
function getAllTaskGraphsForWorkspace(
|
617
|
-
const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
|
616
|
+
function getAllTaskGraphsForWorkspace(projectGraph) {
|
618
617
|
const taskGraphs = {};
|
619
618
|
const taskGraphErrors = {};
|
620
619
|
// TODO(cammisuli): improve performance here. Cache results or something.
|
@@ -624,7 +623,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
|
|
624
623
|
targets.forEach((target) => {
|
625
624
|
const taskId = createTaskId(projectName, target);
|
626
625
|
try {
|
627
|
-
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph,
|
626
|
+
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], undefined, {});
|
628
627
|
}
|
629
628
|
catch (err) {
|
630
629
|
taskGraphs[taskId] = {
|
@@ -639,7 +638,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
|
|
639
638
|
configurations.forEach((configuration) => {
|
640
639
|
const taskId = createTaskId(projectName, target, configuration);
|
641
640
|
try {
|
642
|
-
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph,
|
641
|
+
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], configuration, {});
|
643
642
|
}
|
644
643
|
catch (err) {
|
645
644
|
taskGraphs[taskId] = {
|
@@ -771,9 +770,7 @@ async function createJsonOutput(prunedGraph, rawGraph, projects, targets) {
|
|
771
770
|
graph: prunedGraph,
|
772
771
|
};
|
773
772
|
if (targets?.length) {
|
774
|
-
const
|
775
|
-
const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
|
776
|
-
const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, defaultDependencyConfigs, projects, targets, undefined, {});
|
773
|
+
const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, {}, projects, targets, undefined, {});
|
777
774
|
const hasher = (0, create_task_hasher_1.createTaskHasher)(rawGraph, (0, configuration_1.readNxJson)());
|
778
775
|
let tasks = Object.values(taskGraph.tasks);
|
779
776
|
const hashes = await hasher.hashTasks(tasks, taskGraph);
|