Socket
Socket
Sign inDemoInstall

unplugin

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6

4

dist/index.js

@@ -1054,4 +1054,4 @@ "use strict";

};
if (initialOptions.outdir && !(0, import_fs.existsSync)(initialOptions.outdir)) {
(0, import_fs.mkdirSync)(initialOptions.outdir, { recursive: true });
if (initialOptions.outdir && !import_fs.default.existsSync(initialOptions.outdir)) {
import_fs.default.mkdirSync(initialOptions.outdir, { recursive: true });
}

@@ -1058,0 +1058,0 @@ if (plugin.buildStart) {

{
"name": "unplugin",
"version": "0.9.5",
"packageManager": "pnpm@7.9.5",
"version": "0.9.6",
"packageManager": "pnpm@7.11.0",
"description": "Unified plugin system for build tools",

@@ -36,11 +36,11 @@ "repository": "unjs/unplugin",

"webpack-sources": "^3.2.3",
"webpack-virtual-modules": "^0.4.4"
"webpack-virtual-modules": "^0.4.5"
},
"devDependencies": {
"@ampproject/remapping": "^2.2.0",
"@antfu/ni": "^0.17.2",
"@nuxtjs/eslint-config-typescript": "^10.0.0",
"@types/express": "^4.17.13",
"@antfu/ni": "^0.18.0",
"@nuxtjs/eslint-config-typescript": "^11.0.0",
"@types/express": "^4.17.14",
"@types/fs-extra": "^9.0.13",
"@types/node": "^18.7.6",
"@types/node": "^18.7.16",
"@types/webpack-sources": "^3.2.0",

@@ -50,37 +50,17 @@ "bumpp": "^8.2.1",

"enhanced-resolve": "^5.10.0",
"esbuild": "^0.15.5",
"eslint": "^8.22.0",
"fast-glob": "^3.2.11",
"esbuild": "^0.15.7",
"eslint": "^8.23.1",
"fast-glob": "^3.2.12",
"fs-extra": "^10.1.0",
"jiti": "^1.14.0",
"magic-string": "^0.26.2",
"jiti": "^1.15.0",
"magic-string": "^0.26.3",
"picocolors": "^1.0.0",
"rollup": "^2.78.1",
"tsup": "^6.2.2",
"typescript": "^4.7.4",
"vite": "^3.0.9",
"vitest": "^0.22.1",
"rollup": "^2.79.0",
"tsup": "^6.2.3",
"typescript": "^4.8.3",
"vite": "^3.1.2",
"vitest": "^0.23.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"peerDependencies": {
"esbuild": ">=0.13",
"rollup": "^2.50.0",
"vite": "^2.3.0 || ^3.0.0-0",
"webpack": "4 || 5"
},
"peerDependenciesMeta": {
"esbuild": {
"optional": true
},
"rollup": {
"optional": true
},
"vite": {
"optional": true
},
"webpack": {
"optional": true
}
}
}

@@ -58,3 +58,3 @@ # unplugin

return {
name: 'my-first-unplugin',
name: 'unplugin-prefixed-name',
// webpack's id filter is outside of loader logic,

@@ -85,7 +85,7 @@ // an additional hook is needed for better perf on webpack

// vite.config.ts
import MyUnplugin from './my-unplugin'
import UnpluginFeature from './unplugin-feature'
export default {
plugins: [
MyUnplugin.vite({ /* options */ })
UnpluginFeature.vite({ /* options */ })
]

@@ -99,7 +99,7 @@ }

// rollup.config.js
import MyUnplugin from './my-unplugin'
import UnpluginFeature from './unplugin-feature'
export default {
plugins: [
MyUnplugin.rollup({ /* options */ })
UnpluginFeature.rollup({ /* options */ })
]

@@ -115,3 +115,3 @@ }

plugins: [
require('./my-unplugin').webpack({ /* options */ })
require('./unplugin-feature').webpack({ /* options */ })
]

@@ -129,3 +129,3 @@ }

plugins: [
require('./my-unplugin').esbuild({ /* options */ })
require('./unplugin-feature').esbuild({ /* options */ })
]

@@ -146,6 +146,6 @@ })

// common unplugin hooks
name: 'my-first-unplugin',
name: 'unplugin-prefixed-name',
transformInclude (id) { /* ... */ },
transform (code) { /* ... */ },
// framework specific hooks

@@ -175,2 +175,20 @@ vite: {

## Conventions
- Plugins powered by unplugin should have a clear name with `unplugin-` prefix.
- Include `unplugin` keyword in `package.json`.
- To provide better DX, packages could export 2 kinds of entry points:
- Default export: the returned value of `createUnplugin` function
```ts
import UnpluginFeature from 'unplugin-feature'
```
- Subpath exports: properties of the returned value of `createUnplugin` function for each framework users
```ts
import VitePlugin from 'unplugin-feature/vite'
```
- Refer to [unplugin-starter](https://github.com/antfu/unplugin-starter) for more details about this setup.
## Starter Templates

@@ -177,0 +195,0 @@

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