Socket
Socket
Sign inDemoInstall

unplugin-vue-components

Package Overview
Dependencies
Maintainers
4
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.26.0 to 0.27.0

dist/chunk-5QHU6UOY.cjs

4

dist/esbuild.js
import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
} from "./chunk-TSU3OFN5.js";
import {

@@ -8,3 +8,3 @@ camelCase,

pascalCase
} from "./chunk-WRE7G5OD.js";
} from "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -11,0 +11,0 @@ import "./chunk-6F4PWJZI.js";

import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

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

*/
importStyle?: boolean | 'css' | 'less';
importStyle?: boolean | 'css' | 'less' | 'css-in-js';
/**

@@ -161,3 +161,3 @@ * resolve `ant-design-vue' icons

*
* @default 'default'
* @default 'default' for 1.x version
*/

@@ -171,2 +171,8 @@ importStyleTheme?: string;

scope?: string;
/**
* specify idux version to load style
*
* @default installed version
*/
version?: string;
}

@@ -261,2 +267,8 @@ /**

/**
* style entry file extname
*
* @default '.mjs'
*/
styleExtname?: string;
/**
* auto import for directives

@@ -544,2 +556,2 @@ *

export { AllowResolveIconOption, AntDesignVueResolver, AntDesignVueResolverOptions, ArcoResolver, ArcoResolverOptions, BootstrapVue3Resolver, BootstrapVueNextResolver, BootstrapVueResolver, BootstrapVueResolverOptions, DevResolverOptions, DevUiResolver, DisallowResolveIconOption, ElementPlusResolver, ElementPlusResolverOptions, ElementUiResolver, ElementUiResolverOptions, HeadlessUiResolver, HeadlessUiResolverOptions, IduxResolver, IduxResolverOptions, InklineResolver, IonicBuiltInComponents, IonicResolver, LayuiVueResolver, LayuiVueResolverOptions, NaiveUiResolver, PrimeVueResolver, PrimeVueResolverOptions, QuasarResolver, ResolveIconsOption, TDesignResolver, TDesignResolverOptions, VantResolver, VantResolverOptions, VarletUIResolver, VarletUIResolverOptions, VeuiResolver, VeuiResolverOptions, ViewUiResolver, VueUseComponentsResolver, VueUseDirectiveResolver, Vuetify3Resolver, VuetifyResolver, getResolved };
export { type AllowResolveIconOption, AntDesignVueResolver, type AntDesignVueResolverOptions, ArcoResolver, type ArcoResolverOptions, BootstrapVue3Resolver, BootstrapVueNextResolver, BootstrapVueResolver, type BootstrapVueResolverOptions, type DevResolverOptions, DevUiResolver, type DisallowResolveIconOption, ElementPlusResolver, type ElementPlusResolverOptions, ElementUiResolver, type ElementUiResolverOptions, HeadlessUiResolver, type HeadlessUiResolverOptions, IduxResolver, type IduxResolverOptions, InklineResolver, IonicBuiltInComponents, IonicResolver, LayuiVueResolver, type LayuiVueResolverOptions, NaiveUiResolver, PrimeVueResolver, type PrimeVueResolverOptions, QuasarResolver, type ResolveIconsOption, TDesignResolver, type TDesignResolverOptions, VantResolver, type VantResolverOptions, VarletUIResolver, type VarletUIResolverOptions, VeuiResolver, type VeuiResolverOptions, ViewUiResolver, VueUseComponentsResolver, VueUseDirectiveResolver, Vuetify3Resolver, VuetifyResolver, getResolved };

@@ -8,3 +8,3 @@ import {

resolveImportPath
} from "./chunk-WRE7G5OD.js";
} from "./chunk-SQHKCPM6.js";
import {

@@ -238,3 +238,3 @@ __require,

const packageName = (options == null ? void 0 : options.packageName) || "ant-design-vue";
if (importStyle === "less" || importLess) {
if (importStyle === "less" || importStyle === "css-in-js" || importLess) {
const styleDir = getStyleDir(compName);

@@ -535,4 +535,4 @@ return `${packageName}/${lib}/${styleDir}/style`;

"DialogOverlay",
"DialogPanel",
"DialogTitle",
"DialogPanel",
"Disclosure",

@@ -566,9 +566,9 @@ "DisclosureButton",

"SwitchLabel",
"TransitionChild",
"TransitionRoot",
"Tab",
"TabGroup",
"TabList",
"Tab",
"TabPanel",
"TabPanels",
"TabPanel"
"TransitionChild",
"TransitionRoot"
];

@@ -594,4 +594,4 @@ function HeadlessUiResolver(options = {}) {

// src/core/resolvers/idux.ts
import { resolveModule } from "local-pkg";
var specialComponents = {
CdkVirtualScroll: "scroll",
CdkClickOutside: "click-outside",

@@ -602,15 +602,16 @@ CdkDraggable: "drag-drop",

CdkResizeObserver: "resize",
CdkVirtualScroll: "scroll",
IxAutoComplete: "auto-complete",
IxBackTop: "back-top",
IxCol: "grid",
IxDatePicker: "date-picker",
IxDateRangePicker: "date-picker",
IxCol: "grid",
IxInputNumber: "input-number",
IxLoadingBar: "loading-bar",
IxLoadingBarProvider: "loading-bar",
IxRow: "grid",
IxInputNumber: "input-number",
IxTab: "tabs",
IxTreeSelect: "tree-select",
IxTimePicker: "time-picker",
IxTimeRangePicker: "time-picker",
IxLoadingBar: "loading-bar",
IxLoadingBarProvider: "loading-bar"
IxTreeSelect: "tree-select"
};

@@ -620,4 +621,4 @@ function IduxResolver(options = {}) {

type: "component",
resolve: (name) => {
const { importStyle, importStyleTheme = "default", exclude = [], scope = "@idux" } = options;
resolve: async (name) => {
const { importStyle, importStyleTheme, exclude = [], scope = "@idux" } = options;
if (exclude.includes(name))

@@ -628,2 +629,3 @@ return;

return;
const resolvedVersion = await getPkgVersion(`${scope}/${packageName}`, "2.0.0");
let dirname = specialComponents[name];

@@ -635,5 +637,3 @@ if (!dirname) {

const path = `${scope}/${packageName}/${dirname}`;
let sideEffects;
if (packageName !== "cdk" && importStyle)
sideEffects = `${path}/style/themes/${importStyle === "css" ? `${importStyleTheme}_css` : importStyleTheme}`;
const sideEffects = packageName === "cdk" ? void 0 : getSideEffects4(resolvedVersion, path, importStyle, importStyleTheme);
return { name, from: path, sideEffects };

@@ -653,2 +653,23 @@ }

}
function getSideEffects4(version, path, importStyle, importStyleTheme) {
if (!importStyle)
return;
if (compare(version, "2.0.0-beta.0", "<"))
return getLegacySideEffects(path, importStyle, importStyleTheme);
const styleRoot = `${path}/style`;
const themeRoot = `${path}/theme`;
const styleImport = `${styleRoot}/${importStyle === "css" ? "index_css" : "index"}`;
if (!resolveModule(styleImport))
return;
const themeImport = `${themeRoot}/${importStyleTheme}.css`;
if (!importStyleTheme || !resolveModule(themeImport))
return styleImport;
return [styleImport, `${themeRoot}/${importStyleTheme}`];
}
function getLegacySideEffects(path, importStyle, importStyleTheme = "default") {
const styleImport = `${path}/style/themes/${importStyle === "css" ? `${importStyleTheme}_css` : importStyleTheme}`;
if (!resolveModule(styleImport))
return;
return styleImport;
}

@@ -718,9 +739,16 @@ // src/core/resolvers/inkline.ts

"FileUpload",
"FloatLabel",
"FullCalendar",
"Galleria",
"IconField",
"IconField",
"Image",
"InlineMessage",
"Inplace",
"InputGroup",
"InputGroupAddon",
"InputIcon",
"InputMask",
"InputNumber",
"InputOtp",
"InputSwitch",

@@ -734,2 +762,3 @@ "InputText",

"Message",
"MeterGroup",
"MultiSelect",

@@ -759,2 +788,4 @@ "OrderList",

"SplitterPanel",
"Stepper",
"StepperPanel",
"Steps",

@@ -814,3 +845,3 @@ "TabMenu",

var moduleType = isSSR ? "lib" : "es";
function getSideEffects4(dirName, options) {
function getSideEffects5(dirName, options) {
const { importStyle = true } = options;

@@ -834,3 +865,3 @@ if (!importStyle || isSSR)

from: `vant/${moduleType}`,
sideEffects: getSideEffects4(kebabCase(partialName), options)
sideEffects: getSideEffects5(kebabCase(partialName), options)
};

@@ -850,2 +881,3 @@ }

importLess,
styleExtname = ".mjs",
autoImport = false,

@@ -860,3 +892,3 @@ version = "vue3"

else
sideEffects.push(`${path}/es/${kebabCase(name)}/style/index`);
sideEffects.push(`${path}/es/${kebabCase(name)}/style/index${styleExtname}`);
}

@@ -916,3 +948,3 @@ return {

return;
const sideEffects = getSideEffects5(componentName, options);
const sideEffects = getSideEffects6(componentName, options);
return { name: componentName, from: alias, sideEffects };

@@ -940,3 +972,3 @@ }

}
function getSideEffects5(name, {
function getSideEffects6(name, {
alias = VEUI_PACKAGE_NAME,

@@ -964,3 +996,3 @@ modules = [],

// src/core/resolvers/view-ui.ts
function getSideEffects6(componentName) {
function getSideEffects7(componentName) {
const sideEffects = [

@@ -1004,3 +1036,3 @@ "view-design/dist/styles/iview.css",

from: `view-design/src/components/${getCompDir(compName)}`,
sideEffects: getSideEffects6(compName)
sideEffects: getSideEffects7(compName)
};

@@ -1035,3 +1067,3 @@ }

import process from "process";
import { resolveModule } from "local-pkg";
import { resolveModule as resolveModule2 } from "local-pkg";
var components4;

@@ -1045,4 +1077,4 @@ function VueUseComponentsResolver() {

try {
const corePath = resolveModule("@vueuse/core") || process.cwd();
const path = resolveModule("@vueuse/core/indexes.json") || resolveModule("@vueuse/metadata/index.json") || resolveModule("@vueuse/metadata/index.json", { paths: [corePath] });
const corePath = resolveModule2("@vueuse/core") || process.cwd();
const path = resolveModule2("@vueuse/core/indexes.json") || resolveModule2("@vueuse/metadata/index.json") || resolveModule2("@vueuse/metadata/index.json", { paths: [corePath] });
indexesJson = JSON.parse(readFileSync(path, "utf-8"));

@@ -1064,3 +1096,3 @@ components4 = indexesJson.functions.filter((i) => i.component && i.name).map(({ name: name2 }) => name2[0].toUpperCase() + name2.slice(1));

import process2 from "process";
import { resolveModule as resolveModule2 } from "local-pkg";
import { resolveModule as resolveModule3 } from "local-pkg";
var directives;

@@ -1074,4 +1106,4 @@ function VueUseDirectiveResolver() {

try {
const corePath = resolveModule2("@vueuse/core") || process2.cwd();
const path = resolveModule2("@vueuse/core/indexes.json") || resolveModule2("@vueuse/metadata/index.json") || resolveModule2("@vueuse/metadata/index.json", { paths: [corePath] });
const corePath = resolveModule3("@vueuse/core") || process2.cwd();
const path = resolveModule3("@vueuse/core/indexes.json") || resolveModule3("@vueuse/metadata/index.json") || resolveModule3("@vueuse/metadata/index.json", { paths: [corePath] });
indexesJson = JSON.parse(readFileSync2(path, "utf-8"));

@@ -1092,3 +1124,3 @@ 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);

import { promises as fs } from "fs";
import { resolveModule as resolveModule3 } from "local-pkg";
import { resolveModule as resolveModule4 } from "local-pkg";
function QuasarResolver() {

@@ -1100,3 +1132,3 @@ let components5 = [];

if (!components5.length) {
const quasarApiListPath = resolveModule3("quasar/dist/transforms/api-list.json");
const quasarApiListPath = resolveModule4("quasar/dist/transforms/api-list.json");
if (quasarApiListPath)

@@ -1117,3 +1149,3 @@ components5 = JSON.parse(await fs.readFile(quasarApiListPath, "utf-8"));

}
function getSideEffects7(name, filename) {
function getSideEffects8(name, filename) {
if (HARMLESS.includes(name))

@@ -1155,4 +1187,4 @@ return;

name,
sideEffects: getSideEffects7(resolveId, "style.css"),
from: getSideEffects7(resolveId, `index.${ssr ? "umd" : "es"}.js`)
sideEffects: getSideEffects8(resolveId, "style.css"),
from: getSideEffects8(resolveId, `index.${ssr ? "umd" : "es"}.js`)
};

@@ -1164,3 +1196,3 @@ }

name: `${name}Directive`,
sideEffects: getSideEffects7(resolveId, "style.css"),
sideEffects: getSideEffects8(resolveId, "style.css"),
from: resolveDirectory(resolveId, `index.${ssr ? "umd" : "es"}.js`)

@@ -1517,3 +1549,3 @@ };

}
function getSideEffects8(importName, options) {
function getSideEffects9(importName, options) {
const { importStyle = "css" } = options;

@@ -1549,3 +1581,3 @@ if (!importStyle)

}
return name ? { name, from: libName, sideEffects: getSideEffects8(name, options) } : void 0;
return name ? { name, from: libName, sideEffects: getSideEffects9(name, options) } : void 0;
}

@@ -1575,6 +1607,7 @@ function isExclude3(name, exclude) {

BCheck: "BFormCheckbox",
BCheckGroup: "BFormCheckboxGroup",
BCheckbox: "BFormCheckbox",
BCheckboxGroup: "BFormCheckboxGroup",
BCheckGroup: "BFormCheckboxGroup",
BDatalist: "BFormDatalist",
BDatepicker: "BFormDatepicker",
BDd: "BDropdown",

@@ -1586,8 +1619,7 @@ BDdDivider: "BDropdownDivider",

BDdItem: "BDropdownItem",
BDdItemBtn: "BDropdownItemButton",
BDdItemButton: "BDropdownItemButton",
BDdItemBtn: "BDropdownItemButton",
BDdText: "BDropdownText",
BDropdownItemBtn: "BDropdownItemButton",
BFile: "BFormFile",
BDatepicker: "BFormDatepicker",
BInput: "BFormInput",

@@ -1594,0 +1626,0 @@ BNavDd: "BNavItemDropdown",

import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

@@ -168,2 +168,2 @@ import { FilterPattern } from '@rollup/pluginutils';

export { ComponentInfo, ComponentResolveResult, ComponentResolver, ComponentResolverFunction, ComponentResolverObject, ComponentsImportMap, ImportInfo, ImportInfoLegacy, Matcher, Options, PublicPluginAPI, ResolvedOptions, SideEffectsInfo, SupportedTransformer, Transformer, TypeImport };
export type { ComponentInfo, ComponentResolveResult, ComponentResolver, ComponentResolverFunction, ComponentResolverObject, ComponentsImportMap, ImportInfo, ImportInfoLegacy, Matcher, Options, PublicPluginAPI, ResolvedOptions, SideEffectsInfo, SupportedTransformer, Transformer, TypeImport };
import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

import {
unplugin_default
} from "./chunk-LAHXDHMT.js";
import "./chunk-WRE7G5OD.js";
} from "./chunk-TSU3OFN5.js";
import "./chunk-SQHKCPM6.js";
import "./chunk-5JVO2UWC.js";

@@ -6,0 +6,0 @@ import "./chunk-6F4PWJZI.js";

{
"name": "unplugin-vue-components",
"type": "module",
"version": "0.26.0",
"packageManager": "pnpm@8.7.5",
"version": "0.27.0",
"packageManager": "pnpm@9.0.6",
"description": "Components auto importing for Vue",

@@ -96,37 +96,37 @@ "author": "antfu <anthonyfu117@hotmail.com>",

"dependencies": {
"@antfu/utils": "^0.7.6",
"@rollup/pluginutils": "^5.0.4",
"chokidar": "^3.5.3",
"@antfu/utils": "^0.7.7",
"@rollup/pluginutils": "^5.1.0",
"chokidar": "^3.6.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.1",
"local-pkg": "^0.4.3",
"magic-string": "^0.30.3",
"minimatch": "^9.0.3",
"resolve": "^1.22.4",
"unplugin": "^1.4.0"
"fast-glob": "^3.3.2",
"local-pkg": "^0.5.0",
"magic-string": "^0.30.10",
"minimatch": "^9.0.4",
"resolve": "^1.22.8",
"unplugin": "^1.10.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.42.0",
"@babel/parser": "^7.22.16",
"@babel/types": "^7.22.17",
"@nuxt/kit": "^3.7.3",
"@types/debug": "^4.1.8",
"@antfu/eslint-config": "^2.16.1",
"@babel/parser": "^7.24.5",
"@babel/types": "^7.24.5",
"@nuxt/kit": "^3.11.2",
"@types/debug": "^4.1.12",
"@types/minimatch": "^5.1.2",
"@types/node": "^20.6.0",
"@types/resolve": "^1.20.2",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"bumpp": "^9.2.0",
"@types/node": "^20.12.7",
"@types/resolve": "^1.20.6",
"bumpp": "^9.4.1",
"compare-versions": "^6.1.0",
"element-plus": "^2.3.12",
"eslint": "^8.49.0",
"esno": "^0.17.0",
"element-plus": "^2.7.2",
"eslint": "^9.1.1",
"eslint-plugin-format": "^0.1.1",
"esno": "^4.7.0",
"estree-walker": "^3.0.3",
"pathe": "^1.1.1",
"rollup": "^3.29.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.4",
"pathe": "^1.1.2",
"rollup": "^4.17.2",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"vitest": "^1.5.3",
"vue": "3.2.45"
}
}

@@ -68,3 +68,2 @@ # unplugin-vue-components

<details>

@@ -121,2 +120,3 @@ <summary>Webpack</summary><br>

You can also rename the Vue configuration file to `vue.config.mjs` and use static import syntax (you should use latest `@vue/cli-service ^5.0.8`):
```ts

@@ -171,5 +171,5 @@ // vue.config.mjs

<script>
export default {
name: 'App'
}
export default {
name: 'App',
}
</script>

@@ -188,12 +188,13 @@ ```

<script>
import HelloWorld from './src/components/HelloWorld.vue'
import HelloWorld from './src/components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
export default {
name: 'App',
components: {
HelloWorld,
},
}
}
</script>
```
> **Note**

@@ -200,0 +201,0 @@ > By default this plugin will import components in the `src/components` path. You can customize it using the `dirs` option.

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

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