@nx/vue 24.0.0-pr.37405.acdaf31 → 24.0.0-rc.0

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.
@@ -4,7 +4,6 @@ exports.applicationGenerator = applicationGenerator;
4
4
  exports.applicationGeneratorInternal = applicationGeneratorInternal;
5
5
  const internal_1 = require("@nx/devkit/internal");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const internal_2 = require("@nx/eslint/internal");
8
7
  const js_1 = require("@nx/js");
9
8
  const normalize_options_1 = require("./lib/normalize-options");
10
9
  const init_1 = require("../init/init");
@@ -16,10 +15,9 @@ const add_rsbuild_1 = require("./lib/add-rsbuild");
16
15
  const create_ts_config_1 = require("../../utils/create-ts-config");
17
16
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
18
17
  const assert_supported_vue_version_1 = require("../../utils/assert-supported-vue-version");
19
- const internal_3 = require("@nx/js/internal");
18
+ const internal_2 = require("@nx/js/internal");
20
19
  function applicationGenerator(tree, options) {
21
20
  return applicationGeneratorInternal(tree, {
22
- addPlugin: false,
23
21
  useProjectJson: true,
24
22
  ...options,
25
23
  });
@@ -27,7 +25,7 @@ function applicationGenerator(tree, options) {
27
25
  async function applicationGeneratorInternal(tree, _options) {
28
26
  (0, assert_supported_vue_version_1.assertSupportedVueVersion)(tree);
29
27
  const tasks = [];
30
- const addTsPlugin = (0, internal_3.shouldConfigureTsSolutionSetup)(tree, _options.addPlugin, _options.useTsSolution);
28
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, _options.useTsSolution);
31
29
  tasks.push(await (0, js_1.initGenerator)(tree, {
32
30
  ..._options,
33
31
  tsConfigName: _options.rootProject
@@ -41,12 +39,8 @@ async function applicationGeneratorInternal(tree, _options) {
41
39
  // If we are using the new TS solution
42
40
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
43
41
  if (options.isUsingTsSolutionConfig) {
44
- await (0, internal_3.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
42
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
45
43
  }
46
- const nxJson = (0, devkit_1.readNxJson)(tree);
47
- options.addPlugin ??=
48
- process.env.NX_ADD_PLUGINS !== 'false' &&
49
- nxJson.useInferencePlugins !== false;
50
44
  const packageJson = {
51
45
  name: options.importPath,
52
46
  version: '0.0.1',
@@ -90,9 +84,8 @@ async function applicationGeneratorInternal(tree, _options) {
90
84
  linter: options.linter,
91
85
  unitTestRunner: options.unitTestRunner,
92
86
  skipPackageJson: options.skipPackageJson,
93
- enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
87
+ enableTypedLinting: options.enableTypedLinting,
94
88
  rootProject: options.rootProject,
95
- addPlugin: options.addPlugin,
96
89
  projectName: options.projectName,
97
90
  }, 'app'));
98
91
  if (options.bundler === 'rsbuild') {
@@ -106,7 +99,7 @@ async function applicationGeneratorInternal(tree, _options) {
106
99
  if (options.js)
107
100
  (0, devkit_1.toJS)(tree);
108
101
  if (options.isUsingTsSolutionConfig) {
109
- (0, internal_3.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
102
+ (0, internal_2.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
110
103
  jsx: 'preserve',
111
104
  jsxImportSource: 'vue',
112
105
  module: 'esnext',
@@ -116,7 +109,7 @@ async function applicationGeneratorInternal(tree, _options) {
116
109
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
117
110
  : undefined);
118
111
  }
119
- (0, internal_3.sortPackageJsonFields)(tree, options.appProjectRoot);
112
+ (0, internal_2.sortPackageJsonFields)(tree, options.appProjectRoot);
120
113
  if (!options.skipFormat)
121
114
  await (0, devkit_1.formatFiles)(tree);
122
115
  tasks.push(() => {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addE2e = addE2e;
4
- const internal_1 = require("@nx/eslint/internal");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const web_1 = require("@nx/web");
7
6
  const versions_1 = require("../../../utils/versions");
@@ -16,14 +15,14 @@ async function addE2e(tree, options) {
16
15
  let e2eWebServerInfo;
17
16
  if (options.bundler === 'vite') {
18
17
  const { getViteE2EWebServerInfo } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
19
- e2eWebServerInfo = await getViteE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.devServerPort ?? 4200);
18
+ e2eWebServerInfo = await getViteE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.devServerPort ?? 4200);
20
19
  }
21
20
  else if (options.bundler === 'rsbuild') {
22
21
  (0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
23
22
  // `require()` honors Module._initPaths (which ensurePackage updates); ESM
24
23
  // dynamic `import()` doesn't, so it can't see the on-demand temp install.
25
24
  const { getRsbuildE2EWebServerInfo, } = require('@nx/rsbuild/config-utils');
26
- e2eWebServerInfo = await getRsbuildE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rsbuild.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.devServerPort ?? 4200);
25
+ e2eWebServerInfo = await getRsbuildE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rsbuild.config.${options.js ? 'js' : 'ts'}`), options.devServerPort ?? 4200);
27
26
  }
28
27
  switch (options.e2eTestRunner) {
29
28
  case 'cypress': {
@@ -67,7 +66,6 @@ async function addE2e(tree, options) {
67
66
  devServerTarget: e2eWebServerInfo.e2eDevServerTarget,
68
67
  baseUrl: e2eWebServerInfo.e2eWebServerAddress,
69
68
  jsx: true,
70
- enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
71
69
  webServerCommands: {
72
70
  default: e2eWebServerInfo.e2eWebServerCommand,
73
71
  production: e2eWebServerInfo.e2eCiWebServerCommand,
@@ -109,9 +107,10 @@ async function addE2e(tree, options) {
109
107
  directory: 'src',
110
108
  js: false,
111
109
  linter: options.linter,
112
- enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
113
- webServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
114
- webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
110
+ webServerCommand: e2eWebServerInfo.e2eWebServerCommand,
111
+ webServerAddress: e2eWebServerInfo.e2eWebServerAddress,
112
+ ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
113
+ ciWebServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
115
114
  });
116
115
  return e2eTask;
117
116
  }
@@ -11,7 +11,6 @@ async function addRsbuild(tree, options) {
11
11
  const { initGenerator, configurationGenerator, } = require('@nx/rsbuild/generators');
12
12
  const initTask = await initGenerator(tree, {
13
13
  skipPackageJson: options.skipPackageJson,
14
- addPlugin: true,
15
14
  skipFormat: true,
16
15
  });
17
16
  tasks.push(initTask);
@@ -15,7 +15,6 @@ async function addVite(tree, options) {
15
15
  includeVitest: options.unitTestRunner === 'vitest',
16
16
  skipFormat: true,
17
17
  testEnvironment: 'jsdom',
18
- addPlugin: options.addPlugin,
19
18
  });
20
19
  (0, vite_1.createOrEditViteConfig)(tree, {
21
20
  project: options.projectName,
@@ -48,7 +47,6 @@ async function addVitest(tree, options) {
48
47
  inSourceTests: options.inSourceTests,
49
48
  skipFormat: true,
50
49
  testEnvironment: 'jsdom',
51
- addPlugin: options.addPlugin,
52
50
  runtimeTsconfigFileName: 'tsconfig.app.json',
53
51
  skipViteConfig: true,
54
52
  });
@@ -16,13 +16,8 @@ export interface Schema {
16
16
  js?: boolean;
17
17
  strict?: boolean;
18
18
  enableTypedLinting?: boolean;
19
- /**
20
- * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
21
- */
22
- setParserOptionsProject?: boolean;
23
19
  skipPackageJson?: boolean;
24
20
  rootProject?: boolean;
25
- addPlugin?: boolean;
26
21
  nxCloudToken?: string;
27
22
  useTsSolution?: boolean;
28
23
  useProjectJson?: boolean;
@@ -128,12 +128,6 @@
128
128
  "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
129
129
  "default": false
130
130
  },
131
- "setParserOptionsProject": {
132
- "type": "boolean",
133
- "description": "Deprecated alias for `enableTypedLinting`.",
134
- "default": false,
135
- "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
136
- },
137
131
  "skipPackageJson": {
138
132
  "description": "Do not add dependencies to `package.json`.",
139
133
  "type": "boolean",
@@ -17,7 +17,6 @@ async function addVite(tree, options) {
17
17
  includeVitest: options.unitTestRunner === 'vitest',
18
18
  skipFormat: true,
19
19
  testEnvironment: 'jsdom',
20
- addPlugin: options.addPlugin,
21
20
  });
22
21
  tasks.push(viteTask);
23
22
  createOrEditViteConfig(tree, {
@@ -46,7 +45,6 @@ async function addVite(tree, options) {
46
45
  inSourceTests: options.inSourceTests,
47
46
  skipFormat: true,
48
47
  testEnvironment: 'jsdom',
49
- addPlugin: options.addPlugin,
50
48
  runtimeTsconfigFileName: 'tsconfig.lib.json',
51
49
  });
52
50
  tasks.push(vitestTask);
@@ -23,9 +23,6 @@ async function normalizeOptions(host, options) {
23
23
  bundler = 'vite';
24
24
  }
25
25
  }
26
- const nxJson = (0, devkit_1.readNxJson)(host);
27
- const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
28
- nxJson.useInferencePlugins !== false;
29
26
  const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
30
27
  let appMain;
31
28
  let appSourceRoot;
@@ -45,7 +42,6 @@ async function normalizeOptions(host, options) {
45
42
  }
46
43
  }
47
44
  const normalized = {
48
- addPlugin,
49
45
  ...options,
50
46
  projectName: isUsingTsSolutionConfig && !options.name ? importPath : projectName,
51
47
  // Libraries with a bundler or that are publishable must also be buildable.
@@ -20,7 +20,6 @@ const determine_entry_fields_1 = require("./lib/determine-entry-fields");
20
20
  const normalize_options_1 = require("./lib/normalize-options");
21
21
  function libraryGenerator(tree, schema) {
22
22
  return libraryGeneratorInternal(tree, {
23
- addPlugin: false,
24
23
  useProjectJson: true,
25
24
  ...schema,
26
25
  });
@@ -31,7 +30,7 @@ async function libraryGeneratorInternal(tree, schema) {
31
30
  if (schema.publishable === true && !schema.importPath) {
32
31
  throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
33
32
  }
34
- const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin);
33
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree);
35
34
  tasks.push(await (0, js_1.initGenerator)(tree, {
36
35
  ...schema,
37
36
  addTsPlugin,
@@ -13,10 +13,6 @@ export interface Schema {
13
13
  publishable?: boolean;
14
14
  routing?: boolean;
15
15
  enableTypedLinting?: boolean;
16
- /**
17
- * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
18
- */
19
- setParserOptionsProject?: boolean;
20
16
  skipFormat?: boolean;
21
17
  skipPackageJson?: boolean;
22
18
  skipTsConfig?: boolean;
@@ -25,7 +21,6 @@ export interface Schema {
25
21
  unitTestRunner?: 'vitest' | 'none';
26
22
  minimal?: boolean;
27
23
  e2eTestRunner?: 'cypress' | 'none';
28
- addPlugin?: boolean;
29
24
  useProjectJson?: boolean;
30
25
  }
31
26
 
@@ -105,12 +105,6 @@
105
105
  "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
106
106
  "default": false
107
107
  },
108
- "setParserOptionsProject": {
109
- "type": "boolean",
110
- "description": "Deprecated alias for `enableTypedLinting`.",
111
- "default": false,
112
- "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
113
- },
114
108
  "bundler": {
115
109
  "type": "string",
116
110
  "description": "The bundler to use. Choosing 'none' means this library is not buildable.",
@@ -17,10 +17,7 @@ async function generateStories(host, schema) {
17
17
  });
18
18
  }
19
19
  function storybookConfigurationGenerator(host, schema) {
20
- return storybookConfigurationGeneratorInternal(host, {
21
- addPlugin: false,
22
- ...schema,
23
- });
20
+ return storybookConfigurationGeneratorInternal(host, schema);
24
21
  }
25
22
  async function storybookConfigurationGeneratorInternal(host, schema) {
26
23
  (0, assert_supported_vue_version_1.assertSupportedVueVersion)(host);
@@ -34,7 +31,6 @@ async function storybookConfigurationGeneratorInternal(host, schema) {
34
31
  configureStaticServe: schema.configureStaticServe,
35
32
  uiFramework: '@storybook/vue3-vite',
36
33
  skipFormat: true,
37
- addPlugin: schema.addPlugin,
38
34
  });
39
35
  if (schema.generateStories) {
40
36
  await generateStories(host, schema);
@@ -9,5 +9,4 @@ export interface StorybookConfigureSchema {
9
9
  linter?: LinterType;
10
10
  ignorePaths?: string[];
11
11
  configureStaticServe?: boolean;
12
- addPlugin?: boolean;
13
12
  }
@@ -6,12 +6,7 @@ export declare function addLinting(host: Tree, options: {
6
6
  projectRoot: string;
7
7
  unitTestRunner?: 'vitest' | 'none';
8
8
  enableTypedLinting?: boolean;
9
- /**
10
- * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
11
- */
12
- setParserOptionsProject?: boolean;
13
9
  skipPackageJson?: boolean;
14
10
  rootProject?: boolean;
15
- addPlugin?: boolean;
16
11
  projectName: string;
17
12
  }, projectType: 'lib' | 'app'): Promise<GeneratorCallback>;
@@ -15,9 +15,8 @@ async function addLinting(host, options, projectType) {
15
15
  (0, devkit_1.joinPathFragments)(options.projectRoot, `tsconfig.${projectType}.json`),
16
16
  ],
17
17
  unitTestRunner: options.unitTestRunner,
18
- enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
18
+ enableTypedLinting: options.enableTypedLinting,
19
19
  rootProject: options.rootProject,
20
- addPlugin: options.addPlugin,
21
20
  skipPackageJson: options.skipPackageJson,
22
21
  }));
23
22
  // Everything below configures ESLint — predefined configs, `extends`, ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/vue",
3
- "version": "24.0.0-pr.37405.acdaf31",
3
+ "version": "24.0.0-rc.0",
4
4
  "private": false,
5
5
  "description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -61,26 +61,26 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@nx/devkit": "24.0.0-pr.37405.acdaf31",
65
- "@nx/eslint": "24.0.0-pr.37405.acdaf31",
66
- "@nx/js": "24.0.0-pr.37405.acdaf31",
67
- "@nx/vite": "24.0.0-pr.37405.acdaf31",
68
- "@nx/vitest": "24.0.0-pr.37405.acdaf31",
69
- "@nx/web": "24.0.0-pr.37405.acdaf31",
64
+ "@nx/devkit": "24.0.0-rc.0",
65
+ "@nx/eslint": "24.0.0-rc.0",
66
+ "@nx/js": "24.0.0-rc.0",
67
+ "@nx/vite": "24.0.0-rc.0",
68
+ "@nx/vitest": "24.0.0-rc.0",
69
+ "@nx/web": "24.0.0-rc.0",
70
70
  "picomatch": "4.0.4",
71
71
  "tslib": "^2.3.0"
72
72
  },
73
73
  "devDependencies": {
74
- "nx": "24.0.0-pr.37405.acdaf31"
74
+ "nx": "24.0.0-rc.0"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
79
  "peerDependencies": {
80
- "@nx/cypress": "24.0.0-pr.37405.acdaf31",
81
- "@nx/playwright": "24.0.0-pr.37405.acdaf31",
82
- "@nx/rsbuild": "24.0.0-pr.37405.acdaf31",
83
- "@nx/storybook": "24.0.0-pr.37405.acdaf31",
80
+ "@nx/cypress": "24.0.0-rc.0",
81
+ "@nx/playwright": "24.0.0-rc.0",
82
+ "@nx/rsbuild": "24.0.0-rc.0",
83
+ "@nx/storybook": "24.0.0-rc.0",
84
84
  "vue": "^3.0.0",
85
85
  "vue-router": "^4.0.0",
86
86
  "vue-tsc": "^2.0.0",