@nx/workspace 23.2.0-beta.1 → 23.2.0-beta.10
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/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/src/core/file-utils.d.ts +2 -1
- package/dist/src/core/file-utils.js +12 -2
- package/dist/src/core/project-graph.d.ts +2 -1
- package/dist/src/core/project-graph.js +11 -2
- package/dist/src/generators/ci-workflow/ci-workflow.js +4 -3
- package/dist/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +3 -2
- package/dist/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +7 -5
- package/dist/src/generators/ci-workflow/files/ci-config/.nx/ci-config.yaml__tmpl__ +9 -0
- package/dist/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +3 -2
- package/dist/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +3 -2
- package/dist/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +3 -2
- package/dist/src/generators/convert-to-nx-project/convert-to-nx-project.js +3 -3
- package/dist/src/generators/infer-targets/infer-targets.js +6 -16
- package/dist/src/generators/new/files-integrated-repo/__dot__vscode/extensions.json__tmpl__ +3 -2
- package/dist/src/generators/new/generate-preset.js +40 -8
- package/dist/src/generators/new/generate-workspace-files.js +8 -6
- package/dist/src/generators/new/new.d.ts +2 -2
- package/dist/src/generators/new/new.js +10 -1
- package/dist/src/generators/new/schema.json +3 -2
- package/dist/src/generators/preset/preset.js +40 -2
- package/dist/src/generators/preset/schema.d.ts +2 -1
- package/dist/src/generators/preset/schema.json +8 -2
- package/dist/src/generators/remove/lib/update-tsconfig.js +3 -3
- package/dist/src/tasks-runner/cache.d.ts +1 -1
- package/dist/src/tasks-runner/cache.js +2 -2
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +2 -1
- package/dist/src/tasks-runner/default-tasks-runner.js +5 -2
- package/dist/src/tasks-runner/life-cycle.d.ts +2 -1
- package/dist/src/tasks-runner/life-cycle.js +2 -2
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +1 -1
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +3 -2
- package/dist/src/tasks-runner/tasks-runner.d.ts +1 -1
- package/dist/src/tasks-runner/tasks-runner.js +0 -2
- package/dist/src/tasks-runner/utils.d.ts +2 -1
- package/dist/src/tasks-runner/utils.js +30 -2
- package/dist/src/utilities/app-root.d.ts +2 -1
- package/dist/src/utilities/app-root.js +6 -2
- package/dist/src/utilities/fileutils.d.ts +1 -1
- package/dist/src/utilities/fileutils.js +9 -8
- package/dist/src/utilities/get-import-path.d.ts +1 -1
- package/dist/src/utilities/get-import-path.js +2 -2
- package/dist/src/utilities/output.d.ts +2 -1
- package/dist/src/utilities/output.js +5 -2
- package/dist/src/utilities/package-manager-workspaces.js +2 -2
- package/dist/src/utilities/typescript/ts-solution-setup.js +2 -2
- package/dist/src/utils/lint.d.ts +1 -1
- package/dist/src/utils/versions.d.ts +1 -1
- package/dist/src/utils/versions.js +1 -1
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export { ProjectType, projectRootDir } from './src/utils/project-type';
|
|
|
3
3
|
export { renameSync, updateJsonFile, copyFile, createDirectory, } from './src/utilities/fileutils';
|
|
4
4
|
export { names } from '@nx/devkit';
|
|
5
5
|
export { output } from './src/utilities/output';
|
|
6
|
-
export { readPackageJson } from 'nx/
|
|
6
|
+
export { readPackageJson } from '@nx/devkit/internal';
|
|
7
7
|
export { getWorkspacePath, editTarget, parseTarget, serializeTarget, } from './src/utils/cli-config-utils';
|
|
8
|
-
export { Linter } from './src/utils/lint';
|
|
8
|
+
export { Linter, type LinterType } from './src/utils/lint';
|
|
9
9
|
export { moveGenerator } from './src/generators/move/move';
|
|
10
10
|
export { removeGenerator } from './src/generators/remove/remove';
|
|
11
11
|
export { runCommandsGenerator } from './src/generators/run-commands/run-commands';
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,8 @@ var devkit_1 = require("@nx/devkit");
|
|
|
15
15
|
Object.defineProperty(exports, "names", { enumerable: true, get: function () { return devkit_1.names; } });
|
|
16
16
|
var output_1 = require("./src/utilities/output");
|
|
17
17
|
Object.defineProperty(exports, "output", { enumerable: true, get: function () { return output_1.output; } });
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "readPackageJson", { enumerable: true, get: function () { return
|
|
18
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
19
|
+
Object.defineProperty(exports, "readPackageJson", { enumerable: true, get: function () { return internal_1.readPackageJson; } });
|
|
20
20
|
var cli_config_utils_1 = require("./src/utils/cli-config-utils");
|
|
21
21
|
Object.defineProperty(exports, "getWorkspacePath", { enumerable: true, get: function () { return cli_config_utils_1.getWorkspacePath; } });
|
|
22
22
|
Object.defineProperty(exports, "editTarget", { enumerable: true, get: function () { return cli_config_utils_1.editTarget; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { FileData } from '@nx/devkit';
|
|
2
|
+
export { Change, DeletedFileChange, FileChange, LockFileChange, TEN_MEGABYTES, WholeFileChange, calculateFileChanges, defaultFileRead, isDeletedFileChange, isLockFileChange, isWholeFileChange, readPackageJson, } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.readPackageJson = exports.isWholeFileChange = exports.isLockFileChange = exports.isDeletedFileChange = exports.defaultFileRead = exports.calculateFileChanges = exports.WholeFileChange = exports.TEN_MEGABYTES = exports.LockFileChange = exports.DeletedFileChange = void 0;
|
|
4
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
Object.defineProperty(exports, "DeletedFileChange", { enumerable: true, get: function () { return internal_1.DeletedFileChange; } });
|
|
6
|
+
Object.defineProperty(exports, "LockFileChange", { enumerable: true, get: function () { return internal_1.LockFileChange; } });
|
|
7
|
+
Object.defineProperty(exports, "TEN_MEGABYTES", { enumerable: true, get: function () { return internal_1.TEN_MEGABYTES; } });
|
|
8
|
+
Object.defineProperty(exports, "WholeFileChange", { enumerable: true, get: function () { return internal_1.WholeFileChange; } });
|
|
9
|
+
Object.defineProperty(exports, "calculateFileChanges", { enumerable: true, get: function () { return internal_1.calculateFileChanges; } });
|
|
10
|
+
Object.defineProperty(exports, "defaultFileRead", { enumerable: true, get: function () { return internal_1.defaultFileRead; } });
|
|
11
|
+
Object.defineProperty(exports, "isDeletedFileChange", { enumerable: true, get: function () { return internal_1.isDeletedFileChange; } });
|
|
12
|
+
Object.defineProperty(exports, "isLockFileChange", { enumerable: true, get: function () { return internal_1.isLockFileChange; } });
|
|
13
|
+
Object.defineProperty(exports, "isWholeFileChange", { enumerable: true, get: function () { return internal_1.isWholeFileChange; } });
|
|
14
|
+
Object.defineProperty(exports, "readPackageJson", { enumerable: true, get: function () { return internal_1.readPackageJson; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph, } from '@nx/devkit';
|
|
2
|
+
export { buildProjectGraphAndSourceMapsWithoutDaemon, createProjectGraphAndSourceMapsAsync, handleProjectGraphError, preventRecursionInGraphConstruction, readCachedProjectConfiguration, } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.readCachedProjectConfiguration = exports.preventRecursionInGraphConstruction = exports.handleProjectGraphError = exports.createProjectGraphAndSourceMapsAsync = exports.buildProjectGraphAndSourceMapsWithoutDaemon = exports.readProjectsConfigurationFromProjectGraph = exports.readCachedProjectGraph = exports.createProjectGraphAsync = void 0;
|
|
4
|
+
var devkit_1 = require("@nx/devkit");
|
|
5
|
+
Object.defineProperty(exports, "createProjectGraphAsync", { enumerable: true, get: function () { return devkit_1.createProjectGraphAsync; } });
|
|
6
|
+
Object.defineProperty(exports, "readCachedProjectGraph", { enumerable: true, get: function () { return devkit_1.readCachedProjectGraph; } });
|
|
7
|
+
Object.defineProperty(exports, "readProjectsConfigurationFromProjectGraph", { enumerable: true, get: function () { return devkit_1.readProjectsConfigurationFromProjectGraph; } });
|
|
8
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
9
|
+
Object.defineProperty(exports, "buildProjectGraphAndSourceMapsWithoutDaemon", { enumerable: true, get: function () { return internal_1.buildProjectGraphAndSourceMapsWithoutDaemon; } });
|
|
10
|
+
Object.defineProperty(exports, "createProjectGraphAndSourceMapsAsync", { enumerable: true, get: function () { return internal_1.createProjectGraphAndSourceMapsAsync; } });
|
|
11
|
+
Object.defineProperty(exports, "handleProjectGraphError", { enumerable: true, get: function () { return internal_1.handleProjectGraphError; } });
|
|
12
|
+
Object.defineProperty(exports, "preventRecursionInGraphConstruction", { enumerable: true, get: function () { return internal_1.preventRecursionInGraphConstruction; } });
|
|
13
|
+
Object.defineProperty(exports, "readCachedProjectConfiguration", { enumerable: true, get: function () { return internal_1.readCachedProjectConfiguration; } });
|
|
@@ -4,8 +4,8 @@ exports.ciWorkflowGenerator = ciWorkflowGenerator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const default_base_1 = require("../../utilities/default-base");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
-
const nx_cloud_utils_1 = require("nx/src/utils/nx-cloud-utils");
|
|
8
7
|
const ts_solution_setup_1 = require("../../utilities/typescript/ts-solution-setup");
|
|
8
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
9
9
|
function getNxCloudRecordCommand(ci, packageManagerPrefix) {
|
|
10
10
|
const baseCommand = `${packageManagerPrefix} nx record -- echo Hello World`;
|
|
11
11
|
const prefix = getCiPrefix(ci);
|
|
@@ -100,6 +100,7 @@ async function ciWorkflowGenerator(tree, schema) {
|
|
|
100
100
|
appendOriginPrefix(nxJson);
|
|
101
101
|
}
|
|
102
102
|
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files', ci), '', options);
|
|
103
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files', 'ci-config'), '', options);
|
|
103
104
|
addWorkflowFileToSharedGlobals(nxJson, schema.ci, options.workflowFileName);
|
|
104
105
|
(0, devkit_1.writeJson)(tree, 'nx.json', nxJson);
|
|
105
106
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -110,7 +111,7 @@ function normalizeOptions(options, tree) {
|
|
|
110
111
|
const { exec: packageManagerPrefix, ciInstall: packageManagerInstall, dlx: packageManagerPreInstallPrefix, } = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
111
112
|
let nxCloudHost = 'nx.app';
|
|
112
113
|
try {
|
|
113
|
-
const nxCloudUrl = (0,
|
|
114
|
+
const nxCloudUrl = (0, internal_1.getNxCloudUrl)((0, devkit_1.readJson)(tree, 'nx.json'));
|
|
114
115
|
nxCloudHost = new URL(nxCloudUrl).host;
|
|
115
116
|
}
|
|
116
117
|
catch { }
|
|
@@ -123,7 +124,7 @@ function normalizeOptions(options, tree) {
|
|
|
123
124
|
const hasPlaywright = allDependencies['@nx/playwright'];
|
|
124
125
|
const hasE2E = hasCypress || hasPlaywright;
|
|
125
126
|
const hasTypecheck = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
126
|
-
const connectedToCloud = (0,
|
|
127
|
+
const connectedToCloud = (0, internal_1.isNxCloudUsed)((0, devkit_1.readJson)(tree, 'nx.json'));
|
|
127
128
|
const mainBranch = (0, default_base_1.deduceDefaultBase)();
|
|
128
129
|
const commands = getCiCommands(options.ci, packageManagerPrefix, mainBranch, hasTypecheck, hasE2E, options.useRunMany ?? false);
|
|
129
130
|
const branchCommands = options.ci === 'bitbucket-pipelines'
|
|
@@ -55,9 +55,10 @@ jobs:
|
|
|
55
55
|
|
|
56
56
|
# This enables task distribution via Nx Cloud
|
|
57
57
|
# Run this command as early as possible, before dependencies are installed
|
|
58
|
-
#
|
|
58
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
59
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
59
60
|
<% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
|
|
60
|
-
# - script: <%= packageManagerPreInstallPrefix %> nx start-
|
|
61
|
+
# - script: <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
61
62
|
|
|
62
63
|
- script: <%= packageManagerInstall %><% if(hasCypress){ %>
|
|
63
64
|
- script: <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
|
package/dist/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__
CHANGED
|
@@ -21,9 +21,10 @@ pipelines:
|
|
|
21
21
|
<% } %>
|
|
22
22
|
# This enables task distribution via Nx Cloud
|
|
23
23
|
# Run this command as early as possible, before dependencies are installed
|
|
24
|
-
#
|
|
24
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
25
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
25
26
|
<% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
|
|
26
|
-
# - <%= packageManagerPreInstallPrefix %> nx start-
|
|
27
|
+
# - <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
27
28
|
|
|
28
29
|
- <%= packageManagerInstall %><% if(hasCypress){ %>
|
|
29
30
|
- <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
|
|
@@ -48,10 +49,11 @@ pipelines:
|
|
|
48
49
|
- export NX_BRANCH=$BITBUCKET_BRANCH
|
|
49
50
|
# This enables task distribution via Nx Cloud
|
|
50
51
|
# Run this command as early as possible, before dependencies are installed
|
|
51
|
-
#
|
|
52
|
-
|
|
52
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
53
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
54
|
+
<% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
53
55
|
<% } else { %># Connect your workspace by running "nx connect" and uncomment this
|
|
54
|
-
# - <%= packageManagerPreInstallPrefix %> nx start-
|
|
56
|
+
# - <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
55
57
|
<% } %>
|
|
56
58
|
<% if(packageManager == 'pnpm'){ %>
|
|
57
59
|
- npm install --prefix=$HOME/.local -g pnpm@11
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Nx Cloud reads this file to configure your CI Pipeline Executions.
|
|
2
|
+
# Uncomment the "nx start-nx-agents" line in your CI workflow to distribute tasks across agents.
|
|
3
|
+
# Learn how to start Nx Agents at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
4
|
+
# Learn how to configure this file at https://nx.dev/ci/reference/nx-cloud/ci-config
|
|
5
|
+
dte:
|
|
6
|
+
distribute-on: 3 linux-medium-js
|
|
7
|
+
lifecycle:
|
|
8
|
+
stop-after:
|
|
9
|
+
- <% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>
|
|
@@ -23,9 +23,10 @@ jobs:
|
|
|
23
23
|
|
|
24
24
|
# This enables task distribution via Nx Cloud
|
|
25
25
|
# Run this command as early as possible, before dependencies are installed
|
|
26
|
-
#
|
|
26
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
27
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
27
28
|
<% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
|
|
28
|
-
# - run: <%= packageManagerPreInstallPrefix %> nx start-
|
|
29
|
+
# - run: <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
29
30
|
|
|
30
31
|
- run: <%= packageManagerInstall %><% if(hasCypress){ %>
|
|
31
32
|
- run: <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
|
|
@@ -34,9 +34,10 @@ jobs:
|
|
|
34
34
|
<% } %>
|
|
35
35
|
# This enables task distribution via Nx Cloud
|
|
36
36
|
# Run this command as early as possible, before dependencies are installed
|
|
37
|
-
#
|
|
37
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
38
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
38
39
|
<% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
|
|
39
|
-
# - run: <%= packageManagerPreInstallPrefix %> nx start-
|
|
40
|
+
# - run: <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
40
41
|
|
|
41
42
|
<% if(packageManager !== 'bun'){ %>
|
|
42
43
|
# Cache node_modules
|
|
@@ -18,9 +18,10 @@ variables:
|
|
|
18
18
|
<% } %>
|
|
19
19
|
# This enables task distribution via Nx Cloud
|
|
20
20
|
# Run this command as early as possible, before dependencies are installed
|
|
21
|
-
#
|
|
21
|
+
# Configure Nx Agents and task distribution in .nx/ci-config.yaml
|
|
22
|
+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#nx-cloud-start-nx-agents
|
|
22
23
|
<% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
|
|
23
|
-
# - <%= packageManagerPreInstallPrefix %> nx start-
|
|
24
|
+
# - <%= packageManagerPreInstallPrefix %> nx start-nx-agents
|
|
24
25
|
|
|
25
26
|
- <%= packageManagerInstall %><% if(hasCypress){ %>
|
|
26
27
|
- <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
|
|
@@ -4,8 +4,8 @@ exports.validateSchema = validateSchema;
|
|
|
4
4
|
exports.convertToNxProjectGenerator = convertToNxProjectGenerator;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
-
const angular_json_1 = require("nx/src/adapter/angular-json");
|
|
8
7
|
const output_1 = require("../../utils/output");
|
|
8
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
9
9
|
async function validateSchema(schema, configName) {
|
|
10
10
|
if (schema.project && schema.all) {
|
|
11
11
|
throw new Error('--project and --all are mutually exclusive');
|
|
@@ -31,7 +31,7 @@ async function convertToNxProjectGenerator(host, schema) {
|
|
|
31
31
|
if (!host.exists(configName))
|
|
32
32
|
return;
|
|
33
33
|
await validateSchema(schema, configName);
|
|
34
|
-
const projects = (0,
|
|
34
|
+
const projects = (0, internal_1.toNewFormat)((0, devkit_1.readJson)(host, configName)).projects;
|
|
35
35
|
const leftOverProjects = {};
|
|
36
36
|
for (const projectName of Object.keys(projects)) {
|
|
37
37
|
const config = projects[projectName];
|
|
@@ -60,7 +60,7 @@ async function convertToNxProjectGenerator(host, schema) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
if (Object.keys(leftOverProjects).length > 0) {
|
|
63
|
-
(0, devkit_1.writeJson)(host, 'angular.json', (0,
|
|
63
|
+
(0, devkit_1.writeJson)(host, 'angular.json', (0, internal_1.toOldFormat)({ version: 1, projects: leftOverProjects }));
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
host.delete(configName);
|
|
@@ -3,9 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.convertToInferredGenerator = convertToInferredGenerator;
|
|
4
4
|
const internal_1 = require("@nx/devkit/internal");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const enquirer_1 = require("enquirer");
|
|
7
|
-
const generator_utils_1 = require("nx/src/command-line/generate/generator-utils");
|
|
8
|
-
const installed_plugins_1 = require("nx/src/utils/plugins/installed-plugins");
|
|
9
6
|
async function convertToInferredGenerator(tree, options) {
|
|
10
7
|
const generatorCollectionChoices = await getPossibleConvertToInferredGenerators();
|
|
11
8
|
if (generatorCollectionChoices.size === 0) {
|
|
@@ -25,19 +22,12 @@ async function convertToInferredGenerator(tree, options) {
|
|
|
25
22
|
}
|
|
26
23
|
else {
|
|
27
24
|
const allChoices = Array.from(generatorCollectionChoices.keys());
|
|
28
|
-
generatorsToRun =
|
|
29
|
-
type: 'multiselect',
|
|
30
|
-
name: 'generatorsToRun',
|
|
25
|
+
generatorsToRun = await (0, internal_1.multiselectPrompt)({
|
|
31
26
|
message: 'Which inference plugin do you want to use?',
|
|
32
27
|
choices: allChoices,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return 'Please select at least one plugin.';
|
|
37
|
-
}
|
|
38
|
-
return true;
|
|
39
|
-
},
|
|
40
|
-
})).generatorsToRun;
|
|
28
|
+
initialValues: allChoices,
|
|
29
|
+
required: true,
|
|
30
|
+
});
|
|
41
31
|
}
|
|
42
32
|
if (generatorsToRun.length === 0) {
|
|
43
33
|
devkit_1.output.error({
|
|
@@ -85,13 +75,13 @@ async function convertToInferredGenerator(tree, options) {
|
|
|
85
75
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
86
76
|
}
|
|
87
77
|
async function getPossibleConvertToInferredGenerators() {
|
|
88
|
-
const installedCollections = Array.from(new Set((0,
|
|
78
|
+
const installedCollections = Array.from(new Set((0, internal_1.findInstalledPlugins)().map((x) => x.name)));
|
|
89
79
|
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
|
90
80
|
const projectsConfigurations = (0, devkit_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
|
|
91
81
|
const choices = new Map();
|
|
92
82
|
for (const collectionName of installedCollections) {
|
|
93
83
|
try {
|
|
94
|
-
const generator = (0,
|
|
84
|
+
const generator = (0, internal_1.getGeneratorInformation)(collectionName, 'convert-to-inferred', devkit_1.workspaceRoot, projectsConfigurations.projects);
|
|
95
85
|
if (generator.generatorConfiguration.hidden ||
|
|
96
86
|
generator.generatorConfiguration['x-deprecated']) {
|
|
97
87
|
continue;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<% if(cliCommand === 'ng') { %>
|
|
4
4
|
"angular.ng-template",<% }
|
|
5
5
|
%>
|
|
6
|
-
"nrwl.angular-console"
|
|
7
|
-
"esbenp.prettier-vscode"
|
|
6
|
+
"nrwl.angular-console"<% if(formatter === 'prettier') { %>,
|
|
7
|
+
"esbenp.prettier-vscode"<% } %><% if(formatter === 'oxfmt') { %>,
|
|
8
|
+
"oxc.oxc-vscode"<% } %>
|
|
8
9
|
]
|
|
9
10
|
}
|
|
@@ -10,7 +10,7 @@ const get_npm_package_version_1 = require("../utils/get-npm-package-version");
|
|
|
10
10
|
const path_1 = require("path");
|
|
11
11
|
const yargs_parser_1 = tslib_1.__importDefault(require("yargs-parser"));
|
|
12
12
|
const child_process_1 = require("child_process");
|
|
13
|
-
const
|
|
13
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
14
14
|
function addPresetDependencies(host, options) {
|
|
15
15
|
const { dependencies, dev } = getPresetDependencies(options);
|
|
16
16
|
return (0, devkit_1.addDependenciesToPackageJson)(host, dependencies, dev, (0, path_1.join)(options.directory, 'package.json'), true);
|
|
@@ -28,7 +28,7 @@ function generatePreset(host, opts) {
|
|
|
28
28
|
cwd: newWorkspaceRoot,
|
|
29
29
|
};
|
|
30
30
|
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
31
|
-
const nxInstallationPaths = (0,
|
|
31
|
+
const nxInstallationPaths = (0, internal_1.getNxRequirePaths)(newWorkspaceRoot);
|
|
32
32
|
const nxBinForNewWorkspaceRoot = require.resolve('nx/bin/nx', {
|
|
33
33
|
paths: nxInstallationPaths,
|
|
34
34
|
});
|
|
@@ -89,18 +89,34 @@ function generatePreset(host, opts) {
|
|
|
89
89
|
: null,
|
|
90
90
|
opts.nxCloudToken ? `--nxCloudToken=${opts.nxCloudToken}` : null,
|
|
91
91
|
opts.formatter ? `--formatter=${opts.formatter}` : null,
|
|
92
|
+
opts.skipInstall ? `--skipInstall` : null,
|
|
92
93
|
opts.workspaces !== false ? `--workspaces` : `--no-workspaces`,
|
|
93
94
|
opts.useProjectJson ? `--useProjectJson` : null,
|
|
94
95
|
].filter((e) => !!e);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
+
// `typescript` is pinned here rather than left to `@nx/js:init` so it lands in
|
|
99
|
+
// package.json before the first install. Otherwise npm resolves tsquery's
|
|
100
|
+
// `typescript: >3.0.0` peer to 7.x, whose entry point dropped the compiler API.
|
|
101
|
+
function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner, js, }) {
|
|
98
102
|
switch (preset) {
|
|
103
|
+
// These generate no project, so `@nx/js:init` never runs to add typescript
|
|
104
|
+
// and pinning it here would be net-new. The preset generator itself does
|
|
105
|
+
// run - it sets up the chosen formatter.
|
|
99
106
|
case presets_1.Preset.Apps:
|
|
100
107
|
case presets_1.Preset.NPM:
|
|
108
|
+
return { dependencies: {}, dev: { '@nx/js': versions_1.nxVersion } };
|
|
101
109
|
case presets_1.Preset.TS:
|
|
102
110
|
case presets_1.Preset.TsStandalone:
|
|
103
|
-
return {
|
|
111
|
+
return {
|
|
112
|
+
dependencies: {},
|
|
113
|
+
dev: {
|
|
114
|
+
'@nx/js': versions_1.nxVersion,
|
|
115
|
+
// ts-standalone prompts for JS vs TS; mirror `@nx/js:init`, which
|
|
116
|
+
// skips typescript when `js` is set.
|
|
117
|
+
typescript: js ? undefined : versions_1.typescriptVersion,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
104
120
|
case presets_1.Preset.AngularMonorepo:
|
|
105
121
|
case presets_1.Preset.AngularStandalone:
|
|
106
122
|
return {
|
|
@@ -114,7 +130,10 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
114
130
|
},
|
|
115
131
|
};
|
|
116
132
|
case presets_1.Preset.Express:
|
|
117
|
-
return {
|
|
133
|
+
return {
|
|
134
|
+
dependencies: {},
|
|
135
|
+
dev: { '@nx/express': versions_1.nxVersion, typescript: versions_1.typescriptVersion },
|
|
136
|
+
};
|
|
118
137
|
case presets_1.Preset.Nest:
|
|
119
138
|
return {
|
|
120
139
|
dependencies: {},
|
|
@@ -122,7 +141,10 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
122
141
|
};
|
|
123
142
|
case presets_1.Preset.NextJs:
|
|
124
143
|
case presets_1.Preset.NextJsStandalone:
|
|
125
|
-
return {
|
|
144
|
+
return {
|
|
145
|
+
dependencies: { '@nx/next': versions_1.nxVersion },
|
|
146
|
+
dev: { typescript: versions_1.typescriptVersion },
|
|
147
|
+
};
|
|
126
148
|
case presets_1.Preset.VueMonorepo:
|
|
127
149
|
case presets_1.Preset.VueStandalone:
|
|
128
150
|
return {
|
|
@@ -132,6 +154,7 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
132
154
|
'@nx/cypress': e2eTestRunner === 'cypress' ? versions_1.nxVersion : undefined,
|
|
133
155
|
'@nx/playwright': e2eTestRunner === 'playwright' ? versions_1.nxVersion : undefined,
|
|
134
156
|
'@nx/vite': versions_1.nxVersion,
|
|
157
|
+
typescript: versions_1.typescriptVersion,
|
|
135
158
|
},
|
|
136
159
|
};
|
|
137
160
|
case presets_1.Preset.Nuxt:
|
|
@@ -142,6 +165,7 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
142
165
|
'@nx/nuxt': versions_1.nxVersion,
|
|
143
166
|
'@nx/cypress': e2eTestRunner === 'cypress' ? versions_1.nxVersion : undefined,
|
|
144
167
|
'@nx/playwright': e2eTestRunner === 'playwright' ? versions_1.nxVersion : undefined,
|
|
168
|
+
typescript: versions_1.typescriptVersion,
|
|
145
169
|
},
|
|
146
170
|
};
|
|
147
171
|
case presets_1.Preset.ReactMonorepo:
|
|
@@ -155,12 +179,19 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
155
179
|
'@nx/jest': bundler !== 'vite' ? versions_1.nxVersion : undefined,
|
|
156
180
|
'@nx/vite': bundler === 'vite' ? versions_1.nxVersion : undefined,
|
|
157
181
|
'@nx/webpack': bundler === 'webpack' ? versions_1.nxVersion : undefined,
|
|
182
|
+
typescript: versions_1.typescriptVersion,
|
|
158
183
|
},
|
|
159
184
|
};
|
|
160
185
|
case presets_1.Preset.ReactNative:
|
|
161
|
-
return {
|
|
186
|
+
return {
|
|
187
|
+
dependencies: {},
|
|
188
|
+
dev: { '@nx/react-native': versions_1.nxVersion, typescript: versions_1.typescriptVersion },
|
|
189
|
+
};
|
|
162
190
|
case presets_1.Preset.Expo:
|
|
163
|
-
return {
|
|
191
|
+
return {
|
|
192
|
+
dependencies: {},
|
|
193
|
+
dev: { '@nx/expo': versions_1.nxVersion, typescript: versions_1.typescriptVersion },
|
|
194
|
+
};
|
|
164
195
|
case presets_1.Preset.WebComponents:
|
|
165
196
|
return {
|
|
166
197
|
dependencies: {},
|
|
@@ -173,6 +204,7 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
173
204
|
dev: {
|
|
174
205
|
'@nx/node': versions_1.nxVersion,
|
|
175
206
|
'@nx/webpack': bundler === 'webpack' ? versions_1.nxVersion : undefined,
|
|
207
|
+
typescript: versions_1.typescriptVersion,
|
|
176
208
|
},
|
|
177
209
|
};
|
|
178
210
|
default: {
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateWorkspaceFiles = generateWorkspaceFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const url_shorten_1 = require("nx/src/nx-cloud/utilities/url-shorten");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
6
|
const path_1 = require("path");
|
|
8
7
|
const semver_1 = require("semver");
|
|
9
8
|
const default_base_1 = require("../../utilities/default-base");
|
|
10
9
|
const versions_1 = require("../../utils/versions");
|
|
11
10
|
const presets_1 = require("../utils/presets");
|
|
12
|
-
const set_up_ai_agents_1 = require("nx/src/ai/set-up-ai-agents/set-up-ai-agents");
|
|
13
11
|
// map from the preset to the name of the plugin s.t. the README can have a more
|
|
14
12
|
// meaningful generator command.
|
|
15
13
|
const presetToPluginMap = {
|
|
@@ -127,7 +125,7 @@ async function generateWorkspaceFiles(tree, options) {
|
|
|
127
125
|
createFiles(tree, options);
|
|
128
126
|
const nxJson = createNxJson(tree, options);
|
|
129
127
|
const token = options.nxCloud !== 'skip'
|
|
130
|
-
? await (0,
|
|
128
|
+
? await (0, internal_1.connectToNxCloud)(tree, {
|
|
131
129
|
installationSource: 'create-nx-workspace',
|
|
132
130
|
directory: options.directory,
|
|
133
131
|
github: options.useGitHub,
|
|
@@ -136,7 +134,7 @@ async function generateWorkspaceFiles(tree, options) {
|
|
|
136
134
|
await createReadme(tree, options, token);
|
|
137
135
|
let aiAgentsCallback = undefined;
|
|
138
136
|
if (options.aiAgents && options.aiAgents.length > 0) {
|
|
139
|
-
aiAgentsCallback = await (0,
|
|
137
|
+
aiAgentsCallback = await (0, internal_1.setupAiAgentsGenerator)(tree, {
|
|
140
138
|
directory: options.directory,
|
|
141
139
|
writeNxCloudRules: options.nxCloud !== 'skip',
|
|
142
140
|
packageVersion: 'latest',
|
|
@@ -229,6 +227,10 @@ function createFiles(tree, options) {
|
|
|
229
227
|
...options,
|
|
230
228
|
nxVersion: versions_1.nxVersion,
|
|
231
229
|
packageManager: options.packageManager,
|
|
230
|
+
// After the spread and always defined: `formatter` is optional on the
|
|
231
|
+
// schema, and EJS throws a ReferenceError on a key that is absent rather
|
|
232
|
+
// than treating it as undefined.
|
|
233
|
+
formatter: options.formatter ?? 'none',
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
236
|
async function createReadme(tree, { name, appName, directory, preset, nxCloud, workspaces }, nxCloudToken) {
|
|
@@ -239,7 +241,7 @@ async function createReadme(tree, { name, appName, directory, preset, nxCloud, w
|
|
|
239
241
|
generateLibCmd: null,
|
|
240
242
|
};
|
|
241
243
|
const nxCloudOnboardingUrl = nxCloudToken
|
|
242
|
-
? await (0,
|
|
244
|
+
? await (0, internal_1.createNxCloudOnboardingURL)('readme', nxCloudToken, undefined, false)
|
|
243
245
|
: null;
|
|
244
246
|
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files-readme'), directory, {
|
|
245
247
|
formattedNames,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
2
|
import { Linter, LinterType } from '../../utils/lint';
|
|
3
|
-
import { Agent } from 'nx/
|
|
3
|
+
import { Agent } from '@nx/devkit/internal';
|
|
4
4
|
interface Schema {
|
|
5
5
|
directory: string;
|
|
6
6
|
name: string;
|
|
@@ -28,7 +28,7 @@ interface Schema {
|
|
|
28
28
|
useGitHub?: boolean;
|
|
29
29
|
nxCloud?: 'yes' | 'skip' | 'circleci' | 'github';
|
|
30
30
|
analytics?: boolean;
|
|
31
|
-
formatter?:
|
|
31
|
+
formatter?: 'none' | 'prettier' | 'oxfmt';
|
|
32
32
|
workspaces?: boolean;
|
|
33
33
|
workspaceGlobs?: string | string[];
|
|
34
34
|
useProjectJson?: boolean;
|
|
@@ -27,7 +27,16 @@ async function newGenerator(tree, opts) {
|
|
|
27
27
|
(0, devkit_1.installPackagesTask)(tree, false, options.directory, options.packageManager);
|
|
28
28
|
}
|
|
29
29
|
// TODO: move all of these into create-nx-workspace
|
|
30
|
-
|
|
30
|
+
// The npm preset normally skips the preset generator entirely, which is why
|
|
31
|
+
// `--formatter` used to be dropped for it. Run it when there is a formatter
|
|
32
|
+
// to set up. `schema.json` defaults to `none`, so this fork is taken only
|
|
33
|
+
// when a formatter was actually asked for, which on this preset means an
|
|
34
|
+
// explicit `--formatter`.
|
|
35
|
+
const npmPresetNeedsFormatter = options.preset === presets_1.Preset.NPM &&
|
|
36
|
+
!!options.formatter &&
|
|
37
|
+
options.formatter !== 'none';
|
|
38
|
+
if ((options.preset !== presets_1.Preset.NPM || npmPresetNeedsFormatter) &&
|
|
39
|
+
!options.isCustomPreset) {
|
|
31
40
|
await (0, generate_preset_1.generatePreset)(tree, options);
|
|
32
41
|
}
|
|
33
42
|
// if we move this into create-nx-workspace, we can also easily log things out like nx console install success
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"description": "Application name."
|
|
54
54
|
},
|
|
55
55
|
"linter": {
|
|
56
|
-
"description": "The tool to use for running lint checks.",
|
|
56
|
+
"description": "The tool to use for running lint checks. Defaults to the linter the workspace already uses.",
|
|
57
57
|
"type": "string",
|
|
58
|
-
"
|
|
58
|
+
"enum": ["eslint", "oxlint", "none"]
|
|
59
59
|
},
|
|
60
60
|
"packageManager": {
|
|
61
61
|
"description": "The package manager used to install dependencies.",
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"formatter": {
|
|
100
100
|
"description": "The tool to use for code formatting.",
|
|
101
101
|
"type": "string",
|
|
102
|
+
"enum": ["none", "prettier", "oxfmt"],
|
|
102
103
|
"default": "none"
|
|
103
104
|
},
|
|
104
105
|
"workspaces": {
|
|
@@ -17,8 +17,28 @@ async function createPreset(tree, options) {
|
|
|
17
17
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
18
18
|
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
19
19
|
nxJson.useInferencePlugins !== false;
|
|
20
|
-
if (options.preset === presets_1.Preset.Apps) {
|
|
21
|
-
|
|
20
|
+
if (options.preset === presets_1.Preset.Apps || options.preset === presets_1.Preset.NPM) {
|
|
21
|
+
// These presets generate no project, so nothing downstream would set the
|
|
22
|
+
// formatter up and the choice would be dropped. Only the formatter is
|
|
23
|
+
// configured here - `@nx/js:init` would also add TypeScript and register
|
|
24
|
+
// its plugin, which both presets deliberately leave out.
|
|
25
|
+
//
|
|
26
|
+
// `@nx/js` is only in the new workspace's package.json, not necessarily on
|
|
27
|
+
// disk. `validateOptions` allows `skipInstall` with these presets, so the
|
|
28
|
+
// require has to be reached only when there is a formatter to set up AND
|
|
29
|
+
// the install that puts `@nx/js` there actually ran.
|
|
30
|
+
if (!options.formatter || options.formatter === 'none') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (options.skipInstall) {
|
|
34
|
+
// No follow-up command to name: `@nx/js:init` is what sets a formatter
|
|
35
|
+
// up, and running it here is what the comment above rules out for these
|
|
36
|
+
// presets.
|
|
37
|
+
devkit_1.logger.warn(`Skipped ${options.formatter} setup: it lives in @nx/js, which --skipInstall leaves uninstalled.`);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const { setUpFormatter } = require('@nx' + '/js');
|
|
41
|
+
return setUpFormatter(tree, options.formatter);
|
|
22
42
|
}
|
|
23
43
|
else if (options.preset === presets_1.Preset.AngularMonorepo) {
|
|
24
44
|
const { applicationGenerator: angularApplicationGenerator } = require('@nx' + '/angular/generators');
|
|
@@ -39,6 +59,7 @@ async function createPreset(tree, options) {
|
|
|
39
59
|
ssr: options.ssr,
|
|
40
60
|
prefix: options.prefix,
|
|
41
61
|
zoneless: options.zoneless,
|
|
62
|
+
formatter: options.formatter,
|
|
42
63
|
nxCloudToken: options.nxCloudToken,
|
|
43
64
|
});
|
|
44
65
|
}
|
|
@@ -62,6 +83,7 @@ async function createPreset(tree, options) {
|
|
|
62
83
|
ssr: options.ssr,
|
|
63
84
|
prefix: options.prefix,
|
|
64
85
|
zoneless: options.zoneless,
|
|
86
|
+
formatter: options.formatter,
|
|
65
87
|
nxCloudToken: options.nxCloudToken,
|
|
66
88
|
});
|
|
67
89
|
}
|
|
@@ -132,6 +154,7 @@ async function createPreset(tree, options) {
|
|
|
132
154
|
unitTestRunner: options.unitTestRunner ?? 'vitest',
|
|
133
155
|
addPlugin,
|
|
134
156
|
nxCloudToken: options.nxCloudToken,
|
|
157
|
+
formatter: options.formatter,
|
|
135
158
|
});
|
|
136
159
|
}
|
|
137
160
|
else if (options.preset === presets_1.Preset.Nuxt) {
|
|
@@ -162,6 +185,7 @@ async function createPreset(tree, options) {
|
|
|
162
185
|
unitTestRunner: options.unitTestRunner ?? 'vitest',
|
|
163
186
|
addPlugin,
|
|
164
187
|
nxCloudToken: options.nxCloudToken,
|
|
188
|
+
formatter: options.formatter,
|
|
165
189
|
});
|
|
166
190
|
}
|
|
167
191
|
else if (options.preset === presets_1.Preset.NextJs) {
|
|
@@ -208,6 +232,7 @@ async function createPreset(tree, options) {
|
|
|
208
232
|
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
209
233
|
addPlugin,
|
|
210
234
|
nxCloudToken: options.nxCloudToken,
|
|
235
|
+
formatter: options.formatter,
|
|
211
236
|
});
|
|
212
237
|
}
|
|
213
238
|
else if (options.preset === presets_1.Preset.Nest) {
|
|
@@ -271,9 +296,17 @@ async function createPreset(tree, options) {
|
|
|
271
296
|
}
|
|
272
297
|
else if (options.preset === presets_1.Preset.TS) {
|
|
273
298
|
const { initGenerator } = require('@nx' + '/js');
|
|
299
|
+
// `validateOptions` allows `skipInstall` here, and this run must then stay
|
|
300
|
+
// install-free: `skipPackageJson` gates both `ensurePackage` and the
|
|
301
|
+
// package.json write that would make `installPackagesTask` install, and
|
|
302
|
+
// `skipFormat` keeps `formatFiles` from loading the formatter. The
|
|
303
|
+
// formatter config is still written, so detection restores the dependency
|
|
304
|
+
// on the next `@nx/js:init`-running generator.
|
|
274
305
|
return initGenerator(tree, {
|
|
275
306
|
formatter: options.formatter,
|
|
276
307
|
addTsPlugin: process.env.NX_ADD_PLUGINS !== 'false' && options.workspaces,
|
|
308
|
+
skipPackageJson: options.skipInstall,
|
|
309
|
+
skipFormat: options.skipInstall,
|
|
277
310
|
});
|
|
278
311
|
}
|
|
279
312
|
else if (options.preset === presets_1.Preset.TsStandalone) {
|
|
@@ -282,11 +315,15 @@ async function createPreset(tree, options) {
|
|
|
282
315
|
name: options.name,
|
|
283
316
|
directory: '.',
|
|
284
317
|
bundler: 'tsc',
|
|
318
|
+
// Forwarded so the library generator's own resolution short-circuits;
|
|
319
|
+
// without it the user is asked which linter to use a second time.
|
|
320
|
+
linter: options.linter,
|
|
285
321
|
unitTestRunner: 'vitest',
|
|
286
322
|
testEnvironment: 'node',
|
|
287
323
|
js: options.js,
|
|
288
324
|
rootProject: true,
|
|
289
325
|
addPlugin,
|
|
326
|
+
formatter: options.formatter,
|
|
290
327
|
});
|
|
291
328
|
}
|
|
292
329
|
else if (options.preset === presets_1.Preset.NodeStandalone) {
|
|
@@ -303,6 +340,7 @@ async function createPreset(tree, options) {
|
|
|
303
340
|
e2eTestRunner: options.e2eTestRunner ?? 'jest',
|
|
304
341
|
unitTestRunner: options.unitTestRunner,
|
|
305
342
|
addPlugin,
|
|
343
|
+
formatter: options.formatter,
|
|
306
344
|
});
|
|
307
345
|
}
|
|
308
346
|
else if (options.preset === presets_1.Preset.NodeMonorepo) {
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"type": "string"
|
|
16
16
|
},
|
|
17
17
|
"linter": {
|
|
18
|
-
"description": "The tool to use for running lint checks.",
|
|
18
|
+
"description": "The tool to use for running lint checks. Defaults to the linter the workspace already uses.",
|
|
19
19
|
"type": "string",
|
|
20
|
-
"
|
|
20
|
+
"enum": ["eslint", "oxlint", "none"]
|
|
21
21
|
},
|
|
22
22
|
"routing": {
|
|
23
23
|
"description": "Add routing to the generated application.",
|
|
@@ -103,9 +103,15 @@
|
|
|
103
103
|
"description": "Generate an application that does not use 'zone.js'.",
|
|
104
104
|
"type": "boolean"
|
|
105
105
|
},
|
|
106
|
+
"skipInstall": {
|
|
107
|
+
"description": "Skip installing dependencies. Formatter setup needs @nx/js on disk, so it is skipped too.",
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": false
|
|
110
|
+
},
|
|
106
111
|
"formatter": {
|
|
107
112
|
"description": "The tool to use for code formatting.",
|
|
108
113
|
"type": "string",
|
|
114
|
+
"enum": ["none", "prettier", "oxfmt"],
|
|
109
115
|
"default": "none"
|
|
110
116
|
},
|
|
111
117
|
"workspaces": {
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateTsconfig = updateTsconfig;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const ts_config_1 = require("../../../utilities/ts-config");
|
|
6
|
-
const find_project_for_path_1 = require("nx/src/project-graph/utils/find-project-for-path");
|
|
7
6
|
const ts_solution_setup_1 = require("../../../utilities/typescript/ts-solution-setup");
|
|
8
7
|
const path_1 = require("path");
|
|
8
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
9
9
|
/**
|
|
10
10
|
* Updates the tsconfig paths to remove the project.
|
|
11
11
|
*
|
|
@@ -18,7 +18,7 @@ async function updateTsconfig(tree, schema) {
|
|
|
18
18
|
: (0, ts_config_1.getRootTsConfigPathInTree)(tree);
|
|
19
19
|
if (tree.exists(tsConfigPath)) {
|
|
20
20
|
const graph = await (0, devkit_1.createProjectGraphAsync)();
|
|
21
|
-
const projectMapping = (0,
|
|
21
|
+
const projectMapping = (0, internal_1.createProjectRootMappings)(graph.nodes);
|
|
22
22
|
(0, devkit_1.updateJson)(tree, tsConfigPath, (json) => {
|
|
23
23
|
if (isUsingTsSolution) {
|
|
24
24
|
const projectConfigs = (0, devkit_1.readProjectsConfigurationFromProjectGraph)(graph);
|
|
@@ -32,7 +32,7 @@ async function updateTsconfig(tree, schema) {
|
|
|
32
32
|
for (const importPath in json.compilerOptions.paths) {
|
|
33
33
|
for (const path of json.compilerOptions.paths[importPath]) {
|
|
34
34
|
const normalized = (0, devkit_1.normalizePath)(path).replace(/^\.\//, '');
|
|
35
|
-
const project = (0,
|
|
35
|
+
const project = (0, internal_1.findProjectForPath)(normalized, projectMapping);
|
|
36
36
|
if (project === schema.projectName) {
|
|
37
37
|
delete json.compilerOptions.paths[importPath];
|
|
38
38
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CachedResult, TaskWithCachedResult, Cache
|
|
1
|
+
export { CachedResult, TaskWithCachedResult, Cache } from '@nx/devkit/internal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Cache = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return
|
|
4
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return internal_1.Cache; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { DefaultTasksRunnerOptions, RemoteCache, defaultTasksRunner, } from '@nx/devkit';
|
|
2
|
+
export { RemoteCacheV2 } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.RemoteCacheV2 = exports.defaultTasksRunner = void 0;
|
|
4
|
+
var devkit_1 = require("@nx/devkit");
|
|
5
|
+
Object.defineProperty(exports, "defaultTasksRunner", { enumerable: true, get: function () { return devkit_1.defaultTasksRunner; } });
|
|
6
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
Object.defineProperty(exports, "RemoteCacheV2", { enumerable: true, get: function () { return internal_1.RemoteCacheV2; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { CompositeLifeCycle, TaskMetadata,
|
|
1
|
+
export { CompositeLifeCycle, TaskMetadata, LifeCycle, } from '@nx/devkit/internal';
|
|
2
|
+
export { TaskResult } from '@nx/devkit';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CompositeLifeCycle = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "CompositeLifeCycle", { enumerable: true, get: function () { return
|
|
4
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
Object.defineProperty(exports, "CompositeLifeCycle", { enumerable: true, get: function () { return internal_1.CompositeLifeCycle; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createRunManyDynamicOutputRenderer } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.createRunManyDynamicOutputRenderer = void 0;
|
|
4
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
Object.defineProperty(exports, "createRunManyDynamicOutputRenderer", { enumerable: true, get: function () { return internal_1.createRunManyDynamicOutputRenderer; } });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { TaskStatus, TasksRunner } from '@nx/devkit/internal';
|
|
2
2
|
export { Task } from '@nx/devkit';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { getOutputsForTargetAndConfiguration } from '@nx/devkit';
|
|
2
|
+
export { DependsOnEntryLocation, NormalizedTargetDependencyConfig, calculateReverseDeps, createTaskId, expandDependencyConfigSyntaxSugar, expandInitiatingTasksThroughNoop, expandWildcardTargetConfiguration, getCliPath, getCustomHasher, getDependencyConfigs, getExecutorForTask, getExecutorNameForTask, getOutputs, getPrintableCommandArgsForTask, getSerializedArgsForTask, getTargetConfigurationForTask, getUnparsedOverrideArgs, interpolate, isCacheableTask, normalizeDependencyConfigDefinition, normalizeDependencyConfigProjects, normalizeTargetDependencyWithStringProjects, readProjectAndTargetFromTargetString, removeTasksFromTaskGraph, shouldStreamOutput, transformLegacyOutputs, unparse, validateOutputs, } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.validateOutputs = exports.unparse = exports.transformLegacyOutputs = exports.shouldStreamOutput = exports.removeTasksFromTaskGraph = exports.readProjectAndTargetFromTargetString = exports.normalizeTargetDependencyWithStringProjects = exports.normalizeDependencyConfigProjects = exports.normalizeDependencyConfigDefinition = exports.isCacheableTask = exports.interpolate = exports.getUnparsedOverrideArgs = exports.getTargetConfigurationForTask = exports.getSerializedArgsForTask = exports.getPrintableCommandArgsForTask = exports.getOutputs = exports.getExecutorNameForTask = exports.getExecutorForTask = exports.getDependencyConfigs = exports.getCustomHasher = exports.getCliPath = exports.expandWildcardTargetConfiguration = exports.expandInitiatingTasksThroughNoop = exports.expandDependencyConfigSyntaxSugar = exports.createTaskId = exports.calculateReverseDeps = exports.getOutputsForTargetAndConfiguration = void 0;
|
|
4
|
+
var devkit_1 = require("@nx/devkit");
|
|
5
|
+
Object.defineProperty(exports, "getOutputsForTargetAndConfiguration", { enumerable: true, get: function () { return devkit_1.getOutputsForTargetAndConfiguration; } });
|
|
6
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
Object.defineProperty(exports, "calculateReverseDeps", { enumerable: true, get: function () { return internal_1.calculateReverseDeps; } });
|
|
8
|
+
Object.defineProperty(exports, "createTaskId", { enumerable: true, get: function () { return internal_1.createTaskId; } });
|
|
9
|
+
Object.defineProperty(exports, "expandDependencyConfigSyntaxSugar", { enumerable: true, get: function () { return internal_1.expandDependencyConfigSyntaxSugar; } });
|
|
10
|
+
Object.defineProperty(exports, "expandInitiatingTasksThroughNoop", { enumerable: true, get: function () { return internal_1.expandInitiatingTasksThroughNoop; } });
|
|
11
|
+
Object.defineProperty(exports, "expandWildcardTargetConfiguration", { enumerable: true, get: function () { return internal_1.expandWildcardTargetConfiguration; } });
|
|
12
|
+
Object.defineProperty(exports, "getCliPath", { enumerable: true, get: function () { return internal_1.getCliPath; } });
|
|
13
|
+
Object.defineProperty(exports, "getCustomHasher", { enumerable: true, get: function () { return internal_1.getCustomHasher; } });
|
|
14
|
+
Object.defineProperty(exports, "getDependencyConfigs", { enumerable: true, get: function () { return internal_1.getDependencyConfigs; } });
|
|
15
|
+
Object.defineProperty(exports, "getExecutorForTask", { enumerable: true, get: function () { return internal_1.getExecutorForTask; } });
|
|
16
|
+
Object.defineProperty(exports, "getExecutorNameForTask", { enumerable: true, get: function () { return internal_1.getExecutorNameForTask; } });
|
|
17
|
+
Object.defineProperty(exports, "getOutputs", { enumerable: true, get: function () { return internal_1.getOutputs; } });
|
|
18
|
+
Object.defineProperty(exports, "getPrintableCommandArgsForTask", { enumerable: true, get: function () { return internal_1.getPrintableCommandArgsForTask; } });
|
|
19
|
+
Object.defineProperty(exports, "getSerializedArgsForTask", { enumerable: true, get: function () { return internal_1.getSerializedArgsForTask; } });
|
|
20
|
+
Object.defineProperty(exports, "getTargetConfigurationForTask", { enumerable: true, get: function () { return internal_1.getTargetConfigurationForTask; } });
|
|
21
|
+
Object.defineProperty(exports, "getUnparsedOverrideArgs", { enumerable: true, get: function () { return internal_1.getUnparsedOverrideArgs; } });
|
|
22
|
+
Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return internal_1.interpolate; } });
|
|
23
|
+
Object.defineProperty(exports, "isCacheableTask", { enumerable: true, get: function () { return internal_1.isCacheableTask; } });
|
|
24
|
+
Object.defineProperty(exports, "normalizeDependencyConfigDefinition", { enumerable: true, get: function () { return internal_1.normalizeDependencyConfigDefinition; } });
|
|
25
|
+
Object.defineProperty(exports, "normalizeDependencyConfigProjects", { enumerable: true, get: function () { return internal_1.normalizeDependencyConfigProjects; } });
|
|
26
|
+
Object.defineProperty(exports, "normalizeTargetDependencyWithStringProjects", { enumerable: true, get: function () { return internal_1.normalizeTargetDependencyWithStringProjects; } });
|
|
27
|
+
Object.defineProperty(exports, "readProjectAndTargetFromTargetString", { enumerable: true, get: function () { return internal_1.readProjectAndTargetFromTargetString; } });
|
|
28
|
+
Object.defineProperty(exports, "removeTasksFromTaskGraph", { enumerable: true, get: function () { return internal_1.removeTasksFromTaskGraph; } });
|
|
29
|
+
Object.defineProperty(exports, "shouldStreamOutput", { enumerable: true, get: function () { return internal_1.shouldStreamOutput; } });
|
|
30
|
+
Object.defineProperty(exports, "transformLegacyOutputs", { enumerable: true, get: function () { return internal_1.transformLegacyOutputs; } });
|
|
31
|
+
Object.defineProperty(exports, "unparse", { enumerable: true, get: function () { return internal_1.unparse; } });
|
|
32
|
+
Object.defineProperty(exports, "validateOutputs", { enumerable: true, get: function () { return internal_1.validateOutputs; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { workspaceRoot } from '@nx/devkit';
|
|
2
|
+
export { setWorkspaceRoot, workspaceRootInner } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.workspaceRootInner = exports.setWorkspaceRoot = exports.workspaceRoot = void 0;
|
|
4
|
+
var devkit_1 = require("@nx/devkit");
|
|
5
|
+
Object.defineProperty(exports, "workspaceRoot", { enumerable: true, get: function () { return devkit_1.workspaceRoot; } });
|
|
6
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
Object.defineProperty(exports, "setWorkspaceRoot", { enumerable: true, get: function () { return internal_1.setWorkspaceRoot; } });
|
|
8
|
+
Object.defineProperty(exports, "workspaceRootInner", { enumerable: true, get: function () { return internal_1.workspaceRootInner; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fileExists, directoryExists, isRelativePath, createDirectory } from 'nx/
|
|
1
|
+
import { fileExists, directoryExists, isRelativePath, createDirectory } from '@nx/devkit/internal';
|
|
2
2
|
export { fileExists, directoryExists, isRelativePath, createDirectory };
|
|
3
3
|
/**
|
|
4
4
|
* This method is specifically for updating a JSON file using the filesystem
|
|
@@ -6,11 +6,12 @@ exports.copyFile = copyFile;
|
|
|
6
6
|
exports.renameSync = renameSync;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "
|
|
12
|
-
Object.defineProperty(exports, "
|
|
13
|
-
Object.defineProperty(exports, "
|
|
9
|
+
const devkit_1 = require("@nx/devkit");
|
|
10
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
11
|
+
Object.defineProperty(exports, "fileExists", { enumerable: true, get: function () { return internal_1.fileExists; } });
|
|
12
|
+
Object.defineProperty(exports, "directoryExists", { enumerable: true, get: function () { return internal_1.directoryExists; } });
|
|
13
|
+
Object.defineProperty(exports, "isRelativePath", { enumerable: true, get: function () { return internal_1.isRelativePath; } });
|
|
14
|
+
Object.defineProperty(exports, "createDirectory", { enumerable: true, get: function () { return internal_1.createDirectory; } });
|
|
14
15
|
/**
|
|
15
16
|
* This method is specifically for updating a JSON file using the filesystem
|
|
16
17
|
*
|
|
@@ -20,9 +21,9 @@ Object.defineProperty(exports, "createDirectory", { enumerable: true, get: funct
|
|
|
20
21
|
* @param callback Manipulation of the JSON data
|
|
21
22
|
*/
|
|
22
23
|
function updateJsonFile(path, callback) {
|
|
23
|
-
const json = (0,
|
|
24
|
+
const json = (0, devkit_1.readJsonFile)(path);
|
|
24
25
|
callback(json);
|
|
25
|
-
(0,
|
|
26
|
+
(0, devkit_1.writeJsonFile)(path, json);
|
|
26
27
|
}
|
|
27
28
|
function copyFile(file, target) {
|
|
28
29
|
const f = (0, path_1.basename)(file);
|
|
@@ -41,7 +42,7 @@ function renameSync(from, to, cb) {
|
|
|
41
42
|
}
|
|
42
43
|
// Make sure parent path exists
|
|
43
44
|
const parentPath = (0, path_1.resolve)(to, '..');
|
|
44
|
-
(0,
|
|
45
|
+
(0, internal_1.createDirectory)(parentPath);
|
|
45
46
|
(0, fs_1.renameSync)(from, to);
|
|
46
47
|
cb(null);
|
|
47
48
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getImportPath = getImportPath;
|
|
4
4
|
exports.getNpmScope = getNpmScope;
|
|
5
|
-
const
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
function getImportPath(tree, projectDirectory) {
|
|
7
7
|
const npmScope = getNpmScope(tree);
|
|
8
8
|
return npmScope
|
|
@@ -11,7 +11,7 @@ function getImportPath(tree, projectDirectory) {
|
|
|
11
11
|
}
|
|
12
12
|
function getNpmScope(tree) {
|
|
13
13
|
const { name } = tree.exists('package.json')
|
|
14
|
-
? (0,
|
|
14
|
+
? (0, devkit_1.readJson)(tree, 'package.json')
|
|
15
15
|
: { name: null };
|
|
16
16
|
if (name?.startsWith('@')) {
|
|
17
17
|
return name.split('/')[0].substring(1);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { output } from '@nx/devkit';
|
|
2
|
+
export { CLIErrorMessageConfig, CLINoteMessageConfig, CLISuccessMessageConfig, CLIWarnMessageConfig, orange, } from '@nx/devkit/internal';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.orange = exports.output = void 0;
|
|
4
|
+
var devkit_1 = require("@nx/devkit");
|
|
5
|
+
Object.defineProperty(exports, "output", { enumerable: true, get: function () { return devkit_1.output; } });
|
|
6
|
+
var internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
Object.defineProperty(exports, "orange", { enumerable: true, get: function () { return internal_1.orange; } });
|
|
@@ -6,7 +6,7 @@ exports.isUsingPackageManagerWorkspaces = isUsingPackageManagerWorkspaces;
|
|
|
6
6
|
exports.isWorkspacesEnabled = isWorkspacesEnabled;
|
|
7
7
|
const devkit_1 = require("@nx/devkit");
|
|
8
8
|
const posix_1 = require("node:path/posix");
|
|
9
|
-
const
|
|
9
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
10
10
|
const picomatch = require("picomatch");
|
|
11
11
|
function isProjectIncludedInPackageManagerWorkspaces(tree, projectRoot) {
|
|
12
12
|
if (!isUsingPackageManagerWorkspaces(tree)) {
|
|
@@ -16,7 +16,7 @@ function isProjectIncludedInPackageManagerWorkspaces(tree, projectRoot) {
|
|
|
16
16
|
return patterns.some((p) => picomatch(p)((0, posix_1.join)(projectRoot, 'package.json')));
|
|
17
17
|
}
|
|
18
18
|
function getPackageManagerWorkspacesPatterns(tree) {
|
|
19
|
-
return (0,
|
|
19
|
+
return (0, internal_1.getGlobPatternsFromPackageManagerWorkspaces)(tree.root, (path) => (0, devkit_1.readJson)(tree, path, { expectComments: true }), (path) => {
|
|
20
20
|
const content = tree.read(path, 'utf-8');
|
|
21
21
|
const { load } = require('@zkochan/js-yaml');
|
|
22
22
|
return load(content, { filename: path });
|
|
@@ -4,8 +4,8 @@ exports.isUsingTsSolutionSetup = isUsingTsSolutionSetup;
|
|
|
4
4
|
exports.addProjectToTsSolutionWorkspace = addProjectToTsSolutionWorkspace;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const posix_1 = require("node:path/posix");
|
|
7
|
-
const tree_1 = require("nx/src/generators/tree");
|
|
8
7
|
const package_manager_workspaces_1 = require("../package-manager-workspaces");
|
|
8
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
9
9
|
/**
|
|
10
10
|
* The TS solution setup requires:
|
|
11
11
|
* - `tsconfig.base.json`: TS config with common compiler options needed by the
|
|
@@ -51,7 +51,7 @@ function isWorkspaceSetupWithTsSolution(tree) {
|
|
|
51
51
|
return true;
|
|
52
52
|
}
|
|
53
53
|
function isUsingTsSolutionSetup(tree) {
|
|
54
|
-
tree ??= new
|
|
54
|
+
tree ??= new internal_1.FsTree(devkit_1.workspaceRoot, false);
|
|
55
55
|
return ((0, package_manager_workspaces_1.isUsingPackageManagerWorkspaces)(tree) &&
|
|
56
56
|
isWorkspaceSetupWithTsSolution(tree));
|
|
57
57
|
}
|
package/dist/src/utils/lint.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ exports.nxVersion = require((0, path_1.join)('@nx/workspace', 'package.json')).v
|
|
|
9
9
|
exports.typescriptVersion = '~6.0.3';
|
|
10
10
|
// TODO: remove when preset generation is reworked and
|
|
11
11
|
// deps are not installed from workspace
|
|
12
|
-
exports.angularCliVersion = '~22.
|
|
12
|
+
exports.angularCliVersion = '~22.1.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -80,16 +80,15 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@zkochan/js-yaml": "0.0.7",
|
|
82
82
|
"chalk": "^4.1.0",
|
|
83
|
-
"enquirer": "~2.3.6",
|
|
84
83
|
"picomatch": "4.0.4",
|
|
85
84
|
"semver": "^7.6.3",
|
|
86
85
|
"tslib": "^2.3.0",
|
|
87
86
|
"yargs-parser": "21.1.1",
|
|
88
|
-
"nx": "23.2.0-beta.
|
|
89
|
-
"@nx/devkit": "23.2.0-beta.
|
|
87
|
+
"nx": "23.2.0-beta.10",
|
|
88
|
+
"@nx/devkit": "23.2.0-beta.10"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
|
-
"nx": "23.2.0-beta.
|
|
91
|
+
"nx": "23.2.0-beta.10"
|
|
93
92
|
},
|
|
94
93
|
"publishConfig": {
|
|
95
94
|
"access": "public"
|