🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

unimport

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unimport - npm Package Compare versions

Comparing version

to
0.1.0

dist/types-36f374c0.d.ts

16

dist/index.d.ts

@@ -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