@nx/workspace 17.3.0-canary.20240116-42aefd8 → 17.3.0-canary.20240118-8ccf327
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/move/lib/move-project-files.js +1 -1
- package/src/generators/new/files-root-app/package.json__tmpl__ +3 -0
- package/src/generators/new/generate-preset.js +1 -0
- package/src/generators/new/generate-workspace-files.js +14 -10
- package/src/generators/new/new.d.ts +1 -0
- package/src/generators/new/schema.json +5 -0
- package/src/generators/preset/preset.js +2 -0
- package/src/generators/preset/schema.d.ts +1 -0
- package/src/generators/preset/schema.json +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "17.3.0-canary.
|
|
3
|
+
"version": "17.3.0-canary.20240118-8ccf327",
|
|
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.3.0-canary.
|
|
64
|
+
"@nx/devkit": "17.3.0-canary.20240118-8ccf327",
|
|
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.3.0-canary.
|
|
70
|
-
"@nrwl/workspace": "17.3.0-canary.
|
|
69
|
+
"nx": "17.3.0-canary.20240118-8ccf327",
|
|
70
|
+
"@nrwl/workspace": "17.3.0-canary.20240118-8ccf327"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -56,6 +56,7 @@ function generatePreset(host, opts) {
|
|
|
56
56
|
opts.docker ? `--docker=${opts.docker}` : null,
|
|
57
57
|
opts.js ? `--js` : null,
|
|
58
58
|
opts.nextAppDir ? '--nextAppDir=true' : '--nextAppDir=false',
|
|
59
|
+
opts.nextSrcDir ? '--nextSrcDir=true' : '--nextSrcDir=false',
|
|
59
60
|
opts.packageManager ? `--packageManager=${opts.packageManager}` : null,
|
|
60
61
|
opts.standaloneApi !== undefined
|
|
61
62
|
? `--standaloneApi=${opts.standaloneApi}`
|
|
@@ -48,15 +48,17 @@ function createNxJson(tree, { directory, defaultBase, preset }) {
|
|
|
48
48
|
affected: {
|
|
49
49
|
defaultBase,
|
|
50
50
|
},
|
|
51
|
-
targetDefaults:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
targetDefaults: process.env.NX_PCV3 !== 'true'
|
|
52
|
+
? {
|
|
53
|
+
build: {
|
|
54
|
+
cache: true,
|
|
55
|
+
dependsOn: ['^build'],
|
|
56
|
+
},
|
|
57
|
+
lint: {
|
|
58
|
+
cache: true,
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
: undefined,
|
|
60
62
|
};
|
|
61
63
|
if (defaultBase === 'main') {
|
|
62
64
|
delete nxJson.affected;
|
|
@@ -67,7 +69,9 @@ function createNxJson(tree, { directory, defaultBase, preset }) {
|
|
|
67
69
|
production: ['default'],
|
|
68
70
|
sharedGlobals: [],
|
|
69
71
|
};
|
|
70
|
-
|
|
72
|
+
if (process.env.NX_PCV3 !== 'true') {
|
|
73
|
+
nxJson.targetDefaults.build.inputs = ['production', '^production'];
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
(0, devkit_1.writeJson)(tree, (0, path_1.join)(directory, 'nx.json'), nxJson);
|
|
73
77
|
}
|
|
@@ -68,6 +68,11 @@
|
|
|
68
68
|
"type": "boolean",
|
|
69
69
|
"default": true
|
|
70
70
|
},
|
|
71
|
+
"nextSrcDir": {
|
|
72
|
+
"description": "Generate a `src` directory for this project.",
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": true
|
|
75
|
+
},
|
|
71
76
|
"e2eTestRunner": {
|
|
72
77
|
"description": "The tool to use for running e2e tests.",
|
|
73
78
|
"type": "string",
|
|
@@ -140,6 +140,7 @@ async function createPreset(tree, options) {
|
|
|
140
140
|
style: options.style,
|
|
141
141
|
linter: options.linter,
|
|
142
142
|
appDir: options.nextAppDir,
|
|
143
|
+
src: options.nextSrcDir,
|
|
143
144
|
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
144
145
|
});
|
|
145
146
|
}
|
|
@@ -153,6 +154,7 @@ async function createPreset(tree, options) {
|
|
|
153
154
|
style: options.style,
|
|
154
155
|
linter: options.linter,
|
|
155
156
|
appDir: options.nextAppDir,
|
|
157
|
+
src: options.nextSrcDir,
|
|
156
158
|
e2eTestRunner: options.e2eTestRunner ?? 'cypress',
|
|
157
159
|
rootProject: true,
|
|
158
160
|
});
|
|
@@ -12,6 +12,7 @@ export interface Schema {
|
|
|
12
12
|
bundler?: 'vite' | 'webpack' | 'rspack' | 'esbuild';
|
|
13
13
|
docker?: boolean;
|
|
14
14
|
nextAppDir?: boolean;
|
|
15
|
+
nextSrcDir?: boolean;
|
|
15
16
|
routing?: boolean;
|
|
16
17
|
standaloneApi?: boolean;
|
|
17
18
|
e2eTestRunner?: 'cypress' | 'playwright' | 'jest' | 'detox' | 'none';
|
|
@@ -85,6 +85,11 @@
|
|
|
85
85
|
"type": "boolean",
|
|
86
86
|
"default": true
|
|
87
87
|
},
|
|
88
|
+
"nextSrcDir": {
|
|
89
|
+
"description": "Generate a `src` directory for this project.",
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"default": true
|
|
92
|
+
},
|
|
88
93
|
"e2eTestRunner": {
|
|
89
94
|
"description": "The tool to use for running e2e tests.",
|
|
90
95
|
"type": "string",
|