nx 19.1.0-canary.20240515-a2a7d7e → 19.1.0-canary.20240517-312b271
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 +12 -12
- package/src/command-line/examples.js +4 -0
- package/src/command-line/graph/graph.js +1 -1
- package/src/command-line/migrate/migrate.js +5 -2
- package/src/command-line/reset/reset.js +7 -0
- package/src/command-line/show/command-object.js +10 -4
- package/src/core/graph/main.js +1 -1
- package/src/generators/utils/json.js +2 -1
- package/src/native/index.js +6 -5
- package/src/native/native-file-cache-location.d.ts +1 -0
- package/src/native/native-file-cache-location.js +8 -0
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/utils/find-matching-projects.js +1 -13
- package/src/utils/json.js +1 -1
- package/src/utils/package-manager.js +14 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.1.0-canary.
|
3
|
+
"version": "19.1.0-canary.20240517-312b271",
|
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": "19.1.0-canary.
|
69
|
+
"@nrwl/tao": "19.1.0-canary.20240517-312b271"
|
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": "19.1.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "19.1.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "19.1.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "19.1.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "19.1.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "19.1.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "19.1.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "19.1.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "19.1.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "19.1.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "19.1.0-canary.20240517-312b271",
|
85
|
+
"@nx/nx-darwin-arm64": "19.1.0-canary.20240517-312b271",
|
86
|
+
"@nx/nx-linux-x64-gnu": "19.1.0-canary.20240517-312b271",
|
87
|
+
"@nx/nx-linux-x64-musl": "19.1.0-canary.20240517-312b271",
|
88
|
+
"@nx/nx-win32-x64-msvc": "19.1.0-canary.20240517-312b271",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "19.1.0-canary.20240517-312b271",
|
90
|
+
"@nx/nx-linux-arm64-musl": "19.1.0-canary.20240517-312b271",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "19.1.0-canary.20240517-312b271",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "19.1.0-canary.20240517-312b271",
|
93
|
+
"@nx/nx-freebsd-x64": "19.1.0-canary.20240517-312b271"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -257,6 +257,10 @@ exports.examples = {
|
|
257
257
|
},
|
258
258
|
{
|
259
259
|
command: 'show project my-app',
|
260
|
+
description: 'If in an interactive terminal, opens the project detail view. If not in an interactive terminal, defaults to JSON.',
|
261
|
+
},
|
262
|
+
{
|
263
|
+
command: 'show project my-app --json',
|
260
264
|
description: 'Show detailed information about "my-app" in a json format.',
|
261
265
|
},
|
262
266
|
{
|
@@ -255,7 +255,7 @@ async function generateGraph(args, affectedProjects) {
|
|
255
255
|
const environmentJs = buildEnvironmentJs(args.exclude || [], args.watch, !!args.file && args.file.endsWith('html') ? 'build' : 'serve', projectGraphClientResponse, taskGraphClientResponse, taskInputsReponse, sourceMaps);
|
256
256
|
html = html.replace(/src="/g, 'src="static/');
|
257
257
|
html = html.replace(/href="styles/g, 'href="static/styles');
|
258
|
-
html = html.replace(
|
258
|
+
html = html.replace(/<base href="\/".*>/g, '');
|
259
259
|
html = html.replace(/type="module"/g, '');
|
260
260
|
(0, fs_1.writeFileSync)(fullFilePath, html);
|
261
261
|
(0, fs_1.writeFileSync)((0, path_1.join)(assetsFolder, 'environment.js'), environmentJs);
|
@@ -377,9 +377,9 @@ const LEGACY_NRWL_PACKAGE_GROUP = [
|
|
377
377
|
];
|
378
378
|
async function normalizeVersionWithTagCheck(pkg, version) {
|
379
379
|
// This doesn't seem like a valid version, lets check if its a tag on the registry.
|
380
|
-
if (version && !(0, semver_1.
|
380
|
+
if (version && !(0, semver_1.parse)(version)) {
|
381
381
|
try {
|
382
|
-
return (0, package_manager_1.
|
382
|
+
return (0, package_manager_1.resolvePackageVersionUsingRegistry)(pkg, version);
|
383
383
|
}
|
384
384
|
catch {
|
385
385
|
// fall through to old logic
|
@@ -634,6 +634,9 @@ async function getPackageMigrationsUsingInstall(packageName, packageVersion) {
|
|
634
634
|
}
|
635
635
|
result = { ...migrations, packageGroup, version: packageJson.version };
|
636
636
|
}
|
637
|
+
catch (e) {
|
638
|
+
logger_1.logger.warn(`Unable to fetch migrations for ${packageName}@${packageVersion}: ${e.message}`);
|
639
|
+
}
|
637
640
|
finally {
|
638
641
|
await cleanup();
|
639
642
|
}
|
@@ -5,6 +5,7 @@ const fs_extra_1 = require("fs-extra");
|
|
5
5
|
const client_1 = require("../../daemon/client/client");
|
6
6
|
const cache_directory_1 = require("../../utils/cache-directory");
|
7
7
|
const output_1 = require("../../utils/output");
|
8
|
+
const native_file_cache_location_1 = require("../../native/native-file-cache-location");
|
8
9
|
async function resetHandler() {
|
9
10
|
output_1.output.note({
|
10
11
|
title: 'Resetting the Nx workspace cache and stopping the Nx Daemon.',
|
@@ -12,6 +13,12 @@ async function resetHandler() {
|
|
12
13
|
});
|
13
14
|
await client_1.daemonClient.stop();
|
14
15
|
output_1.output.log({ title: 'Daemon Server - Stopped' });
|
16
|
+
try {
|
17
|
+
(0, fs_extra_1.rmSync)(native_file_cache_location_1.nativeFileCacheLocation, { recursive: true, force: true });
|
18
|
+
}
|
19
|
+
catch (e) {
|
20
|
+
// ignore, deleting the native file cache is not critical and can fail if another process is locking the file
|
21
|
+
}
|
15
22
|
(0, fs_extra_1.rmSync)(cache_directory_1.cacheDir, { recursive: true, force: true });
|
16
23
|
if (cache_directory_1.projectGraphCacheDirectory !== cache_directory_1.cacheDir) {
|
17
24
|
(0, fs_extra_1.rmSync)(cache_directory_1.projectGraphCacheDirectory, { recursive: true, force: true });
|
@@ -81,10 +81,9 @@ const showProjectCommand = {
|
|
81
81
|
alias: 'p',
|
82
82
|
description: 'Which project should be viewed?',
|
83
83
|
})
|
84
|
-
.default('json', true)
|
85
84
|
.option('web', {
|
86
85
|
type: 'boolean',
|
87
|
-
description: 'Show project details in the browser',
|
86
|
+
description: 'Show project details in the browser. (default when interactive)',
|
88
87
|
})
|
89
88
|
.option('open', {
|
90
89
|
type: 'boolean',
|
@@ -92,8 +91,15 @@ const showProjectCommand = {
|
|
92
91
|
implies: 'web',
|
93
92
|
})
|
94
93
|
.check((argv) => {
|
95
|
-
|
96
|
-
|
94
|
+
// If TTY is enabled, default to web. Otherwise, default to JSON.
|
95
|
+
const alreadySpecified = argv.web !== undefined || argv.json !== undefined;
|
96
|
+
if (!alreadySpecified) {
|
97
|
+
if (process.stdout.isTTY) {
|
98
|
+
argv.web = true;
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
argv.json = true;
|
102
|
+
}
|
97
103
|
}
|
98
104
|
return true;
|
99
105
|
})
|