unplugin-vue-components
Advanced tools
Comparing version 0.27.3 to 0.27.4
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import { | ||
@@ -8,3 +8,3 @@ camelCase, | ||
pascalCase | ||
} from "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -11,0 +11,0 @@ import "./chunk-6F4PWJZI.js"; |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
import { ComponentResolver, ComponentResolveResult } from './types.js'; | ||
import '@rollup/pluginutils'; | ||
import { FilterPattern } from '@rollup/pluginutils'; | ||
import 'unplugin'; | ||
@@ -479,3 +479,3 @@ import '@antfu/utils'; | ||
*/ | ||
exclude?: string | RegExp | (string | RegExp)[]; | ||
exclude?: FilterPattern; | ||
} | ||
@@ -502,3 +502,3 @@ declare function TDesignResolver(options?: TDesignResolverOptions): ComponentResolver; | ||
*/ | ||
exclude?: Array<string | RegExp>; | ||
exclude?: FilterPattern; | ||
} | ||
@@ -505,0 +505,0 @@ /** |
import { | ||
camelCase, | ||
getPkgVersion, | ||
isExclude, | ||
isSSR, | ||
kebabCase, | ||
pascalCase | ||
} from "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-VFBNI2IV.js"; | ||
import { | ||
@@ -1186,21 +1187,2 @@ __require | ||
import Debug from "debug"; | ||
// src/core/resolvers/_utils.ts | ||
function isExclude(name, exclude) { | ||
if (!exclude) | ||
return false; | ||
if (typeof exclude === "string") | ||
return name === exclude; | ||
if (exclude instanceof RegExp) | ||
return !!name.match(exclude); | ||
if (Array.isArray(exclude)) { | ||
for (const item of exclude) { | ||
if (name === item || name.match(item)) | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
// src/core/resolvers/arco.ts | ||
var debug = Debug("unplugin-vue-components:resolvers:arco"); | ||
@@ -1400,3 +1382,3 @@ var matchComponents3 = [ | ||
const importFrom = options.esm ? "/esm" : ""; | ||
if (options.exclude && isExclude2(name, exclude)) | ||
if (isExclude(name, exclude)) | ||
return; | ||
@@ -1419,15 +1401,2 @@ if (options.resolveIcons && name.match(/[a-z]Icon$/)) { | ||
} | ||
function isExclude2(name, exclude) { | ||
if (typeof exclude === "string") | ||
return name === exclude; | ||
if (exclude instanceof RegExp) | ||
return !!name.match(exclude); | ||
if (Array.isArray(exclude)) { | ||
for (const item of exclude) { | ||
if (name === item || name.match(item)) | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
@@ -1535,3 +1504,3 @@ // src/core/resolvers/layui-vue.ts | ||
let name; | ||
if (options.exclude && isExclude3(importName, options.exclude)) | ||
if (isExclude(importName, options.exclude)) | ||
return void 0; | ||
@@ -1550,9 +1519,2 @@ if (options.resolveIcons && importName.match(iconsRE)) { | ||
} | ||
function isExclude3(name, exclude) { | ||
for (const item of exclude) { | ||
if (name === item || name.match(item)) | ||
return true; | ||
} | ||
return false; | ||
} | ||
function LayuiVueResolver(options = {}) { | ||
@@ -1559,0 +1521,0 @@ return { |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
@@ -62,2 +62,6 @@ import { FilterPattern } from '@rollup/pluginutils'; | ||
/** | ||
* RegExp or string to match component names that will NOT be imported | ||
*/ | ||
excludeNames?: FilterPattern; | ||
/** | ||
* Relative paths to the directory to search for components. | ||
@@ -75,3 +79,3 @@ * @default 'src/components' | ||
* | ||
* When specified, the `dirs` and `extensions` options will be ignored. | ||
* When specified, the `dirs`, `extensions`, and `directoryAsNamespace` options will be ignored. | ||
*/ | ||
@@ -78,0 +82,0 @@ globs?: string | string[]; |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
import { | ||
unplugin_default | ||
} from "./chunk-YOHL3P33.js"; | ||
import "./chunk-4KHLF5I7.js"; | ||
} from "./chunk-B4WNWTB4.js"; | ||
import "./chunk-VFBNI2IV.js"; | ||
import "./chunk-3RG5ZIWI.js"; | ||
@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js"; |
{ | ||
"name": "unplugin-vue-components", | ||
"type": "module", | ||
"version": "0.27.3", | ||
"packageManager": "pnpm@9.5.0", | ||
"version": "0.27.4", | ||
"packageManager": "pnpm@9.7.0", | ||
"description": "Components auto importing for Vue", | ||
@@ -99,22 +99,22 @@ "author": "antfu <anthonyfu117@hotmail.com>", | ||
"chokidar": "^3.6.0", | ||
"debug": "^4.3.5", | ||
"debug": "^4.3.6", | ||
"fast-glob": "^3.3.2", | ||
"local-pkg": "^0.5.0", | ||
"magic-string": "^0.30.10", | ||
"magic-string": "^0.30.11", | ||
"minimatch": "^9.0.5", | ||
"mlly": "^1.7.1", | ||
"unplugin": "^1.11.0" | ||
"unplugin": "^1.12.1" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.22.4", | ||
"@babel/parser": "^7.24.8", | ||
"@babel/types": "^7.24.9", | ||
"@nuxt/kit": "^3.12.3", | ||
"@antfu/eslint-config": "^2.25.1", | ||
"@babel/parser": "^7.25.3", | ||
"@babel/types": "^7.25.2", | ||
"@nuxt/kit": "^3.12.4", | ||
"@types/debug": "^4.1.12", | ||
"@types/minimatch": "^5.1.2", | ||
"@types/node": "^20.14.10", | ||
"bumpp": "^9.4.1", | ||
"@types/node": "^20.14.15", | ||
"bumpp": "^9.5.1", | ||
"compare-versions": "^6.1.1", | ||
"element-plus": "^2.7.7", | ||
"eslint": "^9.7.0", | ||
"element-plus": "^2.8.0", | ||
"eslint": "^9.9.0", | ||
"eslint-plugin-format": "^0.1.2", | ||
@@ -124,9 +124,9 @@ "esno": "^4.7.0", | ||
"pathe": "^1.1.2", | ||
"rollup": "^4.18.1", | ||
"tsup": "^8.1.0", | ||
"typescript": "^5.5.3", | ||
"vite": "^5.3.4", | ||
"vitest": "^2.0.3", | ||
"rollup": "^4.20.0", | ||
"tsup": "^8.2.4", | ||
"typescript": "^5.5.4", | ||
"vite": "^5.4.0", | ||
"vitest": "^2.0.5", | ||
"vue": "3.2.45" | ||
} | ||
} |
@@ -361,3 +361,3 @@ # unplugin-vue-components | ||
// Glob patterns to match file names to be detected as components. | ||
// When specified, the `dirs` and `extensions` options will be ignored. | ||
// When specified, the `dirs`, `extensions`, and `directoryAsNamespace` options will be ignored. | ||
// If you want to exclude components being registered, use negative globs with leading `!`. | ||
@@ -402,6 +402,10 @@ globs: ['src/components/*.{vue}'], | ||
// Filters for transforming targets (components to insert the auto import) | ||
// Note these are NOT about including/excluding components registered - use `globs` for that | ||
// Note these are NOT about including/excluding components registered - use `globs` or `excludeNames` for that | ||
include: [/\.vue$/, /\.vue\?vue/], | ||
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/], | ||
// Filters for component names that will not be imported | ||
// Use for globally imported async components or other conflicts that the plugin cannot detect | ||
excludeNames: [/^Async.+/], | ||
// Vue version of project. It will detect automatically if not specified. | ||
@@ -408,0 +412,0 @@ // Acceptable value: 2 | 2.7 | 3 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
243761
429
6719
Updateddebug@^4.3.6
Updatedmagic-string@^0.30.11
Updatedunplugin@^1.12.1