nx 18.4.0-canary.20240417-801a22b → 18.4.0-canary.20240418-e549ea2
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/.eslintrc.json +4 -0
- package/bin/nx.js +7 -19
- package/package.json +12 -12
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +6 -3
- package/src/core/graph/main.js +1 -1
- package/src/daemon/cache.js +18 -0
- package/src/daemon/client/client.js +3 -4
- package/src/daemon/server/handle-hash-tasks.js +2 -2
- package/src/daemon/server/project-graph-incremental-recomputation.js +1 -2
- package/src/daemon/socket-utils.js +2 -2
- package/src/native/index.js +68 -259
- package/src/native/native-bindings.js +290 -0
- package/src/project-graph/error-types.d.ts +27 -1
- package/src/project-graph/error-types.js +52 -1
- package/src/project-graph/plugins/isolation/index.js +8 -4
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +4 -10
- package/src/project-graph/plugins/utils.js +1 -1
- package/src/project-graph/project-graph.d.ts +2 -24
- package/src/project-graph/project-graph.js +11 -52
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/tasks-runner/init-tasks-runner.js +2 -0
- package/src/utils/dotenv.d.ts +7 -0
- package/src/utils/dotenv.js +22 -0
- package/src/daemon/daemon-project-graph-error.d.ts +0 -8
- package/src/daemon/daemon-project-graph-error.js +0 -13
package/.eslintrc.json
CHANGED
@@ -25,6 +25,10 @@
|
|
25
25
|
{
|
26
26
|
"group": ["nx/*"],
|
27
27
|
"message": "Circular import in 'nx' found. Use relative path."
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"group": ["**/native-bindings", "**/native-bindings.js"],
|
31
|
+
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
|
28
32
|
}
|
29
33
|
]
|
30
34
|
}
|
package/bin/nx.js
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
const find_workspace_root_1 = require("../src/utils/find-workspace-root");
|
5
5
|
const chalk = require("chalk");
|
6
|
-
const dotenv_1 = require("dotenv");
|
7
|
-
const dotenv_expand_1 = require("dotenv-expand");
|
6
|
+
const dotenv_1 = require("../src/utils/dotenv");
|
8
7
|
const init_local_1 = require("./init-local");
|
9
8
|
const output_1 = require("../src/utils/output");
|
10
9
|
const installation_directory_1 = require("../src/utils/installation-directory");
|
@@ -20,15 +19,18 @@ const client_1 = require("../src/daemon/client/client");
|
|
20
19
|
function main() {
|
21
20
|
if (process.argv[2] !== 'report' &&
|
22
21
|
process.argv[2] !== '--version' &&
|
23
|
-
process.argv[2] !== '--help'
|
22
|
+
process.argv[2] !== '--help' &&
|
23
|
+
process.argv[2] !== 'reset') {
|
24
24
|
(0, assert_supported_platform_1.assertSupportedPlatform)();
|
25
25
|
}
|
26
26
|
require('nx/src/utils/perf-logging');
|
27
|
+
const workspace = (0, find_workspace_root_1.findWorkspaceRoot)(process.cwd());
|
27
28
|
perf_hooks_1.performance.mark('loading dotenv files:start');
|
28
|
-
|
29
|
+
if (workspace) {
|
30
|
+
(0, dotenv_1.loadRootEnvFiles)(workspace.dir);
|
31
|
+
}
|
29
32
|
perf_hooks_1.performance.mark('loading dotenv files:end');
|
30
33
|
perf_hooks_1.performance.measure('loading dotenv files', 'loading dotenv files:start', 'loading dotenv files:end');
|
31
|
-
const workspace = (0, find_workspace_root_1.findWorkspaceRoot)(process.cwd());
|
32
34
|
// new is a special case because there is no local workspace to load
|
33
35
|
if (process.argv[2] === 'new' ||
|
34
36
|
process.argv[2] === '_migrate' ||
|
@@ -81,20 +83,6 @@ function main() {
|
|
81
83
|
}
|
82
84
|
}
|
83
85
|
}
|
84
|
-
/**
|
85
|
-
* This loads dotenv files from:
|
86
|
-
* - .env
|
87
|
-
* - .local.env
|
88
|
-
* - .env.local
|
89
|
-
*/
|
90
|
-
function loadDotEnvFiles() {
|
91
|
-
for (const file of ['.local.env', '.env.local', '.env']) {
|
92
|
-
const myEnv = (0, dotenv_1.config)({
|
93
|
-
path: file,
|
94
|
-
});
|
95
|
-
(0, dotenv_expand_1.expand)(myEnv);
|
96
|
-
}
|
97
|
-
}
|
98
86
|
function handleNoWorkspace(globalNxVersion) {
|
99
87
|
output_1.output.log({
|
100
88
|
title: `The current directory isn't part of an Nx workspace.`,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "18.4.0-canary.
|
3
|
+
"version": "18.4.0-canary.20240418-e549ea2",
|
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.4.0-canary.
|
69
|
+
"@nrwl/tao": "18.4.0-canary.20240418-e549ea2"
|
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.4.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "18.4.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.4.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.4.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.4.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.4.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.4.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.4.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.4.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "18.4.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "18.4.0-canary.20240418-e549ea2",
|
85
|
+
"@nx/nx-darwin-arm64": "18.4.0-canary.20240418-e549ea2",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.4.0-canary.20240418-e549ea2",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.4.0-canary.20240418-e549ea2",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.4.0-canary.20240418-e549ea2",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.4.0-canary.20240418-e549ea2",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.4.0-canary.20240418-e549ea2",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.4.0-canary.20240418-e549ea2",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.4.0-canary.20240418-e549ea2",
|
93
|
+
"@nx/nx-freebsd-x64": "18.4.0-canary.20240418-e549ea2"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -3,12 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkForUncommittedChanges = void 0;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
function checkForUncommittedChanges() {
|
6
|
-
const gitResult = (0, child_process_1.execSync)(
|
7
|
-
|
6
|
+
const gitResult = (0, child_process_1.execSync)('git status --porcelain').toString();
|
7
|
+
const filteredResults = gitResult
|
8
|
+
.split('\n')
|
9
|
+
.filter((line) => !line.includes('.nx') && line.trim().length > 0);
|
10
|
+
if (filteredResults.length > 0) {
|
8
11
|
console.log('❗️ Careful!');
|
9
12
|
console.log('You have uncommitted changes in your repository.');
|
10
13
|
console.log('');
|
11
|
-
console.log(
|
14
|
+
console.log(filteredResults.join('\n').toString());
|
12
15
|
console.log('Please commit your changes before running the migrator!');
|
13
16
|
process.exit(1);
|
14
17
|
}
|