nx 18.1.0-canary.20240215-d5e1451 → 18.1.0-canary.20240217-5b6d1b4
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
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "18.1.0-canary.
|
3
|
+
"version": "18.1.0-canary.20240217-5b6d1b4",
|
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": {
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"yargs-parser": "21.1.1",
|
67
67
|
"node-machine-id": "1.1.12",
|
68
68
|
"ora": "5.3.0",
|
69
|
-
"@nrwl/tao": "18.1.0-canary.
|
69
|
+
"@nrwl/tao": "18.1.0-canary.20240217-5b6d1b4"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
72
|
"@swc-node/register": "^1.8.0",
|
@@ -81,16 +81,16 @@
|
|
81
81
|
}
|
82
82
|
},
|
83
83
|
"optionalDependencies": {
|
84
|
-
"@nx/nx-darwin-x64": "18.1.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "18.1.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.1.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.1.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.1.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.1.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.1.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.1.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.1.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "18.1.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "18.1.0-canary.20240217-5b6d1b4",
|
85
|
+
"@nx/nx-darwin-arm64": "18.1.0-canary.20240217-5b6d1b4",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.1.0-canary.20240217-5b6d1b4",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.1.0-canary.20240217-5b6d1b4",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.1.0-canary.20240217-5b6d1b4",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.1.0-canary.20240217-5b6d1b4",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.1.0-canary.20240217-5b6d1b4",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.1.0-canary.20240217-5b6d1b4",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.1.0-canary.20240217-5b6d1b4",
|
93
|
+
"@nx/nx-freebsd-x64": "18.1.0-canary.20240217-5b6d1b4"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -108,11 +108,11 @@ function runMigration() {
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
function nxCliPath() {
|
111
|
+
const version = process.env.NX_MIGRATE_CLI_VERSION || 'latest';
|
111
112
|
try {
|
112
113
|
const packageManager = (0, package_manager_1.getPackageManagerCommand)();
|
113
114
|
const { dirSync } = require('tmp');
|
114
115
|
const tmpDir = dirSync().name;
|
115
|
-
const version = process.env.NX_MIGRATE_USE_NEXT === 'true' ? 'next' : 'latest';
|
116
116
|
(0, fileutils_1.writeJsonFile)(path.join(tmpDir, 'package.json'), {
|
117
117
|
dependencies: {
|
118
118
|
nx: version,
|
@@ -129,7 +129,7 @@ function nxCliPath() {
|
|
129
129
|
return path.join(tmpDir, `node_modules`, '.bin', 'nx');
|
130
130
|
}
|
131
131
|
catch (e) {
|
132
|
-
console.error(
|
132
|
+
console.error(`Failed to install the ${version} version of the migration script. Using the current version.`);
|
133
133
|
if (process.env.NX_VERBOSE_LOGGING) {
|
134
134
|
console.error(e);
|
135
135
|
}
|
@@ -430,13 +430,15 @@ async function parseTargetPackageAndVersion(args) {
|
|
430
430
|
else {
|
431
431
|
if (args === 'latest' ||
|
432
432
|
args === 'next' ||
|
433
|
+
args === 'canary' ||
|
433
434
|
(0, semver_1.valid)(args) ||
|
434
435
|
args.match(/^\d+(?:\.\d+)?(?:\.\d+)?$/)) {
|
435
436
|
// Passing `nx` here may seem wrong, but nx and @nrwl/workspace are synced in version.
|
436
437
|
// We could duplicate the ternary below, but its not necessary since they are equivalent
|
437
438
|
// on the registry
|
438
439
|
const targetVersion = await normalizeVersionWithTagCheck('nx', args);
|
439
|
-
const targetPackage = !['latest', 'next'].includes(args) &&
|
440
|
+
const targetPackage = !['latest', 'next', 'canary'].includes(args) &&
|
441
|
+
(0, semver_1.lt)(targetVersion, '14.0.0-beta.0')
|
440
442
|
? '@nrwl/workspace'
|
441
443
|
: 'nx';
|
442
444
|
return {
|
@@ -717,7 +719,7 @@ async function updateInstallationDetails(root, updatedPackages) {
|
|
717
719
|
}
|
718
720
|
async function isMigratingToNewMajor(from, to) {
|
719
721
|
from = normalizeVersion(from);
|
720
|
-
to = ['latest', 'next'].includes(to) ? to : normalizeVersion(to);
|
722
|
+
to = ['latest', 'next', 'canary'].includes(to) ? to : normalizeVersion(to);
|
721
723
|
if (!(0, semver_1.valid)(from)) {
|
722
724
|
from = await (0, package_manager_1.resolvePackageVersionUsingRegistry)('nx', from);
|
723
725
|
}
|
package/src/utils/params.d.ts
CHANGED
@@ -29,7 +29,7 @@ type PropertyDescription = {
|
|
29
29
|
} | {
|
30
30
|
$source: 'workingDirectory';
|
31
31
|
};
|
32
|
-
additionalProperties?: boolean;
|
32
|
+
additionalProperties?: boolean | PropertyDescription;
|
33
33
|
const?: any;
|
34
34
|
'x-prompt'?: string | {
|
35
35
|
message: string;
|
@@ -62,7 +62,7 @@ export type Schema = {
|
|
62
62
|
oneOf?: Partial<Schema>[];
|
63
63
|
description?: string;
|
64
64
|
definitions?: Properties;
|
65
|
-
additionalProperties?: boolean;
|
65
|
+
additionalProperties?: boolean | PropertyDescription;
|
66
66
|
examples?: {
|
67
67
|
command: string;
|
68
68
|
description?: string;
|
package/src/utils/params.js
CHANGED
@@ -188,7 +188,8 @@ function validateObject(opts, schema, definitions) {
|
|
188
188
|
throw new SchemaError(`Required property '${p}' is missing`);
|
189
189
|
}
|
190
190
|
});
|
191
|
-
if (schema.additionalProperties
|
191
|
+
if (schema.additionalProperties !== undefined &&
|
192
|
+
schema.additionalProperties !== true) {
|
192
193
|
Object.keys(opts).find((p) => {
|
193
194
|
if (Object.keys(schema.properties).indexOf(p) === -1 &&
|
194
195
|
(!schema.patternProperties ||
|
@@ -196,9 +197,12 @@ function validateObject(opts, schema, definitions) {
|
|
196
197
|
if (p === '_') {
|
197
198
|
throw new SchemaError(`Schema does not support positional arguments. Argument '${opts[p]}' found`);
|
198
199
|
}
|
199
|
-
else {
|
200
|
+
else if (schema.additionalProperties === false) {
|
200
201
|
throw new SchemaError(`'${p}' is not found in schema`);
|
201
202
|
}
|
203
|
+
else if (typeof schema.additionalProperties === 'object') {
|
204
|
+
validateProperty(p, opts[p], schema.additionalProperties, definitions);
|
205
|
+
}
|
202
206
|
}
|
203
207
|
});
|
204
208
|
}
|
@@ -408,7 +412,7 @@ function resolveDefinition(ref, definitions) {
|
|
408
412
|
return definitions[definition];
|
409
413
|
}
|
410
414
|
function applyVerbosity(options, schema, isVerbose) {
|
411
|
-
if ((schema.additionalProperties || 'verbose' in schema.properties) &&
|
415
|
+
if ((schema.additionalProperties === true || 'verbose' in schema.properties) &&
|
412
416
|
isVerbose) {
|
413
417
|
options['verbose'] = true;
|
414
418
|
}
|