@nx/workspace 20.6.1 → 20.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "20.6.1",
3
+ "version": "20.6.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": {
@@ -38,14 +38,14 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@nx/devkit": "20.6.1",
41
+ "@nx/devkit": "20.6.3",
42
42
  "@zkochan/js-yaml": "0.0.7",
43
43
  "chalk": "^4.1.0",
44
44
  "enquirer": "~2.3.6",
45
45
  "picomatch": "4.0.2",
46
46
  "tslib": "^2.3.0",
47
47
  "yargs-parser": "21.1.1",
48
- "nx": "20.6.1"
48
+ "nx": "20.6.3"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -85,6 +85,7 @@ function generatePreset(host, opts) {
85
85
  opts.nxCloudToken ? `--nxCloudToken=${opts.nxCloudToken}` : null,
86
86
  opts.formatter ? `--formatter=${opts.formatter}` : null,
87
87
  opts.workspaces !== false ? `--workspaces` : `--no-workspaces`,
88
+ opts.useProjectJson ? `--useProjectJson` : null,
88
89
  ].filter((e) => !!e);
89
90
  }
90
91
  }
@@ -29,6 +29,7 @@ interface Schema {
29
29
  formatter?: 'none' | 'prettier';
30
30
  workspaces?: boolean;
31
31
  workspaceGlobs?: string | string[];
32
+ useProjectJson?: boolean;
32
33
  }
33
34
  export interface NormalizedSchema extends Schema {
34
35
  presetVersion?: string;
@@ -111,6 +111,10 @@
111
111
  "description": "Whether to use package manager workspaces.",
112
112
  "type": "boolean",
113
113
  "default": true
114
+ },
115
+ "useProjectJson": {
116
+ "type": "boolean",
117
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
114
118
  }
115
119
  },
116
120
  "additionalProperties": true
@@ -75,7 +75,7 @@ async function createPreset(tree, options) {
75
75
  nxCloudToken: options.nxCloudToken,
76
76
  useTsSolution: options.workspaces,
77
77
  formatter: options.formatter,
78
- useProjectJson: !options.workspaces,
78
+ useProjectJson: options.useProjectJson,
79
79
  });
80
80
  }
81
81
  else if (options.preset === presets_1.Preset.ReactStandalone) {
@@ -112,7 +112,7 @@ async function createPreset(tree, options) {
112
112
  nxCloudToken: options.nxCloudToken,
113
113
  useTsSolution: options.workspaces,
114
114
  formatter: options.formatter,
115
- useProjectJson: !options.workspaces,
115
+ useProjectJson: options.useProjectJson,
116
116
  });
117
117
  }
118
118
  else if (options.preset === presets_1.Preset.VueStandalone) {
@@ -144,7 +144,7 @@ async function createPreset(tree, options) {
144
144
  nxCloudToken: options.nxCloudToken,
145
145
  useTsSolution: options.workspaces,
146
146
  formatter: options.formatter,
147
- useProjectJson: !options.workspaces,
147
+ useProjectJson: options.useProjectJson,
148
148
  });
149
149
  }
150
150
  else if (options.preset === presets_1.Preset.NuxtStandalone) {
@@ -177,7 +177,7 @@ async function createPreset(tree, options) {
177
177
  addPlugin,
178
178
  useTsSolution: options.workspaces,
179
179
  formatter: options.formatter,
180
- useProjectJson: !options.workspaces,
180
+ useProjectJson: options.useProjectJson,
181
181
  });
182
182
  }
183
183
  else if (options.preset === presets_1.Preset.NextJsStandalone) {
@@ -223,7 +223,7 @@ async function createPreset(tree, options) {
223
223
  addPlugin,
224
224
  useTsSolution: options.workspaces,
225
225
  formatter: options.formatter,
226
- useProjectJson: !options.workspaces,
226
+ useProjectJson: options.useProjectJson,
227
227
  });
228
228
  }
229
229
  else if (options.preset === presets_1.Preset.Express) {
@@ -237,7 +237,7 @@ async function createPreset(tree, options) {
237
237
  addPlugin,
238
238
  useTsSolution: options.workspaces,
239
239
  formatter: options.formatter,
240
- useProjectJson: !options.workspaces,
240
+ useProjectJson: options.useProjectJson,
241
241
  });
242
242
  }
243
243
  else if (options.preset === presets_1.Preset.ReactNative) {
@@ -254,7 +254,7 @@ async function createPreset(tree, options) {
254
254
  bundler: options.bundler ?? 'webpack',
255
255
  useTsSolution: options.workspaces,
256
256
  formatter: options.formatter,
257
- useProjectJson: !options.workspaces,
257
+ useProjectJson: options.useProjectJson,
258
258
  });
259
259
  }
260
260
  else if (options.preset === presets_1.Preset.Expo) {
@@ -269,7 +269,7 @@ async function createPreset(tree, options) {
269
269
  nxCloudToken: options.nxCloudToken,
270
270
  useTsSolution: options.workspaces,
271
271
  formatter: options.formatter,
272
- useProjectJson: !options.workspaces,
272
+ useProjectJson: options.useProjectJson,
273
273
  });
274
274
  }
275
275
  else if (options.preset === presets_1.Preset.TS) {
@@ -327,7 +327,7 @@ async function createPreset(tree, options) {
327
327
  addPlugin,
328
328
  useTsSolution: options.workspaces,
329
329
  formatter: options.formatter,
330
- useProjectJson: !options.workspaces,
330
+ useProjectJson: options.useProjectJson,
331
331
  });
332
332
  }
333
333
  else {
@@ -25,4 +25,5 @@ export interface Schema {
25
25
  serverRouting?: boolean;
26
26
  prefix?: string;
27
27
  nxCloudToken?: string;
28
+ useProjectJson?: boolean;
28
29
  }
@@ -128,6 +128,10 @@
128
128
  "description": "Whether to use package manager workspaces.",
129
129
  "type": "boolean",
130
130
  "default": true
131
+ },
132
+ "useProjectJson": {
133
+ "type": "boolean",
134
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
131
135
  }
132
136
  },
133
137
  "required": ["preset", "name"]