@nx/workspace 17.1.0-beta.0 → 17.1.0-beta.3
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 +4 -4
- package/src/generators/new/files-readme/README.md.template +1 -1
- package/src/generators/new/generate-preset.js +11 -0
- package/src/generators/new/generate-workspace-files.js +2 -3
- package/src/generators/new/new.d.ts +1 -0
- package/src/generators/new/schema.json +5 -0
- package/src/generators/preset/preset.js +30 -0
- package/src/generators/preset/schema.d.ts +1 -0
- package/src/generators/preset/schema.json +5 -0
- package/src/generators/utils/presets.d.ts +2 -0
- package/src/generators/utils/presets.js +2 -0
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "17.1.0-beta.
|
|
3
|
+
"version": "17.1.0-beta.3",
|
|
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": {
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@nx/devkit": "17.1.0-beta.
|
|
64
|
+
"@nx/devkit": "17.1.0-beta.3",
|
|
65
65
|
"chalk": "^4.1.0",
|
|
66
66
|
"enquirer": "~2.3.6",
|
|
67
67
|
"tslib": "^2.3.0",
|
|
68
68
|
"yargs-parser": "21.1.1",
|
|
69
|
-
"nx": "17.1.0-beta.
|
|
70
|
-
"@nrwl/workspace": "17.1.0-beta.
|
|
69
|
+
"nx": "17.1.0-beta.3",
|
|
70
|
+
"@nrwl/workspace": "17.1.0-beta.3"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -53,7 +53,7 @@ Just run `nx build demoapp` to build the application. The build artifacts will b
|
|
|
53
53
|
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further.
|
|
54
54
|
|
|
55
55
|
- [Set up remote caching](https://nx.dev/core-features/share-your-cache)
|
|
56
|
-
- [Set up task distribution across multiple machines](https://nx.dev/
|
|
56
|
+
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution)
|
|
57
57
|
- [Learn more how to setup CI](https://nx.dev/recipes/ci)
|
|
58
58
|
|
|
59
59
|
## Connect with us!
|
|
@@ -65,6 +65,7 @@ function generatePreset(host, opts) {
|
|
|
65
65
|
opts.e2eTestRunner !== undefined
|
|
66
66
|
? `--e2eTestRunner=${opts.e2eTestRunner}`
|
|
67
67
|
: null,
|
|
68
|
+
opts.ssr ? `--ssr` : null,
|
|
68
69
|
].filter((e) => !!e);
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -106,6 +107,16 @@ function getPresetDependencies({ preset, presetVersion, bundler, e2eTestRunner,
|
|
|
106
107
|
'@nx/vite': versions_1.nxVersion,
|
|
107
108
|
},
|
|
108
109
|
};
|
|
110
|
+
case presets_1.Preset.Nuxt:
|
|
111
|
+
case presets_1.Preset.NuxtStandalone:
|
|
112
|
+
return {
|
|
113
|
+
dependencies: {},
|
|
114
|
+
dev: {
|
|
115
|
+
'@nx/nuxt': versions_1.nxVersion,
|
|
116
|
+
'@nx/cypress': e2eTestRunner === 'cypress' ? versions_1.nxVersion : undefined,
|
|
117
|
+
'@nx/playwright': e2eTestRunner === 'playwright' ? versions_1.nxVersion : undefined,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
109
120
|
case presets_1.Preset.ReactMonorepo:
|
|
110
121
|
case presets_1.Preset.ReactStandalone:
|
|
111
122
|
return {
|
|
@@ -56,9 +56,6 @@ function createNxJson(tree, { directory, defaultBase, preset }) {
|
|
|
56
56
|
lint: {
|
|
57
57
|
cache: true,
|
|
58
58
|
},
|
|
59
|
-
test: {
|
|
60
|
-
cache: true,
|
|
61
|
-
},
|
|
62
59
|
e2e: {
|
|
63
60
|
cache: true,
|
|
64
61
|
},
|
|
@@ -82,6 +79,7 @@ function createFiles(tree, options) {
|
|
|
82
79
|
const filesDirName = options.preset === presets_1.Preset.AngularStandalone ||
|
|
83
80
|
options.preset === presets_1.Preset.ReactStandalone ||
|
|
84
81
|
options.preset === presets_1.Preset.VueStandalone ||
|
|
82
|
+
options.preset === presets_1.Preset.NuxtStandalone ||
|
|
85
83
|
options.preset === presets_1.Preset.NodeStandalone ||
|
|
86
84
|
options.preset === presets_1.Preset.NextJsStandalone ||
|
|
87
85
|
options.preset === presets_1.Preset.TsStandalone
|
|
@@ -121,6 +119,7 @@ function addNpmScripts(tree, options) {
|
|
|
121
119
|
if (options.preset === presets_1.Preset.AngularStandalone ||
|
|
122
120
|
options.preset === presets_1.Preset.ReactStandalone ||
|
|
123
121
|
options.preset === presets_1.Preset.VueStandalone ||
|
|
122
|
+
options.preset === presets_1.Preset.NuxtStandalone ||
|
|
124
123
|
options.preset === presets_1.Preset.NodeStandalone ||
|
|
125
124
|
options.preset === presets_1.Preset.NextJsStandalone) {
|
|
126
125
|
(0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
|
|
@@ -72,6 +72,11 @@
|
|
|
72
72
|
"description": "The tool to use for running e2e tests.",
|
|
73
73
|
"type": "string",
|
|
74
74
|
"enum": ["cypress", "playwright", "jest", "detox", "none"]
|
|
75
|
+
},
|
|
76
|
+
"ssr": {
|
|
77
|
+
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": false
|
|
75
80
|
}
|
|
76
81
|
},
|
|
77
82
|
"additionalProperties": true
|
|
@@ -30,6 +30,8 @@ async function createPreset(tree, options) {
|
|
|
30
30
|
standalone: options.standaloneApi,
|
|
31
31
|
routing: options.routing,
|
|
32
32
|
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
33
|
+
bundler: options.bundler,
|
|
34
|
+
ssr: options.ssr,
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
else if (options.preset === presets_1.Preset.AngularStandalone) {
|
|
@@ -44,6 +46,8 @@ async function createPreset(tree, options) {
|
|
|
44
46
|
rootProject: true,
|
|
45
47
|
standalone: options.standaloneApi,
|
|
46
48
|
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
49
|
+
bundler: options.bundler,
|
|
50
|
+
ssr: options.ssr,
|
|
47
51
|
});
|
|
48
52
|
}
|
|
49
53
|
else if (options.preset === presets_1.Preset.ReactMonorepo) {
|
|
@@ -100,6 +104,32 @@ async function createPreset(tree, options) {
|
|
|
100
104
|
unitTestRunner: 'vitest',
|
|
101
105
|
});
|
|
102
106
|
}
|
|
107
|
+
else if (options.preset === presets_1.Preset.Nuxt) {
|
|
108
|
+
const { applicationGenerator: nuxtApplicationGenerator } = require('@nx' +
|
|
109
|
+
'/nuxt');
|
|
110
|
+
return nuxtApplicationGenerator(tree, {
|
|
111
|
+
name: options.name,
|
|
112
|
+
directory: (0, path_1.join)('apps', options.name),
|
|
113
|
+
projectNameAndRootFormat: 'as-provided',
|
|
114
|
+
style: options.style,
|
|
115
|
+
linter: options.linter,
|
|
116
|
+
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
else if (options.preset === presets_1.Preset.NuxtStandalone) {
|
|
120
|
+
const { applicationGenerator: nuxtApplicationGenerator } = require('@nx' +
|
|
121
|
+
'/nuxt');
|
|
122
|
+
return nuxtApplicationGenerator(tree, {
|
|
123
|
+
name: options.name,
|
|
124
|
+
directory: '.',
|
|
125
|
+
projectNameAndRootFormat: 'as-provided',
|
|
126
|
+
style: options.style,
|
|
127
|
+
linter: options.linter,
|
|
128
|
+
rootProject: true,
|
|
129
|
+
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
130
|
+
unitTestRunner: 'vitest',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
103
133
|
else if (options.preset === presets_1.Preset.NextJs) {
|
|
104
134
|
const { applicationGenerator: nextApplicationGenerator } = require('@nx' +
|
|
105
135
|
'/next');
|
|
@@ -89,6 +89,11 @@
|
|
|
89
89
|
"description": "The tool to use for running e2e tests.",
|
|
90
90
|
"type": "string",
|
|
91
91
|
"enum": ["cypress", "playwright", "jest", "detox", "none"]
|
|
92
|
+
},
|
|
93
|
+
"ssr": {
|
|
94
|
+
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"default": false
|
|
92
97
|
}
|
|
93
98
|
},
|
|
94
99
|
"required": ["preset", "name"]
|
|
@@ -22,6 +22,8 @@ var Preset;
|
|
|
22
22
|
Preset["ReactNative"] = "react-native";
|
|
23
23
|
Preset["VueMonorepo"] = "vue-monorepo";
|
|
24
24
|
Preset["VueStandalone"] = "vue-standalone";
|
|
25
|
+
Preset["Nuxt"] = "nuxt";
|
|
26
|
+
Preset["NuxtStandalone"] = "nuxt-standalone";
|
|
25
27
|
Preset["Expo"] = "expo";
|
|
26
28
|
Preset["NextJs"] = "next";
|
|
27
29
|
Preset["Nest"] = "nest";
|
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.2.2";
|
|
3
|
+
export declare const angularCliVersion = "~17.0.0-rc.4";
|
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.2.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 = '~17.0.0-rc.4';
|