nx 20.3.2 → 20.4.0-beta.1
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/implementation/angular/standalone-workspace.js +2 -1
- package/src/command-line/run/run-one.js +37 -13
- package/src/command-line/show/project.js +21 -3
- package/src/command-line/yargs-utils/shared-options.d.ts +1 -0
- package/src/command-line/yargs-utils/shared-options.js +7 -0
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/utils/register.d.ts +2 -0
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/tasks-runner/cache.d.ts +1 -0
- package/src/tasks-runner/cache.js +20 -2
- package/src/tasks-runner/default-tasks-runner.d.ts +1 -0
- package/src/utils/command-line-utils.d.ts +1 -0
- package/src/utils/command-line-utils.js +8 -1
- package/src/utils/find-matching-projects.js +11 -0
Binary file
|
@@ -91,6 +91,7 @@ export declare function getTsNodeCompilerOptions(compilerOptions: CompilerOption
|
|
91
91
|
moduleDetection?: any;
|
92
92
|
newLine?: any;
|
93
93
|
noEmit?: any;
|
94
|
+
noCheck?: any;
|
94
95
|
noEmitHelpers?: any;
|
95
96
|
noEmitOnError?: any;
|
96
97
|
noErrorTruncation?: any;
|
@@ -126,6 +127,7 @@ export declare function getTsNodeCompilerOptions(compilerOptions: CompilerOption
|
|
126
127
|
removeComments?: any;
|
127
128
|
resolvePackageJsonExports?: any;
|
128
129
|
resolvePackageJsonImports?: any;
|
130
|
+
rewriteRelativeImportExtensions?: any;
|
129
131
|
rootDir?: any;
|
130
132
|
rootDirs?: any;
|
131
133
|
skipLibCheck?: any;
|
@@ -1 +1 @@
|
|
1
|
-
export declare const typescriptVersion = "~5.
|
1
|
+
export declare const typescriptVersion = "~5.7.2";
|
@@ -61,6 +61,7 @@ function getCache(options) {
|
|
61
61
|
? new DbCache({
|
62
62
|
// Remove this in Nx 21
|
63
63
|
nxCloudRemoteCache: (0, nx_cloud_utils_1.isNxCloudUsed)(nxJson) ? options.remoteCache : null,
|
64
|
+
skipRemoteCache: options.skipRemoteCache,
|
64
65
|
})
|
65
66
|
: new Cache(options);
|
66
67
|
}
|
@@ -132,6 +133,15 @@ class DbCache {
|
|
132
133
|
return this.remoteCachePromise;
|
133
134
|
}
|
134
135
|
async _getRemoteCache() {
|
136
|
+
if (this.options.skipRemoteCache) {
|
137
|
+
output_1.output.warn({
|
138
|
+
title: 'Remote Cache Disabled',
|
139
|
+
bodyLines: [
|
140
|
+
'Nx will continue running, but nothing will be written or read from the remote cache.',
|
141
|
+
],
|
142
|
+
});
|
143
|
+
return null;
|
144
|
+
}
|
135
145
|
const nxJson = (0, nx_json_1.readNxJson)();
|
136
146
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
|
137
147
|
const options = (0, get_cloud_options_1.getCloudOptions)();
|
@@ -211,6 +221,14 @@ class Cache {
|
|
211
221
|
this.cachePath = this.createCacheDir();
|
212
222
|
this.terminalOutputsDir = this.createTerminalOutputsDir();
|
213
223
|
this._currentMachineId = null;
|
224
|
+
if (this.options.skipRemoteCache) {
|
225
|
+
output_1.output.warn({
|
226
|
+
title: 'Remote Cache Disabled',
|
227
|
+
bodyLines: [
|
228
|
+
'Nx will continue running, but nothing will be written or read from the remote cache.',
|
229
|
+
],
|
230
|
+
});
|
231
|
+
}
|
214
232
|
}
|
215
233
|
removeOldCacheRecords() {
|
216
234
|
/**
|
@@ -255,7 +273,7 @@ class Cache {
|
|
255
273
|
await this.assertLocalCacheValidity(task);
|
256
274
|
return { ...res, remote: false };
|
257
275
|
}
|
258
|
-
else if (this.options.remoteCache) {
|
276
|
+
else if (this.options.remoteCache && !this.options.skipRemoteCache) {
|
259
277
|
// didn't find it locally but we have a remote cache
|
260
278
|
// attempt remote cache
|
261
279
|
await this.options.remoteCache.retrieve(task.hash, this.cachePath);
|
@@ -295,7 +313,7 @@ class Cache {
|
|
295
313
|
await (0, promises_1.writeFile)((0, path_1.join)(td, 'code'), code.toString());
|
296
314
|
await (0, promises_1.writeFile)((0, path_1.join)(td, 'source'), await this.currentMachineId());
|
297
315
|
await (0, promises_1.writeFile)(tdCommit, 'true');
|
298
|
-
if (this.options.remoteCache) {
|
316
|
+
if (this.options.remoteCache && !this.options.skipRemoteCache) {
|
299
317
|
await this.options.remoteCache.store(task.hash, this.cachePath);
|
300
318
|
}
|
301
319
|
if (terminalOutput) {
|
@@ -20,6 +20,7 @@ export interface DefaultTasksRunnerOptions {
|
|
20
20
|
lifeCycle: LifeCycle;
|
21
21
|
captureStderr?: boolean;
|
22
22
|
skipNxCache?: boolean;
|
23
|
+
skipRemoteCache?: boolean;
|
23
24
|
batch?: boolean;
|
24
25
|
}
|
25
26
|
export declare const defaultTasksRunner: TasksRunner<DefaultTasksRunnerOptions>;
|
@@ -113,7 +113,14 @@ function splitArgsIntoNxArgsAndOverrides(args, mode, options = { printWarnings:
|
|
113
113
|
nxArgs.exclude = args.exclude.split(',');
|
114
114
|
}
|
115
115
|
if (!nxArgs.skipNxCache) {
|
116
|
-
nxArgs.skipNxCache =
|
116
|
+
nxArgs.skipNxCache =
|
117
|
+
process.env.NX_SKIP_NX_CACHE === 'true' ||
|
118
|
+
process.env.NX_DISABLE_NX_CACHE === 'true';
|
119
|
+
}
|
120
|
+
if (!nxArgs.skipRemoteCache) {
|
121
|
+
nxArgs.skipRemoteCache =
|
122
|
+
process.env.NX_DISABLE_REMOTE_CACHE === 'true' ||
|
123
|
+
process.env.NX_SKIP_REMOTE_CACHE === 'true';
|
117
124
|
}
|
118
125
|
normalizeNxArgsRunner(nxArgs, nxJson, options);
|
119
126
|
nxArgs['parallel'] = (0, shared_options_1.readParallelFromArgsAndEnv)(args);
|
@@ -112,6 +112,17 @@ function addMatchingProjectsByName(projectNames, projects, pattern, matchedProje
|
|
112
112
|
return;
|
113
113
|
}
|
114
114
|
if (!(0, globs_1.isGlobPattern)(pattern.value)) {
|
115
|
+
// Custom regex that is basically \b without underscores, so "foo" pattern matches "foo_bar".
|
116
|
+
const regex = new RegExp(`(?<![a-zA-Z0-9])${pattern.value}(?![a-zA-Z0-9])`, 'i');
|
117
|
+
const matchingProjects = Object.keys(projects).filter((name) => regex.test(name));
|
118
|
+
for (const projectName of matchingProjects) {
|
119
|
+
if (pattern.exclude) {
|
120
|
+
matchedProjects.delete(projectName);
|
121
|
+
}
|
122
|
+
else {
|
123
|
+
matchedProjects.add(projectName);
|
124
|
+
}
|
125
|
+
}
|
115
126
|
return;
|
116
127
|
}
|
117
128
|
const matchedProjectNames = (0, exports.getMatchingStringsWithCache)(pattern.value, projectNames);
|