Socket
Socket
Sign inDemoInstall

unimport

Package Overview
Dependencies
Maintainers
3
Versions
101
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 0.1.6 to 0.1.7

CHANGELOG.md

5

dist/index.d.ts

@@ -1,3 +0,3 @@

import { P as Preset, I as Import, B as BuiltinPresetName, T as TypeDeclrationOptions, S as ScanDirExportsOptions, U as UnimportOptions } from './types-3d1232fe';
export { B as BuiltinPresetName, I as Import, c as ImportCommon, a as ImportName, M as ModuleId, e as PathFromResolver, P as Preset, d as PresetImport, S as ScanDirExportsOptions, T as TypeDeclrationOptions, U as UnimportOptions, b as builtinPresets } from './types-3d1232fe';
import { P as Preset, I as Import, B as BuiltinPresetName, T as TypeDeclrationOptions, S as ScanDirExportsOptions, U as UnimportOptions } from './types-3d1232fe.js';
export { B as BuiltinPresetName, I as Import, c as ImportCommon, a as ImportName, M as ModuleId, e as PathFromResolver, P as Preset, d as PresetImport, S as ScanDirExportsOptions, T as TypeDeclrationOptions, U as UnimportOptions, b as builtinPresets } from './types-3d1232fe.js';
import * as MagicString from 'magic-string';

@@ -32,2 +32,3 @@ import MagicString__default from 'magic-string';

declare function createUnimport(opts: Partial<UnimportOptions>): {
clearDynamicImports: () => void;
modifyDynamicImports: (fn: (imports: Import[]) => Promise<void> | void) => Promise<void>;

@@ -34,0 +35,0 @@ getImports: () => Import[];

2

dist/unplugin.d.ts
import * as unplugin from 'unplugin';
import { FilterPattern } from '@rollup/pluginutils';
import { U as UnimportOptions } from './types-3d1232fe';
import { U as UnimportOptions } from './types-3d1232fe.js';

@@ -5,0 +5,0 @@ interface UnimportPluginOptions extends UnimportOptions {

{
"name": "unimport",
"version": "0.1.6",
"version": "0.1.7",
"description": "Unified utils for auto importing APIs in modules",

@@ -34,3 +34,3 @@ "repository": "unjs/unimport",

"prepack": "unbuild",
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"release": "pnpm test && standard-version && git push --follow-tags && npm publish",
"test": "vitest run --coverage"

@@ -52,9 +52,10 @@ },

"c8": "latest",
"eslint": "^8.13.0",
"eslint": "^8.14.0",
"fast-glob": "^3.2.11",
"standard-version": "latest",
"typescript": "latest",
"unbuild": "latest",
"vitest": "^0.9.3"
"vitest": "^0.10.0"
},
"packageManager": "yarn@3.2.0"
"packageManager": "pnpm@6.32.3"
}

@@ -66,3 +66,3 @@ # unimport

```js
const { addImports } = createUnimport({
const { injectImports } = createUnimport({
imports: [{ name: 'fooBar', from: 'test-id' }]

@@ -72,3 +72,3 @@ })

// { code: "import { fooBar } from 'test-id';console.log(fooBar())" }
console.log(addImports('console.log(fooBar())'))
console.log(injectImports('console.log(fooBar())'))
```

@@ -80,4 +80,4 @@

- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)
- Install dependencies using `yarn install`
- Run interactive tests using `yarn dev`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

@@ -84,0 +84,0 @@ ## License

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