nx 23.3.0-beta.3 → 23.3.0-beta.5
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/dist/plugins/package-json.js +1 -1
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/plugins/package-json/create-nodes.d.ts +2 -2
- package/dist/src/plugins/package-json/create-nodes.js +13 -13
- package/package.json +11 -11
- package/readme-template.md +16 -0
|
@@ -29,7 +29,7 @@ const plugin = {
|
|
|
29
29
|
const patterns = (0, package_json_1.buildPackageJsonPatterns)(context.workspaceRoot, (f) => (0, fileutils_1.readJsonFile)((0, path_1.join)(context.workspaceRoot, f)));
|
|
30
30
|
const isInPackageJsonWorkspaces = (0, package_json_1.buildPackageJsonWorkspacesMatcher)(patterns);
|
|
31
31
|
const packageManagerCommand = (0, package_manager_1.getPackageManagerCommand)((0, package_manager_1.detectPackageManager)(context.workspaceRoot), context.workspaceRoot);
|
|
32
|
-
const result = (0, plugins_1.createNodesFromFiles)((packageJsonPath) => (0, package_json_1.createNodeFromPackageJson)(packageJsonPath, workspace_root_1.workspaceRoot, cache, isInPackageJsonWorkspaces(packageJsonPath), packageManagerCommand), configFiles, options, context);
|
|
32
|
+
const result = (0, plugins_1.createNodesFromFiles)((packageJsonPath) => (0, package_json_1.createNodeFromPackageJson)(packageJsonPath, workspace_root_1.workspaceRoot, cache, isInPackageJsonWorkspaces(packageJsonPath), packageManagerCommand, context.nxJsonConfiguration), configFiles, options, context);
|
|
33
33
|
writeCache();
|
|
34
34
|
return result;
|
|
35
35
|
},
|
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ import type { ProjectConfiguration } from '../../config/workspace-json-project-j
|
|
|
3
3
|
import { PackageJson } from '../../utils/package-json';
|
|
4
4
|
import { PackageManagerCommands } from '../../utils/package-manager';
|
|
5
5
|
import { CreateNodes } from '../../project-graph/plugins';
|
|
6
|
-
import { PackageJsonConfigurationCache } from '../../../plugins/package-json';
|
|
6
|
+
import type { PackageJsonConfigurationCache } from '../../../plugins/package-json';
|
|
7
7
|
export declare const createNodes: CreateNodes;
|
|
8
8
|
export declare function buildPackageJsonPatterns(workspaceRoot: string, readJson: (path: string) => any): PackageJsonPatterns;
|
|
9
9
|
type PackageJsonPatterns = {
|
|
@@ -13,7 +13,7 @@ type PackageJsonPatterns = {
|
|
|
13
13
|
negativeLookup: Record<string, boolean>;
|
|
14
14
|
};
|
|
15
15
|
export declare function buildPackageJsonWorkspacesMatcher(patterns: PackageJsonPatterns): (p: any) => boolean;
|
|
16
|
-
export declare function createNodeFromPackageJson(pkgJsonPath: string, workspaceRoot: string, cache: PackageJsonConfigurationCache, isInPackageManagerWorkspaces: boolean, packageManagerCommand: PackageManagerCommands): {
|
|
16
|
+
export declare function createNodeFromPackageJson(pkgJsonPath: string, workspaceRoot: string, cache: PackageJsonConfigurationCache | undefined, isInPackageManagerWorkspaces: boolean, packageManagerCommand: PackageManagerCommands, nxJson?: NxJsonConfiguration): {
|
|
17
17
|
projects: {
|
|
18
18
|
[x: string]: ProjectConfiguration;
|
|
19
19
|
};
|
|
@@ -22,7 +22,6 @@ const versions_1 = require("../../utils/versions");
|
|
|
22
22
|
const plugins_1 = require("../../project-graph/plugins");
|
|
23
23
|
const path_2 = require("path");
|
|
24
24
|
const file_hasher_1 = require("../../hasher/file-hasher");
|
|
25
|
-
const package_json_2 = require("../../../plugins/package-json");
|
|
26
25
|
const globPatterns = (0, globs_1.combineGlobPatterns)('package.json', '**/package.json', 'project.json', '**/project.json');
|
|
27
26
|
exports.createNodes = [
|
|
28
27
|
globPatterns,
|
|
@@ -38,7 +37,6 @@ exports.createNodes = [
|
|
|
38
37
|
const isNextToProjectJson = (packageJsonPath) => {
|
|
39
38
|
return projectJsonRoots.has((0, node_path_1.dirname)(packageJsonPath));
|
|
40
39
|
};
|
|
41
|
-
const cache = (0, package_json_2.readPackageJsonConfigurationCache)();
|
|
42
40
|
const packageManagerCommand = (0, package_manager_1.getPackageManagerCommand)((0, package_manager_1.detectPackageManager)(context.workspaceRoot), context.workspaceRoot);
|
|
43
41
|
return (0, plugins_1.createNodesFromFiles)((packageJsonPath, options, context) => {
|
|
44
42
|
const isInPackageManagerWorkspaces = isInPackageJsonWorkspaces(packageJsonPath);
|
|
@@ -47,7 +45,7 @@ exports.createNodes = [
|
|
|
47
45
|
// Skip if package.json is not part of the package.json workspaces and not next to a project.json.
|
|
48
46
|
return null;
|
|
49
47
|
}
|
|
50
|
-
return createNodeFromPackageJson(packageJsonPath, context.workspaceRoot,
|
|
48
|
+
return createNodeFromPackageJson(packageJsonPath, context.workspaceRoot, undefined, isInPackageManagerWorkspaces, packageManagerCommand, context.nxJsonConfiguration);
|
|
51
49
|
}, packageJsons, _, context);
|
|
52
50
|
},
|
|
53
51
|
];
|
|
@@ -115,16 +113,18 @@ function buildPackageJsonWorkspacesMatcher(patterns) {
|
|
|
115
113
|
!patterns.negativeLookup[p] &&
|
|
116
114
|
negative.every((m) => m.match(p));
|
|
117
115
|
}
|
|
118
|
-
function createNodeFromPackageJson(pkgJsonPath, workspaceRoot, cache, isInPackageManagerWorkspaces, packageManagerCommand) {
|
|
116
|
+
function createNodeFromPackageJson(pkgJsonPath, workspaceRoot, cache, isInPackageManagerWorkspaces, packageManagerCommand, nxJson) {
|
|
119
117
|
const json = (0, fileutils_1.readJsonFile)((0, node_path_1.join)(workspaceRoot, pkgJsonPath));
|
|
120
118
|
const projectRoot = (0, node_path_1.dirname)(pkgJsonPath);
|
|
121
|
-
const hash =
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
const hash = cache
|
|
120
|
+
? (0, file_hasher_1.hashObject)({
|
|
121
|
+
...json,
|
|
122
|
+
root: projectRoot,
|
|
123
|
+
isInPackageManagerWorkspaces,
|
|
124
|
+
nxVersion: versions_1.nxVersion,
|
|
125
|
+
})
|
|
126
|
+
: undefined;
|
|
127
|
+
const cached = cache?.get(hash);
|
|
128
128
|
if (cached) {
|
|
129
129
|
return {
|
|
130
130
|
projects: {
|
|
@@ -132,8 +132,8 @@ function createNodeFromPackageJson(pkgJsonPath, workspaceRoot, cache, isInPackag
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
const project = buildProjectConfigurationFromPackageJson(json, workspaceRoot, pkgJsonPath, (0, nx_json_1.readNxJson)(workspaceRoot), isInPackageManagerWorkspaces, packageManagerCommand);
|
|
136
|
-
cache
|
|
135
|
+
const project = buildProjectConfigurationFromPackageJson(json, workspaceRoot, pkgJsonPath, nxJson ?? (0, nx_json_1.readNxJson)(workspaceRoot), isInPackageManagerWorkspaces, packageManagerCommand);
|
|
136
|
+
cache?.set(hash, project);
|
|
137
137
|
return {
|
|
138
138
|
projects: {
|
|
139
139
|
[project.root]: project,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "23.3.0-beta.
|
|
3
|
+
"version": "23.3.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
@@ -184,16 +184,16 @@
|
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"optionalDependencies": {
|
|
187
|
-
"@nx/nx-darwin-arm64": "23.3.0-beta.
|
|
188
|
-
"@nx/nx-darwin-x64": "23.3.0-beta.
|
|
189
|
-
"@nx/nx-freebsd-x64": "23.3.0-beta.
|
|
190
|
-
"@nx/nx-linux-arm-gnueabihf": "23.3.0-beta.
|
|
191
|
-
"@nx/nx-linux-arm64-gnu": "23.3.0-beta.
|
|
192
|
-
"@nx/nx-linux-arm64-musl": "23.3.0-beta.
|
|
193
|
-
"@nx/nx-linux-x64-gnu": "23.3.0-beta.
|
|
194
|
-
"@nx/nx-linux-x64-musl": "23.3.0-beta.
|
|
195
|
-
"@nx/nx-win32-arm64-msvc": "23.3.0-beta.
|
|
196
|
-
"@nx/nx-win32-x64-msvc": "23.3.0-beta.
|
|
187
|
+
"@nx/nx-darwin-arm64": "23.3.0-beta.5",
|
|
188
|
+
"@nx/nx-darwin-x64": "23.3.0-beta.5",
|
|
189
|
+
"@nx/nx-freebsd-x64": "23.3.0-beta.5",
|
|
190
|
+
"@nx/nx-linux-arm-gnueabihf": "23.3.0-beta.5",
|
|
191
|
+
"@nx/nx-linux-arm64-gnu": "23.3.0-beta.5",
|
|
192
|
+
"@nx/nx-linux-arm64-musl": "23.3.0-beta.5",
|
|
193
|
+
"@nx/nx-linux-x64-gnu": "23.3.0-beta.5",
|
|
194
|
+
"@nx/nx-linux-x64-musl": "23.3.0-beta.5",
|
|
195
|
+
"@nx/nx-win32-arm64-msvc": "23.3.0-beta.5",
|
|
196
|
+
"@nx/nx-win32-x64-msvc": "23.3.0-beta.5"
|
|
197
197
|
},
|
|
198
198
|
"nx-migrations": {
|
|
199
199
|
"migrations": "./migrations.json",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Repos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
{{links}}
|
|
9
|
+
|
|
10
|
+
<hr>
|
|
11
|
+
|
|
12
|
+
# Nx: Smart Repos · Fast Builds
|
|
13
|
+
|
|
14
|
+
Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
|
|
15
|
+
|
|
16
|
+
{{content}}
|