unplugin-vue-components 29.2.0 → 30.0.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.
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.js +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.js +1 -1
- package/dist/{src-bfjkatac.js → src-BcnnO6GN.js} +8 -8
- package/dist/{src-DAvVDVLg.cjs → src-DzdkjKhH.cjs} +9 -9
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +2 -3
package/dist/esbuild.cjs
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_utils = require('./utils-8UQ22cuO.cjs');
|
|
3
|
-
const require_src = require('./src-
|
|
3
|
+
const require_src = require('./src-DzdkjKhH.cjs');
|
|
4
4
|
require('./types-CBTc19th.cjs');
|
|
5
5
|
|
|
6
6
|
exports.camelCase = require_utils.camelCase;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { camelCase, kebabCase, pascalCase } from "./utils-BoXu-4gQ.js";
|
|
2
|
-
import { unplugin_default } from "./src-
|
|
2
|
+
import { unplugin_default } from "./src-BcnnO6GN.js";
|
|
3
3
|
import "./types-DQoXDiso.js";
|
|
4
4
|
|
|
5
5
|
export { camelCase, unplugin_default as default, kebabCase, pascalCase };
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_utils = require('./utils-8UQ22cuO.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DzdkjKhH.cjs');
|
|
3
3
|
require('./types-CBTc19th.cjs');
|
|
4
4
|
let __nuxt_kit = require("@nuxt/kit");
|
|
5
5
|
__nuxt_kit = require_utils.__toESM(__nuxt_kit);
|
package/dist/nuxt.js
CHANGED
package/dist/rolldown.cjs
CHANGED
package/dist/rolldown.js
CHANGED
package/dist/rollup.cjs
CHANGED
package/dist/rollup.js
CHANGED
package/dist/rspack.cjs
CHANGED
package/dist/rspack.js
CHANGED
|
@@ -2,13 +2,13 @@ import { DIRECTIVE_IMPORT_PREFIX, DISABLE_COMMENT, escapeSpecialChars, getNameFr
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import chokidar from "chokidar";
|
|
5
|
+
import { glob, globSync } from "tinyglobby";
|
|
5
6
|
import { createUnplugin } from "unplugin";
|
|
6
7
|
import { createFilter } from "unplugin-utils";
|
|
7
8
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
8
9
|
import Debug from "debug";
|
|
9
10
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
10
11
|
import { getPackageInfoSync, importModule, isPackageExists } from "local-pkg";
|
|
11
|
-
import { globSync } from "tinyglobby";
|
|
12
12
|
import MagicString from "magic-string";
|
|
13
13
|
|
|
14
14
|
//#region src/core/type-imports/index.ts
|
|
@@ -201,16 +201,16 @@ function normalizeResolvers(resolvers) {
|
|
|
201
201
|
type: "component"
|
|
202
202
|
} : r);
|
|
203
203
|
}
|
|
204
|
-
function resolveGlobsExclude(root, glob) {
|
|
204
|
+
function resolveGlobsExclude(root, glob$1) {
|
|
205
205
|
const excludeReg = /^!/;
|
|
206
|
-
return slash(`${excludeReg.test(glob) ? "!" : ""}${resolve(root, glob.replace(excludeReg, ""))}`);
|
|
206
|
+
return slash(`${excludeReg.test(glob$1) ? "!" : ""}${resolve(root, glob$1.replace(excludeReg, ""))}`);
|
|
207
207
|
}
|
|
208
208
|
function resolveOptions(options, root) {
|
|
209
209
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
210
210
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
211
211
|
resolved.extensions = toArray(resolved.extensions);
|
|
212
212
|
if (resolved.globs) {
|
|
213
|
-
resolved.globs = toArray(resolved.globs).map((glob) => resolveGlobsExclude(root, glob));
|
|
213
|
+
resolved.globs = toArray(resolved.globs).map((glob$1) => resolveGlobsExclude(root, glob$1));
|
|
214
214
|
resolved.resolvedDirs = [];
|
|
215
215
|
} else {
|
|
216
216
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
@@ -702,7 +702,7 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
702
702
|
}
|
|
703
703
|
},
|
|
704
704
|
vite: {
|
|
705
|
-
configResolved(config) {
|
|
705
|
+
async configResolved(config) {
|
|
706
706
|
ctx.setRoot(config.root);
|
|
707
707
|
ctx.sourcemap = true;
|
|
708
708
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2")) ctx.setTransformer("vue2");
|
|
@@ -713,7 +713,7 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
713
713
|
if (ctx.options.dumpComponentsInfo && ctx.dumpComponentsInfoPath) {
|
|
714
714
|
if (!existsSync(ctx.dumpComponentsInfoPath)) ctx.generateComponentsJson();
|
|
715
715
|
}
|
|
716
|
-
if (config.build.watch && config.command === "build") ctx.setupWatcher(chokidar.watch(ctx.options.globs));
|
|
716
|
+
if (config.build.watch && config.command === "build") ctx.setupWatcher(chokidar.watch(await glob(ctx.options.globs)));
|
|
717
717
|
},
|
|
718
718
|
configureServer(server) {
|
|
719
719
|
ctx.setupViteServer(server);
|
|
@@ -722,10 +722,10 @@ var unplugin_default = createUnplugin((options = {}) => {
|
|
|
722
722
|
webpack(compiler) {
|
|
723
723
|
let watcher;
|
|
724
724
|
let fileDepQueue = [];
|
|
725
|
-
compiler.hooks.watchRun.
|
|
725
|
+
compiler.hooks.watchRun.tapAsync(PLUGIN_NAME, async () => {
|
|
726
726
|
if (!watcher && compiler.watching) {
|
|
727
727
|
watcher = compiler.watching;
|
|
728
|
-
ctx.setupWatcherWebpack(chokidar.watch(ctx.options.globs), (path, type) => {
|
|
728
|
+
ctx.setupWatcherWebpack(chokidar.watch(await glob(ctx.options.globs)), (path, type) => {
|
|
729
729
|
fileDepQueue.push({
|
|
730
730
|
path,
|
|
731
731
|
type
|
|
@@ -5,6 +5,8 @@ let node_process = require("node:process");
|
|
|
5
5
|
node_process = require_utils.__toESM(node_process);
|
|
6
6
|
let chokidar = require("chokidar");
|
|
7
7
|
chokidar = require_utils.__toESM(chokidar);
|
|
8
|
+
let tinyglobby = require("tinyglobby");
|
|
9
|
+
tinyglobby = require_utils.__toESM(tinyglobby);
|
|
8
10
|
let unplugin = require("unplugin");
|
|
9
11
|
unplugin = require_utils.__toESM(unplugin);
|
|
10
12
|
let unplugin_utils = require("unplugin-utils");
|
|
@@ -17,8 +19,6 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
17
19
|
node_fs_promises = require_utils.__toESM(node_fs_promises);
|
|
18
20
|
let local_pkg = require("local-pkg");
|
|
19
21
|
local_pkg = require_utils.__toESM(local_pkg);
|
|
20
|
-
let tinyglobby = require("tinyglobby");
|
|
21
|
-
tinyglobby = require_utils.__toESM(tinyglobby);
|
|
22
22
|
let magic_string = require("magic-string");
|
|
23
23
|
magic_string = require_utils.__toESM(magic_string);
|
|
24
24
|
|
|
@@ -212,16 +212,16 @@ function normalizeResolvers(resolvers) {
|
|
|
212
212
|
type: "component"
|
|
213
213
|
} : r);
|
|
214
214
|
}
|
|
215
|
-
function resolveGlobsExclude(root, glob) {
|
|
215
|
+
function resolveGlobsExclude(root, glob$1) {
|
|
216
216
|
const excludeReg = /^!/;
|
|
217
|
-
return require_utils.slash(`${excludeReg.test(glob) ? "!" : ""}${(0, node_path.resolve)(root, glob.replace(excludeReg, ""))}`);
|
|
217
|
+
return require_utils.slash(`${excludeReg.test(glob$1) ? "!" : ""}${(0, node_path.resolve)(root, glob$1.replace(excludeReg, ""))}`);
|
|
218
218
|
}
|
|
219
219
|
function resolveOptions(options, root) {
|
|
220
220
|
const resolved = Object.assign({}, defaultOptions, options);
|
|
221
221
|
resolved.resolvers = normalizeResolvers(resolved.resolvers);
|
|
222
222
|
resolved.extensions = require_utils.toArray(resolved.extensions);
|
|
223
223
|
if (resolved.globs) {
|
|
224
|
-
resolved.globs = require_utils.toArray(resolved.globs).map((glob) => resolveGlobsExclude(root, glob));
|
|
224
|
+
resolved.globs = require_utils.toArray(resolved.globs).map((glob$1) => resolveGlobsExclude(root, glob$1));
|
|
225
225
|
resolved.resolvedDirs = [];
|
|
226
226
|
} else {
|
|
227
227
|
const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
|
|
@@ -713,7 +713,7 @@ var unplugin_default = (0, unplugin.createUnplugin)((options = {}) => {
|
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
vite: {
|
|
716
|
-
configResolved(config) {
|
|
716
|
+
async configResolved(config) {
|
|
717
717
|
ctx.setRoot(config.root);
|
|
718
718
|
ctx.sourcemap = true;
|
|
719
719
|
if (config.plugins.find((i) => i.name === "vite-plugin-vue2")) ctx.setTransformer("vue2");
|
|
@@ -724,7 +724,7 @@ var unplugin_default = (0, unplugin.createUnplugin)((options = {}) => {
|
|
|
724
724
|
if (ctx.options.dumpComponentsInfo && ctx.dumpComponentsInfoPath) {
|
|
725
725
|
if (!(0, node_fs.existsSync)(ctx.dumpComponentsInfoPath)) ctx.generateComponentsJson();
|
|
726
726
|
}
|
|
727
|
-
if (config.build.watch && config.command === "build") ctx.setupWatcher(chokidar.default.watch(ctx.options.globs));
|
|
727
|
+
if (config.build.watch && config.command === "build") ctx.setupWatcher(chokidar.default.watch(await (0, tinyglobby.glob)(ctx.options.globs)));
|
|
728
728
|
},
|
|
729
729
|
configureServer(server) {
|
|
730
730
|
ctx.setupViteServer(server);
|
|
@@ -733,10 +733,10 @@ var unplugin_default = (0, unplugin.createUnplugin)((options = {}) => {
|
|
|
733
733
|
webpack(compiler) {
|
|
734
734
|
let watcher;
|
|
735
735
|
let fileDepQueue = [];
|
|
736
|
-
compiler.hooks.watchRun.
|
|
736
|
+
compiler.hooks.watchRun.tapAsync(PLUGIN_NAME, async () => {
|
|
737
737
|
if (!watcher && compiler.watching) {
|
|
738
738
|
watcher = compiler.watching;
|
|
739
|
-
ctx.setupWatcherWebpack(chokidar.default.watch(ctx.options.globs), (path, type) => {
|
|
739
|
+
ctx.setupWatcherWebpack(chokidar.default.watch(await (0, tinyglobby.glob)(ctx.options.globs)), (path, type) => {
|
|
740
740
|
fileDepQueue.push({
|
|
741
741
|
path,
|
|
742
742
|
type
|
package/dist/vite.cjs
CHANGED
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-vue-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "30.0.0",
|
|
5
5
|
"description": "Components auto importing for Vue",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"chokidar": "^
|
|
88
|
+
"chokidar": "^4.0.3",
|
|
89
89
|
"debug": "^4.4.3",
|
|
90
90
|
"local-pkg": "^1.1.2",
|
|
91
91
|
"magic-string": "^0.30.19",
|
|
@@ -102,7 +102,6 @@
|
|
|
102
102
|
"@nuxt/kit": "^4.1.3",
|
|
103
103
|
"@nuxt/schema": "^4.1.3",
|
|
104
104
|
"@types/debug": "^4.1.12",
|
|
105
|
-
"@types/minimatch": "^6.0.0",
|
|
106
105
|
"@types/node": "^24.8.1",
|
|
107
106
|
"bumpp": "^10.3.1",
|
|
108
107
|
"compare-versions": "^6.1.1",
|