@nx/workspace 23.2.0-beta.6 → 23.2.0-beta.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/dist/index.d.ts +1 -1
- package/dist/src/generators/infer-targets/infer-targets.js +4 -12
- package/dist/src/generators/new/generate-workspace-files.js +1 -2
- package/dist/src/generators/new/schema.json +2 -2
- package/dist/src/generators/preset/preset.js +3 -0
- package/dist/src/generators/preset/schema.json +2 -2
- package/dist/src/utils/lint.d.ts +1 -1
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { names } from '@nx/devkit';
|
|
|
5
5
|
export { output } from './src/utilities/output';
|
|
6
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';
|
|
@@ -3,7 +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
6
|
async function convertToInferredGenerator(tree, options) {
|
|
8
7
|
const generatorCollectionChoices = await getPossibleConvertToInferredGenerators();
|
|
9
8
|
if (generatorCollectionChoices.size === 0) {
|
|
@@ -23,19 +22,12 @@ async function convertToInferredGenerator(tree, options) {
|
|
|
23
22
|
}
|
|
24
23
|
else {
|
|
25
24
|
const allChoices = Array.from(generatorCollectionChoices.keys());
|
|
26
|
-
generatorsToRun =
|
|
27
|
-
type: 'multiselect',
|
|
28
|
-
name: 'generatorsToRun',
|
|
25
|
+
generatorsToRun = await (0, internal_1.multiselectPrompt)({
|
|
29
26
|
message: 'Which inference plugin do you want to use?',
|
|
30
27
|
choices: allChoices,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return 'Please select at least one plugin.';
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
},
|
|
38
|
-
})).generatorsToRun;
|
|
28
|
+
initialValues: allChoices,
|
|
29
|
+
required: true,
|
|
30
|
+
});
|
|
39
31
|
}
|
|
40
32
|
if (generatorsToRun.length === 0) {
|
|
41
33
|
devkit_1.output.error({
|
|
@@ -8,7 +8,6 @@ const semver_1 = require("semver");
|
|
|
8
8
|
const default_base_1 = require("../../utilities/default-base");
|
|
9
9
|
const versions_1 = require("../../utils/versions");
|
|
10
10
|
const presets_1 = require("../utils/presets");
|
|
11
|
-
const internal_2 = require("@nx/devkit/internal");
|
|
12
11
|
// map from the preset to the name of the plugin s.t. the README can have a more
|
|
13
12
|
// meaningful generator command.
|
|
14
13
|
const presetToPluginMap = {
|
|
@@ -135,7 +134,7 @@ async function generateWorkspaceFiles(tree, options) {
|
|
|
135
134
|
await createReadme(tree, options, token);
|
|
136
135
|
let aiAgentsCallback = undefined;
|
|
137
136
|
if (options.aiAgents && options.aiAgents.length > 0) {
|
|
138
|
-
aiAgentsCallback = await (0,
|
|
137
|
+
aiAgentsCallback = await (0, internal_1.setupAiAgentsGenerator)(tree, {
|
|
139
138
|
directory: options.directory,
|
|
140
139
|
writeNxCloudRules: options.nxCloud !== 'skip',
|
|
141
140
|
packageVersion: 'latest',
|
|
@@ -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.",
|
|
@@ -282,6 +282,9 @@ async function createPreset(tree, options) {
|
|
|
282
282
|
name: options.name,
|
|
283
283
|
directory: '.',
|
|
284
284
|
bundler: 'tsc',
|
|
285
|
+
// Forwarded so the library generator's own resolution short-circuits;
|
|
286
|
+
// without it the user is asked which linter to use a second time.
|
|
287
|
+
linter: options.linter,
|
|
285
288
|
unitTestRunner: 'vitest',
|
|
286
289
|
testEnvironment: 'node',
|
|
287
290
|
js: options.js,
|
|
@@ -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.",
|
package/dist/src/utils/lint.d.ts
CHANGED
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.8",
|
|
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.8",
|
|
88
|
+
"@nx/devkit": "23.2.0-beta.8"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
|
-
"nx": "23.2.0-beta.
|
|
91
|
+
"nx": "23.2.0-beta.8"
|
|
93
92
|
},
|
|
94
93
|
"publishConfig": {
|
|
95
94
|
"access": "public"
|