@nx/workspace 18.1.0-canary.20240228-4d13753 → 18.1.0-canary.20240301-d705372

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": "18.1.0-canary.20240228-4d13753",
3
+ "version": "18.1.0-canary.20240301-d705372",
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": "18.1.0-canary.20240228-4d13753",
64
+ "@nx/devkit": "18.1.0-canary.20240301-d705372",
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": "18.1.0-canary.20240228-4d13753",
70
- "@nrwl/workspace": "18.1.0-canary.20240228-4d13753"
69
+ "nx": "18.1.0-canary.20240301-d705372",
70
+ "@nrwl/workspace": "18.1.0-canary.20240301-d705372"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"
@@ -69,6 +69,7 @@ function createNxJson(tree, { directory, defaultBase, preset }) {
69
69
  };
70
70
  if (process.env.NX_ADD_PLUGINS === 'false') {
71
71
  nxJson.targetDefaults.build.inputs = ['production', '^production'];
72
+ nxJson.useInferencePlugins = false;
72
73
  }
73
74
  }
74
75
  (0, devkit_1.writeJson)(tree, (0, path_1.join)(directory, 'nx.json'), nxJson);
@@ -122,8 +123,7 @@ function addNpmScripts(tree, options) {
122
123
  options.preset === presets_1.Preset.ReactStandalone ||
123
124
  options.preset === presets_1.Preset.VueStandalone ||
124
125
  options.preset === presets_1.Preset.NuxtStandalone ||
125
- options.preset === presets_1.Preset.NodeStandalone ||
126
- options.preset === presets_1.Preset.NextJsStandalone) {
126
+ options.preset === presets_1.Preset.NodeStandalone) {
127
127
  (0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
128
128
  Object.assign(json.scripts, {
129
129
  start: 'nx serve',
@@ -133,6 +133,17 @@ function addNpmScripts(tree, options) {
133
133
  return json;
134
134
  });
135
135
  }
136
+ if (options.preset === presets_1.Preset.NextJsStandalone) {
137
+ (0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
138
+ Object.assign(json.scripts, {
139
+ dev: 'nx dev',
140
+ build: 'nx build',
141
+ start: 'nx start',
142
+ test: 'nx test',
143
+ });
144
+ return json;
145
+ });
146
+ }
136
147
  if (options.preset === presets_1.Preset.TsStandalone) {
137
148
  (0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
138
149
  Object.assign(json.scripts, {
@@ -16,7 +16,12 @@ async function presetGenerator(tree, options) {
16
16
  exports.presetGenerator = presetGenerator;
17
17
  exports.default = presetGenerator;
18
18
  async function createPreset(tree, options) {
19
- const addPlugin = process.env.NX_ADD_PLUGINS !== 'false';
19
+ console.log('Crate preset');
20
+ const nxJson = (0, devkit_1.readNxJson)(tree);
21
+ const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
22
+ nxJson.useInferencePlugins !== false;
23
+ console.log('Add plugin', addPlugin);
24
+ console.log(options.preset, presets_1.Preset.ReactNative);
20
25
  if (options.preset === presets_1.Preset.Apps) {
21
26
  return;
22
27
  }
@@ -208,8 +213,11 @@ async function createPreset(tree, options) {
208
213
  });
209
214
  }
210
215
  else if (options.preset === presets_1.Preset.ReactNative) {
216
+ console.log('Before require');
211
217
  const { reactNativeApplicationGenerator } = require('@nx' +
212
218
  '/react-native');
219
+ console.log('Hello', reactNativeApplicationGenerator);
220
+ console.log('Active require');
213
221
  return reactNativeApplicationGenerator(tree, {
214
222
  name: options.name,
215
223
  directory: (0, path_1.join)('apps', options.name),