nx 19.4.2 → 19.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/package.json +12 -12
- package/src/command-line/report/report.js +20 -12
- package/src/command-line/run/command-object.js +6 -0
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/project-graph/plugins/internal-api.d.ts +1 -1
- package/src/project-graph/plugins/internal-api.js +9 -5
- package/src/project-graph/plugins/isolation/plugin-worker.js +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +6 -1
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/tasks-runner/task-orchestrator.js +8 -0
package/README.md
CHANGED
@@ -59,7 +59,7 @@ npx nx@latest init
|
|
59
59
|
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
60
60
|
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
61
61
|
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
62
|
-
- [Blog Posts About Nx](https://
|
62
|
+
- [Blog Posts About Nx](https://nx.dev/blog)
|
63
63
|
|
64
64
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
65
65
|
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.4.
|
3
|
+
"version": "19.4.4",
|
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": {
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"yargs-parser": "21.1.1",
|
71
71
|
"node-machine-id": "1.1.12",
|
72
72
|
"ora": "5.3.0",
|
73
|
-
"@nrwl/tao": "19.4.
|
73
|
+
"@nrwl/tao": "19.4.4"
|
74
74
|
},
|
75
75
|
"peerDependencies": {
|
76
76
|
"@swc-node/register": "^1.8.0",
|
@@ -85,16 +85,16 @@
|
|
85
85
|
}
|
86
86
|
},
|
87
87
|
"optionalDependencies": {
|
88
|
-
"@nx/nx-darwin-x64": "19.4.
|
89
|
-
"@nx/nx-darwin-arm64": "19.4.
|
90
|
-
"@nx/nx-linux-x64-gnu": "19.4.
|
91
|
-
"@nx/nx-linux-x64-musl": "19.4.
|
92
|
-
"@nx/nx-win32-x64-msvc": "19.4.
|
93
|
-
"@nx/nx-linux-arm64-gnu": "19.4.
|
94
|
-
"@nx/nx-linux-arm64-musl": "19.4.
|
95
|
-
"@nx/nx-linux-arm-gnueabihf": "19.4.
|
96
|
-
"@nx/nx-win32-arm64-msvc": "19.4.
|
97
|
-
"@nx/nx-freebsd-x64": "19.4.
|
88
|
+
"@nx/nx-darwin-x64": "19.4.4",
|
89
|
+
"@nx/nx-darwin-arm64": "19.4.4",
|
90
|
+
"@nx/nx-linux-x64-gnu": "19.4.4",
|
91
|
+
"@nx/nx-linux-x64-musl": "19.4.4",
|
92
|
+
"@nx/nx-win32-x64-msvc": "19.4.4",
|
93
|
+
"@nx/nx-linux-arm64-gnu": "19.4.4",
|
94
|
+
"@nx/nx-linux-arm64-musl": "19.4.4",
|
95
|
+
"@nx/nx-linux-arm-gnueabihf": "19.4.4",
|
96
|
+
"@nx/nx-win32-arm64-msvc": "19.4.4",
|
97
|
+
"@nx/nx-freebsd-x64": "19.4.4"
|
98
98
|
},
|
99
99
|
"nx-migrations": {
|
100
100
|
"migrations": "./migrations.json",
|
@@ -13,6 +13,7 @@ const semver_1 = require("semver");
|
|
13
13
|
const installed_plugins_1 = require("../../utils/plugins/installed-plugins");
|
14
14
|
const installation_directory_1 = require("../../utils/installation-directory");
|
15
15
|
const nx_json_1 = require("../../config/nx-json");
|
16
|
+
const error_types_1 = require("../../project-graph/error-types");
|
16
17
|
const nxPackageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(__dirname, '../../../package.json'));
|
17
18
|
exports.packagesWeCareAbout = [
|
18
19
|
'lerna',
|
@@ -93,19 +94,11 @@ exports.reportHandler = reportHandler;
|
|
93
94
|
async function getReportData() {
|
94
95
|
const pm = (0, package_manager_1.detectPackageManager)();
|
95
96
|
const pmVersion = (0, package_manager_1.getPackageManagerVersion)(pm);
|
97
|
+
const { graph, error: projectGraphError } = await tryGetProjectGraph();
|
96
98
|
const nxJson = (0, nx_json_1.readNxJson)();
|
97
|
-
const localPlugins = await findLocalPlugins(nxJson);
|
99
|
+
const localPlugins = await findLocalPlugins(graph, nxJson);
|
98
100
|
const communityPlugins = findInstalledCommunityPlugins();
|
99
101
|
const registeredPlugins = findRegisteredPluginsBeingUsed(nxJson);
|
100
|
-
let projectGraphError = null;
|
101
|
-
if (isNativeAvailable()) {
|
102
|
-
try {
|
103
|
-
await (0, project_graph_1.createProjectGraphAsync)();
|
104
|
-
}
|
105
|
-
catch (e) {
|
106
|
-
projectGraphError = e;
|
107
|
-
}
|
108
|
-
}
|
109
102
|
const packageVersionsWeCareAbout = findInstalledPackagesWeCareAbout();
|
110
103
|
packageVersionsWeCareAbout.unshift({
|
111
104
|
package: 'nx',
|
@@ -130,9 +123,24 @@ async function getReportData() {
|
|
130
123
|
};
|
131
124
|
}
|
132
125
|
exports.getReportData = getReportData;
|
133
|
-
async function
|
126
|
+
async function tryGetProjectGraph() {
|
127
|
+
try {
|
128
|
+
return { graph: await (0, project_graph_1.createProjectGraphAsync)() };
|
129
|
+
}
|
130
|
+
catch (error) {
|
131
|
+
if (error instanceof error_types_1.ProjectGraphError) {
|
132
|
+
return {
|
133
|
+
graph: error.getPartialProjectGraph(),
|
134
|
+
error: error,
|
135
|
+
};
|
136
|
+
}
|
137
|
+
return {
|
138
|
+
error,
|
139
|
+
};
|
140
|
+
}
|
141
|
+
}
|
142
|
+
async function findLocalPlugins(projectGraph, nxJson) {
|
134
143
|
try {
|
135
|
-
const projectGraph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true });
|
136
144
|
const localPlugins = await (0, local_plugins_1.getLocalWorkspacePlugins)((0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph), nxJson);
|
137
145
|
return Array.from(localPlugins.keys());
|
138
146
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.yargsNxInfixCommand = exports.yargsRunCommand = void 0;
|
4
|
+
const yargs_1 = require("yargs");
|
4
5
|
const shared_options_1 = require("../yargs-utils/shared-options");
|
5
6
|
const params_1 = require("../../utils/params");
|
6
7
|
exports.yargsRunCommand = {
|
@@ -29,6 +30,11 @@ exports.yargsNxInfixCommand = {
|
|
29
30
|
describe: 'Run a target for a project',
|
30
31
|
handler: async (args) => {
|
31
32
|
const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
33
|
+
// Yargs parses <target> as 'undefined' if running just 'nx'
|
34
|
+
if (!args.target || args.target === 'undefined') {
|
35
|
+
(0, yargs_1.showHelp)();
|
36
|
+
process.exit(1);
|
37
|
+
}
|
32
38
|
return (await Promise.resolve().then(() => require('./run-one'))).runOne(process.cwd(), (0, shared_options_1.withOverrides)(args, 0));
|
33
39
|
});
|
34
40
|
process.exit(exitCode);
|