@nx/vue 21.4.0-beta.1 → 21.4.0-beta.11

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": "21.4.0-beta.1",
3
+ "version": "21.4.0-beta.11",
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": {
@@ -31,14 +31,14 @@
31
31
  "dependencies": {
32
32
  "picomatch": "^4.0.2",
33
33
  "tslib": "^2.3.0",
34
- "@nx/devkit": "21.4.0-beta.1",
35
- "@nx/js": "21.4.0-beta.1",
36
- "@nx/eslint": "21.4.0-beta.1",
37
- "@nx/vite": "21.4.0-beta.1",
38
- "@nx/web": "21.4.0-beta.1"
34
+ "@nx/devkit": "21.4.0-beta.11",
35
+ "@nx/js": "21.4.0-beta.11",
36
+ "@nx/eslint": "21.4.0-beta.11",
37
+ "@nx/vite": "21.4.0-beta.11",
38
+ "@nx/web": "21.4.0-beta.11"
39
39
  },
40
40
  "devDependencies": {
41
- "nx": "21.4.0-beta.1"
41
+ "nx": "21.4.0-beta.11"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
@@ -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;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,CAyI5B;AAED,eAAe,oBAAoB,CAAC"}
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,CA8I5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -25,13 +25,14 @@ function applicationGenerator(tree, options) {
25
25
  }
26
26
  async function applicationGeneratorInternal(tree, _options) {
27
27
  const tasks = [];
28
+ const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, _options.addPlugin, _options.useTsSolution);
28
29
  tasks.push(await (0, js_1.initGenerator)(tree, {
29
30
  ..._options,
30
31
  tsConfigName: _options.rootProject
31
32
  ? 'tsconfig.json'
32
33
  : 'tsconfig.base.json',
33
34
  skipFormat: true,
34
- addTsPlugin: _options.useTsSolution,
35
+ addTsPlugin,
35
36
  formatter: _options.formatter,
36
37
  platform: 'web',
37
38
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"create-library-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/create-library-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAUvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAuDvE"}
1
+ {"version":3,"file":"create-library-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/create-library-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAUvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAuDvE"}
@@ -4,6 +4,7 @@ exports.createLibraryFiles = createLibraryFiles;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const js_1 = require("@nx/js");
6
6
  const create_ts_config_1 = require("../../../utils/create-ts-config");
7
+ const path_1 = require("path");
7
8
  function createLibraryFiles(host, options) {
8
9
  const relativePathToRootTsConfig = (0, js_1.getRelativePathToRootTsConfig)(host, options.projectRoot);
9
10
  const substitutions = {
@@ -13,7 +14,7 @@ function createLibraryFiles(host, options) {
13
14
  offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.projectRoot),
14
15
  fileName: options.fileName,
15
16
  };
16
- (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, '../files'), options.projectRoot, substitutions);
17
+ (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files'), options.projectRoot, substitutions);
17
18
  if (!options.isUsingTsSolutionConfig &&
18
19
  options.useProjectJson &&
19
20
  (options.publishable || options.bundler !== 'none')) {
@@ -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,8BA6JxE;AAED,eAAe,gBAAgB,CAAC"}
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;AA2BpB,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,8BAqKxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -29,11 +29,16 @@ function libraryGenerator(tree, schema) {
29
29
  }
30
30
  async function libraryGeneratorInternal(tree, schema) {
31
31
  const tasks = [];
32
- const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
33
- if (options.publishable === true && !schema.importPath) {
32
+ if (schema.publishable === true && !schema.importPath) {
34
33
  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)`);
35
34
  }
36
- tasks.push(await (0, js_1.initGenerator)(tree, { ...options, skipFormat: true }));
35
+ const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin);
36
+ tasks.push(await (0, js_1.initGenerator)(tree, {
37
+ ...schema,
38
+ addTsPlugin,
39
+ skipFormat: true,
40
+ }));
41
+ const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
37
42
  // If we are using the new TS solution
38
43
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
39
44
  if (options.isUsingTsSolutionConfig) {
@@ -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;AASpD,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;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"}
@@ -5,6 +5,7 @@ const devkit_1 = require("@nx/devkit");
5
5
  const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
6
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
7
  const utils_1 = require("./utils");
8
+ const path_1 = require("path");
8
9
  let tsModule;
9
10
  function createComponentStories(host, { project, js, interactionTests }, componentPath) {
10
11
  if (!tsModule) {
@@ -20,7 +21,7 @@ function createComponentStories(host, { project, js, interactionTests }, compone
20
21
  const name = componentFileName;
21
22
  const contents = host.read(componentFilePath, 'utf-8');
22
23
  const propsObject = (0, utils_1.getDefinePropsObject)(contents);
23
- (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, `./files${js ? '/js' : '/ts'}`), (0, devkit_1.normalizePath)(componentDirectory), {
24
+ (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, `./files${js ? '/js' : '/ts'}`), (0, devkit_1.normalizePath)(componentDirectory), {
24
25
  tmpl: '',
25
26
  componentFileName: name,
26
27
  componentImportFileName: `${name}.vue`,