Socket
Socket
Sign inDemoInstall

unplugin-vue-components

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-vue-components - npm Package Compare versions

Comparing version 0.22.9 to 0.22.11

dist/chunk-BTQOTIPQ.js

8

dist/esbuild.js
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');
require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');
// src/esbuild.ts
var esbuild_default = _chunkZWAJ4GHEjs.unplugin_default.esbuild;
var esbuild_default = _chunkIBVXRXR4js.unplugin_default.esbuild;

@@ -11,0 +11,0 @@

@@ -7,3 +7,3 @@ import { Options } from './types.js';

declare const _default: unplugin.UnpluginInstance<Options>;
declare const _default: unplugin.UnpluginInstance<Options, false>;

@@ -10,0 +10,0 @@ declare function pascalCase(str: string): string;

"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');

@@ -8,4 +8,4 @@

var _chunk2VBGH4A4js = require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkDLADAJMIjs = require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');

@@ -17,2 +17,2 @@

exports.camelCase = _chunk2VBGH4A4js.camelCase; exports.default = _chunkZWAJ4GHEjs.unplugin_default; exports.kebabCase = _chunk2VBGH4A4js.kebabCase; exports.pascalCase = _chunk2VBGH4A4js.pascalCase;
exports.camelCase = _chunkDLADAJMIjs.camelCase; exports.default = _chunkIBVXRXR4js.unplugin_default; exports.kebabCase = _chunkDLADAJMIjs.kebabCase; exports.pascalCase = _chunkDLADAJMIjs.pascalCase;
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');
require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');

@@ -12,7 +12,7 @@

config.plugins = config.plugins || [];
config.plugins.unshift(_chunkZWAJ4GHEjs.unplugin_default.webpack(options));
config.plugins.unshift(_chunkIBVXRXR4js.unplugin_default.webpack(options));
});
this.nuxt.hook("vite:extend", async (vite) => {
vite.config.plugins = vite.config.plugins || [];
vite.config.plugins.push(_chunkZWAJ4GHEjs.unplugin_default.vite(options));
vite.config.plugins.push(_chunkIBVXRXR4js.unplugin_default.vite(options));
});

@@ -19,0 +19,0 @@ }

@@ -299,3 +299,3 @@ import { ComponentResolver, ComponentResolveResult } from './types.js';

}
declare type SupportedLocale = 'en-US' | 'zh-Hans';
type SupportedLocale = 'en-US' | 'zh-Hans';
interface VeuiResolverOptions {

@@ -394,10 +394,10 @@ /**

declare type DisallowResolveIconOption = undefined | false | {
type DisallowResolveIconOption = undefined | false | {
enable: false;
};
declare type AllowResolveIconOption = true | {
type AllowResolveIconOption = true | {
enable: true;
iconPrefix?: string;
};
declare type ResolveIconsOption = DisallowResolveIconOption | AllowResolveIconOption;
type ResolveIconsOption = DisallowResolveIconOption | AllowResolveIconOption;
interface ArcoResolverOptions {

@@ -404,0 +404,0 @@ /**

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -8,7 +8,9 @@

var _chunk2VBGH4A4js = require('./chunk-2VBGH4A4.js');
var _chunkDLADAJMIjs = require('./chunk-DLADAJMI.js');
var _chunkEZUCZHGVjs = require('./chunk-EZUCZHGV.js');
var _chunkBTQOTIPQjs = require('./chunk-BTQOTIPQ.js');
// src/core/resolvers/antdv.ts

@@ -168,3 +170,3 @@ var matchComponents = [

if (!styleDir)
styleDir = _chunk2VBGH4A4js.kebabCase.call(void 0, compName);
styleDir = _chunkDLADAJMIjs.kebabCase.call(void 0, compName);
return styleDir;

@@ -335,3 +337,3 @@ }

}
const partialName = _chunk2VBGH4A4js.kebabCase.call(void 0, name.slice(2));
const partialName = _chunkDLADAJMIjs.kebabCase.call(void 0, name.slice(2));
const { version, ssr } = options;

@@ -382,11 +384,10 @@ if (compare(version, "1.1.0-beta.1", ">=")) {

return optionsResolved;
optionsResolved = {
optionsResolved = _chunkBTQOTIPQjs.__spreadValues.call(void 0, {
ssr: false,
version: await _chunk2VBGH4A4js.getPkgVersion.call(void 0, "element-plus", "2.2.2"),
version: await _chunkDLADAJMIjs.getPkgVersion.call(void 0, "element-plus", "2.2.2"),
importStyle: "css",
directives: true,
exclude: void 0,
noStylesComponents: options.noStylesComponents || [],
...options
};
noStylesComponents: options.noStylesComponents || []
}, options);
return optionsResolved;

@@ -400,3 +401,3 @@ }

if ([...options2.noStylesComponents, ...noStylesComponents].includes(name))
return resolveComponent(name, { ...options2, importStyle: false });
return resolveComponent(name, _chunkBTQOTIPQjs.__spreadProps.call(void 0, _chunkBTQOTIPQjs.__spreadValues.call(void 0, {}, options2), { importStyle: false }));
else

@@ -440,3 +441,3 @@ return resolveComponent(name, options2);

const compName = name.slice(2);
const partialName = _chunk2VBGH4A4js.kebabCase.call(void 0, compName);
const partialName = _chunkDLADAJMIjs.kebabCase.call(void 0, compName);
if (partialName === "collapse-transition") {

@@ -551,3 +552,3 @@ return {

const nameIndex = packageName === "pro" ? 2 : 1;
dirname = _chunk2VBGH4A4js.kebabCase.call(void 0, name).split("-")[nameIndex];
dirname = _chunkDLADAJMIjs.kebabCase.call(void 0, name).split("-")[nameIndex];
}

@@ -721,6 +722,6 @@ const path = `${scope}/${packageName}/${dirname}`;

// src/core/resolvers/vant.ts
var moduleType = _chunk2VBGH4A4js.isSSR ? "lib" : "es";
var moduleType = _chunkDLADAJMIjs.isSSR ? "lib" : "es";
function getSideEffects4(dirName, options) {
const { importStyle = true } = options;
if (!importStyle || _chunk2VBGH4A4js.isSSR)
if (!importStyle || _chunkDLADAJMIjs.isSSR)
return;

@@ -742,3 +743,3 @@ if (importStyle === "less")

from: `vant/${moduleType}`,
sideEffects: getSideEffects4(_chunk2VBGH4A4js.kebabCase.call(void 0, partialName), options)
sideEffects: getSideEffects4(_chunkDLADAJMIjs.kebabCase.call(void 0, partialName), options)
};

@@ -751,3 +752,3 @@ }

// src/core/resolvers/varlet-ui.ts
var varFunctions = ["Snackbar", "Picker", "ActionSheet", "Dialog", "Locale", "StyleProvider"];
var varFunctions = ["ImagePreview", "Snackbar", "Picker", "ActionSheet", "Dialog", "Locale", "StyleProvider"];
var varDirectives = ["Ripple", "Lazy"];

@@ -766,5 +767,5 @@ function getResolved(name, options) {

if (importStyle === "less" || importLess)
sideEffects.push(`${path}/es/${_chunk2VBGH4A4js.kebabCase.call(void 0, name)}/style/less.js`);
sideEffects.push(`${path}/es/${_chunkDLADAJMIjs.kebabCase.call(void 0, name)}/style/less.js`);
else
sideEffects.push(`${path}/es/${_chunk2VBGH4A4js.kebabCase.call(void 0, name)}/style`);
sideEffects.push(`${path}/es/${_chunkDLADAJMIjs.kebabCase.call(void 0, name)}/style`);
}

@@ -811,3 +812,3 @@ return {

try {
const componentsData = _chunkEZUCZHGVjs.__require.call(void 0, `${alias}/components.json`);
const componentsData = _chunkBTQOTIPQjs.__require.call(void 0, `${alias}/components.json`);
components3 = new Set(componentsData.map(({ name }) => name));

@@ -832,5 +833,5 @@ } catch (e) {

var formatters = {
"kebab-case": _chunk2VBGH4A4js.kebabCase,
"camelCase": _chunk2VBGH4A4js.camelCase,
"PascalCase": _chunk2VBGH4A4js.pascalCase
"kebab-case": _chunkDLADAJMIjs.kebabCase,
"camelCase": _chunkDLADAJMIjs.camelCase,
"PascalCase": _chunkDLADAJMIjs.pascalCase
};

@@ -841,3 +842,3 @@ var peerPaths = /* @__PURE__ */ new Map();

try {
_chunk2VBGH4A4js.resolveImportPath.call(void 0, peerPath);
_chunkDLADAJMIjs.resolveImportPath.call(void 0, peerPath);
peerPaths.set(peerPath, true);

@@ -896,3 +897,3 @@ } catch (e) {

if (compName.match(matcher.pattern)) {
compPath = `${matcher.compDir}/${_chunk2VBGH4A4js.kebabCase.call(void 0, compName)}.vue`;
compPath = `${matcher.compDir}/${_chunkDLADAJMIjs.kebabCase.call(void 0, compName)}.vue`;
break;

@@ -902,3 +903,3 @@ }

if (!compPath)
compPath = _chunk2VBGH4A4js.kebabCase.call(void 0, compName);
compPath = _chunkDLADAJMIjs.kebabCase.call(void 0, compName);
return compPath;

@@ -981,3 +982,3 @@ }

indexesJson = JSON.parse(_fs.readFileSync.call(void 0, path, "utf-8"));
directives = indexesJson.functions.filter((i) => i.directive && i.name).map(({ name: name2 }) => name2[0].toUpperCase() + name2.slice(1));
directives = indexesJson.functions.filter((i) => i.directive && i.name).map(({ name: name2 }) => name2[0].toUpperCase() + name2.slice(1)).map((name2) => name2.startsWith("Use") ? name2.slice(3) : name2);
} catch (error) {

@@ -1033,3 +1034,3 @@ console.error(error);

return;
const resolveId = _chunk2VBGH4A4js.kebabCase.call(void 0, name = name.slice(1));
const resolveId = _chunkDLADAJMIjs.kebabCase.call(void 0, name = name.slice(1));
return {

@@ -1042,3 +1043,3 @@ name,

function directivesResolver(name, { ssr }) {
const resolveId = _chunk2VBGH4A4js.kebabCase.call(void 0, name);
const resolveId = _chunkDLADAJMIjs.kebabCase.call(void 0, name);
return {

@@ -1051,3 +1052,3 @@ name: `${name}Directive`,

function DevUiResolver(options = {}) {
const config = { directives: true, importStyle: true, ssr: false, ...options };
const config = _chunkBTQOTIPQjs.__spreadValues.call(void 0, { directives: true, importStyle: true, ssr: false }, options);
const resolvers = [

@@ -1192,3 +1193,3 @@ {

return void 0;
let componentDir = _chunk2VBGH4A4js.kebabCase.call(void 0, importName);
let componentDir = _chunkDLADAJMIjs.kebabCase.call(void 0, importName);
for (const item of matchComponents3) {

@@ -1214,2 +1215,3 @@ if (item.pattern.test(importName)) {

function getResolveIconPrefix(options) {
var _a;
if (canResolveIcons(options)) {

@@ -1219,3 +1221,3 @@ if (typeof options === "boolean" && options)

else if (options.enable)
return _nullishCoalesce(options.iconPrefix, () => ( ""));
return (_a = options.iconPrefix) != null ? _a : "";
else

@@ -1230,4 +1232,5 @@ return "";

resolve: (name) => {
var _a;
if (canResolveIcons(options.resolveIcons)) {
const iconPrefix = _chunk2VBGH4A4js.pascalCase.call(void 0, getResolveIconPrefix(options.resolveIcons));
const iconPrefix = _chunkDLADAJMIjs.pascalCase.call(void 0, getResolveIconPrefix(options.resolveIcons));
const newNameRegexp = new RegExp(`^${iconPrefix}Icon`);

@@ -1246,3 +1249,3 @@ if (newNameRegexp.test(name)) {

if (name.match(/^A[A-Z]/)) {
const importStyle = _nullishCoalesce(options.importStyle, () => ( "css"));
const importStyle = (_a = options.importStyle) != null ? _a : "css";
const importName = name.slice(1);

@@ -1264,3 +1267,3 @@ const config = {

const { library = "vue", importStyle = "css" } = options;
let fileName = _chunk2VBGH4A4js.kebabCase.call(void 0, importName);
let fileName = _chunkDLADAJMIjs.kebabCase.call(void 0, importName);
if (!importStyle)

@@ -1500,3 +1503,3 @@ return;

function BootstrapVueResolver(_options = {}) {
const options = { directives: true, ..._options };
const options = _chunkBTQOTIPQjs.__spreadValues.call(void 0, { directives: true }, _options);
const resolvers = [{

@@ -1531,3 +1534,3 @@ type: "component",

var BootstrapVue3Resolver = (_options = {}) => {
const options = { directives: true, ..._options };
const options = _chunkBTQOTIPQjs.__spreadValues.call(void 0, { directives: true }, _options);
const resolvers = [{

@@ -1534,0 +1537,0 @@ type: "component",

@@ -7,4 +7,4 @@ import * as rollup from 'rollup';

declare const _default: (options: Options) => rollup.Plugin | rollup.Plugin[];
declare const _default: (options: Options) => rollup.Plugin;
export { _default as default };
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');
require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');
// src/rollup.ts
var rollup_default = _chunkZWAJ4GHEjs.unplugin_default.rollup;
var rollup_default = _chunkIBVXRXR4js.unplugin_default.rollup;

@@ -11,0 +11,0 @@

@@ -25,8 +25,8 @@ import { FilterPattern } from '@rollup/pluginutils';

}
declare type SideEffectsInfo = (ImportInfo | string)[] | ImportInfo | string | undefined;
type SideEffectsInfo = (ImportInfo | string)[] | ImportInfo | string | undefined;
interface ComponentInfo extends ImportInfo {
sideEffects?: SideEffectsInfo;
}
declare type ComponentResolveResult = Awaitable<string | ComponentInfo | null | undefined | void>;
declare type ComponentResolverFunction = (name: string) => ComponentResolveResult;
type ComponentResolveResult = Awaitable<string | ComponentInfo | null | undefined | void>;
type ComponentResolverFunction = (name: string) => ComponentResolveResult;
interface ComponentResolverObject {

@@ -36,6 +36,6 @@ type: 'component' | 'directive';

}
declare type ComponentResolver = ComponentResolverFunction | ComponentResolverObject;
declare type Matcher = (id: string) => boolean | null | undefined;
declare type Transformer = (code: string, id: string, path: string, query: Record<string, string>) => Awaitable<TransformResult | null>;
declare type SupportedTransformer = 'vue3' | 'vue2';
type ComponentResolver = ComponentResolverFunction | ComponentResolverObject;
type Matcher = (id: string) => boolean | null | undefined;
type Transformer = (code: string, id: string, path: string, query: Record<string, string>) => Awaitable<TransformResult | null>;
type SupportedTransformer = 'vue3' | 'vue2';
interface PublicPluginAPI {

@@ -155,3 +155,3 @@ /**

}
declare type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dirs' | 'globalComponentsDeclaration'> & {
type ResolvedOptions = Omit<Required<Options>, 'resolvers' | 'extensions' | 'dirs' | 'globalComponentsDeclaration'> & {
resolvers: ComponentResolverObject[];

@@ -165,3 +165,3 @@ extensions: string[];

};
declare type ComponentsImportMap = Record<string, string[] | undefined>;
type ComponentsImportMap = Record<string, string[] | undefined>;
interface TypeImport {

@@ -168,0 +168,0 @@ from: string;

"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');
require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');
// src/vite.ts
var vite_default = _chunkZWAJ4GHEjs.unplugin_default.vite;
var vite_default = _chunkIBVXRXR4js.unplugin_default.vite;

@@ -11,0 +11,0 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkZWAJ4GHEjs = require('./chunk-ZWAJ4GHE.js');
require('./chunk-2VBGH4A4.js');
require('./chunk-EZUCZHGV.js');
var _chunkIBVXRXR4js = require('./chunk-IBVXRXR4.js');
require('./chunk-DLADAJMI.js');
require('./chunk-BTQOTIPQ.js');
require('./chunk-6F4PWJZI.js');
// src/webpack.ts
var webpack_default = _chunkZWAJ4GHEjs.unplugin_default.webpack;
var webpack_default = _chunkIBVXRXR4js.unplugin_default.webpack;

@@ -11,0 +11,0 @@

{
"name": "unplugin-vue-components",
"version": "0.22.9",
"packageManager": "pnpm@7.1.5",
"version": "0.22.11",
"packageManager": "pnpm@7.13.4",
"description": "Components auto importing for Vue",

@@ -87,3 +87,3 @@ "author": "antfu <anthonyfu117@hotmail.com>",

"dependencies": {
"@antfu/utils": "^0.6.0",
"@antfu/utils": "^0.7.0",
"@rollup/pluginutils": "^5.0.2",

@@ -97,27 +97,27 @@ "chokidar": "^3.5.3",

"resolve": "^1.22.1",
"unplugin": "^0.10.1"
"unplugin": "^1.0.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.27.0",
"@babel/parser": "^7.19.6",
"@babel/types": "^7.19.3",
"@antfu/eslint-config": "^0.31.0",
"@babel/parser": "^7.20.3",
"@babel/types": "^7.20.2",
"@types/debug": "^4.1.7",
"@types/minimatch": "^5.1.2",
"@types/node": "^18.11.4",
"@types/node": "^18.11.9",
"@types/resolve": "^1.20.2",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"bumpp": "^8.2.1",
"compare-versions": "^5.0.1",
"element-plus": "^2.2.19",
"eslint": "^8.26.0",
"element-plus": "^2.2.22",
"eslint": "^8.28.0",
"esno": "^0.16.3",
"estree-walker": "^3.0.1",
"pathe": "^0.3.9",
"rollup": "^3.2.3",
"tsup": "^6.3.0",
"typescript": "^4.8.4",
"vite": "^3.1.8",
"vitest": "^0.24.3",
"pathe": "^1.0.0",
"rollup": "^3.4.0",
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"vite": "^3.2.4",
"vitest": "^0.25.2",
"vue": "3.2.37"
}
}

@@ -287,3 +287,3 @@ # unplugin-vue-components

`vite.config.json`
`vite.config.js`

@@ -290,0 +290,0 @@ ```diff

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc