unplugin-isolated-decl 0.13.6 → 0.13.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +1 -1
- package/dist/esbuild.js +2 -2
- package/dist/farm.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/rolldown.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/{src-DAG_rtx2.js → src-CLaOCtRu.js} +4 -1
- package/dist/{transformer-Bp3NCHCk.js → transformer-CiAWE027.js} +9 -0
- package/dist/vite.js +2 -2
- package/package.json +21 -20
package/dist/api.js
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/farm.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/rolldown.js
CHANGED
package/dist/rollup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { appendMapUrl, generateDtsMap, oxcTransform, swcTransform, tsTransform } from "./transformer-
|
|
1
|
+
import { appendMapUrl, generateDtsMap, oxcTransform, swcTransform, tsTransform } from "./transformer-CiAWE027.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import MagicString from "magic-string";
|
|
@@ -110,6 +110,9 @@ function resolveOptions(options) {
|
|
|
110
110
|
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/index.ts
|
|
113
|
+
/**
|
|
114
|
+
* The main unplugin instance.
|
|
115
|
+
*/
|
|
113
116
|
const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
114
117
|
const options = resolveOptions(rawOptions);
|
|
115
118
|
const filter = createFilter(options.include, options.exclude);
|
|
@@ -4,6 +4,9 @@ import path from "node:path";
|
|
|
4
4
|
function tryImport(pkg) {
|
|
5
5
|
return import(pkg).catch(() => null);
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Transform isolated declarations with `oxc-transform`.
|
|
9
|
+
*/
|
|
7
10
|
async function oxcTransform(id, code, transformOptions) {
|
|
8
11
|
const oxc = await tryImport("oxc-transform");
|
|
9
12
|
if (!oxc) return {
|
|
@@ -17,6 +20,9 @@ async function oxcTransform(id, code, transformOptions) {
|
|
|
17
20
|
errors: result.errors.map((error) => error.message)
|
|
18
21
|
};
|
|
19
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Transform isolated declarations with `@swc/core`.
|
|
25
|
+
*/
|
|
20
26
|
async function swcTransform(id, code) {
|
|
21
27
|
const swc = await tryImport("@swc/core");
|
|
22
28
|
if (!swc) return {
|
|
@@ -46,6 +52,9 @@ async function swcTransform(id, code) {
|
|
|
46
52
|
};
|
|
47
53
|
}
|
|
48
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Transform isolated declarations with `typescript`.
|
|
57
|
+
*/
|
|
49
58
|
async function tsTransform(id, code, transformOptions, sourceMap) {
|
|
50
59
|
const ts = await tryImport("typescript");
|
|
51
60
|
if (!ts) return {
|
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-isolated-decl",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8",
|
|
4
4
|
"description": "A blazing-fast tool for generating isolated declarations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -63,35 +63,35 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"debug": "^4.4.0",
|
|
65
65
|
"magic-string": "^0.30.17",
|
|
66
|
-
"oxc-parser": "^0.
|
|
67
|
-
"oxc-transform": "^0.
|
|
68
|
-
"unplugin": "^2.
|
|
66
|
+
"oxc-parser": "^0.65.0",
|
|
67
|
+
"oxc-transform": "^0.65.0",
|
|
68
|
+
"unplugin": "^2.3.2",
|
|
69
69
|
"unplugin-utils": "^0.2.4"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@farmfe/core": "^1.7.
|
|
73
|
-
"@oxc-project/types": "^0.
|
|
72
|
+
"@farmfe/core": "^1.7.4",
|
|
73
|
+
"@oxc-project/types": "^0.65.0",
|
|
74
74
|
"@rollup/plugin-alias": "^5.1.1",
|
|
75
|
-
"@swc/core": "^1.11.
|
|
76
|
-
"@sxzz/eslint-config": "^6.1.
|
|
75
|
+
"@swc/core": "^1.11.21",
|
|
76
|
+
"@sxzz/eslint-config": "^6.1.2",
|
|
77
77
|
"@sxzz/prettier-config": "^2.2.1",
|
|
78
|
-
"@sxzz/test-utils": "^0.5.
|
|
78
|
+
"@sxzz/test-utils": "^0.5.5",
|
|
79
79
|
"@types/debug": "^4.1.12",
|
|
80
|
-
"@types/node": "^22.14.
|
|
80
|
+
"@types/node": "^22.14.1",
|
|
81
81
|
"bumpp": "^10.1.0",
|
|
82
|
-
"esbuild": "^0.25.
|
|
83
|
-
"eslint": "^9.
|
|
82
|
+
"esbuild": "^0.25.3",
|
|
83
|
+
"eslint": "^9.25.1",
|
|
84
84
|
"fast-glob": "^3.3.3",
|
|
85
85
|
"prettier": "^3.5.3",
|
|
86
|
-
"rolldown": "^1.0.0-beta.
|
|
87
|
-
"rollup": "^4.
|
|
88
|
-
"tinyglobby": "^0.2.
|
|
89
|
-
"tsdown": "^0.
|
|
86
|
+
"rolldown": "^1.0.0-beta.8",
|
|
87
|
+
"rollup": "^4.40.0",
|
|
88
|
+
"tinyglobby": "^0.2.13",
|
|
89
|
+
"tsdown": "^0.9.5",
|
|
90
90
|
"tsx": "^4.19.3",
|
|
91
|
-
"typescript": "^5.8.
|
|
92
|
-
"unplugin-oxc": "^0.3.
|
|
93
|
-
"vite": "^6.2
|
|
94
|
-
"vitest": "^3.1.
|
|
91
|
+
"typescript": "^5.8.3",
|
|
92
|
+
"unplugin-oxc": "^0.3.5",
|
|
93
|
+
"vite": "^6.3.2",
|
|
94
|
+
"vitest": "^3.1.2"
|
|
95
95
|
},
|
|
96
96
|
"engines": {
|
|
97
97
|
"node": ">=18.12.0"
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"lint": "eslint --cache .",
|
|
106
106
|
"lint:fix": "pnpm run lint --fix",
|
|
107
107
|
"build": "tsdown",
|
|
108
|
+
"dev": "tsdown --watch",
|
|
108
109
|
"test": "vitest",
|
|
109
110
|
"typecheck": "tsc --noEmit",
|
|
110
111
|
"release": "bumpp && pnpm publish"
|