nx 21.3.0-canary.20250715-cf994df → 21.3.0-canary.20250717-8b4b3e9
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": "21.3.0-canary.
|
3
|
+
"version": "21.3.0-canary.20250717-8b4b3e9",
|
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.3.0-canary.
|
87
|
-
"@nx/nx-darwin-x64": "21.3.0-canary.
|
88
|
-
"@nx/nx-freebsd-x64": "21.3.0-canary.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.3.0-canary.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.3.0-canary.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.3.0-canary.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.3.0-canary.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.3.0-canary.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.3.0-canary.
|
86
|
+
"@nx/nx-darwin-arm64": "21.3.0-canary.20250717-8b4b3e9",
|
87
|
+
"@nx/nx-darwin-x64": "21.3.0-canary.20250717-8b4b3e9",
|
88
|
+
"@nx/nx-freebsd-x64": "21.3.0-canary.20250717-8b4b3e9",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.20250717-8b4b3e9",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.3.0-canary.20250717-8b4b3e9",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.3.0-canary.20250717-8b4b3e9",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.3.0-canary.20250717-8b4b3e9",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.3.0-canary.20250717-8b4b3e9",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.3.0-canary.20250717-8b4b3e9",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.3.0-canary.20250717-8b4b3e9"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
@@ -121,19 +121,26 @@ function normalizeOptions(options) {
|
|
121
121
|
return options;
|
122
122
|
}
|
123
123
|
function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
|
124
|
+
if (command.indexOf('{args.') > -1 && command.indexOf('{args}') > -1) {
|
125
|
+
throw new Error('Command should not contain both {args} and {args.*} values. Please choose one to use.');
|
126
|
+
}
|
124
127
|
if (command.indexOf('{args.') > -1) {
|
125
128
|
const regex = /{args\.([^}]+)}/g;
|
126
129
|
return command.replace(regex, (_, group) => opts.parsedArgs[group] !== undefined ? opts.parsedArgs[group] : '');
|
127
130
|
}
|
131
|
+
else if (command.indexOf('{args}') > -1) {
|
132
|
+
const regex = /{args}/g;
|
133
|
+
const args = [
|
134
|
+
...unknownOptionsToArgsArray(opts),
|
135
|
+
...unparsedOptionsToArgsArray(opts),
|
136
|
+
];
|
137
|
+
const argsString = `${args.join(' ')} ${opts.args ?? ''}`;
|
138
|
+
return command.replace(regex, argsString);
|
139
|
+
}
|
128
140
|
else if (forwardAllArgs) {
|
129
141
|
let args = '';
|
130
142
|
if (Object.keys(opts.unknownOptions ?? {}).length > 0) {
|
131
|
-
const unknownOptionsArgs =
|
132
|
-
.filter((k) => typeof opts.unknownOptions[k] !== 'object' &&
|
133
|
-
opts.parsedArgs[k] === opts.unknownOptions[k])
|
134
|
-
.map((k) => `--${k}=${opts.unknownOptions[k]}`)
|
135
|
-
.map(wrapArgIntoQuotesIfNeeded)
|
136
|
-
.join(' ');
|
143
|
+
const unknownOptionsArgs = unknownOptionsToArgsArray(opts).join(' ');
|
137
144
|
if (unknownOptionsArgs) {
|
138
145
|
args += ` ${unknownOptionsArgs}`;
|
139
146
|
}
|
@@ -142,11 +149,9 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
|
|
142
149
|
args += ` ${opts.args}`;
|
143
150
|
}
|
144
151
|
if (opts.__unparsed__?.length > 0) {
|
145
|
-
const filteredParsedOptions =
|
152
|
+
const filteredParsedOptions = unparsedOptionsToArgsArray(opts);
|
146
153
|
if (filteredParsedOptions.length > 0) {
|
147
|
-
args += ` ${filteredParsedOptions
|
148
|
-
.map(wrapArgIntoQuotesIfNeeded)
|
149
|
-
.join(' ')}`;
|
154
|
+
args += ` ${filteredParsedOptions.join(' ')}`;
|
150
155
|
}
|
151
156
|
}
|
152
157
|
return `${command}${args}`;
|
@@ -155,6 +160,20 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
|
|
155
160
|
return command;
|
156
161
|
}
|
157
162
|
}
|
163
|
+
function unknownOptionsToArgsArray(opts) {
|
164
|
+
return Object.keys(opts.unknownOptions ?? {})
|
165
|
+
.filter((k) => typeof opts.unknownOptions[k] !== 'object' &&
|
166
|
+
opts.parsedArgs[k] === opts.unknownOptions[k])
|
167
|
+
.map((k) => `--${k}=${opts.unknownOptions[k]}`)
|
168
|
+
.map(wrapArgIntoQuotesIfNeeded);
|
169
|
+
}
|
170
|
+
function unparsedOptionsToArgsArray(opts) {
|
171
|
+
const filteredParsedOptions = filterPropKeysFromUnParsedOptions(opts.__unparsed__, opts.parsedArgs);
|
172
|
+
if (filteredParsedOptions.length > 0) {
|
173
|
+
return filteredParsedOptions.map(wrapArgIntoQuotesIfNeeded);
|
174
|
+
}
|
175
|
+
return [];
|
176
|
+
}
|
158
177
|
function parseArgs(unparsedCommandArgs, unknownOptions, args) {
|
159
178
|
if (!args) {
|
160
179
|
return { ...unknownOptions, ...unparsedCommandArgs };
|
Binary file
|