nx 18.2.0-beta.1 → 18.2.0-beta.2
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 -1
- package/src/core/graph/index.html +1 -1
- package/src/core/graph/main.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-beta.
|
3
|
+
"version": "18.2.0-beta.2",
|
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-beta.
|
69
|
+
"@nrwl/tao": "18.2.0-beta.2"
|
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-beta.
|
85
|
-
"@nx/nx-darwin-arm64": "18.2.0-beta.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.2.0-beta.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.2.0-beta.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.2.0-beta.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.2.0-beta.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.2.0-beta.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.2.0-beta.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.2.0-beta.
|
93
|
-
"@nx/nx-freebsd-x64": "18.2.0-beta.
|
84
|
+
"@nx/nx-darwin-x64": "18.2.0-beta.2",
|
85
|
+
"@nx/nx-darwin-arm64": "18.2.0-beta.2",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.2.0-beta.2",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.2.0-beta.2",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.2.0-beta.2",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.2.0-beta.2",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.2.0-beta.2",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.2.0-beta.2",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.2.0-beta.2",
|
93
|
+
"@nx/nx-freebsd-x64": "18.2.0-beta.2"
|
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 {
|
@@ -214,7 +214,7 @@ SOFTWARE.
|
|
214
214
|
|
215
215
|
core-js
|
216
216
|
MIT
|
217
|
-
Copyright (c) 2014-
|
217
|
+
Copyright (c) 2014-2022 Denis Pushkarev
|
218
218
|
|
219
219
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
220
220
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -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>
|