@nx/vue 20.3.1 → 20.3.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/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/vue",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.3",
|
|
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,11 +31,11 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"minimatch": "9.0.3",
|
|
33
33
|
"tslib": "^2.3.0",
|
|
34
|
-
"@nx/devkit": "20.3.
|
|
35
|
-
"@nx/js": "20.3.
|
|
36
|
-
"@nx/eslint": "20.3.
|
|
37
|
-
"@nx/vite": "20.3.
|
|
38
|
-
"@nx/web": "20.3.
|
|
34
|
+
"@nx/devkit": "20.3.3",
|
|
35
|
+
"@nx/js": "20.3.3",
|
|
36
|
+
"@nx/eslint": "20.3.3",
|
|
37
|
+
"@nx/vite": "20.3.3",
|
|
38
|
+
"@nx/web": "20.3.3"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -17,6 +17,7 @@ const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
|
17
17
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
18
18
|
const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
|
|
19
19
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
20
|
+
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
20
21
|
function applicationGenerator(tree, options) {
|
|
21
22
|
return applicationGeneratorInternal(tree, { addPlugin: false, ...options });
|
|
22
23
|
}
|
|
@@ -90,8 +91,6 @@ async function applicationGeneratorInternal(tree, _options) {
|
|
|
90
91
|
tasks.push(await (0, add_e2e_1.addE2e)(tree, options));
|
|
91
92
|
if (options.js)
|
|
92
93
|
(0, devkit_1.toJS)(tree);
|
|
93
|
-
if (!options.skipFormat)
|
|
94
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
95
94
|
if (options.isUsingTsSolutionConfig) {
|
|
96
95
|
(0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
|
|
97
96
|
jsx: 'preserve',
|
|
@@ -103,6 +102,14 @@ async function applicationGeneratorInternal(tree, _options) {
|
|
|
103
102
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
104
103
|
: undefined);
|
|
105
104
|
}
|
|
105
|
+
// If we are using the new TS solution
|
|
106
|
+
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
107
|
+
if (options.isUsingTsSolutionConfig) {
|
|
108
|
+
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
|
|
109
|
+
}
|
|
110
|
+
(0, sort_fields_1.sortPackageJsonFields)(tree, options.appProjectRoot);
|
|
111
|
+
if (!options.skipFormat)
|
|
112
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
106
113
|
tasks.push(() => {
|
|
107
114
|
(0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
|
|
108
115
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.determineEntryFields = determineEntryFields;
|
|
4
|
+
function determineEntryFields(options) {
|
|
5
|
+
if (options.bundler === 'none') {
|
|
6
|
+
return {
|
|
7
|
+
module: options.js ? './src/index.js' : './src/index.ts',
|
|
8
|
+
types: options.js ? './src/index.js' : './src/index.ts',
|
|
9
|
+
exports: {
|
|
10
|
+
'.': options.js
|
|
11
|
+
? './src/index.js'
|
|
12
|
+
: {
|
|
13
|
+
types: './src/index.ts',
|
|
14
|
+
import: './src/index.ts',
|
|
15
|
+
default: './src/index.ts',
|
|
16
|
+
},
|
|
17
|
+
'./package.json': './package.json',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
module: './dist/index.mjs',
|
|
23
|
+
types: './dist/index.d.ts',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -17,6 +17,8 @@ const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/a
|
|
|
17
17
|
const path_1 = require("path");
|
|
18
18
|
const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
|
|
19
19
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
20
|
+
const determine_entry_fields_1 = require("./lib/determine-entry-fields");
|
|
21
|
+
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
20
22
|
function libraryGenerator(tree, schema) {
|
|
21
23
|
return libraryGeneratorInternal(tree, { addPlugin: false, ...schema });
|
|
22
24
|
}
|
|
@@ -28,26 +30,15 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
28
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)`);
|
|
29
31
|
}
|
|
30
32
|
if (options.isUsingTsSolutionConfig) {
|
|
31
|
-
const moduleFile = options.bundler === 'none'
|
|
32
|
-
? options.js
|
|
33
|
-
? './src/index.js'
|
|
34
|
-
: './src/index.ts'
|
|
35
|
-
: './dist/index.mjs';
|
|
36
|
-
const typesFile = options.bundler === 'none'
|
|
37
|
-
? options.js
|
|
38
|
-
? './src/index.js'
|
|
39
|
-
: './src/index.ts'
|
|
40
|
-
: './dist/index.d.ts';
|
|
41
33
|
(0, devkit_1.writeJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), {
|
|
42
34
|
name: (0, get_import_path_1.getImportPath)(tree, options.name),
|
|
43
35
|
version: '0.0.1',
|
|
44
36
|
private: true,
|
|
45
|
-
|
|
46
|
-
types: typesFile,
|
|
37
|
+
...(0, determine_entry_fields_1.determineEntryFields)(options),
|
|
47
38
|
files: options.publishable ? ['dist', '!**/*.tsbuildinfo'] : undefined,
|
|
48
39
|
nx: {
|
|
49
40
|
name: options.name,
|
|
50
|
-
projectType: '
|
|
41
|
+
projectType: 'library',
|
|
51
42
|
sourceRoot: `${options.projectRoot}/src`,
|
|
52
43
|
tags: options.parsedTags?.length ? options.parsedTags : undefined,
|
|
53
44
|
},
|
|
@@ -101,8 +92,6 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
101
92
|
}
|
|
102
93
|
if (options.js)
|
|
103
94
|
(0, devkit_1.toJS)(tree);
|
|
104
|
-
if (!options.skipFormat)
|
|
105
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
106
95
|
if (options.isUsingTsSolutionConfig) {
|
|
107
96
|
(0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.projectRoot, 'tsconfig.lib.json', {
|
|
108
97
|
jsx: 'preserve',
|
|
@@ -114,6 +103,14 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
114
103
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
115
104
|
: undefined);
|
|
116
105
|
}
|
|
106
|
+
// If we are using the new TS solution
|
|
107
|
+
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
108
|
+
if (options.isUsingTsSolutionConfig) {
|
|
109
|
+
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.projectRoot);
|
|
110
|
+
}
|
|
111
|
+
(0, sort_fields_1.sortPackageJsonFields)(tree, options.projectRoot);
|
|
112
|
+
if (!options.skipFormat)
|
|
113
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
117
114
|
// Always run install to link packages.
|
|
118
115
|
if (options.isUsingTsSolutionConfig) {
|
|
119
116
|
tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
|