unplugin-auto-import
Advanced tools
Comparing version 0.4.20 to 0.5.0
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkOOCHIAGFjs = require('./chunk-OOCHIAGF.js'); | ||
var _chunkL77PZ7OAjs = require('./chunk-L77PZ7OA.js'); | ||
require('./chunk-EGAZYO6M.js'); | ||
exports.default = _chunkOOCHIAGFjs.src_default; | ||
exports.default = _chunkL77PZ7OAjs.src_default; |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkOOCHIAGFjs = require('./chunk-OOCHIAGF.js'); | ||
var _chunkL77PZ7OAjs = require('./chunk-L77PZ7OA.js'); | ||
require('./chunk-EGAZYO6M.js'); | ||
@@ -11,7 +11,7 @@ | ||
config.plugins = config.plugins || []; | ||
config.plugins.unshift(_chunkOOCHIAGFjs.src_default.webpack(options)); | ||
config.plugins.unshift(_chunkL77PZ7OAjs.src_default.webpack(options)); | ||
}); | ||
this.nuxt.hook("vite:extend", async (vite) => { | ||
vite.config.plugins = vite.config.plugins || []; | ||
vite.config.plugins.push(_chunkOOCHIAGFjs.src_default.vite(options)); | ||
vite.config.plugins.push(_chunkL77PZ7OAjs.src_default.vite(options)); | ||
}); | ||
@@ -18,0 +18,0 @@ } |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkOOCHIAGFjs = require('./chunk-OOCHIAGF.js'); | ||
var _chunkL77PZ7OAjs = require('./chunk-L77PZ7OA.js'); | ||
require('./chunk-EGAZYO6M.js'); | ||
// src/rollup.ts | ||
var rollup_default = _chunkOOCHIAGFjs.src_default.rollup; | ||
var rollup_default = _chunkL77PZ7OAjs.src_default.rollup; | ||
@@ -9,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Arrayable } from '@antfu/utils'; | ||
import { Arrayable, Awaitable } from '@antfu/utils'; | ||
import { FilterPattern } from '@rollup/pluginutils'; | ||
@@ -31,14 +31,21 @@ | ||
declare type ImportInfo = { | ||
module: string; | ||
path: string; | ||
name?: string; | ||
from?: string; | ||
importName?: string; | ||
}; | ||
declare type SideEffectsInfo = Arrayable<ImportInfo | string> | undefined; | ||
interface ResolveResult extends ImportInfo { | ||
declare type ResolvedResult = { | ||
path: string; | ||
importName?: string; | ||
sideEffects?: SideEffectsInfo; | ||
} | ||
}; | ||
declare type ResolverFunction = (name: string) => Awaitable<string | ResolvedResult | null | undefined | void>; | ||
declare type ResolverResultObject = { | ||
type: 'component' | 'directive'; | ||
resolve: ResolverFunction; | ||
}; | ||
/** | ||
* Given a identifier name, returns the import path or an importInfo object | ||
*/ | ||
declare type Resolver = (name: string) => string | ResolveResult | null | undefined | void; | ||
declare type Resolver = ResolverFunction | ResolverResultObject; | ||
/** | ||
@@ -51,3 +58,3 @@ * module, name, alias | ||
*/ | ||
declare type ImportsFlatMap = Record<string, ResolveResult>; | ||
declare type ImportsFlatMap = Record<string, ResolvedResult>; | ||
interface Options { | ||
@@ -69,3 +76,3 @@ /** | ||
*/ | ||
resolvers?: Resolver | Resolver[]; | ||
resolvers?: Arrayable<Resolver>; | ||
/** | ||
@@ -130,2 +137,2 @@ * Filepath to generate corresponding .d.ts file. | ||
export { ImportInfo, ImportNameAlias, ImportsFlatMap, ImportsMap, Options, PresetName, ResolveResult, ResolvedOptions, Resolver, SideEffectsInfo, TransformOptions }; | ||
export { ImportInfo, ImportNameAlias, ImportsFlatMap, ImportsMap, Options, PresetName, ResolvedOptions, ResolvedResult, Resolver, ResolverFunction, ResolverResultObject, SideEffectsInfo, TransformOptions }; |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkOOCHIAGFjs = require('./chunk-OOCHIAGF.js'); | ||
var _chunkL77PZ7OAjs = require('./chunk-L77PZ7OA.js'); | ||
require('./chunk-EGAZYO6M.js'); | ||
// src/vite.ts | ||
var vite_default = _chunkOOCHIAGFjs.src_default.vite; | ||
var vite_default = _chunkL77PZ7OAjs.src_default.vite; | ||
@@ -9,0 +9,0 @@ |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkOOCHIAGFjs = require('./chunk-OOCHIAGF.js'); | ||
var _chunkL77PZ7OAjs = require('./chunk-L77PZ7OA.js'); | ||
require('./chunk-EGAZYO6M.js'); | ||
// src/webpack.ts | ||
var webpack_default = _chunkOOCHIAGFjs.src_default.webpack; | ||
var webpack_default = _chunkL77PZ7OAjs.src_default.webpack; | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "unplugin-auto-import", | ||
"version": "0.4.20", | ||
"version": "0.5.0", | ||
"description": "Register global imports on demand for Vite and Webpack", | ||
@@ -17,2 +17,3 @@ "keywords": [ | ||
}, | ||
"license": "MIT", | ||
"repository": { | ||
@@ -23,5 +24,8 @@ "type": "git", | ||
"funding": "https://github.com/sponsors/antfu", | ||
"license": "MIT", | ||
"author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
"sideEffects": false, | ||
"files": [ | ||
"dist", | ||
"*.d.ts" | ||
], | ||
"exports": { | ||
@@ -57,6 +61,10 @@ ".": { | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"*.d.ts" | ||
], | ||
"peerDependencies": { | ||
"@vueuse/core": "*" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@vueuse/core": { | ||
"optional": true | ||
} | ||
}, | ||
"dependencies": { | ||
@@ -82,3 +90,2 @@ "@antfu/utils": "^0.3.0", | ||
"jest": "^27.3.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.60.1", | ||
@@ -91,10 +98,2 @@ "ts-jest": "^27.0.7", | ||
}, | ||
"peerDependencies": { | ||
"@vueuse/core": "*" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@vueuse/core": { | ||
"optional": true | ||
} | ||
}, | ||
"engines": { | ||
@@ -104,3 +103,3 @@ "node": ">=14" | ||
"scripts": { | ||
"build": "rimraf dist && tsup src/*.ts --format cjs,esm --dts --splitting && esno scripts/postbuild.ts", | ||
"build": "tsup src/*.ts --format cjs,esm --dts --splitting --clean && esno scripts/postbuild.ts", | ||
"dev": "tsup 'src/*.ts' --watch src", | ||
@@ -107,0 +106,0 @@ "lint": "eslint \"{src,test}/**/*.ts\"", |
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
45943
17
1379