nx 24.0.6 → 24.1.0-beta.0
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/dist/src/adapter/ngcli-adapter.js +7 -20
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -1
- package/dist/src/command-line/generate/generate.js +12 -23
- package/dist/src/command-line/graph/graph.js +1 -7
- package/dist/src/command-line/import/utils/prepare-source-repo.js +0 -3
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +2 -2
- package/dist/src/command-line/init/init-v2.js +2 -2
- package/dist/src/command-line/migrate/migrate.js +1 -4
- package/dist/src/command-line/migrate/prompt-files.js +5 -5
- package/dist/src/command-line/migrate/run/orchestrator.js +2 -3
- package/dist/src/command-line/migrate/run/worker.js +7 -5
- package/dist/src/command-line/migrate/run-migration-process.js +3 -2
- package/dist/src/command-line/release/changelog.js +8 -39
- package/dist/src/command-line/release/config/use-legacy-versioning.js +1 -1
- package/dist/src/command-line/release/utils/diff.js +0 -14
- package/dist/src/command-line/release/utils/git.js +1 -1
- package/dist/src/command-line/run/executor-utils.js +1 -1
- package/dist/src/command-line/show/show-target/utils.js +1 -1
- package/dist/src/command-line/watch/watch.js +1 -1
- package/dist/src/commands-runner/get-command-projects.js +0 -3
- package/dist/src/config/misc-interfaces.d.ts +0 -1
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/styles.css +1 -1
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/devkit-internals.js +1 -1
- package/dist/src/hasher/hash-task.js +4 -4
- package/dist/src/hasher/task-hasher.js +2 -2
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/nx-cloud/utilities/environment.js +0 -17
- package/dist/src/plugins/js/lock-file/bun-parser.js +0 -2
- package/dist/src/plugins/js/lock-file/npm-parser.js +1 -2
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +1 -1
- package/dist/src/plugins/js/utils/register.js +1 -1
- package/dist/src/project-graph/affected/affected-tasks.js +1 -1
- package/dist/src/tasks-runner/run-command.js +6 -7
- package/dist/src/tasks-runner/task-orchestrator.js +1 -1
- package/dist/src/tasks-runner/utils.js +1 -12
- package/dist/src/ultracache/overrides.js +1 -1
- package/dist/src/utils/code-frames.js +0 -1
- package/dist/src/utils/db-connection.js +6 -4
- package/dist/src/utils/min-release-age/behavior/pnpm.js +9 -9
- package/dist/src/utils/min-release-age/behavior/yarn.js +2 -2
- package/dist/src/utils/plugins/output.js +0 -2
- package/package.json +12 -12
|
@@ -371,7 +371,7 @@ class TaskOrchestrator {
|
|
|
371
371
|
// Use a separate groupId space (parallel..parallel+N) so continuous tasks
|
|
372
372
|
// don't consume discrete group slots
|
|
373
373
|
const groupId = this.options.parallel + this.continuousTasksStarted++;
|
|
374
|
-
|
|
374
|
+
await this.startContinuousTask(task, groupId);
|
|
375
375
|
if (this.initializingTaskIds.has(task.id)) {
|
|
376
376
|
await this.continuousTaskExitHandled.get(task.id);
|
|
377
377
|
}
|
|
@@ -147,17 +147,6 @@ function normalizeTargetDependencyWithStringProjects(dependencyConfig) {
|
|
|
147
147
|
}
|
|
148
148
|
return dependencyConfig;
|
|
149
149
|
}
|
|
150
|
-
class InvalidOutputsError extends Error {
|
|
151
|
-
constructor(outputs, invalidOutputs) {
|
|
152
|
-
super(InvalidOutputsError.createMessage(invalidOutputs));
|
|
153
|
-
this.outputs = outputs;
|
|
154
|
-
this.invalidOutputs = invalidOutputs;
|
|
155
|
-
}
|
|
156
|
-
static createMessage(invalidOutputs) {
|
|
157
|
-
const invalidOutputsList = '\n - ' + Array.from(invalidOutputs).join('\n - ');
|
|
158
|
-
return `The following outputs are invalid:${invalidOutputsList}\nPlease run "nx repair" to repair your configuration`;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
150
|
function assertOutputsAreValidType(outputs) {
|
|
162
151
|
if (!Array.isArray(outputs)) {
|
|
163
152
|
throw new Error("The 'outputs' field must be an array");
|
|
@@ -379,7 +368,7 @@ function getExecutorForTask(task, projects) {
|
|
|
379
368
|
const [nodeModule, executorName] = (0, executor_utils_1.parseExecutor)(executor);
|
|
380
369
|
return (0, executor_utils_1.getExecutorInformation)(nodeModule, executorName, workspace_root_1.workspaceRoot, projects);
|
|
381
370
|
}
|
|
382
|
-
// TODO(v25): remove custom hasher support.
|
|
371
|
+
// TODO(v25): remove custom hasher support (NXC-5052).
|
|
383
372
|
function getCustomHasher(task, projects) {
|
|
384
373
|
const factory = getExecutorForTask(task, projects).hasherFactory;
|
|
385
374
|
if (!factory) {
|
|
@@ -19,7 +19,7 @@ function customHasherTaskIds(projectGraph, taskGraph) {
|
|
|
19
19
|
return memoized;
|
|
20
20
|
}
|
|
21
21
|
const projects = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph).projects;
|
|
22
|
-
// TODO(v25): remove custom hasher support.
|
|
22
|
+
// TODO(v25): remove custom hasher support (NXC-5052).
|
|
23
23
|
const ids = Object.values(taskGraph.tasks)
|
|
24
24
|
.filter((task) => {
|
|
25
25
|
try {
|
|
@@ -24,8 +24,9 @@ function sharedWorkspaceDataDirectory(root) {
|
|
|
24
24
|
}
|
|
25
25
|
function getDbConnection(opts = {}) {
|
|
26
26
|
opts.directory ??= sharedWorkspaceDataDirectory(workspace_root_1.workspaceRoot);
|
|
27
|
-
const
|
|
28
|
-
const
|
|
27
|
+
const dbName = opts.dbName ?? (process.env.NX_DB_NAME || undefined);
|
|
28
|
+
const key = JSON.stringify([opts.directory, dbName]);
|
|
29
|
+
const connection = getEntryOrSet(dbConnectionMap, key, () => (0, native_1.connectToNxDb)(opts.directory, dbName));
|
|
29
30
|
return connection;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
@@ -36,8 +37,9 @@ function getDbConnection(opts = {}) {
|
|
|
36
37
|
*/
|
|
37
38
|
function getLocalDbConnection(opts = {}) {
|
|
38
39
|
const directory = (0, cache_directory_1.workspaceDataDirectoryForWorkspace)(workspace_root_1.workspaceRoot);
|
|
39
|
-
const
|
|
40
|
-
const
|
|
40
|
+
const dbName = opts.dbName ?? (process.env.NX_DB_NAME || undefined);
|
|
41
|
+
const key = JSON.stringify([directory, dbName]);
|
|
42
|
+
const connection = getEntryOrSet(dbConnectionMap, key, () => (0, native_1.connectToNxDb)(directory, dbName));
|
|
41
43
|
return connection;
|
|
42
44
|
}
|
|
43
45
|
function removeDbConnections() {
|
|
@@ -343,7 +343,7 @@ function pickPnpmVersion(spec, metadata, policy) {
|
|
|
343
343
|
}
|
|
344
344
|
const wholeMapMissing = metadata.time === null;
|
|
345
345
|
if (wholeMapMissing && behavior.missingTimeMap === 'error') {
|
|
346
|
-
throw missingTime(metadata
|
|
346
|
+
throw missingTime(metadata);
|
|
347
347
|
}
|
|
348
348
|
const type = (0, pick_1.classifySpec)(spec);
|
|
349
349
|
if (type === 'exact') {
|
|
@@ -356,7 +356,7 @@ function pickPnpmVersion(spec, metadata, policy) {
|
|
|
356
356
|
}
|
|
357
357
|
function pickExact(spec, metadata, policy, behavior) {
|
|
358
358
|
const unconstrained = spec;
|
|
359
|
-
if (mature(metadata, policy, spec
|
|
359
|
+
if (mature(metadata, policy, spec)) {
|
|
360
360
|
return { version: spec, unconstrained };
|
|
361
361
|
}
|
|
362
362
|
if (behavior.looseFallback) {
|
|
@@ -371,10 +371,10 @@ function pickTag(spec, metadata, policy, behavior) {
|
|
|
371
371
|
throw violation(metadata, policy, spec, 'tag', []);
|
|
372
372
|
}
|
|
373
373
|
const unconstrained = tagTarget;
|
|
374
|
-
if (mature(metadata, policy, tagTarget
|
|
374
|
+
if (mature(metadata, policy, tagTarget)) {
|
|
375
375
|
return { version: tagTarget, unconstrained };
|
|
376
376
|
}
|
|
377
|
-
const degraded = (0, pick_1.degradeTagToCompliant)(tagTarget, metadata, (v) => mature(metadata, policy, v
|
|
377
|
+
const degraded = (0, pick_1.degradeTagToCompliant)(tagTarget, metadata, (v) => mature(metadata, policy, v));
|
|
378
378
|
if (degraded) {
|
|
379
379
|
return { version: degraded, unconstrained };
|
|
380
380
|
}
|
|
@@ -389,7 +389,7 @@ function pickTag(spec, metadata, policy, behavior) {
|
|
|
389
389
|
throw violation(metadata, policy, spec, 'tag', [tagTarget]);
|
|
390
390
|
}
|
|
391
391
|
function pickRange(spec, metadata, policy, behavior, unconstrained) {
|
|
392
|
-
const matureInRange = matureVersions(metadata, policy
|
|
392
|
+
const matureInRange = matureVersions(metadata, policy);
|
|
393
393
|
const newest = (0, semver_1.maxSatisfying)(matureInRange, spec, {
|
|
394
394
|
includePrerelease: false,
|
|
395
395
|
});
|
|
@@ -414,12 +414,12 @@ function pickRange(spec, metadata, policy, behavior, unconstrained) {
|
|
|
414
414
|
.sort(semver_1.rcompare);
|
|
415
415
|
throw violation(metadata, policy, spec, 'range', blocked);
|
|
416
416
|
}
|
|
417
|
-
function matureVersions(metadata, policy
|
|
418
|
-
return metadata.versions.filter((v) => mature(metadata, policy, v
|
|
417
|
+
function matureVersions(metadata, policy) {
|
|
418
|
+
return metadata.versions.filter((v) => mature(metadata, policy, v));
|
|
419
419
|
}
|
|
420
420
|
// pnpm blocks a version whose individual time entry is missing (treated too
|
|
421
421
|
// new). The whole-map-missing skip case is handled before any pick.
|
|
422
|
-
function mature(metadata, policy, version
|
|
422
|
+
function mature(metadata, policy, version) {
|
|
423
423
|
if (policy.isExcluded(metadata.name, version)) {
|
|
424
424
|
return true;
|
|
425
425
|
}
|
|
@@ -502,7 +502,7 @@ function failOnImmatureDetail(metadata, policy, spec, type, blockedVersions) {
|
|
|
502
502
|
return ('1 version does not meet the minimumReleaseAge constraint:\n' +
|
|
503
503
|
` ${metadata.name}@${resolved} was published at ${publishedIso}, within the minimumReleaseAge cutoff (${cutoffIso})`);
|
|
504
504
|
}
|
|
505
|
-
function missingTime(metadata
|
|
505
|
+
function missingTime(metadata) {
|
|
506
506
|
return new errors_1.MinReleaseAgeViolationError({
|
|
507
507
|
packageManager: 'pnpm',
|
|
508
508
|
packageName: metadata.name,
|
|
@@ -47,7 +47,7 @@ async function readYarnPolicy(root, pmVersion) {
|
|
|
47
47
|
if (gateMinutes <= 0) {
|
|
48
48
|
return { outcome: 'inactive' };
|
|
49
49
|
}
|
|
50
|
-
if (isDefaultLockfileMigrationEscape(root, pmVersion, gateMinutes
|
|
50
|
+
if (isDefaultLockfileMigrationEscape(root, pmVersion, gateMinutes)) {
|
|
51
51
|
return { outcome: 'inactive' };
|
|
52
52
|
}
|
|
53
53
|
const windowMs = gateMinutes * constants_1.MS_PER_MINUTE;
|
|
@@ -101,7 +101,7 @@ function readPreapprovedPackages(root) {
|
|
|
101
101
|
* and that has not explicitly set the gate. A missing lockfile means a fresh
|
|
102
102
|
* project, where the default does apply.
|
|
103
103
|
*/
|
|
104
|
-
function isDefaultLockfileMigrationEscape(root, pmVersion, gateMinutes
|
|
104
|
+
function isDefaultLockfileMigrationEscape(root, pmVersion, gateMinutes) {
|
|
105
105
|
if ((0, semver_1.lt)(pmVersion, '4.15.0')) {
|
|
106
106
|
return false;
|
|
107
107
|
}
|
|
@@ -14,9 +14,7 @@ const package_manager_1 = require("../package-manager");
|
|
|
14
14
|
const workspace_root_1 = require("../workspace-root");
|
|
15
15
|
const core_plugins_1 = require("./core-plugins");
|
|
16
16
|
const plugin_capabilities_1 = require("./plugin-capabilities");
|
|
17
|
-
const package_json_1 = require("../package-json");
|
|
18
17
|
function listPlugins(plugins, title) {
|
|
19
|
-
package_json_1.readModulePackageJson;
|
|
20
18
|
const bodyLines = [];
|
|
21
19
|
for (const [, p] of plugins) {
|
|
22
20
|
const capabilities = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.1.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@emnapi/core": "1.4.5",
|
|
54
54
|
"@emnapi/runtime": "1.4.5",
|
|
55
55
|
"@emnapi/wasi-threads": "1.0.4",
|
|
56
|
-
"@jest/diff-sequences": "30.0
|
|
56
|
+
"@jest/diff-sequences": "30.3.0",
|
|
57
57
|
"@napi-rs/wasm-runtime": "0.2.4",
|
|
58
58
|
"@tybys/wasm-util": "0.9.0",
|
|
59
59
|
"@yarnpkg/lockfile": "1.1.0",
|
|
@@ -150,16 +150,16 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"optionalDependencies": {
|
|
153
|
-
"@nx/nx-darwin-arm64": "24.0.
|
|
154
|
-
"@nx/nx-darwin-x64": "24.0.
|
|
155
|
-
"@nx/nx-freebsd-x64": "24.0.
|
|
156
|
-
"@nx/nx-linux-arm-gnueabihf": "24.0.
|
|
157
|
-
"@nx/nx-linux-arm64-gnu": "24.0.
|
|
158
|
-
"@nx/nx-linux-arm64-musl": "24.0.
|
|
159
|
-
"@nx/nx-linux-x64-gnu": "24.0.
|
|
160
|
-
"@nx/nx-linux-x64-musl": "24.0.
|
|
161
|
-
"@nx/nx-win32-arm64-msvc": "24.0.
|
|
162
|
-
"@nx/nx-win32-x64-msvc": "24.0.
|
|
153
|
+
"@nx/nx-darwin-arm64": "24.1.0-beta.0",
|
|
154
|
+
"@nx/nx-darwin-x64": "24.1.0-beta.0",
|
|
155
|
+
"@nx/nx-freebsd-x64": "24.1.0-beta.0",
|
|
156
|
+
"@nx/nx-linux-arm-gnueabihf": "24.1.0-beta.0",
|
|
157
|
+
"@nx/nx-linux-arm64-gnu": "24.1.0-beta.0",
|
|
158
|
+
"@nx/nx-linux-arm64-musl": "24.1.0-beta.0",
|
|
159
|
+
"@nx/nx-linux-x64-gnu": "24.1.0-beta.0",
|
|
160
|
+
"@nx/nx-linux-x64-musl": "24.1.0-beta.0",
|
|
161
|
+
"@nx/nx-win32-arm64-msvc": "24.1.0-beta.0",
|
|
162
|
+
"@nx/nx-win32-x64-msvc": "24.1.0-beta.0"
|
|
163
163
|
},
|
|
164
164
|
"nx-migrations": {
|
|
165
165
|
"migrations": "./migrations.json",
|