nx 18.0.7 → 18.0.8
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/bin/init-local.js +13 -1
- package/package.json +12 -12
- package/src/command-line/init/implementation/add-nx-to-nest.js +2 -2
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +2 -2
- package/src/command-line/init/implementation/utils.d.ts +1 -3
- package/src/command-line/init/implementation/utils.js +9 -16
- package/src/command-line/init/init-v2.js +3 -2
- package/src/command-line/release/utils/shared.d.ts +5 -1
- package/src/command-line/release/version.d.ts +1 -1
- package/src/command-line/release/version.js +1 -1
- package/src/core/graph/3rdpartylicenses.txt +51 -0
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/plugins/js/lock-file/lock-file.js +13 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +16 -13
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +8 -7
package/bin/init-local.js
CHANGED
|
@@ -99,7 +99,14 @@ function isKnownCommand(command) {
|
|
|
99
99
|
}
|
|
100
100
|
function shouldDelegateToAngularCLI() {
|
|
101
101
|
const command = process.argv[2];
|
|
102
|
-
const commands = [
|
|
102
|
+
const commands = [
|
|
103
|
+
'analytics',
|
|
104
|
+
'cache',
|
|
105
|
+
'completion',
|
|
106
|
+
'config',
|
|
107
|
+
'doc',
|
|
108
|
+
'update',
|
|
109
|
+
];
|
|
103
110
|
return commands.indexOf(command) > -1;
|
|
104
111
|
}
|
|
105
112
|
function handleAngularCLIFallbacks(workspace) {
|
|
@@ -122,6 +129,11 @@ function handleAngularCLIFallbacks(workspace) {
|
|
|
122
129
|
For more information, see https://nx.dev/features/integrate-with-editors`);
|
|
123
130
|
}
|
|
124
131
|
}
|
|
132
|
+
else if (process.argv[2] === 'cache') {
|
|
133
|
+
console.log(`"ng cache" is not natively supported by Nx.
|
|
134
|
+
To clear the cache, you can delete the ".angular/cache" directory (or the directory configured by "cli.cache.path" in the "nx.json" file).
|
|
135
|
+
To update the cache configuration, you can directly update the relevant options in your "nx.json" file (https://angular.io/guide/workspace-config#cache-options).`);
|
|
136
|
+
}
|
|
125
137
|
else {
|
|
126
138
|
try {
|
|
127
139
|
// nx-ignore-next-line
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.8",
|
|
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.0.
|
|
69
|
+
"@nrwl/tao": "18.0.8"
|
|
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.0.
|
|
85
|
-
"@nx/nx-darwin-arm64": "18.0.
|
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.0.
|
|
87
|
-
"@nx/nx-linux-x64-musl": "18.0.
|
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.0.
|
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.0.
|
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.0.
|
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.0.
|
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.0.
|
|
93
|
-
"@nx/nx-freebsd-x64": "18.0.
|
|
84
|
+
"@nx/nx-darwin-x64": "18.0.8",
|
|
85
|
+
"@nx/nx-darwin-arm64": "18.0.8",
|
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.0.8",
|
|
87
|
+
"@nx/nx-linux-x64-musl": "18.0.8",
|
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.0.8",
|
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.0.8",
|
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.0.8",
|
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.0.8",
|
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.0.8",
|
|
93
|
+
"@nx/nx-freebsd-x64": "18.0.8"
|
|
94
94
|
},
|
|
95
95
|
"nx-migrations": {
|
|
96
96
|
"migrations": "./migrations.json",
|
|
@@ -73,12 +73,12 @@ async function addNxToNest(options, packageJson) {
|
|
|
73
73
|
? await (0, connect_to_nx_cloud_1.connectExistingRepoToNxCloudPrompt)()
|
|
74
74
|
: false);
|
|
75
75
|
}
|
|
76
|
-
(0, utils_1.createNxJsonFile)(repoRoot, [], [...cacheableOperations, ...nestCacheableScripts],
|
|
76
|
+
(0, utils_1.createNxJsonFile)(repoRoot, [], [...cacheableOperations, ...nestCacheableScripts], scriptOutputs);
|
|
77
77
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
|
78
78
|
(0, utils_1.updateGitIgnore)(repoRoot);
|
|
79
79
|
(0, utils_1.addDepsToPackageJson)(repoRoot);
|
|
80
80
|
addNestPluginToPackageJson(repoRoot);
|
|
81
|
-
(0, utils_1.markRootPackageJsonAsNxProject)(repoRoot, cacheableOperations,
|
|
81
|
+
(0, utils_1.markRootPackageJsonAsNxProject)(repoRoot, cacheableOperations, pmc);
|
|
82
82
|
createProjectJson(repoRoot, packageJson, nestCLIConfiguration);
|
|
83
83
|
removeFile(repoRoot, 'nest-cli.json');
|
|
84
84
|
updatePackageJsonScripts(repoRoot, isJS);
|
|
@@ -48,11 +48,11 @@ async function addNxToNpmRepo(options) {
|
|
|
48
48
|
? await (0, connect_to_nx_cloud_1.connectExistingRepoToNxCloudPrompt)()
|
|
49
49
|
: false);
|
|
50
50
|
}
|
|
51
|
-
(0, utils_1.createNxJsonFile)(repoRoot, [], cacheableOperations,
|
|
51
|
+
(0, utils_1.createNxJsonFile)(repoRoot, [], cacheableOperations, scriptOutputs);
|
|
52
52
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
|
53
53
|
(0, utils_1.updateGitIgnore)(repoRoot);
|
|
54
54
|
(0, utils_1.addDepsToPackageJson)(repoRoot);
|
|
55
|
-
(0, utils_1.markRootPackageJsonAsNxProject)(repoRoot, cacheableOperations,
|
|
55
|
+
(0, utils_1.markRootPackageJsonAsNxProject)(repoRoot, cacheableOperations, pmc);
|
|
56
56
|
output_1.output.log({ title: '📦 Installing dependencies' });
|
|
57
57
|
(0, utils_1.runInstall)(repoRoot, pmc);
|
|
58
58
|
if (useNxCloud) {
|
|
@@ -8,9 +8,7 @@ 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 markRootPackageJsonAsNxProject(repoRoot: string, cacheableScripts: string[],
|
|
12
|
-
[script: string]: string;
|
|
13
|
-
}, pmc: PackageManagerCommands): void;
|
|
11
|
+
export declare function markRootPackageJsonAsNxProject(repoRoot: string, cacheableScripts: string[], pmc: PackageManagerCommands): void;
|
|
14
12
|
export declare function printFinalMessage({ learnMoreLink, bodyLines, }: {
|
|
15
13
|
learnMoreLink?: string;
|
|
16
14
|
bodyLines?: string[];
|
|
@@ -25,14 +25,14 @@ function createNxJsonFile(repoRoot, topologicalTargets, cacheableOperations, scr
|
|
|
25
25
|
nxJson.targetDefaults[scriptName] ??= {};
|
|
26
26
|
nxJson.targetDefaults[scriptName] = { dependsOn: [`^${scriptName}`] };
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
nxJson.targetDefaults[scriptName] ??= {};
|
|
34
|
-
nxJson.targetDefaults[scriptName].outputs = [`{projectRoot}/${output}`];
|
|
28
|
+
}
|
|
29
|
+
for (const [scriptName, output] of Object.entries(scriptOutputs)) {
|
|
30
|
+
if (!output) {
|
|
31
|
+
// eslint-disable-next-line no-continue
|
|
32
|
+
continue;
|
|
35
33
|
}
|
|
34
|
+
nxJson.targetDefaults[scriptName] ??= {};
|
|
35
|
+
nxJson.targetDefaults[scriptName].outputs = [`{projectRoot}/${output}`];
|
|
36
36
|
}
|
|
37
37
|
for (const target of cacheableOperations) {
|
|
38
38
|
nxJson.targetDefaults[target] ??= {};
|
|
@@ -135,16 +135,9 @@ function addVsCodeRecommendedExtensions(repoRoot, extensions) {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
exports.addVsCodeRecommendedExtensions = addVsCodeRecommendedExtensions;
|
|
138
|
-
function markRootPackageJsonAsNxProject(repoRoot, cacheableScripts,
|
|
138
|
+
function markRootPackageJsonAsNxProject(repoRoot, cacheableScripts, pmc) {
|
|
139
139
|
const json = (0, fileutils_1.readJsonFile)((0, path_2.joinPathFragments)(repoRoot, `package.json`));
|
|
140
|
-
json.nx = {
|
|
141
|
-
for (let script of Object.keys(scriptOutputs)) {
|
|
142
|
-
if (scriptOutputs[script]) {
|
|
143
|
-
json.nx.targets[script] = {
|
|
144
|
-
outputs: [`{projectRoot}/${scriptOutputs[script]}`],
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}
|
|
140
|
+
json.nx = {};
|
|
148
141
|
for (let script of cacheableScripts) {
|
|
149
142
|
const scriptDefinition = json.scripts[script];
|
|
150
143
|
if (!scriptDefinition) {
|
|
@@ -19,6 +19,7 @@ const add_nx_to_npm_repo_1 = require("./implementation/add-nx-to-npm-repo");
|
|
|
19
19
|
const add_nx_to_monorepo_1 = require("./implementation/add-nx-to-monorepo");
|
|
20
20
|
const path_1 = require("path");
|
|
21
21
|
async function initHandler(options) {
|
|
22
|
+
process.env.NX_RUNNING_NX_INIT = 'true';
|
|
22
23
|
const version = process.env.NX_VERSION ?? ((0, semver_1.prerelease)(versions_1.nxVersion) ? 'next' : 'latest');
|
|
23
24
|
if (process.env.NX_VERSION) {
|
|
24
25
|
output_1.output.log({ title: `Using version ${process.env.NX_VERSION}` });
|
|
@@ -32,7 +33,7 @@ async function initHandler(options) {
|
|
|
32
33
|
}
|
|
33
34
|
(0, add_nx_scripts_1.generateDotNxSetup)(version);
|
|
34
35
|
// invokes the wrapper, thus invoking the initial installation process
|
|
35
|
-
(0, child_process_1.runNxSync)('');
|
|
36
|
+
(0, child_process_1.runNxSync)('--version', { stdio: 'ignore' });
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
39
|
// TODO(jack): Remove this Angular logic once `@nx/angular` is compatible with inferred targets.
|
|
@@ -79,7 +80,7 @@ async function initHandler(options) {
|
|
|
79
80
|
if (!detectPluginsResponse.updatePackageScripts) {
|
|
80
81
|
const rootPackageJsonPath = (0, path_1.join)(repoRoot, 'package.json');
|
|
81
82
|
const json = (0, fileutils_1.readJsonFile)(rootPackageJsonPath);
|
|
82
|
-
json.nx = {};
|
|
83
|
+
json.nx = { includedScripts: [] };
|
|
83
84
|
(0, fileutils_1.writeJsonFile)(rootPackageJsonPath, json);
|
|
84
85
|
}
|
|
85
86
|
if (useNxCloud) {
|
|
@@ -12,7 +12,11 @@ export type ReleaseVersionGeneratorResult = {
|
|
|
12
12
|
}) => Promise<string[]>;
|
|
13
13
|
};
|
|
14
14
|
export type VersionData = Record<string, {
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* newVersion will be null in the case that no changes are detected for the project,
|
|
17
|
+
* e.g. when using conventional commits
|
|
18
|
+
*/
|
|
19
|
+
newVersion: string | null;
|
|
16
20
|
currentVersion: string;
|
|
17
21
|
dependentProjects: any[];
|
|
18
22
|
}>;
|
|
@@ -4,7 +4,7 @@ import { ReleaseGroupWithName } from './config/filter-release-groups';
|
|
|
4
4
|
import { VersionData } from './utils/shared';
|
|
5
5
|
export { deriveNewSemverVersion } from './utils/semver';
|
|
6
6
|
export type { ReleaseVersionGeneratorResult, VersionData, } from './utils/shared';
|
|
7
|
-
export declare const validReleaseVersionPrefixes:
|
|
7
|
+
export declare const validReleaseVersionPrefixes: readonly ["auto", "", "~", "^", "="];
|
|
8
8
|
export interface ReleaseVersionGeneratorSchema {
|
|
9
9
|
projects: ProjectGraphProjectNode[];
|
|
10
10
|
releaseGroup: ReleaseGroupWithName;
|
|
@@ -21,7 +21,7 @@ const shared_1 = require("./utils/shared");
|
|
|
21
21
|
// Reexport some utils for use in plugin release-version generator implementations
|
|
22
22
|
var semver_1 = require("./utils/semver");
|
|
23
23
|
Object.defineProperty(exports, "deriveNewSemverVersion", { enumerable: true, get: function () { return semver_1.deriveNewSemverVersion; } });
|
|
24
|
-
exports.validReleaseVersionPrefixes = ['auto', '', '~', '^'];
|
|
24
|
+
exports.validReleaseVersionPrefixes = ['auto', '', '~', '^', '='];
|
|
25
25
|
const releaseVersionCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => releaseVersion(args));
|
|
26
26
|
exports.releaseVersionCLIHandler = releaseVersionCLIHandler;
|
|
27
27
|
/**
|
|
@@ -704,6 +704,57 @@ 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
|
+
|
|
707
758
|
toggle-selection
|
|
708
759
|
MIT
|
|
709
760
|
|