nx 18.2.1 → 18.2.2
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.2.
|
3
|
+
"version": "18.2.2",
|
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.2.
|
69
|
+
"@nrwl/tao": "18.2.2"
|
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.2.
|
85
|
-
"@nx/nx-darwin-arm64": "18.2.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.2.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.2.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.2.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.2.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.2.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.2.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.2.
|
93
|
-
"@nx/nx-freebsd-x64": "18.2.
|
84
|
+
"@nx/nx-darwin-x64": "18.2.2",
|
85
|
+
"@nx/nx-darwin-arm64": "18.2.2",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.2.2",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.2.2",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.2.2",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.2.2",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.2.2",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.2.2",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.2.2",
|
93
|
+
"@nx/nx-freebsd-x64": "18.2.2"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -1,5 +1,3 @@
|
|
1
1
|
import { TouchedProjectLocator } from '../affected-project-graph-models';
|
2
|
-
import { NxJsonConfiguration } from '../../../config/nx-json';
|
3
2
|
export declare const getTouchedProjects: TouchedProjectLocator;
|
4
3
|
export declare const getImplicitlyTouchedProjects: TouchedProjectLocator;
|
5
|
-
export declare function extractGlobalFilesFromInputs(nxJson: NxJsonConfiguration): any[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getImplicitlyTouchedProjects = exports.getTouchedProjects = void 0;
|
4
4
|
const minimatch_1 = require("minimatch");
|
5
5
|
const find_project_for_path_1 = require("../../utils/find-project-for-path");
|
6
6
|
const getTouchedProjects = (touchedFiles, projectGraphNodes) => {
|
@@ -16,15 +16,12 @@ const getTouchedProjects = (touchedFiles, projectGraphNodes) => {
|
|
16
16
|
exports.getTouchedProjects = getTouchedProjects;
|
17
17
|
const getImplicitlyTouchedProjects = (fileChanges, projectGraphNodes, nxJson) => {
|
18
18
|
const implicits = {};
|
19
|
-
const globalFiles = [...extractGlobalFilesFromInputs(nxJson), 'nx.json'];
|
20
|
-
globalFiles.forEach((file) => {
|
21
|
-
implicits[file] = '*';
|
22
|
-
});
|
23
19
|
Object.values(projectGraphNodes || {}).forEach((node) => {
|
24
|
-
|
25
|
-
...
|
26
|
-
...
|
27
|
-
|
20
|
+
const namedInputs = {
|
21
|
+
...nxJson.namedInputs,
|
22
|
+
...node.data.namedInputs,
|
23
|
+
};
|
24
|
+
extractFilesFromTargetInputs(node.data.targets, namedInputs).forEach((input) => {
|
28
25
|
implicits[input] ??= [];
|
29
26
|
if (Array.isArray(implicits[input])) {
|
30
27
|
implicits[input].push(node.name);
|
@@ -48,33 +45,23 @@ const getImplicitlyTouchedProjects = (fileChanges, projectGraphNodes, nxJson) =>
|
|
48
45
|
return Array.from(touched);
|
49
46
|
};
|
50
47
|
exports.getImplicitlyTouchedProjects = getImplicitlyTouchedProjects;
|
51
|
-
function
|
52
|
-
const globalFiles = [];
|
53
|
-
globalFiles.push(...extractFilesFromNamedInputs(nxJson.namedInputs));
|
54
|
-
globalFiles.push(...extractFilesFromTargetInputs(nxJson.targetDefaults));
|
55
|
-
return globalFiles;
|
56
|
-
}
|
57
|
-
exports.extractGlobalFilesFromInputs = extractGlobalFilesFromInputs;
|
58
|
-
function extractFilesFromNamedInputs(namedInputs) {
|
59
|
-
const files = [];
|
60
|
-
for (const inputs of Object.values(namedInputs || {})) {
|
61
|
-
files.push(...extractFilesFromInputs(inputs));
|
62
|
-
}
|
63
|
-
return files;
|
64
|
-
}
|
65
|
-
function extractFilesFromTargetInputs(targets) {
|
48
|
+
function extractFilesFromTargetInputs(targets, namedInputs) {
|
66
49
|
const globalFiles = [];
|
67
50
|
for (const target of Object.values(targets || {})) {
|
68
51
|
if (target.inputs) {
|
69
|
-
globalFiles.push(...extractFilesFromInputs(target.inputs));
|
52
|
+
globalFiles.push(...extractFilesFromInputs(target.inputs, namedInputs));
|
70
53
|
}
|
71
54
|
}
|
72
55
|
return globalFiles;
|
73
56
|
}
|
74
|
-
function extractFilesFromInputs(inputs) {
|
57
|
+
function extractFilesFromInputs(inputs, namedInputs) {
|
75
58
|
const globalFiles = [];
|
76
59
|
for (const input of inputs) {
|
77
|
-
if (typeof input === 'string' && input
|
60
|
+
if (typeof input === 'string' && input in namedInputs) {
|
61
|
+
return extractFilesFromInputs(namedInputs[input], namedInputs);
|
62
|
+
}
|
63
|
+
else if (typeof input === 'string' &&
|
64
|
+
input.startsWith('{workspaceRoot}/')) {
|
78
65
|
globalFiles.push(input.substring('{workspaceRoot}/'.length));
|
79
66
|
}
|
80
67
|
else if (input.fileset && input.fileset.startsWith('{workspaceRoot}/')) {
|