@nx/vue 23.0.0-beta.2 → 23.0.0-beta.20

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/vue",
3
- "version": "23.0.0-beta.2",
3
+ "version": "23.0.0-beta.20",
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": {
@@ -30,27 +30,27 @@
30
30
  "migrations": "./migrations.json"
31
31
  },
32
32
  "dependencies": {
33
- "@nx/devkit": "23.0.0-beta.2",
34
- "@nx/eslint": "23.0.0-beta.2",
35
- "@nx/js": "23.0.0-beta.2",
36
- "@nx/vite": "23.0.0-beta.2",
37
- "@nx/vitest": "23.0.0-beta.2",
38
- "@nx/web": "23.0.0-beta.2",
33
+ "@nx/devkit": "23.0.0-beta.20",
34
+ "@nx/eslint": "23.0.0-beta.20",
35
+ "@nx/js": "23.0.0-beta.20",
36
+ "@nx/vite": "23.0.0-beta.20",
37
+ "@nx/vitest": "23.0.0-beta.20",
38
+ "@nx/web": "23.0.0-beta.20",
39
39
  "picomatch": "4.0.4",
40
40
  "semver": "^7.6.3",
41
41
  "tslib": "^2.3.0"
42
42
  },
43
43
  "devDependencies": {
44
- "nx": "23.0.0-beta.2"
44
+ "nx": "23.0.0-beta.20"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
49
  "peerDependencies": {
50
- "@nx/cypress": "23.0.0-beta.2",
51
- "@nx/playwright": "23.0.0-beta.2",
52
- "@nx/rsbuild": "23.0.0-beta.2",
53
- "@nx/storybook": "23.0.0-beta.2"
50
+ "@nx/cypress": "23.0.0-beta.20",
51
+ "@nx/playwright": "23.0.0-beta.20",
52
+ "@nx/rsbuild": "23.0.0-beta.20",
53
+ "@nx/storybook": "23.0.0-beta.20"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@nx/cypress": {
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAKjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmBlC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAM/D;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CA0I5B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAKjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAkBlC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAM/D;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CA0I5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationGenerator = applicationGenerator;
4
4
  exports.applicationGeneratorInternal = applicationGeneratorInternal;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const js_1 = require("@nx/js");
7
8
  const normalize_options_1 = require("./lib/normalize-options");
@@ -13,9 +14,7 @@ const add_vite_1 = require("./lib/add-vite");
13
14
  const add_rsbuild_1 = require("./lib/add-rsbuild");
14
15
  const create_ts_config_1 = require("../../utils/create-ts-config");
15
16
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
16
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
17
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
18
- const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
17
+ const internal_2 = require("@nx/js/internal");
19
18
  function applicationGenerator(tree, options) {
20
19
  return applicationGeneratorInternal(tree, {
21
20
  addPlugin: false,
@@ -25,7 +24,7 @@ function applicationGenerator(tree, options) {
25
24
  }
26
25
  async function applicationGeneratorInternal(tree, _options) {
27
26
  const tasks = [];
28
- const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, _options.addPlugin, _options.useTsSolution);
27
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, _options.addPlugin, _options.useTsSolution);
29
28
  tasks.push(await (0, js_1.initGenerator)(tree, {
30
29
  ..._options,
31
30
  tsConfigName: _options.rootProject
@@ -40,7 +39,7 @@ async function applicationGeneratorInternal(tree, _options) {
40
39
  // If we are using the new TS solution
41
40
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
42
41
  if (options.isUsingTsSolutionConfig) {
43
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
42
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
44
43
  }
45
44
  const nxJson = (0, devkit_1.readNxJson)(tree);
46
45
  options.addPlugin ??=
@@ -105,7 +104,7 @@ async function applicationGeneratorInternal(tree, _options) {
105
104
  if (options.js)
106
105
  (0, devkit_1.toJS)(tree);
107
106
  if (options.isUsingTsSolutionConfig) {
108
- (0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
107
+ (0, internal_2.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
109
108
  jsx: 'preserve',
110
109
  jsxImportSource: 'vue',
111
110
  module: 'esnext',
@@ -115,11 +114,11 @@ async function applicationGeneratorInternal(tree, _options) {
115
114
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
116
115
  : undefined);
117
116
  }
118
- (0, sort_fields_1.sortPackageJsonFields)(tree, options.appProjectRoot);
117
+ (0, internal_2.sortPackageJsonFields)(tree, options.appProjectRoot);
119
118
  if (!options.skipFormat)
120
119
  await (0, devkit_1.formatFiles)(tree);
121
120
  tasks.push(() => {
122
- (0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
121
+ (0, internal_1.logShowProjectCommand)(options.projectName);
123
122
  });
124
123
  return (0, devkit_1.runTasksInSerial)(...tasks);
125
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAY1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA4J5B"}
1
+ {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAa1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA4J5B"}
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
4
+ const internal_1 = require("@nx/devkit/internal");
5
+ const internal_2 = require("@nx/js/internal");
6
6
  async function normalizeOptions(host, options) {
7
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
8
- const { projectName, projectRoot: appProjectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
7
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
8
+ const { projectName, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
9
9
  name: options.name,
10
10
  projectType: 'application',
11
11
  directory: options.directory,
12
12
  rootProject: options.rootProject,
13
13
  });
14
14
  options.rootProject = appProjectRoot === '.';
15
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
15
+ const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
16
16
  const appProjectName = !isUsingTsSolutionConfig || options.name ? projectName : importPath;
17
17
  const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`;
18
18
  const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/component/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAMvE,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAsC3B;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAqCvE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/component/lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAIvE,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAsC3B;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAqCvE"}
@@ -2,15 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  exports.addExportsToBarrel = addExportsToBarrel;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const path_1 = require("path");
7
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
8
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
8
+ const internal_2 = require("@nx/js/internal");
9
9
  const ast_utils_1 = require("../../../utils/ast-utils");
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
11
10
  let tsModule;
12
11
  async function normalizeOptions(host, options) {
13
- const { fileName, filePath, directory, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
12
+ const { fileName, filePath, directory, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
14
13
  path: options.path,
15
14
  allowedFileExtensions: ['vue'],
16
15
  fileExtension: 'vue',
@@ -20,7 +19,7 @@ async function normalizeOptions(host, options) {
20
19
  const project = (0, devkit_1.getProjects)(host).get(projectName);
21
20
  const { root, sourceRoot: projectSourceRoot, projectType } = project;
22
21
  if (options.export &&
23
- (0, ts_solution_setup_1.getProjectType)(host, root, projectType) === 'application') {
22
+ (0, internal_2.getProjectType)(host, root, projectType) === 'application') {
24
23
  devkit_1.logger.warn(`The "--export" option should not be used with applications and will do nothing.`);
25
24
  }
26
25
  options.routing = options.routing ?? false;
@@ -37,11 +36,11 @@ async function normalizeOptions(host, options) {
37
36
  }
38
37
  function addExportsToBarrel(host, options) {
39
38
  if (!tsModule) {
40
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
39
+ tsModule = (0, internal_2.ensureTypescript)();
41
40
  }
42
41
  const workspace = (0, devkit_1.getProjects)(host);
43
42
  const proj = workspace.get(options.projectName);
44
- const isApp = (0, ts_solution_setup_1.getProjectType)(host, proj.root, proj.projectType) === 'application';
43
+ const isApp = (0, internal_2.getProjectType)(host, proj.root, proj.projectType) === 'application';
45
44
  if (options.export && !isApp) {
46
45
  const indexFilePath = (0, devkit_1.joinPathFragments)(options.projectSourceRoot ?? 'src', options.js ? 'index.js' : 'index.ts');
47
46
  const indexSource = host.read(indexFilePath, 'utf-8');
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAuF3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAuF3B"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
+ const internal_2 = require("@nx/js/internal");
7
7
  async function normalizeOptions(host, options) {
8
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'library');
9
- const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
8
+ await (0, internal_1.ensureRootProjectName)(options, 'library');
9
+ const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
10
10
  name: options.name,
11
11
  projectType: 'library',
12
12
  directory: options.directory,
@@ -26,7 +26,7 @@ async function normalizeOptions(host, options) {
26
26
  const nxJson = (0, devkit_1.readNxJson)(host);
27
27
  const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
28
28
  nxJson.useInferencePlugins !== false;
29
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
29
+ const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
30
30
  const normalized = {
31
31
  addPlugin,
32
32
  ...options,
@@ -47,11 +47,11 @@ async function normalizeOptions(host, options) {
47
47
  normalized.inSourceTests === normalized.minimal || normalized.inSourceTests;
48
48
  if (options.appProject) {
49
49
  const appProjectConfig = (0, devkit_1.getProjects)(host).get(options.appProject);
50
- const appProjectType = (0, ts_solution_setup_1.getProjectType)(host, appProjectConfig.root, appProjectConfig.projectType);
50
+ const appProjectType = (0, internal_2.getProjectType)(host, appProjectConfig.root, appProjectConfig.projectType);
51
51
  if (appProjectType !== 'application') {
52
52
  throw new Error(`appProject expected type of "application" but got "${appProjectType}"`);
53
53
  }
54
- const appSourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(appProjectConfig, host);
54
+ const appSourceRoot = (0, internal_2.getProjectSourceRoot)(appProjectConfig, host);
55
55
  try {
56
56
  normalized.appMain = appProjectConfig.targets.build.options.main;
57
57
  normalized.appSourceRoot = (0, devkit_1.normalizePath)(appSourceRoot);
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA0BpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAM1D;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAoKxE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAsBpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAM1D;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAoKxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -3,13 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGenerator = libraryGenerator;
4
4
  exports.libraryGeneratorInternal = libraryGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
8
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
9
8
  const js_1 = require("@nx/js");
10
- const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
11
- const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
12
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
+ const internal_2 = require("@nx/js/internal");
13
10
  const path_1 = require("path");
14
11
  const add_linting_1 = require("../../utils/add-linting");
15
12
  const create_ts_config_1 = require("../../utils/create-ts-config");
@@ -32,7 +29,7 @@ async function libraryGeneratorInternal(tree, schema) {
32
29
  if (schema.publishable === true && !schema.importPath) {
33
30
  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)`);
34
31
  }
35
- const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin);
32
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin);
36
33
  tasks.push(await (0, js_1.initGenerator)(tree, {
37
34
  ...schema,
38
35
  addTsPlugin,
@@ -42,7 +39,7 @@ async function libraryGeneratorInternal(tree, schema) {
42
39
  // If we are using the new TS solution
43
40
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
44
41
  if (options.isUsingTsSolutionConfig) {
45
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.projectRoot);
42
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(tree, options.projectRoot);
46
43
  }
47
44
  let packageJson = {
48
45
  name: options.importPath,
@@ -86,7 +83,7 @@ async function libraryGeneratorInternal(tree, schema) {
86
83
  (0, create_library_files_1.createLibraryFiles)(tree, options);
87
84
  tasks.push(await (0, add_vite_1.addVite)(tree, options));
88
85
  if (options.component) {
89
- const relativeCwd = (0, artifact_name_and_directory_utils_1.getRelativeCwd)();
86
+ const relativeCwd = (0, internal_1.getRelativeCwd)();
90
87
  const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
91
88
  await (0, component_1.default)(tree, {
92
89
  path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
@@ -107,7 +104,7 @@ async function libraryGeneratorInternal(tree, schema) {
107
104
  if (options.js)
108
105
  (0, devkit_1.toJS)(tree);
109
106
  if (options.isUsingTsSolutionConfig) {
110
- (0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.projectRoot, 'tsconfig.lib.json', {
107
+ (0, internal_2.updateTsconfigFiles)(tree, options.projectRoot, 'tsconfig.lib.json', {
111
108
  jsx: 'preserve',
112
109
  jsxImportSource: 'vue',
113
110
  module: 'esnext',
@@ -117,18 +114,18 @@ async function libraryGeneratorInternal(tree, schema) {
117
114
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
118
115
  : undefined);
119
116
  }
120
- (0, sort_fields_1.sortPackageJsonFields)(tree, options.projectRoot);
117
+ (0, internal_2.sortPackageJsonFields)(tree, options.projectRoot);
121
118
  if (options.publishable) {
122
119
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
123
120
  if (options.isUsingTsSolutionConfig) {
124
- await (0, add_release_config_1.addReleaseConfigForTsSolution)(tree, options.projectName, projectConfig);
121
+ await (0, internal_2.addReleaseConfigForTsSolution)(tree, options.projectName, projectConfig);
125
122
  }
126
123
  else {
127
124
  const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
128
- await (0, add_release_config_1.addReleaseConfigForNonTsSolution)(tree, options.projectName, projectConfig);
125
+ await (0, internal_2.addReleaseConfigForNonTsSolution)(tree, options.projectName, projectConfig);
129
126
  }
130
127
  (0, devkit_1.updateProjectConfiguration)(tree, options.projectName, projectConfig);
131
- tasks.push(await (0, add_release_config_1.releaseTasks)(tree));
128
+ tasks.push(await (0, internal_2.releaseTasks)(tree));
132
129
  }
133
130
  if (!options.skipFormat)
134
131
  await (0, devkit_1.formatFiles)(tree);
@@ -137,7 +134,7 @@ async function libraryGeneratorInternal(tree, schema) {
137
134
  tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
138
135
  }
139
136
  tasks.push(() => {
140
- (0, log_show_project_command_1.logShowProjectCommand)(options.name);
137
+ (0, internal_1.logShowProjectCommand)(options.name);
141
138
  });
142
139
  return (0, devkit_1.runTasksInSerial)(...tasks);
143
140
  }
@@ -1 +1 @@
1
- {"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/stories/lib/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAUpD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,EAAE,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,sBAAsB,EACzD,aAAa,EAAE,MAAM,QAuCtB"}
1
+ {"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/stories/lib/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAUpD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,EAAE,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,sBAAsB,EACzD,aAAa,EAAE,MAAM,QAuCtB"}
@@ -2,17 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createComponentStories = createComponentStories;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
7
6
  const utils_1 = require("./utils");
8
7
  const path_1 = require("path");
9
8
  let tsModule;
10
9
  function createComponentStories(host, { project, js, interactionTests }, componentPath) {
11
10
  if (!tsModule) {
12
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
11
+ tsModule = (0, internal_1.ensureTypescript)();
13
12
  }
14
13
  const proj = (0, devkit_1.readProjectConfiguration)(host, project);
15
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(proj);
14
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(proj);
16
15
  const componentFilePath = (0, devkit_1.joinPathFragments)(sourceRoot, componentPath);
17
16
  const componentDirectory = componentFilePath.replace(componentFilePath.slice(componentFilePath.lastIndexOf('/')), '');
18
17
  const componentFileName = componentFilePath
@@ -1 +1 @@
1
- {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AAgBtE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAU9C,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,EACD,WAAW,EAAE,KAAK,GAAG,KAAK,8BAiE3B"}
1
+ {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AActE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAU9C,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,EACD,WAAW,EAAE,KAAK,GAAG,KAAK,8BAiE3B"}
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLinting = addLinting;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const eslint_1 = require("@nx/eslint");
6
- const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
7
- const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
8
- const version_utils_1 = require("@nx/eslint/src/utils/version-utils");
6
+ const internal_1 = require("@nx/eslint/internal");
9
7
  const path_1 = require("nx/src/utils/path");
10
8
  const versions_1 = require("./versions");
11
9
  const semver_1 = require("semver");
@@ -25,10 +23,10 @@ async function addLinting(host, options, projectType) {
25
23
  addPlugin: options.addPlugin,
26
24
  });
27
25
  tasks.push(lintTask);
28
- if ((0, flat_config_1.useFlatConfig)(host)) {
26
+ if ((0, internal_1.useFlatConfig)(host)) {
29
27
  }
30
28
  else {
31
- const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, [
29
+ const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(host, options.projectRoot, [
32
30
  'plugin:vue/vue3-essential',
33
31
  'eslint:recommended',
34
32
  '@vue/eslint-config-typescript',
@@ -37,7 +35,7 @@ async function addLinting(host, options, projectType) {
37
35
  tasks.push(addExtendsTask);
38
36
  }
39
37
  editEslintConfigFiles(host, options.projectRoot);
40
- const eslintVersion = (0, version_utils_1.getInstalledEslintVersion)(host);
38
+ const eslintVersion = (0, internal_1.getInstalledEslintVersion)(host);
41
39
  const devDependencies = {
42
40
  '@vue/eslint-config-prettier': versions_1.vueEslintConfigPrettierVersion,
43
41
  '@vue/eslint-config-typescript': eslintVersion && (0, semver_1.lt)(eslintVersion, '9.0.0')
@@ -45,10 +43,10 @@ async function addLinting(host, options, projectType) {
45
43
  : versions_1.eslint9__VueEslintConfigTypescriptVersion,
46
44
  'eslint-plugin-vue': versions_1.eslintPluginVueVersion,
47
45
  };
48
- if ((0, eslint_file_1.isEslintConfigSupported)(host, options.projectRoot) &&
49
- (0, flat_config_1.useFlatConfig)(host)) {
46
+ if ((0, internal_1.isEslintConfigSupported)(host, options.projectRoot) &&
47
+ (0, internal_1.useFlatConfig)(host)) {
50
48
  devDependencies['@typescript-eslint/parser'] =
51
- (0, version_utils_1.getTypeScriptEslintVersionToInstall)(host);
49
+ (0, internal_1.getTypeScriptEslintVersionToInstall)(host);
52
50
  }
53
51
  if (!options.skipPackageJson) {
54
52
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, devDependencies);
@@ -76,11 +74,11 @@ function editEslintConfigFiles(tree, projectRoot) {
76
74
  o.files = [o.files, '*.vue'];
77
75
  }
78
76
  };
79
- if ((0, eslint_file_1.isEslintConfigSupported)(tree, projectRoot)) {
80
- if ((0, flat_config_1.useFlatConfig)(tree)) {
81
- (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectRoot, 'flat/recommended', { moduleName: 'vue', moduleImportPath: 'eslint-plugin-vue' });
77
+ if ((0, internal_1.isEslintConfigSupported)(tree, projectRoot)) {
78
+ if ((0, internal_1.useFlatConfig)(tree)) {
79
+ (0, internal_1.addPredefinedConfigToFlatLintConfig)(tree, projectRoot, 'flat/recommended', { moduleName: 'vue', moduleImportPath: 'eslint-plugin-vue' });
82
80
  // This allows .vue files to be parsed
83
- (0, eslint_file_1.addOverrideToLintConfig)(tree, projectRoot, {
81
+ (0, internal_1.addOverrideToLintConfig)(tree, projectRoot, {
84
82
  files: ['**/*.vue'],
85
83
  languageOptions: {
86
84
  parserOptions: {
@@ -90,20 +88,20 @@ function editEslintConfigFiles(tree, projectRoot) {
90
88
  } // languageOptions is not present on eslintrc override, but it is for flat config
91
89
  );
92
90
  // Add an empty rules object to users know how to add/override rules
93
- (0, eslint_file_1.addOverrideToLintConfig)(tree, projectRoot, {
91
+ (0, internal_1.addOverrideToLintConfig)(tree, projectRoot, {
94
92
  files: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.vue'],
95
93
  rules: { 'vue/multi-word-component-names': 'off' },
96
94
  });
97
95
  }
98
96
  else {
99
- if ((0, eslint_file_1.lintConfigHasOverride)(tree, projectRoot, (o) => o.parserOptions && !hasVueFiles(o), true)) {
100
- (0, eslint_file_1.updateOverrideInLintConfig)(tree, projectRoot, (o) => !!o.parserOptions, (o) => {
97
+ if ((0, internal_1.lintConfigHasOverride)(tree, projectRoot, (o) => o.parserOptions && !hasVueFiles(o), true)) {
98
+ (0, internal_1.updateOverrideInLintConfig)(tree, projectRoot, (o) => !!o.parserOptions, (o) => {
101
99
  addVueFiles(o);
102
100
  return o;
103
101
  });
104
102
  }
105
103
  else {
106
- (0, eslint_file_1.replaceOverridesInLintConfig)(tree, projectRoot, [
104
+ (0, internal_1.replaceOverridesInLintConfig)(tree, projectRoot, [
107
105
  {
108
106
  files: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.vue'],
109
107
  rules: { 'vue/multi-word-component-names': 'off' },
@@ -113,11 +111,11 @@ function editEslintConfigFiles(tree, projectRoot) {
113
111
  }
114
112
  }
115
113
  // Edit root config too
116
- if (!(0, eslint_file_1.isEslintConfigSupported)(tree)) {
114
+ if (!(0, internal_1.isEslintConfigSupported)(tree)) {
117
115
  return;
118
116
  }
119
- if ((0, eslint_file_1.lintConfigHasOverride)(tree, '', (o) => o.rules?.['@nx/enforce-module-boundaries'] && !hasVueFiles(o), true)) {
120
- (0, eslint_file_1.updateOverrideInLintConfig)(tree, '', (o) => !!o.rules?.['@nx/enforce-module-boundaries'], (o) => {
117
+ if ((0, internal_1.lintConfigHasOverride)(tree, '', (o) => o.rules?.['@nx/enforce-module-boundaries'] && !hasVueFiles(o), true)) {
118
+ (0, internal_1.updateOverrideInLintConfig)(tree, '', (o) => !!o.rules?.['@nx/enforce-module-boundaries'], (o) => {
121
119
  addVueFiles(o);
122
120
  return o;
123
121
  });
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addImport = addImport;
4
4
  const js_1 = require("@nx/js");
5
5
  const devkit_1 = require("@nx/devkit");
6
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
+ const internal_1 = require("@nx/js/internal");
7
7
  let tsModule;
8
8
  function addImport(source, statement) {
9
9
  if (!tsModule) {
10
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
10
+ tsModule = (0, internal_1.ensureTypescript)();
11
11
  }
12
12
  const allImports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ImportDeclaration);
13
13
  if (allImports.length > 0) {
@@ -6,10 +6,10 @@ exports.createTsConfigForNonTsSolution = createTsConfigForNonTsSolution;
6
6
  exports.extractTsConfigBase = extractTsConfigBase;
7
7
  const tslib_1 = require("tslib");
8
8
  const devkit_1 = require("@nx/devkit");
9
- const shared = tslib_1.__importStar(require("@nx/js/src/utils/typescript/create-ts-config"));
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
+ const shared = tslib_1.__importStar(require("@nx/js"));
10
+ const internal_1 = require("@nx/js/internal");
11
11
  function createTsConfig(host, projectRoot, type, options, relativePathToRootTsConfig) {
12
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
12
+ if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
13
13
  createTsConfigForTsSolution(host, projectRoot, type, options, relativePathToRootTsConfig);
14
14
  }
15
15
  else {
package/tailwind.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
4
- const generate_globs_1 = require("@nx/js/src/utils/generate-globs");
4
+ const internal_1 = require("@nx/js/internal");
5
5
  let hasWarned = false;
6
6
  /**
7
7
  * @deprecated `@nx/vue/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
@@ -15,7 +15,7 @@ function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.s
15
15
  `See: https://nx.dev/docs/technologies/vue/guides/using-tailwind-css-in-vue\n`);
16
16
  }
17
17
  try {
18
- return (0, generate_globs_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
18
+ return (0, internal_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
19
19
  }
20
20
  catch (e) {
21
21
  /**