nx 16.7.2 → 16.7.3
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/bin/nx.js +1 -1
- package/package.json +13 -13
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +3 -1
- package/src/generators/utils/project-configuration.js +1 -1
- package/src/hasher/task-hasher.js +1 -1
- package/src/migrations/update-15-1-0/set-project-names.js +1 -1
- package/src/plugins/js/lock-file/yarn-parser.js +4 -0
- package/src/project-graph/affected/locators/project-glob-changes.js +3 -1
- package/src/project-graph/affected/locators/workspace-projects.js +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.js +5 -3
- package/src/tasks-runner/forked-process-task-runner.js +1 -1
- package/src/utils/find-matching-projects.js +1 -1
package/bin/nx.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.3",
|
|
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": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://nx.dev",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nrwl/tao": "16.7.
|
|
35
|
+
"@nrwl/tao": "16.7.3",
|
|
36
36
|
"@parcel/watcher": "2.0.4",
|
|
37
37
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
38
38
|
"@yarnpkg/parsers": "3.0.0-rc.46",
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"optionalDependencies": {
|
|
84
|
-
"@nx/nx-darwin-arm64": "16.7.
|
|
85
|
-
"@nx/nx-darwin-x64": "16.7.
|
|
86
|
-
"@nx/nx-freebsd-x64": "16.7.
|
|
87
|
-
"@nx/nx-linux-arm-gnueabihf": "16.7.
|
|
88
|
-
"@nx/nx-linux-arm64-gnu": "16.7.
|
|
89
|
-
"@nx/nx-linux-arm64-musl": "16.7.
|
|
90
|
-
"@nx/nx-linux-x64-gnu": "16.7.
|
|
91
|
-
"@nx/nx-linux-x64-musl": "16.7.
|
|
92
|
-
"@nx/nx-win32-arm64-msvc": "16.7.
|
|
93
|
-
"@nx/nx-win32-x64-msvc": "16.7.
|
|
84
|
+
"@nx/nx-darwin-arm64": "16.7.3",
|
|
85
|
+
"@nx/nx-darwin-x64": "16.7.3",
|
|
86
|
+
"@nx/nx-freebsd-x64": "16.7.3",
|
|
87
|
+
"@nx/nx-linux-arm-gnueabihf": "16.7.3",
|
|
88
|
+
"@nx/nx-linux-arm64-gnu": "16.7.3",
|
|
89
|
+
"@nx/nx-linux-arm64-musl": "16.7.3",
|
|
90
|
+
"@nx/nx-linux-x64-gnu": "16.7.3",
|
|
91
|
+
"@nx/nx-linux-x64-musl": "16.7.3",
|
|
92
|
+
"@nx/nx-win32-arm64-msvc": "16.7.3",
|
|
93
|
+
"@nx/nx-win32-x64-msvc": "16.7.3"
|
|
94
94
|
},
|
|
95
95
|
"nx-migrations": {
|
|
96
96
|
"migrations": "./migrations.json",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
},
|
|
178
178
|
"main": "./bin/nx.js",
|
|
179
179
|
"type": "commonjs",
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "6ff5487c5f4ed9ed008df2af39e37d98fd289259"
|
|
181
181
|
}
|
|
@@ -34,7 +34,9 @@ function formatChangedFilesWithPrettierIfAvailable(tree) {
|
|
|
34
34
|
if (support.ignored || !support.inferredParser) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
tree.write(file.path,
|
|
37
|
+
tree.write(file.path,
|
|
38
|
+
// In prettier v3 the format result is a promise
|
|
39
|
+
yield prettier.format(file.content.toString('utf-8'), options));
|
|
38
40
|
}
|
|
39
41
|
catch (e) {
|
|
40
42
|
console.warn(`Could not format ${file.path}. Error: "${e.message}"`);
|
|
@@ -167,7 +167,7 @@ function findCreatedProjectFiles(tree, globPatterns) {
|
|
|
167
167
|
for (const change of tree.listChanges()) {
|
|
168
168
|
if (change.type === 'CREATE') {
|
|
169
169
|
const fileName = (0, path_1.basename)(change.path);
|
|
170
|
-
if (globPatterns.some((pattern) => minimatch(change.path, pattern))) {
|
|
170
|
+
if (globPatterns.some((pattern) => minimatch(change.path, pattern, { dot: true }))) {
|
|
171
171
|
createdProjectFiles.push(change.path);
|
|
172
172
|
}
|
|
173
173
|
else if (fileName === 'package.json') {
|
|
@@ -222,7 +222,7 @@ class TaskHasherImpl {
|
|
|
222
222
|
const { getFilesForOutputs } = require('../native');
|
|
223
223
|
const outputFiles = getFilesForOutputs(workspace_root_1.workspaceRoot, outputs);
|
|
224
224
|
const filteredFiles = outputFiles.filter((p) => p === dependentTasksOutputFiles ||
|
|
225
|
-
minimatch(p, dependentTasksOutputFiles));
|
|
225
|
+
minimatch(p, dependentTasksOutputFiles, { dot: true }));
|
|
226
226
|
const hashDetails = {};
|
|
227
227
|
const hashes = [];
|
|
228
228
|
for (const [file, hash] of yield this.fileHasher.hashFiles(filteredFiles.map((p) => (0, path_1.join)(workspace_root_1.workspaceRoot, p)))) {
|
|
@@ -9,7 +9,7 @@ const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-w
|
|
|
9
9
|
function default_1(tree) {
|
|
10
10
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
11
|
const nxJson = (0, nx_json_1.readNxJson)(tree);
|
|
12
|
-
const projectFiles = (0, retrieve_workspace_files_1.retrieveProjectConfigurationPaths)(tree.root, nxJson);
|
|
12
|
+
const projectFiles = yield (0, retrieve_workspace_files_1.retrieveProjectConfigurationPaths)(tree.root, nxJson);
|
|
13
13
|
const projectJsons = projectFiles.filter((f) => f.endsWith('project.json'));
|
|
14
14
|
for (let f of projectJsons) {
|
|
15
15
|
const projectJson = (0, json_1.readJson)(tree, f);
|
|
@@ -366,6 +366,10 @@ function findPatchedKeys(dependencies, node) {
|
|
|
366
366
|
if (!keys[0].startsWith(`${node.data.packageName}@patch:`)) {
|
|
367
367
|
continue;
|
|
368
368
|
}
|
|
369
|
+
// local patches are currently not supported
|
|
370
|
+
if (keys[0].includes('.yarn/patches')) {
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
369
373
|
if (snapshot.version === node.data.version) {
|
|
370
374
|
return [keys, snapshot];
|
|
371
375
|
}
|
|
@@ -14,7 +14,9 @@ const getTouchedProjectsFromProjectGlobChanges = (touchedFiles, projectGraphNode
|
|
|
14
14
|
const globPattern = (0, globs_1.combineGlobPatterns)((0, retrieve_workspace_files_1.configurationGlobs)(workspace_root_1.workspaceRoot, yield (0, nx_plugin_1.loadNxPlugins)(nxJson === null || nxJson === void 0 ? void 0 : nxJson.plugins, (0, installation_directory_1.getNxRequirePaths)(workspace_root_1.workspaceRoot), workspace_root_1.workspaceRoot)));
|
|
15
15
|
const touchedProjects = new Set();
|
|
16
16
|
for (const touchedFile of touchedFiles) {
|
|
17
|
-
const isProjectFile = minimatch(touchedFile.file, globPattern
|
|
17
|
+
const isProjectFile = minimatch(touchedFile.file, globPattern, {
|
|
18
|
+
dot: true,
|
|
19
|
+
});
|
|
18
20
|
if (isProjectFile) {
|
|
19
21
|
// If the file no longer exists on disk, then it was deleted
|
|
20
22
|
if (!(0, fs_1.existsSync)((0, path_1.join)(workspace_root_1.workspaceRoot, touchedFile.file))) {
|
|
@@ -34,7 +34,7 @@ const getImplicitlyTouchedProjects = (fileChanges, projectGraphNodes, nxJson) =>
|
|
|
34
34
|
});
|
|
35
35
|
const touched = new Set();
|
|
36
36
|
for (const [pattern, projects] of Object.entries(implicits)) {
|
|
37
|
-
const implicitDependencyWasChanged = fileChanges.some((f) => minimatch(f.file, pattern));
|
|
37
|
+
const implicitDependencyWasChanged = fileChanges.some((f) => minimatch(f.file, pattern, { dot: true }));
|
|
38
38
|
if (!implicitDependencyWasChanged) {
|
|
39
39
|
continue;
|
|
40
40
|
}
|
|
@@ -61,7 +61,7 @@ plugins, root = workspace_root_1.workspaceRoot) {
|
|
|
61
61
|
continue;
|
|
62
62
|
}
|
|
63
63
|
for (const file of projectFiles) {
|
|
64
|
-
if (minimatch(file, pattern)) {
|
|
64
|
+
if (minimatch(file, pattern, { dot: true })) {
|
|
65
65
|
const { projects: projectNodes, externalNodes: pluginExternalNodes } = configurationConstructor(file, {
|
|
66
66
|
nxJsonConfiguration: nxJson,
|
|
67
67
|
workspaceRoot: root,
|
|
@@ -35,7 +35,7 @@ export declare function retrieveProjectConfigurationsSync(workspaceRoot: string,
|
|
|
35
35
|
externalNodes: Record<string, ProjectGraphExternalNode>;
|
|
36
36
|
projectNodes: Record<string, ProjectConfiguration>;
|
|
37
37
|
};
|
|
38
|
-
export declare function retrieveProjectConfigurationPaths(root: string, nxJson: NxJsonConfiguration): string[]
|
|
38
|
+
export declare function retrieveProjectConfigurationPaths(root: string, nxJson: NxJsonConfiguration): Promise<string[]>;
|
|
39
39
|
export declare function retrieveProjectConfigurationPathsWithoutPluginInference(root: string): string[];
|
|
40
40
|
export declare function retrieveProjectConfigurationsWithoutPluginInference(root: string): Record<string, ProjectConfiguration>;
|
|
41
41
|
export declare function configurationGlobs(workspaceRoot: string, plugins: NxPluginV2[]): string[];
|
|
@@ -97,9 +97,11 @@ function _retrieveProjectConfigurations(workspaceRoot, nxJson, plugins, globs) {
|
|
|
97
97
|
}
|
|
98
98
|
function retrieveProjectConfigurationPaths(root, nxJson) {
|
|
99
99
|
var _a;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const projectGlobPatterns = configurationGlobs(root, yield (0, nx_plugin_1.loadNxPlugins)((_a = nxJson === null || nxJson === void 0 ? void 0 : nxJson.plugins) !== null && _a !== void 0 ? _a : [], (0, installation_directory_1.getNxRequirePaths)(root), root));
|
|
102
|
+
const { getProjectConfigurationFiles } = require('../../native');
|
|
103
|
+
return getProjectConfigurationFiles(root, projectGlobPatterns);
|
|
104
|
+
});
|
|
103
105
|
}
|
|
104
106
|
exports.retrieveProjectConfigurationPaths = retrieveProjectConfigurationPaths;
|
|
105
107
|
function retrieveProjectConfigurationPathsWithoutPluginInference(root) {
|
|
@@ -310,9 +310,9 @@ class ForkedProcessTaskRunner {
|
|
|
310
310
|
`.env.${task.target.target}`,
|
|
311
311
|
`.${task.target.target}.env`,
|
|
312
312
|
// Load base DotEnv Files at workspace root
|
|
313
|
-
`.env`,
|
|
314
313
|
`.local.env`,
|
|
315
314
|
`.env.local`,
|
|
315
|
+
`.env`,
|
|
316
316
|
];
|
|
317
317
|
for (const file of dotEnvFiles) {
|
|
318
318
|
(0, dotenv_1.config)({
|
|
@@ -161,7 +161,7 @@ exports.getMatchingStringsWithCache = (() => {
|
|
|
161
161
|
}
|
|
162
162
|
const patternCache = minimatchCache.get(pattern);
|
|
163
163
|
if (!regexCache.has(pattern)) {
|
|
164
|
-
const regex = minimatch.makeRe(pattern);
|
|
164
|
+
const regex = minimatch.makeRe(pattern, { dot: true });
|
|
165
165
|
if (regex) {
|
|
166
166
|
regexCache.set(pattern, regex);
|
|
167
167
|
}
|