Comparing version
@@ -1,3 +0,3 @@ | ||
import { P as Preset, I as Import, B as BuiltinPresetName, a as PathFromResolver, U as UnimportOptions } from './types-c897d48e'; | ||
export { B as BuiltinPresetName, I as Import, c as ImportName, M as ModuleId, a as PathFromResolver, P as Preset, d as PresetImport, U as UnimportOptions, b as builtinPresets } from './types-c897d48e'; | ||
import { P as Preset, I as Import, B as BuiltinPresetName, T as TypeDeclrationOptions, S as ScanDirExportsOptions, U as UnimportOptions } from './types-36f374c0'; | ||
export { B as BuiltinPresetName, I as Import, a as ImportName, M as ModuleId, d as PathFromResolver, P as Preset, c as PresetImport, S as ScanDirExportsOptions, T as TypeDeclrationOptions, U as UnimportOptions, b as builtinPresets } from './types-36f374c0'; | ||
import * as MagicString from 'magic-string'; | ||
@@ -17,4 +17,4 @@ import MagicString__default from 'magic-string'; | ||
declare function toExports(imports: Import[]): string; | ||
declare function toTypeDeclrationItems(imports: Import[], resolvePath?: PathFromResolver): string[]; | ||
declare function toTypeDeclrationFile(imports: Import[], resolvePath?: PathFromResolver): string; | ||
declare function toTypeDeclrationItems(imports: Import[], options?: TypeDeclrationOptions): string[]; | ||
declare function toTypeDeclrationFile(imports: Import[], options?: TypeDeclrationOptions): string; | ||
declare function addImportToCode(code: string, imports: Import[], isCJS?: boolean, mergeExisting?: boolean): { | ||
@@ -26,2 +26,6 @@ s: MagicString__default; | ||
declare function resolveFiles(path: string, pattern: string | string[]): Promise<string[]>; | ||
declare function scanDirExports(dir: string | string[], options?: ScanDirExportsOptions): Promise<Import[]>; | ||
declare function scanExports(filepath: string): Promise<Import[]>; | ||
declare type Unimport = ReturnType<typeof createUnimport>; | ||
@@ -41,5 +45,5 @@ declare function createUnimport(opts: Partial<UnimportOptions>): { | ||
toExports: () => string; | ||
generateTypeDecarations: (pathResolver?: PathFromResolver) => string; | ||
generateTypeDecarations: (options?: TypeDeclrationOptions) => string; | ||
}; | ||
export { Unimport, addImportToCode, createUnimport, dedupeImports, defineUnimportPreset, excludeRE, importAsRE, normalizeImports, resolveBuiltinPresets, resolvePreset, separatorRE, stripCommentsAndStrings, toExports, toImports, toTypeDeclrationFile, toTypeDeclrationItems }; | ||
export { Unimport, addImportToCode, createUnimport, dedupeImports, defineUnimportPreset, excludeRE, importAsRE, normalizeImports, resolveBuiltinPresets, resolveFiles, resolvePreset, scanDirExports, scanExports, separatorRE, stripCommentsAndStrings, toExports, toImports, toTypeDeclrationFile, toTypeDeclrationItems }; |
import * as unplugin from 'unplugin'; | ||
import { FilterPattern } from '@rollup/pluginutils'; | ||
import { U as UnimportOptions } from './types-c897d48e'; | ||
import { U as UnimportOptions } from './types-36f374c0'; | ||
@@ -5,0 +5,0 @@ interface UnimportPluginOptions extends UnimportOptions { |
{ | ||
"name": "unimport", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"description": "Unified utils for auto importing APIs in modules", | ||
@@ -40,5 +40,8 @@ "repository": "unjs/unimport", | ||
"escape-string-regexp": "^5.0.0", | ||
"globby": "^13.1.1", | ||
"local-pkg": "^0.4.1", | ||
"magic-string": "^0.26.0", | ||
"mlly": "^0.4.3", | ||
"pathe": "^0.2.0", | ||
"scule": "^0.2.1", | ||
"unplugin": "^0.3.3" | ||
@@ -45,0 +48,0 @@ }, |
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
53934
11.14%1800
10.23%9
50%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added