nx 16.7.0-rc.1 → 16.7.1
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/schemas/nx-schema.json +3 -2
- package/src/config/calculate-default-project-name.d.ts +1 -3
- package/src/config/configuration.d.ts +0 -6
- package/src/config/configuration.js +1 -11
- package/src/config/workspaces.d.ts +5 -13
- package/src/config/workspaces.js +8 -42
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +3 -4
- package/src/devkit-exports.d.ts +2 -2
- package/src/devkit-exports.js +3 -2
- package/src/devkit-internals.d.ts +1 -0
- package/src/devkit-internals.js +3 -1
- package/src/executors/utils/convert-nx-executor.js +5 -3
- package/src/hasher/task-hasher.js +1 -0
- package/src/project-graph/build-nodes/workspace-projects.js +1 -3
- package/src/project-graph/build-project-graph.d.ts +2 -2
- package/src/project-graph/build-project-graph.js +12 -9
- package/src/project-graph/file-utils.d.ts +5 -1
- package/src/project-graph/file-utils.js +13 -6
- package/src/project-graph/nx-deps-cache.d.ts +2 -2
- package/src/project-graph/nx-deps-cache.js +1 -1
- package/src/project-graph/project-graph.d.ts +3 -0
- package/src/project-graph/project-graph.js +4 -1
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +11 -0
- package/src/project-graph/utils/retrieve-workspace-files.js +33 -11
- package/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +2 -3
- package/src/utils/assert-workspace-validity.d.ts +2 -2
- package/src/utils/assert-workspace-validity.js +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.1",
|
|
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.1",
|
|
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.1",
|
|
85
|
+
"@nx/nx-darwin-x64": "16.7.1",
|
|
86
|
+
"@nx/nx-freebsd-x64": "16.7.1",
|
|
87
|
+
"@nx/nx-linux-arm-gnueabihf": "16.7.1",
|
|
88
|
+
"@nx/nx-linux-arm64-gnu": "16.7.1",
|
|
89
|
+
"@nx/nx-linux-arm64-musl": "16.7.1",
|
|
90
|
+
"@nx/nx-linux-x64-gnu": "16.7.1",
|
|
91
|
+
"@nx/nx-linux-x64-musl": "16.7.1",
|
|
92
|
+
"@nx/nx-win32-arm64-msvc": "16.7.1",
|
|
93
|
+
"@nx/nx-win32-x64-msvc": "16.7.1"
|
|
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": "8b38708d6c18496711695499d07c95f3ecc31cc9"
|
|
181
181
|
}
|
package/schemas/nx-schema.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"implicitDependencies": {
|
|
8
8
|
"type": "object",
|
|
9
|
-
"description": "Map of files to projects that implicitly depend on them."
|
|
9
|
+
"description": "Map of files to projects that implicitly depend on them.",
|
|
10
|
+
"deprecated": "Use named inputs instead. See https://nx.dev/deprecated/global-implicit-dependencies"
|
|
10
11
|
},
|
|
11
12
|
"affected": {
|
|
12
13
|
"type": "object",
|
|
@@ -199,7 +200,7 @@
|
|
|
199
200
|
},
|
|
200
201
|
"defaultCollection": {
|
|
201
202
|
"type": "string",
|
|
202
|
-
"description": "The default
|
|
203
|
+
"description": "The default generator collection to use."
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
},
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { NxJsonConfiguration } from './nx-json';
|
|
2
2
|
import { ProjectConfiguration, ProjectsConfigurations } from './workspace-json-project-json';
|
|
3
3
|
export declare function calculateDefaultProjectName(cwd: string, root: string, { projects }: ProjectsConfigurations, nxJson: NxJsonConfiguration): string;
|
|
4
|
-
export declare function findMatchingProjectInCwd(projects:
|
|
5
|
-
[projectName: string]: ProjectConfiguration;
|
|
6
|
-
}, relativeCwd: string): string | undefined;
|
|
4
|
+
export declare function findMatchingProjectInCwd(projects: Record<string, ProjectConfiguration>, relativeCwd: string): string | undefined;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { NxJsonConfiguration } from './nx-json';
|
|
2
|
-
import { ProjectsConfigurations } from './workspace-json-project-json';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use readProjectsConfigurationFromProjectGraph(await createProjectGraphAsync())
|
|
5
|
-
*/
|
|
6
|
-
export declare function readAllWorkspaceConfiguration(): ProjectsConfigurations & NxJsonConfiguration;
|
|
7
1
|
/**
|
|
8
2
|
* Returns information about where apps and libs will be created.
|
|
9
3
|
*/
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readNxJson = exports.workspaceLayout =
|
|
4
|
-
const workspaces_1 = require("./workspaces");
|
|
5
|
-
const workspace_root_1 = require("../utils/workspace-root");
|
|
3
|
+
exports.readNxJson = exports.workspaceLayout = void 0;
|
|
6
4
|
const nx_json_1 = require("./nx-json");
|
|
7
|
-
// TODO(vsavkin): Remove after Nx 16 is out
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use readProjectsConfigurationFromProjectGraph(await createProjectGraphAsync())
|
|
10
|
-
*/
|
|
11
|
-
function readAllWorkspaceConfiguration() {
|
|
12
|
-
return new workspaces_1.Workspaces(workspace_root_1.workspaceRoot).readProjectsConfigurations();
|
|
13
|
-
}
|
|
14
|
-
exports.readAllWorkspaceConfiguration = readAllWorkspaceConfiguration;
|
|
15
5
|
/**
|
|
16
6
|
* Returns information about where apps and libs will be created.
|
|
17
7
|
*/
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import type { NxJsonConfiguration } from './nx-json';
|
|
2
2
|
import { ProjectsConfigurations } from './workspace-json-project-json';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This will be removed in v18. Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
5
|
+
*/
|
|
3
6
|
export declare class Workspaces {
|
|
4
7
|
private root;
|
|
5
|
-
private cachedProjectsConfig;
|
|
6
8
|
constructor(root: string);
|
|
7
9
|
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
readProjectsConfigurations(opts?: {
|
|
11
|
-
_includeProjectsFromAngularJson?: boolean;
|
|
12
|
-
}): ProjectsConfigurations;
|
|
13
|
-
/**
|
|
14
|
-
* Deprecated. Use readProjectsConfigurations
|
|
10
|
+
* @deprecated Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
15
11
|
*/
|
|
16
|
-
readWorkspaceConfiguration(
|
|
17
|
-
_ignorePluginInference?: boolean;
|
|
18
|
-
_includeProjectsFromAngularJson?: boolean;
|
|
19
|
-
}): ProjectsConfigurations & NxJsonConfiguration;
|
|
20
|
-
private mergeTargetDefaultsIntoProjectDescriptions;
|
|
12
|
+
readWorkspaceConfiguration(): ProjectsConfigurations & NxJsonConfiguration;
|
|
21
13
|
}
|
|
22
14
|
/**
|
|
23
15
|
* Pulled from toFileName in names from @nx/devkit.
|
package/src/config/workspaces.js
CHANGED
|
@@ -2,57 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toProjectName = exports.Workspaces = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
-
const installation_directory_1 = require("../utils/installation-directory");
|
|
6
|
-
const nx_plugin_1 = require("../utils/nx-plugin");
|
|
7
5
|
const nx_json_1 = require("./nx-json");
|
|
8
|
-
const angular_json_1 = require("../adapter/angular-json");
|
|
9
6
|
const retrieve_workspace_files_1 = require("../project-graph/utils/retrieve-workspace-files");
|
|
10
|
-
|
|
7
|
+
// TODO(v18): remove this class
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated This will be removed in v18. Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
10
|
+
*/
|
|
11
11
|
class Workspaces {
|
|
12
12
|
constructor(root) {
|
|
13
13
|
this.root = root;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* @deprecated
|
|
16
|
+
* @deprecated Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
if (this.cachedProjectsConfig &&
|
|
20
|
-
process.env.NX_CACHE_PROJECTS_CONFIG !== 'false') {
|
|
21
|
-
return this.cachedProjectsConfig;
|
|
22
|
-
}
|
|
18
|
+
readWorkspaceConfiguration() {
|
|
23
19
|
const nxJson = (0, nx_json_1.readNxJson)(this.root);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if ((0, angular_json_1.shouldMergeAngularProjects)(this.root, opts === null || opts === void 0 ? void 0 : opts._includeProjectsFromAngularJson)) {
|
|
27
|
-
projectsConfigurations = (0, angular_json_1.mergeAngularJsonAndProjects)(projectsConfigurations, this.root);
|
|
28
|
-
}
|
|
29
|
-
this.cachedProjectsConfig = {
|
|
30
|
-
version: 2,
|
|
31
|
-
projects: projectsConfigurations,
|
|
32
|
-
};
|
|
33
|
-
return this.cachedProjectsConfig;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Deprecated. Use readProjectsConfigurations
|
|
37
|
-
*/
|
|
38
|
-
readWorkspaceConfiguration(opts) {
|
|
39
|
-
const nxJson = (0, nx_json_1.readNxJson)(this.root);
|
|
40
|
-
return Object.assign(Object.assign({}, this.readProjectsConfigurations(opts)), nxJson);
|
|
41
|
-
}
|
|
42
|
-
mergeTargetDefaultsIntoProjectDescriptions(projects, nxJson) {
|
|
43
|
-
var _a;
|
|
44
|
-
for (const proj of Object.values(projects)) {
|
|
45
|
-
if (proj.targets) {
|
|
46
|
-
for (const targetName of Object.keys((_a = proj.targets) !== null && _a !== void 0 ? _a : {})) {
|
|
47
|
-
const projectTargetDefinition = proj.targets[targetName];
|
|
48
|
-
const defaults = (0, project_configuration_utils_1.readTargetDefaultsForTarget)(targetName, nxJson.targetDefaults, projectTargetDefinition.executor);
|
|
49
|
-
if (defaults) {
|
|
50
|
-
proj.targets[targetName] = (0, project_configuration_utils_1.mergeTargetConfigurations)(proj, targetName, defaults);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return projects;
|
|
20
|
+
return Object.assign({ version: 2, projects: (0, retrieve_workspace_files_1.retrieveProjectConfigurationsSync)(this.root, nxJson)
|
|
21
|
+
.projectNodes }, nxJson);
|
|
56
22
|
}
|
|
57
23
|
}
|
|
58
24
|
exports.Workspaces = Workspaces;
|