@nx/vue 20.3.1 → 20.3.2
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.2",
|
|
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.2",
|
|
35
|
+
"@nx/js": "20.3.2",
|
|
36
|
+
"@nx/eslint": "20.3.2",
|
|
37
|
+
"@nx/vite": "20.3.2",
|
|
38
|
+
"@nx/web": "20.3.2"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -90,8 +90,6 @@ async function applicationGeneratorInternal(tree, _options) {
|
|
|
90
90
|
tasks.push(await (0, add_e2e_1.addE2e)(tree, options));
|
|
91
91
|
if (options.js)
|
|
92
92
|
(0, devkit_1.toJS)(tree);
|
|
93
|
-
if (!options.skipFormat)
|
|
94
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
95
93
|
if (options.isUsingTsSolutionConfig) {
|
|
96
94
|
(0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
|
|
97
95
|
jsx: 'preserve',
|
|
@@ -103,6 +101,13 @@ async function applicationGeneratorInternal(tree, _options) {
|
|
|
103
101
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
104
102
|
: undefined);
|
|
105
103
|
}
|
|
104
|
+
// If we are using the new TS solution
|
|
105
|
+
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
106
|
+
if (options.isUsingTsSolutionConfig) {
|
|
107
|
+
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
|
|
108
|
+
}
|
|
109
|
+
if (!options.skipFormat)
|
|
110
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
106
111
|
tasks.push(() => {
|
|
107
112
|
(0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
|
|
108
113
|
});
|
|
@@ -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,7 @@ 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");
|
|
20
21
|
function libraryGenerator(tree, schema) {
|
|
21
22
|
return libraryGeneratorInternal(tree, { addPlugin: false, ...schema });
|
|
22
23
|
}
|
|
@@ -28,26 +29,15 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
28
29
|
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
30
|
}
|
|
30
31
|
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
32
|
(0, devkit_1.writeJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), {
|
|
42
33
|
name: (0, get_import_path_1.getImportPath)(tree, options.name),
|
|
43
34
|
version: '0.0.1',
|
|
44
35
|
private: true,
|
|
45
|
-
|
|
46
|
-
types: typesFile,
|
|
36
|
+
...(0, determine_entry_fields_1.determineEntryFields)(options),
|
|
47
37
|
files: options.publishable ? ['dist', '!**/*.tsbuildinfo'] : undefined,
|
|
48
38
|
nx: {
|
|
49
39
|
name: options.name,
|
|
50
|
-
projectType: '
|
|
40
|
+
projectType: 'library',
|
|
51
41
|
sourceRoot: `${options.projectRoot}/src`,
|
|
52
42
|
tags: options.parsedTags?.length ? options.parsedTags : undefined,
|
|
53
43
|
},
|
|
@@ -101,8 +91,6 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
101
91
|
}
|
|
102
92
|
if (options.js)
|
|
103
93
|
(0, devkit_1.toJS)(tree);
|
|
104
|
-
if (!options.skipFormat)
|
|
105
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
106
94
|
if (options.isUsingTsSolutionConfig) {
|
|
107
95
|
(0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.projectRoot, 'tsconfig.lib.json', {
|
|
108
96
|
jsx: 'preserve',
|
|
@@ -114,6 +102,13 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
114
102
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
115
103
|
: undefined);
|
|
116
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.projectRoot);
|
|
109
|
+
}
|
|
110
|
+
if (!options.skipFormat)
|
|
111
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
117
112
|
// Always run install to link packages.
|
|
118
113
|
if (options.isUsingTsSolutionConfig) {
|
|
119
114
|
tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
|