nx 18.2.0-canary.20240326-fb90767 → 18.2.0-canary.20240328-7d2a420
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 +12 -12
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +3 -1
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +5 -0
- package/src/command-line/init/implementation/add-nx-to-nest.js +1 -1
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +3 -1
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +7 -1
- package/src/command-line/init/implementation/utils.d.ts +2 -1
- package/src/command-line/init/implementation/utils.js +17 -3
- package/src/command-line/init/init-v1.js +2 -2
- package/src/core/graph/3rdpartylicenses.txt +1 -52
- package/src/core/graph/index.html +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +3 -0
- package/src/plugins/js/index.js +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/tasks-runner/task-orchestrator.js +7 -1
- package/src/utils/ignore.js +8 -1
- package/src/utils/params.js +1 -1
- package/src/core/graph/polyfills.js +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "18.2.0-canary.
|
3
|
+
"version": "18.2.0-canary.20240328-7d2a420",
|
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.2.0-canary.
|
69
|
+
"@nrwl/tao": "18.2.0-canary.20240328-7d2a420"
|
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.2.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "18.2.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.2.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.2.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.2.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.2.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.2.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.2.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.2.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "18.2.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "18.2.0-canary.20240328-7d2a420",
|
85
|
+
"@nx/nx-darwin-arm64": "18.2.0-canary.20240328-7d2a420",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.2.0-canary.20240328-7d2a420",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.2.0-canary.20240328-7d2a420",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.2.0-canary.20240328-7d2a420",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.2.0-canary.20240328-7d2a420",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.2.0-canary.20240328-7d2a420",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.2.0-canary.20240328-7d2a420",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.2.0-canary.20240328-7d2a420",
|
93
|
+
"@nx/nx-freebsd-x64": "18.2.0-canary.20240328-7d2a420"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { InitArgs } from '../init-v1';
|
2
|
-
type Options = Pick<InitArgs, 'nxCloud' | 'interactive' | 'cacheable'
|
2
|
+
type Options = Pick<InitArgs, 'nxCloud' | 'interactive' | 'cacheable'> & {
|
3
|
+
legacy?: boolean;
|
4
|
+
};
|
3
5
|
export declare function addNxToMonorepo(options: Options): Promise<void>;
|
4
6
|
export {};
|
@@ -61,6 +61,11 @@ async function addNxToMonorepo(options) {
|
|
61
61
|
: false);
|
62
62
|
}
|
63
63
|
(0, utils_1.createNxJsonFile)(repoRoot, targetDefaults, cacheableOperations, scriptOutputs);
|
64
|
+
if (!options.legacy) {
|
65
|
+
packageJsonFiles.forEach((packageJsonPath) => {
|
66
|
+
(0, utils_1.markPackageJsonAsNxProject)((0, path_1.join)(repoRoot, packageJsonPath), cacheableOperations);
|
67
|
+
});
|
68
|
+
}
|
64
69
|
(0, utils_1.updateGitIgnore)(repoRoot);
|
65
70
|
(0, utils_1.addDepsToPackageJson)(repoRoot);
|
66
71
|
output_1.output.log({ title: '📦 Installing dependencies' });
|
@@ -78,7 +78,7 @@ async function addNxToNest(options, packageJson) {
|
|
78
78
|
(0, utils_1.updateGitIgnore)(repoRoot);
|
79
79
|
(0, utils_1.addDepsToPackageJson)(repoRoot);
|
80
80
|
addNestPluginToPackageJson(repoRoot);
|
81
|
-
(0, utils_1.
|
81
|
+
(0, utils_1.markRootPackageJsonAsNxProjectLegacy)(repoRoot, cacheableOperations, pmc);
|
82
82
|
createProjectJson(repoRoot, packageJson, nestCLIConfiguration);
|
83
83
|
removeFile(repoRoot, 'nest-cli.json');
|
84
84
|
updatePackageJsonScripts(repoRoot, isJS);
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { InitArgs } from '../init-v1';
|
2
|
-
type Options = Pick<InitArgs, 'nxCloud' | 'interactive' | 'cacheable'
|
2
|
+
type Options = Pick<InitArgs, 'nxCloud' | 'interactive' | 'cacheable'> & {
|
3
|
+
legacy?: boolean;
|
4
|
+
};
|
3
5
|
export declare function addNxToNpmRepo(options: Options): Promise<void>;
|
4
6
|
export {};
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.addNxToNpmRepo = void 0;
|
4
4
|
const enquirer = require("enquirer");
|
5
|
+
const path_1 = require("path");
|
5
6
|
const fileutils_1 = require("../../../utils/fileutils");
|
6
7
|
const output_1 = require("../../../utils/output");
|
7
8
|
const package_manager_1 = require("../../../utils/package-manager");
|
@@ -52,7 +53,12 @@ async function addNxToNpmRepo(options) {
|
|
52
53
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
53
54
|
(0, utils_1.updateGitIgnore)(repoRoot);
|
54
55
|
(0, utils_1.addDepsToPackageJson)(repoRoot);
|
55
|
-
(
|
56
|
+
if (options.legacy) {
|
57
|
+
(0, utils_1.markRootPackageJsonAsNxProjectLegacy)(repoRoot, cacheableOperations, pmc);
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
(0, utils_1.markPackageJsonAsNxProject)((0, path_1.join)(repoRoot, 'package.json'), cacheableOperations);
|
61
|
+
}
|
56
62
|
output_1.output.log({ title: '📦 Installing dependencies' });
|
57
63
|
(0, utils_1.runInstall)(repoRoot, pmc);
|
58
64
|
if (useNxCloud) {
|
@@ -8,7 +8,8 @@ export declare function updateGitIgnore(root: string): void;
|
|
8
8
|
export declare function runInstall(repoRoot: string, pmc?: PackageManagerCommands): void;
|
9
9
|
export declare function initCloud(repoRoot: string, installationSource: 'nx-init-angular' | 'nx-init-cra' | 'nx-init-monorepo' | 'nx-init-nest' | 'nx-init-npm-repo'): void;
|
10
10
|
export declare function addVsCodeRecommendedExtensions(repoRoot: string, extensions: string[]): void;
|
11
|
-
export declare function
|
11
|
+
export declare function markRootPackageJsonAsNxProjectLegacy(repoRoot: string, cacheableScripts: string[], pmc: PackageManagerCommands): void;
|
12
|
+
export declare function markPackageJsonAsNxProject(packageJsonPath: string, cacheableScripts: string[]): void;
|
12
13
|
export declare function printFinalMessage({ learnMoreLink, bodyLines, }: {
|
13
14
|
learnMoreLink?: string;
|
14
15
|
bodyLines?: string[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.isMonorepo = exports.printFinalMessage = exports.
|
3
|
+
exports.isMonorepo = exports.printFinalMessage = exports.markPackageJsonAsNxProject = exports.markRootPackageJsonAsNxProjectLegacy = exports.addVsCodeRecommendedExtensions = exports.initCloud = exports.runInstall = exports.updateGitIgnore = exports.addDepsToPackageJson = exports.createNxJsonFile = void 0;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const child_process_2 = require("../../../utils/child-process");
|
@@ -134,7 +134,7 @@ function addVsCodeRecommendedExtensions(repoRoot, extensions) {
|
|
134
134
|
}
|
135
135
|
}
|
136
136
|
exports.addVsCodeRecommendedExtensions = addVsCodeRecommendedExtensions;
|
137
|
-
function
|
137
|
+
function markRootPackageJsonAsNxProjectLegacy(repoRoot, cacheableScripts, pmc) {
|
138
138
|
const json = (0, fileutils_1.readJsonFile)((0, path_2.joinPathFragments)(repoRoot, `package.json`));
|
139
139
|
json.nx = {};
|
140
140
|
for (let script of cacheableScripts) {
|
@@ -153,7 +153,21 @@ function markRootPackageJsonAsNxProject(repoRoot, cacheableScripts, pmc) {
|
|
153
153
|
}
|
154
154
|
(0, fileutils_1.writeJsonFile)(`package.json`, json);
|
155
155
|
}
|
156
|
-
exports.
|
156
|
+
exports.markRootPackageJsonAsNxProjectLegacy = markRootPackageJsonAsNxProjectLegacy;
|
157
|
+
function markPackageJsonAsNxProject(packageJsonPath, cacheableScripts) {
|
158
|
+
const json = (0, fileutils_1.readJsonFile)(packageJsonPath);
|
159
|
+
if (!json.scripts) {
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
json.nx = { includedScripts: [] };
|
163
|
+
for (let script of cacheableScripts) {
|
164
|
+
if (json.scripts[script]) {
|
165
|
+
json.nx.includedScripts.push(script);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
(0, fileutils_1.writeJsonFile)(packageJsonPath, json);
|
169
|
+
}
|
170
|
+
exports.markPackageJsonAsNxProject = markPackageJsonAsNxProject;
|
157
171
|
function printFinalMessage({ learnMoreLink, bodyLines, }) {
|
158
172
|
const normalizedBodyLines = (bodyLines ?? []).map((l) => l.startsWith('- ') ? l : `- ${l}`);
|
159
173
|
output_1.output.success({
|
@@ -37,10 +37,10 @@ async function initHandler(options) {
|
|
37
37
|
await (0, add_nx_to_nest_1.addNxToNest)(options, packageJson);
|
38
38
|
}
|
39
39
|
else if ((0, utils_1.isMonorepo)(packageJson)) {
|
40
|
-
await (0, add_nx_to_monorepo_1.addNxToMonorepo)(options);
|
40
|
+
await (0, add_nx_to_monorepo_1.addNxToMonorepo)({ ...options, legacy: true });
|
41
41
|
}
|
42
42
|
else {
|
43
|
-
await (0, add_nx_to_npm_repo_1.addNxToNpmRepo)(options);
|
43
|
+
await (0, add_nx_to_npm_repo_1.addNxToNpmRepo)({ ...options, legacy: true });
|
44
44
|
}
|
45
45
|
}
|
46
46
|
else {
|
@@ -34,7 +34,7 @@ MIT
|
|
34
34
|
MIT
|
35
35
|
(The MIT License)
|
36
36
|
|
37
|
-
Copyright (c) 2017-
|
37
|
+
Copyright (c) 2017-2024 Narwhal Technologies Inc.
|
38
38
|
|
39
39
|
Permission is hereby granted, free of charge, to any person obtaining
|
40
40
|
a copy of this software and associated documentation files (the
|
@@ -704,57 +704,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
704
704
|
SOFTWARE.
|
705
705
|
|
706
706
|
|
707
|
-
regenerator-runtime
|
708
|
-
MIT
|
709
|
-
MIT License
|
710
|
-
|
711
|
-
Copyright (c) 2014-present, Facebook, Inc.
|
712
|
-
|
713
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
714
|
-
of this software and associated documentation files (the "Software"), to deal
|
715
|
-
in the Software without restriction, including without limitation the rights
|
716
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
717
|
-
copies of the Software, and to permit persons to whom the Software is
|
718
|
-
furnished to do so, subject to the following conditions:
|
719
|
-
|
720
|
-
The above copyright notice and this permission notice shall be included in all
|
721
|
-
copies or substantial portions of the Software.
|
722
|
-
|
723
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
724
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
725
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
726
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
727
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
728
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
729
|
-
SOFTWARE.
|
730
|
-
|
731
|
-
|
732
|
-
tabbable
|
733
|
-
MIT
|
734
|
-
The MIT License (MIT)
|
735
|
-
|
736
|
-
Copyright (c) 2015 David Clark
|
737
|
-
|
738
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
739
|
-
of this software and associated documentation files (the "Software"), to deal
|
740
|
-
in the Software without restriction, including without limitation the rights
|
741
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
742
|
-
copies of the Software, and to permit persons to whom the Software is
|
743
|
-
furnished to do so, subject to the following conditions:
|
744
|
-
|
745
|
-
The above copyright notice and this permission notice shall be included in all
|
746
|
-
copies or substantial portions of the Software.
|
747
|
-
|
748
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
749
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
750
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
751
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
752
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
753
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
754
|
-
SOFTWARE.
|
755
|
-
|
756
|
-
|
757
|
-
|
758
707
|
toggle-selection
|
759
708
|
MIT
|
760
709
|
|
@@ -27,5 +27,5 @@
|
|
27
27
|
|
28
28
|
<body class="bg-white text-slate-500 dark:bg-slate-900 dark:text-slate-400">
|
29
29
|
<div class="flex p-0" id="app"></div>
|
30
|
-
<script src="runtime.js" type="module"></script><script src="
|
30
|
+
<script src="runtime.js" type="module"></script><script src="styles.js" type="module"></script><script src="main.js" type="module"></script></body>
|
31
31
|
</html>
|