unplugin-isolated-decl 0.15.5 → 0.15.7
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.d.ts → api.d.mts} +1 -1
- package/dist/api.mjs +3 -0
- package/dist/core/{options.d.ts → options.d.mts} +1 -1
- package/dist/{esbuild.d.ts → esbuild.d.mts} +1 -1
- package/dist/{esbuild.js → esbuild.mjs} +1 -2
- package/dist/{farm.d.ts → farm.d.mts} +1 -1
- package/dist/{farm.js → farm.mjs} +1 -2
- package/dist/{index.d.ts → index.d.mts} +1 -1
- package/dist/index.mjs +3 -0
- package/dist/{rolldown.d.ts → rolldown.d.mts} +1 -1
- package/dist/{rolldown.js → rolldown.mjs} +1 -2
- package/dist/{rollup.d.ts → rollup.d.mts} +1 -1
- package/dist/{rollup.js → rollup.mjs} +1 -2
- package/dist/{src-B1bL5Pcm.js → src-BYD-yWlY.mjs} +11 -6
- package/dist/{transformer-DIxtVpUn.js → transformer-CDjTlq6t.mjs} +1 -1
- package/dist/{vite.d.ts → vite.d.mts} +1 -1
- package/dist/{vite.js → vite.mjs} +1 -2
- package/package.json +54 -54
- package/dist/api.js +0 -3
- package/dist/index.js +0 -4
- /package/dist/core/{ast.d.ts → ast.d.mts} +0 -0
- /package/dist/core/{transformer.d.ts → transformer.d.mts} +0 -0
- /package/dist/core/{utils.d.ts → utils.d.mts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export { oxcTransform, swcTransform, tsTransform } from "./core/transformer.
|
|
1
|
+
export { oxcTransform, swcTransform, tsTransform } from "./core/transformer.mjs";
|
package/dist/api.mjs
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IsolatedDeclarationsOptions } from "oxc-transform";
|
|
2
2
|
import type { TranspileOptions } from "typescript";
|
|
3
|
-
import type { FilterPattern } from "unplugin
|
|
3
|
+
import type { FilterPattern } from "unplugin";
|
|
4
4
|
/**
|
|
5
5
|
* Represents the options for the plugin.
|
|
6
6
|
*/
|
package/dist/index.mjs
ADDED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as tsTransform, i as swcTransform, n as generateDtsMap, r as oxcTransform, t as appendMapUrl } from "./transformer-
|
|
1
|
+
import { a as tsTransform, i as swcTransform, n as generateDtsMap, r as oxcTransform, t as appendMapUrl } from "./transformer-CDjTlq6t.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import MagicString from "magic-string";
|
|
5
|
-
import {
|
|
5
|
+
import { parse } from "oxc-parser";
|
|
6
6
|
import { createUnplugin } from "unplugin";
|
|
7
7
|
import { createFilter } from "unplugin-utils";
|
|
8
8
|
import { createDebug } from "obug";
|
|
@@ -136,9 +136,14 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
136
136
|
farmPluginContext = this;
|
|
137
137
|
outputFiles = Object.create(null);
|
|
138
138
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
transform: {
|
|
140
|
+
filter: { id: {
|
|
141
|
+
include: options.include,
|
|
142
|
+
exclude: options.exclude
|
|
143
|
+
} },
|
|
144
|
+
handler(code, id) {
|
|
145
|
+
return transform(this, code, id);
|
|
146
|
+
}
|
|
142
147
|
},
|
|
143
148
|
esbuild: { setup: esbuildSetup },
|
|
144
149
|
rollup,
|
|
@@ -175,7 +180,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
175
180
|
context.error(errors[0]);
|
|
176
181
|
return;
|
|
177
182
|
}
|
|
178
|
-
const { program } = await
|
|
183
|
+
const { program } = await parse(id, dts);
|
|
179
184
|
const imports = filterImports(program);
|
|
180
185
|
const s = new MagicString(dts);
|
|
181
186
|
for (const i of imports) {
|
|
@@ -13,7 +13,7 @@ async function oxcTransform(id, code, transformOptions) {
|
|
|
13
13
|
code: "",
|
|
14
14
|
errors: ["oxc-transform is required for transforming TypeScript, please install `oxc-transform`."]
|
|
15
15
|
};
|
|
16
|
-
const result = oxc.isolatedDeclaration(id, code, transformOptions);
|
|
16
|
+
const result = await oxc.isolatedDeclaration(id, code, transformOptions);
|
|
17
17
|
return {
|
|
18
18
|
...result,
|
|
19
19
|
map: result.map?.mappings,
|
package/package.json
CHANGED
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-isolated-decl",
|
|
3
|
-
"version": "0.15.5",
|
|
4
|
-
"description": "A blazing-fast tool for generating isolated declarations.",
|
|
5
3
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"vite",
|
|
10
|
-
"esbuild",
|
|
11
|
-
"webpack"
|
|
12
|
-
],
|
|
4
|
+
"version": "0.15.7",
|
|
5
|
+
"description": "A blazing-fast tool for generating isolated declarations.",
|
|
6
|
+
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
13
7
|
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/sponsors/sxzz",
|
|
14
9
|
"homepage": "https://github.com/unplugin/unplugin-isolated-decl#readme",
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/unplugin/unplugin-isolated-decl/issues"
|
|
17
|
-
},
|
|
18
10
|
"repository": {
|
|
19
11
|
"type": "git",
|
|
20
12
|
"url": "git+https://github.com/unplugin/unplugin-isolated-decl.git"
|
|
21
13
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/unplugin/unplugin-isolated-decl/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"unplugin",
|
|
19
|
+
"rollup",
|
|
20
|
+
"vite",
|
|
21
|
+
"esbuild",
|
|
22
|
+
"webpack"
|
|
26
23
|
],
|
|
27
|
-
"main": "./dist/index.js",
|
|
28
|
-
"module": "./dist/index.js",
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
24
|
"exports": {
|
|
31
|
-
".": "./dist/index.
|
|
32
|
-
"./
|
|
33
|
-
"./
|
|
34
|
-
"./
|
|
35
|
-
"./
|
|
36
|
-
"./
|
|
37
|
-
"./
|
|
38
|
-
"
|
|
25
|
+
".": "./dist/index.mjs",
|
|
26
|
+
"./api": "./dist/api.mjs",
|
|
27
|
+
"./esbuild": "./dist/esbuild.mjs",
|
|
28
|
+
"./farm": "./dist/farm.mjs",
|
|
29
|
+
"./rolldown": "./dist/rolldown.mjs",
|
|
30
|
+
"./rollup": "./dist/rollup.mjs",
|
|
31
|
+
"./vite": "./dist/vite.mjs",
|
|
32
|
+
"./package.json": "./package.json"
|
|
39
33
|
},
|
|
34
|
+
"main": "./dist/index.mjs",
|
|
35
|
+
"module": "./dist/index.mjs",
|
|
36
|
+
"types": "./dist/index.d.mts",
|
|
40
37
|
"typesVersions": {
|
|
41
38
|
"*": {
|
|
42
39
|
"*": [
|
|
43
|
-
"./dist
|
|
40
|
+
"./dist/*.d.mts",
|
|
44
41
|
"./*"
|
|
45
42
|
]
|
|
46
43
|
}
|
|
47
44
|
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=20.19.0"
|
|
53
|
+
},
|
|
51
54
|
"peerDependencies": {
|
|
52
55
|
"@swc/core": "^1.6.6",
|
|
53
56
|
"typescript": "^5.5.2"
|
|
@@ -62,39 +65,36 @@
|
|
|
62
65
|
},
|
|
63
66
|
"dependencies": {
|
|
64
67
|
"magic-string": "^0.30.21",
|
|
65
|
-
"obug": "^2.
|
|
66
|
-
"oxc-parser": ">=0.
|
|
67
|
-
"oxc-transform": ">=0.
|
|
68
|
-
"unplugin": "^2.3.
|
|
68
|
+
"obug": "^2.1.1",
|
|
69
|
+
"oxc-parser": ">=0.103.0",
|
|
70
|
+
"oxc-transform": ">=0.103.0",
|
|
71
|
+
"unplugin": "^2.3.11",
|
|
69
72
|
"unplugin-utils": "^0.3.1"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
75
|
"@farmfe/core": "^1.7.11",
|
|
73
|
-
"@oxc-project/types": "^0.
|
|
76
|
+
"@oxc-project/types": "^0.103.0",
|
|
74
77
|
"@rollup/plugin-alias": "^6.0.0",
|
|
75
|
-
"@swc/core": "^1.15.
|
|
76
|
-
"@sxzz/eslint-config": "^7.
|
|
77
|
-
"@sxzz/prettier-config": "^2.2.
|
|
78
|
-
"@sxzz/test-utils": "^0.5.
|
|
79
|
-
"@types/node": "^
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
78
|
+
"@swc/core": "^1.15.5",
|
|
79
|
+
"@sxzz/eslint-config": "^7.4.3",
|
|
80
|
+
"@sxzz/prettier-config": "^2.2.6",
|
|
81
|
+
"@sxzz/test-utils": "^0.5.14",
|
|
82
|
+
"@types/node": "^25.0.2",
|
|
83
|
+
"@typescript/native-preview": "7.0.0-dev.20251215.1",
|
|
84
|
+
"bumpp": "^10.3.2",
|
|
85
|
+
"esbuild": "^0.27.1",
|
|
86
|
+
"eslint": "^9.39.2",
|
|
83
87
|
"fast-glob": "^3.3.3",
|
|
84
|
-
"prettier": "^3.
|
|
85
|
-
"publint": "^0.3.
|
|
86
|
-
"rolldown": "^1.0.0-beta.
|
|
87
|
-
"rollup": "^4.53.
|
|
88
|
+
"prettier": "^3.7.4",
|
|
89
|
+
"publint": "^0.3.16",
|
|
90
|
+
"rolldown": "^1.0.0-beta.54",
|
|
91
|
+
"rollup": "^4.53.4",
|
|
88
92
|
"tinyglobby": "^0.2.15",
|
|
89
|
-
"tsdown": "^0.
|
|
90
|
-
"tsx": "^4.20.6",
|
|
93
|
+
"tsdown": "^0.18.0",
|
|
91
94
|
"typescript": "^5.9.3",
|
|
92
|
-
"unplugin-oxc": "^0.5.
|
|
93
|
-
"vite": "^7.
|
|
94
|
-
"vitest": "^4.0.
|
|
95
|
-
},
|
|
96
|
-
"engines": {
|
|
97
|
-
"node": ">=20.18.0"
|
|
95
|
+
"unplugin-oxc": "^0.5.6",
|
|
96
|
+
"vite": "^7.3.0",
|
|
97
|
+
"vitest": "^4.0.15"
|
|
98
98
|
},
|
|
99
99
|
"resolutions": {
|
|
100
100
|
"@changesets/cli": "-",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"build": "tsdown",
|
|
108
108
|
"dev": "tsdown --watch",
|
|
109
109
|
"test": "vitest",
|
|
110
|
-
"typecheck": "
|
|
110
|
+
"typecheck": "tsgo --noEmit",
|
|
111
111
|
"release": "bumpp"
|
|
112
112
|
}
|
|
113
113
|
}
|
package/dist/api.js
DELETED
package/dist/index.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|