Comparing version 0.9.5 to 0.9.6
@@ -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
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
117866
4
212
- Removed@esbuild/aix-ppc64@0.24.0(transitive)
- Removed@esbuild/android-arm@0.15.180.24.0(transitive)
- Removed@esbuild/android-arm64@0.24.0(transitive)
- Removed@esbuild/android-x64@0.24.0(transitive)
- Removed@esbuild/darwin-arm64@0.24.0(transitive)
- Removed@esbuild/darwin-x64@0.24.0(transitive)
- Removed@esbuild/freebsd-arm64@0.24.0(transitive)
- Removed@esbuild/freebsd-x64@0.24.0(transitive)
- Removed@esbuild/linux-arm@0.24.0(transitive)
- Removed@esbuild/linux-arm64@0.24.0(transitive)
- Removed@esbuild/linux-ia32@0.24.0(transitive)
- Removed@esbuild/linux-loong64@0.15.180.24.0(transitive)
- Removed@esbuild/linux-mips64el@0.24.0(transitive)
- Removed@esbuild/linux-ppc64@0.24.0(transitive)
- Removed@esbuild/linux-riscv64@0.24.0(transitive)
- Removed@esbuild/linux-s390x@0.24.0(transitive)
- Removed@esbuild/linux-x64@0.24.0(transitive)
- Removed@esbuild/netbsd-x64@0.24.0(transitive)
- Removed@esbuild/openbsd-arm64@0.24.0(transitive)
- Removed@esbuild/openbsd-x64@0.24.0(transitive)
- Removed@esbuild/sunos-x64@0.24.0(transitive)
- Removed@esbuild/win32-arm64@0.24.0(transitive)
- Removed@esbuild/win32-ia32@0.24.0(transitive)
- Removed@esbuild/win32-x64@0.24.0(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/source-map@0.3.6(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/json-schema@7.0.15(transitive)
- Removed@types/node@22.7.4(transitive)
- Removed@webassemblyjs/ast@1.12.1(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.11.6(transitive)
- Removed@webassemblyjs/helper-api-error@1.11.6(transitive)
- Removed@webassemblyjs/helper-buffer@1.12.1(transitive)
- Removed@webassemblyjs/helper-numbers@1.11.6(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.11.6(transitive)
- Removed@webassemblyjs/helper-wasm-section@1.12.1(transitive)
- Removed@webassemblyjs/ieee754@1.11.6(transitive)
- Removed@webassemblyjs/leb128@1.11.6(transitive)
- Removed@webassemblyjs/utf8@1.11.6(transitive)
- Removed@webassemblyjs/wasm-edit@1.12.1(transitive)
- Removed@webassemblyjs/wasm-gen@1.12.1(transitive)
- Removed@webassemblyjs/wasm-opt@1.12.1(transitive)
- Removed@webassemblyjs/wasm-parser@1.12.1(transitive)
- Removed@webassemblyjs/wast-printer@1.12.1(transitive)
- Removed@xtuc/ieee754@1.2.0(transitive)
- Removed@xtuc/long@4.2.2(transitive)
- Removedacorn-import-attributes@1.9.5(transitive)
- Removedajv@6.12.6(transitive)
- Removedajv-keywords@3.5.2(transitive)
- Removedbrowserslist@4.24.0(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcaniuse-lite@1.0.30001664(transitive)
- Removedchrome-trace-event@1.0.4(transitive)
- Removedcommander@2.20.3(transitive)
- Removedelectron-to-chromium@1.5.29(transitive)
- Removedenhanced-resolve@5.17.1(transitive)
- Removedes-module-lexer@1.5.4(transitive)
- Removedesbuild@0.15.180.24.0(transitive)
- Removedesbuild-android-64@0.15.18(transitive)
- Removedesbuild-android-arm64@0.15.18(transitive)
- Removedesbuild-darwin-64@0.15.18(transitive)
- Removedesbuild-darwin-arm64@0.15.18(transitive)
- Removedesbuild-freebsd-64@0.15.18(transitive)
- Removedesbuild-freebsd-arm64@0.15.18(transitive)
- Removedesbuild-linux-32@0.15.18(transitive)
- Removedesbuild-linux-64@0.15.18(transitive)
- Removedesbuild-linux-arm@0.15.18(transitive)
- Removedesbuild-linux-arm64@0.15.18(transitive)
- Removedesbuild-linux-mips64le@0.15.18(transitive)
- Removedesbuild-linux-ppc64le@0.15.18(transitive)
- Removedesbuild-linux-riscv64@0.15.18(transitive)
- Removedesbuild-linux-s390x@0.15.18(transitive)
- Removedesbuild-netbsd-64@0.15.18(transitive)
- Removedesbuild-openbsd-64@0.15.18(transitive)
- Removedesbuild-sunos-64@0.15.18(transitive)
- Removedesbuild-windows-32@0.15.18(transitive)
- Removedesbuild-windows-64@0.15.18(transitive)
- Removedesbuild-windows-arm64@0.15.18(transitive)
- Removedescalade@3.2.0(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedevents@3.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob-to-regexp@0.4.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedjest-worker@27.5.1(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedloader-runner@4.3.0(transitive)
- Removedmerge-stream@2.0.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednanoid@3.3.7(transitive)
- Removedneo-async@2.6.2(transitive)
- Removednode-releases@2.0.18(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpicocolors@1.1.0(transitive)
- Removedpostcss@8.4.47(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedresolve@1.22.8(transitive)
- Removedrollup@2.79.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedschema-utils@3.3.0(transitive)
- Removedserialize-javascript@6.0.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-js@1.2.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
- Removedsupports-color@8.1.1(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtapable@2.2.1(transitive)
- Removedterser@5.34.1(transitive)
- Removedterser-webpack-plugin@5.3.10(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedvite@3.2.11(transitive)
- Removedwatchpack@2.4.2(transitive)
- Removedwebpack@5.95.0(transitive)