nx 16.5.0-beta.3 → 16.6.0-beta.0
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 +13 -13
- package/src/config/workspaces.d.ts +1 -1
- package/src/config/workspaces.js +12 -12
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/generators/utils/project-configuration.js +1 -1
- package/src/hasher/task-hasher.js +17 -14
- package/src/native/index.d.ts +3 -4
- package/src/native/index.js +2 -2
- package/src/plugins/js/package-json/create-package-json.d.ts +2 -1
- package/src/plugins/js/package-json/create-package-json.js +14 -4
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.js +23 -26
- package/src/utils/package-manager.d.ts +1 -0
- package/src/utils/package-manager.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.6.0-beta.0",
|
|
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.
|
|
35
|
+
"@nrwl/tao": "16.6.0-beta.0",
|
|
36
36
|
"@parcel/watcher": "2.0.4",
|
|
37
37
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
38
38
|
"@yarnpkg/parsers": "3.0.0-rc.46",
|
|
@@ -80,16 +80,16 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@nx/nx-darwin-arm64": "16.
|
|
84
|
-
"@nx/nx-darwin-x64": "16.
|
|
85
|
-
"@nx/nx-freebsd-x64": "16.
|
|
86
|
-
"@nx/nx-linux-arm-gnueabihf": "16.
|
|
87
|
-
"@nx/nx-linux-arm64-gnu": "16.
|
|
88
|
-
"@nx/nx-linux-arm64-musl": "16.
|
|
89
|
-
"@nx/nx-linux-x64-gnu": "16.
|
|
90
|
-
"@nx/nx-linux-x64-musl": "16.
|
|
91
|
-
"@nx/nx-win32-arm64-msvc": "16.
|
|
92
|
-
"@nx/nx-win32-x64-msvc": "16.
|
|
83
|
+
"@nx/nx-darwin-arm64": "16.6.0-beta.0",
|
|
84
|
+
"@nx/nx-darwin-x64": "16.6.0-beta.0",
|
|
85
|
+
"@nx/nx-freebsd-x64": "16.6.0-beta.0",
|
|
86
|
+
"@nx/nx-linux-arm-gnueabihf": "16.6.0-beta.0",
|
|
87
|
+
"@nx/nx-linux-arm64-gnu": "16.6.0-beta.0",
|
|
88
|
+
"@nx/nx-linux-arm64-musl": "16.6.0-beta.0",
|
|
89
|
+
"@nx/nx-linux-x64-gnu": "16.6.0-beta.0",
|
|
90
|
+
"@nx/nx-linux-x64-musl": "16.6.0-beta.0",
|
|
91
|
+
"@nx/nx-win32-arm64-msvc": "16.6.0-beta.0",
|
|
92
|
+
"@nx/nx-win32-x64-msvc": "16.6.0-beta.0"
|
|
93
93
|
},
|
|
94
94
|
"nx-migrations": {
|
|
95
95
|
"migrations": "./migrations.json",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
},
|
|
176
176
|
"main": "./bin/nx.js",
|
|
177
177
|
"types": "./bin/nx.d.ts",
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "5a7ffb93c9e84bffbf52f6ae9c6c1e3b8edb9d35"
|
|
179
179
|
}
|
|
@@ -73,7 +73,7 @@ export declare function inferProjectFromNonStandardFile(file: string): ProjectCo
|
|
|
73
73
|
name: string;
|
|
74
74
|
};
|
|
75
75
|
export declare function buildProjectsConfigurationsFromProjectPaths(nxJson: NxJsonConfiguration, projectFiles: string[], // making this parameter allows devkit to pick up newly created projects
|
|
76
|
-
readJson?: <T extends Object>(string: any) => T):
|
|
76
|
+
readJson?: <T extends Object>(string: any) => T): Record<string, ProjectConfiguration>;
|
|
77
77
|
export declare function mergeTargetConfigurations(projectConfiguration: ProjectConfiguration, target: string, targetDefaults: TargetDefaults[string]): TargetConfiguration;
|
|
78
78
|
export declare function readTargetDefaultsForTarget(targetName: string, targetDefaults: TargetDefaults, executor?: string): TargetDefaults[string];
|
|
79
79
|
export declare function renamePropertyWithStableKeys(obj: any, from: string, to: string): void;
|
package/src/config/workspaces.js
CHANGED
|
@@ -58,13 +58,16 @@ class Workspaces {
|
|
|
58
58
|
return this.cachedProjectsConfig;
|
|
59
59
|
}
|
|
60
60
|
const nxJson = this.readNxJson();
|
|
61
|
-
|
|
61
|
+
let projectsConfigurations = buildProjectsConfigurationsFromProjectPaths(nxJson, globForProjectFiles(this.root, (opts === null || opts === void 0 ? void 0 : opts._ignorePluginInference)
|
|
62
62
|
? []
|
|
63
63
|
: getGlobPatternsFromPlugins(nxJson, (0, installation_directory_1.getNxRequirePaths)(this.root), this.root), nxJson), (path) => (0, fileutils_1.readJsonFile)((0, path_1.join)(this.root, path)));
|
|
64
64
|
if ((0, angular_json_1.shouldMergeAngularProjects)(this.root, opts === null || opts === void 0 ? void 0 : opts._includeProjectsFromAngularJson)) {
|
|
65
|
-
projectsConfigurations
|
|
65
|
+
projectsConfigurations = (0, angular_json_1.mergeAngularJsonAndProjects)(projectsConfigurations, this.root);
|
|
66
66
|
}
|
|
67
|
-
this.cachedProjectsConfig =
|
|
67
|
+
this.cachedProjectsConfig = {
|
|
68
|
+
version: 2,
|
|
69
|
+
projects: this.mergeTargetDefaultsIntoProjectDescriptions(projectsConfigurations, nxJson),
|
|
70
|
+
};
|
|
68
71
|
return this.cachedProjectsConfig;
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -74,8 +77,8 @@ class Workspaces {
|
|
|
74
77
|
const nxJson = this.readNxJson();
|
|
75
78
|
return Object.assign(Object.assign({}, this.readProjectsConfigurations(opts)), nxJson);
|
|
76
79
|
}
|
|
77
|
-
mergeTargetDefaultsIntoProjectDescriptions(
|
|
78
|
-
for (const proj of Object.values(
|
|
80
|
+
mergeTargetDefaultsIntoProjectDescriptions(projects, nxJson) {
|
|
81
|
+
for (const proj of Object.values(projects)) {
|
|
79
82
|
if (proj.targets) {
|
|
80
83
|
for (const targetName of Object.keys(proj.targets)) {
|
|
81
84
|
const projectTargetDefinition = proj.targets[targetName];
|
|
@@ -86,7 +89,7 @@ class Workspaces {
|
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
|
-
return
|
|
92
|
+
return projects;
|
|
90
93
|
}
|
|
91
94
|
isNxExecutor(nodeModule, executor) {
|
|
92
95
|
return !this.readExecutor(nodeModule, executor).isNgCompat;
|
|
@@ -322,7 +325,7 @@ function getGlobPatternsFromPlugins(nxJson, paths, root = workspace_root_1.works
|
|
|
322
325
|
continue;
|
|
323
326
|
}
|
|
324
327
|
for (const filePattern of plugin.projectFilePatterns) {
|
|
325
|
-
patterns.push('
|
|
328
|
+
patterns.push('*/**/' + filePattern);
|
|
326
329
|
}
|
|
327
330
|
}
|
|
328
331
|
return patterns;
|
|
@@ -337,7 +340,7 @@ function getGlobPatternsFromPluginsAsync(nxJson, paths, root = workspace_root_1.
|
|
|
337
340
|
continue;
|
|
338
341
|
}
|
|
339
342
|
for (const filePattern of plugin.projectFilePatterns) {
|
|
340
|
-
patterns.push('
|
|
343
|
+
patterns.push('*/**/' + filePattern);
|
|
341
344
|
}
|
|
342
345
|
}
|
|
343
346
|
return patterns;
|
|
@@ -565,10 +568,7 @@ readJson = (string) => (0, fileutils_1.readJsonFile)(string) // making this an a
|
|
|
565
568
|
}
|
|
566
569
|
}
|
|
567
570
|
}
|
|
568
|
-
return
|
|
569
|
-
version: 2,
|
|
570
|
-
projects: projects,
|
|
571
|
-
};
|
|
571
|
+
return projects;
|
|
572
572
|
}
|
|
573
573
|
exports.buildProjectsConfigurationsFromProjectPaths = buildProjectsConfigurationsFromProjectPaths;
|
|
574
574
|
function mergeTargetConfigurations(projectConfiguration, target, targetDefaults) {
|