@nx/workspace 20.2.0-canary.20241130-ec5a5e6 → 20.2.0-canary.20241204-75b2080
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/migrations.json +13 -0
- package/package.json +3 -3
- package/src/generators/new/generate-preset.js +13 -6
- package/src/generators/new/new.d.ts +1 -0
- package/src/generators/new/schema.json +4 -0
- package/src/generators/preset/preset.js +2 -0
- package/src/generators/preset/schema.d.ts +1 -0
- package/src/generators/preset/schema.json +4 -0
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +2 -2
package/migrations.json
CHANGED
@@ -50,6 +50,19 @@
|
|
50
50
|
"alwaysAddToPackageJson": false
|
51
51
|
}
|
52
52
|
}
|
53
|
+
},
|
54
|
+
"20.2.0": {
|
55
|
+
"version": "20.2.0-beta.5",
|
56
|
+
"x-prompt": "Do you want to update to TypeScript v5.6?",
|
57
|
+
"requires": {
|
58
|
+
"typescript": ">=5.5.0 <5.6.0"
|
59
|
+
},
|
60
|
+
"packages": {
|
61
|
+
"typescript": {
|
62
|
+
"version": "~5.6.2",
|
63
|
+
"alwaysAddToPackageJson": false
|
64
|
+
}
|
65
|
+
}
|
53
66
|
}
|
54
67
|
}
|
55
68
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/workspace",
|
3
|
-
"version": "20.2.0-canary.
|
3
|
+
"version": "20.2.0-canary.20241204-75b2080",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
|
6
6
|
"repository": {
|
@@ -38,12 +38,12 @@
|
|
38
38
|
}
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@nx/devkit": "20.2.0-canary.
|
41
|
+
"@nx/devkit": "20.2.0-canary.20241204-75b2080",
|
42
42
|
"chalk": "^4.1.0",
|
43
43
|
"enquirer": "~2.3.6",
|
44
44
|
"tslib": "^2.3.0",
|
45
45
|
"yargs-parser": "21.1.1",
|
46
|
-
"nx": "20.2.0-canary.
|
46
|
+
"nx": "20.2.0-canary.20241204-75b2080"
|
47
47
|
},
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
@@ -9,6 +9,7 @@ const get_npm_package_version_1 = require("../utils/get-npm-package-version");
|
|
9
9
|
const path_1 = require("path");
|
10
10
|
const yargsParser = require("yargs-parser");
|
11
11
|
const child_process_1 = require("child_process");
|
12
|
+
const installation_directory_1 = require("nx/src/utils/installation-directory");
|
12
13
|
function addPresetDependencies(host, options) {
|
13
14
|
const { dependencies, dev } = getPresetDependencies(options);
|
14
15
|
return (0, devkit_1.addDependenciesToPackageJson)(host, dependencies, dev, (0, path_1.join)(options.directory, 'package.json'));
|
@@ -20,17 +21,22 @@ function generatePreset(host, opts) {
|
|
20
21
|
interactive: true,
|
21
22
|
},
|
22
23
|
});
|
23
|
-
const
|
24
|
+
const newWorkspaceRoot = (0, path_1.join)(host.root, opts.directory);
|
25
|
+
const forkOptions = {
|
24
26
|
stdio: 'inherit',
|
25
|
-
|
26
|
-
cwd: (0, path_1.join)(host.root, opts.directory),
|
27
|
-
windowsHide: false,
|
27
|
+
cwd: newWorkspaceRoot,
|
28
28
|
};
|
29
29
|
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
30
|
-
const
|
30
|
+
const nxInstallationPaths = (0, installation_directory_1.getNxRequirePaths)(newWorkspaceRoot);
|
31
|
+
const nxBinForNewWorkspaceRoot = require.resolve('nx/bin/nx', {
|
32
|
+
paths: nxInstallationPaths,
|
33
|
+
});
|
31
34
|
const args = getPresetArgs(opts);
|
32
35
|
return new Promise((resolve, reject) => {
|
33
|
-
|
36
|
+
// This needs to be `fork` instead of `spawn` because `spawn` is failing on Windows with pnpm + yarn
|
37
|
+
// The root cause is unclear. Spawn causes the `@nx/workspace:preset` generator to be called twice
|
38
|
+
// and the second time it fails with `Project {projectName} already exists.`
|
39
|
+
(0, child_process_1.fork)(nxBinForNewWorkspaceRoot, args, forkOptions).on('close', (code) => {
|
34
40
|
if (code === 0) {
|
35
41
|
resolve();
|
36
42
|
}
|
@@ -68,6 +74,7 @@ function generatePreset(host, opts) {
|
|
68
74
|
? `--e2eTestRunner=${opts.e2eTestRunner}`
|
69
75
|
: null,
|
70
76
|
opts.ssr ? `--ssr` : null,
|
77
|
+
opts.serverRouting ? `--server-routing` : null,
|
71
78
|
opts.prefix !== undefined ? `--prefix=${opts.prefix}` : null,
|
72
79
|
opts.nxCloudToken ? `--nxCloudToken=${opts.nxCloudToken}` : null,
|
73
80
|
opts.formatter ? `--formatter=${opts.formatter}` : null,
|
@@ -20,6 +20,7 @@ interface Schema {
|
|
20
20
|
packageManager?: PackageManager;
|
21
21
|
e2eTestRunner?: 'cypress' | 'playwright' | 'detox' | 'jest' | 'none';
|
22
22
|
ssr?: boolean;
|
23
|
+
serverRouting?: boolean;
|
23
24
|
prefix?: string;
|
24
25
|
useGitHub?: boolean;
|
25
26
|
nxCloud?: 'yes' | 'skip' | 'circleci' | 'github';
|
@@ -83,6 +83,10 @@
|
|
83
83
|
"type": "boolean",
|
84
84
|
"default": false
|
85
85
|
},
|
86
|
+
"serverRouting": {
|
87
|
+
"description": "Use the Angular Server Routing and App Engine APIs (Developer Preview).",
|
88
|
+
"type": "boolean"
|
89
|
+
},
|
86
90
|
"prefix": {
|
87
91
|
"description": "The prefix to use for Angular component and directive selectors.",
|
88
92
|
"type": "string"
|
@@ -32,6 +32,7 @@ async function createPreset(tree, options) {
|
|
32
32
|
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
33
33
|
bundler: options.bundler,
|
34
34
|
ssr: options.ssr,
|
35
|
+
serverRouting: options.serverRouting,
|
35
36
|
prefix: options.prefix,
|
36
37
|
nxCloudToken: options.nxCloudToken,
|
37
38
|
});
|
@@ -49,6 +50,7 @@ async function createPreset(tree, options) {
|
|
49
50
|
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
50
51
|
bundler: options.bundler,
|
51
52
|
ssr: options.ssr,
|
53
|
+
serverRouting: options.serverRouting,
|
52
54
|
prefix: options.prefix,
|
53
55
|
nxCloudToken: options.nxCloudToken,
|
54
56
|
});
|
@@ -100,6 +100,10 @@
|
|
100
100
|
"type": "boolean",
|
101
101
|
"default": false
|
102
102
|
},
|
103
|
+
"serverRouting": {
|
104
|
+
"description": "Use the Angular Server Routing and App Engine APIs (Developer Preview).",
|
105
|
+
"type": "boolean"
|
106
|
+
},
|
103
107
|
"prefix": {
|
104
108
|
"description": "The prefix to use for Angular component and directive selectors.",
|
105
109
|
"type": "string"
|
package/src/utils/versions.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export declare const nxVersion: any;
|
2
|
-
export declare const typescriptVersion = "~5.
|
3
|
-
export declare const angularCliVersion = "~
|
2
|
+
export declare const typescriptVersion = "~5.6.2";
|
3
|
+
export declare const angularCliVersion = "~19.0.0";
|
package/src/utils/versions.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.angularCliVersion = exports.typescriptVersion = exports.nxVersion = void 0;
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
5
|
-
exports.typescriptVersion = '~5.
|
5
|
+
exports.typescriptVersion = '~5.6.2';
|
6
6
|
// TODO: remove when preset generation is reworked and
|
7
7
|
// deps are not installed from workspace
|
8
|
-
exports.angularCliVersion = '~
|
8
|
+
exports.angularCliVersion = '~19.0.0';
|