@nx/workspace 0.0.0-pr-28808-eac89e6 → 0.0.0-pr-29114-41d0324

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "0.0.0-pr-28808-eac89e6",
3
+ "version": "0.0.0-pr-29114-41d0324",
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": "0.0.0-pr-28808-eac89e6",
41
+ "@nx/devkit": "0.0.0-pr-29114-41d0324",
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": "0.0.0-pr-28808-eac89e6"
46
+ "nx": "0.0.0-pr-29114-41d0324"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -71,7 +71,6 @@ function generatePreset(host, opts) {
71
71
  opts.prefix !== undefined ? `--prefix=${opts.prefix}` : null,
72
72
  opts.nxCloudToken ? `--nxCloudToken=${opts.nxCloudToken}` : null,
73
73
  opts.formatter ? `--formatter=${opts.formatter}` : null,
74
- opts.workspaces ? `--workspaces` : null,
75
74
  ].filter((e) => !!e);
76
75
  }
77
76
  }
@@ -325,22 +325,15 @@ function setUpWorkspacesInPackageJson(tree, options) {
325
325
  if (options.preset === presets_1.Preset.NPM ||
326
326
  (options.preset === presets_1.Preset.TS &&
327
327
  process.env.NX_ADD_PLUGINS !== 'false' &&
328
- process.env.NX_ADD_TS_PLUGIN !== 'false') ||
329
- ((options.preset === presets_1.Preset.Expo ||
330
- options.preset === presets_1.Preset.NextJs ||
331
- options.preset === presets_1.Preset.ReactMonorepo ||
332
- options.preset === presets_1.Preset.ReactNative ||
333
- options.preset === presets_1.Preset.RemixMonorepo) &&
334
- options.workspaces)) {
335
- const workspaces = options.workspaceGlobs ?? ['packages/*'];
328
+ process.env.NX_ADD_TS_PLUGIN !== 'false')) {
336
329
  if (options.packageManager === 'pnpm') {
337
- tree.write((0, path_1.join)(options.directory, 'pnpm-workspace.yaml'), `packages:
338
- - ${workspaces.join('\n - ')}
330
+ tree.write((0, path_1.join)(options.directory, 'pnpm-workspace.yaml'), `packages:
331
+ - 'packages/*'
339
332
  `);
340
333
  }
341
334
  else {
342
335
  (0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
343
- json.workspaces = workspaces;
336
+ json.workspaces = ['packages/*'];
344
337
  return json;
345
338
  });
346
339
  }
@@ -24,14 +24,11 @@ interface Schema {
24
24
  useGitHub?: boolean;
25
25
  nxCloud?: 'yes' | 'skip' | 'circleci' | 'github';
26
26
  formatter?: 'none' | 'prettier';
27
- workspaces?: boolean;
28
- workspaceGlobs?: string | string[];
29
27
  }
30
28
  export interface NormalizedSchema extends Schema {
31
29
  presetVersion?: string;
32
30
  isCustomPreset: boolean;
33
31
  nxCloudToken?: string;
34
- workspaceGlobs?: string[];
35
32
  }
36
33
  export declare function newGenerator(tree: Tree, opts: Schema): Promise<() => Promise<void>>;
37
34
  export default newGenerator;
@@ -71,11 +71,6 @@ function parsePresetName(input) {
71
71
  function normalizeOptions(options) {
72
72
  const normalized = {
73
73
  ...options,
74
- workspaceGlobs: Array.isArray(options.workspaceGlobs)
75
- ? options.workspaceGlobs
76
- : options.workspaceGlobs
77
- ? [options.workspaceGlobs]
78
- : undefined,
79
74
  };
80
75
  if (!options.directory) {
81
76
  normalized.directory = normalized.name;
@@ -50,7 +50,7 @@
50
50
  "linter": {
51
51
  "description": "The tool to use for running lint checks.",
52
52
  "type": "string",
53
- "enum": ["eslint", "none"],
53
+ "enum": ["eslint"],
54
54
  "default": "eslint"
55
55
  },
56
56
  "packageManager": {
@@ -92,11 +92,6 @@
92
92
  "type": "string",
93
93
  "enum": ["none", "prettier"],
94
94
  "default": "none"
95
- },
96
- "workspaces": {
97
- "description": "Whether to use package manager workspaces.",
98
- "type": "boolean",
99
- "default": false
100
95
  }
101
96
  },
102
97
  "additionalProperties": true
@@ -65,8 +65,6 @@ async function createPreset(tree, options) {
65
65
  e2eTestRunner: options.e2eTestRunner ?? 'playwright',
66
66
  addPlugin,
67
67
  nxCloudToken: options.nxCloudToken,
68
- useTsSolution: options.workspaces,
69
- formatter: options.formatter,
70
68
  });
71
69
  }
72
70
  else if (options.preset === presets_1.Preset.ReactStandalone) {
@@ -83,7 +81,6 @@ async function createPreset(tree, options) {
83
81
  unitTestRunner: options.bundler === 'vite' ? 'vitest' : 'jest',
84
82
  addPlugin,
85
83
  nxCloudToken: options.nxCloudToken,
86
- formatter: options.formatter,
87
84
  });
88
85
  }
89
86
  else if (options.preset === presets_1.Preset.RemixMonorepo) {
@@ -97,8 +94,6 @@ async function createPreset(tree, options) {
97
94
  unitTestRunner: 'vitest',
98
95
  addPlugin,
99
96
  nxCloudToken: options.nxCloudToken,
100
- useTsSolution: options.workspaces,
101
- formatter: options.formatter,
102
97
  });
103
98
  }
104
99
  else if (options.preset === presets_1.Preset.RemixStandalone) {
@@ -113,7 +108,6 @@ async function createPreset(tree, options) {
113
108
  unitTestRunner: 'vitest',
114
109
  addPlugin,
115
110
  nxCloudToken: options.nxCloudToken,
116
- formatter: options.formatter,
117
111
  });
118
112
  }
119
113
  else if (options.preset === presets_1.Preset.VueMonorepo) {
@@ -184,8 +178,6 @@ async function createPreset(tree, options) {
184
178
  src: options.nextSrcDir,
185
179
  e2eTestRunner: options.e2eTestRunner ?? 'playwright',
186
180
  addPlugin,
187
- useTsSolution: options.workspaces,
188
- formatter: options.formatter,
189
181
  });
190
182
  }
191
183
  else if (options.preset === presets_1.Preset.NextJsStandalone) {
@@ -201,7 +193,6 @@ async function createPreset(tree, options) {
201
193
  e2eTestRunner: options.e2eTestRunner ?? 'playwright',
202
194
  rootProject: true,
203
195
  addPlugin,
204
- formatter: options.formatter,
205
196
  });
206
197
  }
207
198
  else if (options.preset === presets_1.Preset.WebComponents) {
@@ -250,8 +241,6 @@ async function createPreset(tree, options) {
250
241
  addPlugin,
251
242
  nxCloudToken: options.nxCloudToken,
252
243
  bundler: options.bundler ?? 'webpack',
253
- useTsSolution: options.workspaces,
254
- formatter: options.formatter,
255
244
  });
256
245
  }
257
246
  else if (options.preset === presets_1.Preset.Expo) {
@@ -263,8 +252,6 @@ async function createPreset(tree, options) {
263
252
  e2eTestRunner: options.e2eTestRunner ?? 'detox',
264
253
  addPlugin,
265
254
  nxCloudToken: options.nxCloudToken,
266
- useTsSolution: options.workspaces,
267
- formatter: options.formatter,
268
255
  });
269
256
  }
270
257
  else if (options.preset === presets_1.Preset.TS) {
@@ -7,7 +7,6 @@ export interface Schema {
7
7
  style?: string;
8
8
  linter?: string;
9
9
  formatter?: 'none' | 'prettier';
10
- workspaces?: boolean;
11
10
  standaloneConfig?: boolean;
12
11
  framework?: string;
13
12
  packageManager?: PackageManager;
@@ -17,7 +17,7 @@
17
17
  "linter": {
18
18
  "description": "The tool to use for running lint checks.",
19
19
  "type": "string",
20
- "enum": ["eslint", "none"],
20
+ "enum": ["eslint"],
21
21
  "default": "eslint"
22
22
  },
23
23
  "routing": {
@@ -103,17 +103,6 @@
103
103
  "prefix": {
104
104
  "description": "The prefix to use for Angular component and directive selectors.",
105
105
  "type": "string"
106
- },
107
- "formatter": {
108
- "description": "The tool to use for code formatting.",
109
- "type": "string",
110
- "enum": ["none", "prettier"],
111
- "default": "none"
112
- },
113
- "workspaces": {
114
- "description": "Whether to use package manager workspaces.",
115
- "type": "boolean",
116
- "default": false
117
106
  }
118
107
  },
119
108
  "required": ["preset", "name"]