unplugin-isolated-decl 0.15.5 → 0.15.6

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.
@@ -1 +1 @@
1
- export { oxcTransform, swcTransform, tsTransform } from "./core/transformer.js";
1
+ export { oxcTransform, swcTransform, tsTransform } from "./core/transformer.mjs";
package/dist/api.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { a as tsTransform, i as swcTransform, r as oxcTransform } from "./transformer-CDjTlq6t.mjs";
2
+
3
+ export { oxcTransform, swcTransform, tsTransform };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IsolatedDecl } from "./index.js";
6
+ import { IsolatedDecl } from "./index.mjs";
7
7
  /**
8
8
  * Esbuild plugin
9
9
  *
@@ -1,5 +1,5 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
3
 
4
4
  //#region src/esbuild.ts
5
5
  /**
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IsolatedDecl } from "./index.js";
6
+ import { IsolatedDecl } from "./index.mjs";
7
7
  /**
8
8
  * Farm plugin
9
9
  *
@@ -1,5 +1,5 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
3
 
4
4
  //#region src/farm.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { type UnpluginInstance } from "unplugin";
2
- import { type Options } from "./core/options.js";
2
+ import { type Options } from "./core/options.mjs";
3
3
  export type { Options };
4
4
  /**
5
5
  * The main unplugin instance.
package/dist/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
+
4
+ export { IsolatedDecl };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IsolatedDecl } from "./index.js";
6
+ import { IsolatedDecl } from "./index.mjs";
7
7
  /**
8
8
  * Rolldown plugin
9
9
  *
@@ -1,5 +1,5 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
3
 
4
4
  //#region src/rolldown.ts
5
5
  /**
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IsolatedDecl } from "./index.js";
6
+ import { IsolatedDecl } from "./index.mjs";
7
7
  /**
8
8
  * Rollup plugin
9
9
  *
@@ -1,5 +1,5 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
3
 
4
4
  //#region src/rollup.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
- import { a as tsTransform, i as swcTransform, n as generateDtsMap, r as oxcTransform, t as appendMapUrl } from "./transformer-DIxtVpUn.js";
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 { parseAsync } from "oxc-parser";
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";
@@ -175,7 +175,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
175
175
  context.error(errors[0]);
176
176
  return;
177
177
  }
178
- const { program } = await parseAsync(id, dts);
178
+ const { program } = await parse(id, dts);
179
179
  const imports = filterImports(program);
180
180
  const s = new MagicString(dts);
181
181
  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,
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IsolatedDecl } from "./index.js";
6
+ import { IsolatedDecl } from "./index.mjs";
7
7
  /**
8
8
  * Vite plugin
9
9
  *
@@ -1,5 +1,5 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
1
+ import "./transformer-CDjTlq6t.mjs";
2
+ import { t as IsolatedDecl } from "./src-CxymJW35.mjs";
3
3
 
4
4
  //#region src/vite.ts
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-isolated-decl",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "description": "A blazing-fast tool for generating isolated declarations.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -24,23 +24,23 @@
24
24
  "files": [
25
25
  "dist"
26
26
  ],
27
- "main": "./dist/index.js",
28
- "module": "./dist/index.js",
29
- "types": "./dist/index.d.ts",
27
+ "main": "./dist/index.mjs",
28
+ "module": "./dist/index.mjs",
29
+ "types": "./dist/index.d.mts",
30
30
  "exports": {
31
- ".": "./dist/index.js",
32
- "./vite": "./dist/vite.js",
33
- "./rollup": "./dist/rollup.js",
34
- "./rolldown": "./dist/rolldown.js",
35
- "./esbuild": "./dist/esbuild.js",
36
- "./farm": "./dist/farm.js",
37
- "./api": "./dist/api.js",
38
- "./*": "./*"
31
+ ".": "./dist/index.mjs",
32
+ "./api": "./dist/api.mjs",
33
+ "./esbuild": "./dist/esbuild.mjs",
34
+ "./farm": "./dist/farm.mjs",
35
+ "./rolldown": "./dist/rolldown.mjs",
36
+ "./rollup": "./dist/rollup.mjs",
37
+ "./vite": "./dist/vite.mjs",
38
+ "./package.json": "./package.json"
39
39
  },
40
40
  "typesVersions": {
41
41
  "*": {
42
42
  "*": [
43
- "./dist/*",
43
+ "./dist/*.d.mts",
44
44
  "./*"
45
45
  ]
46
46
  }
@@ -62,15 +62,15 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "magic-string": "^0.30.21",
65
- "obug": "^2.0.0-beta.1",
66
- "oxc-parser": ">=0.97.0",
67
- "oxc-transform": ">=0.97.0",
65
+ "obug": "^2.0.0",
66
+ "oxc-parser": ">=0.98.0",
67
+ "oxc-transform": ">=0.98.0",
68
68
  "unplugin": "^2.3.10",
69
69
  "unplugin-utils": "^0.3.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@farmfe/core": "^1.7.11",
73
- "@oxc-project/types": "^0.97.0",
73
+ "@oxc-project/types": "^0.98.0",
74
74
  "@rollup/plugin-alias": "^6.0.0",
75
75
  "@swc/core": "^1.15.2",
76
76
  "@sxzz/eslint-config": "^7.2.10",
@@ -86,12 +86,11 @@
86
86
  "rolldown": "^1.0.0-beta.50",
87
87
  "rollup": "^4.53.2",
88
88
  "tinyglobby": "^0.2.15",
89
- "tsdown": "^0.16.4",
90
- "tsx": "^4.20.6",
89
+ "tsdown": "^0.16.5",
91
90
  "typescript": "^5.9.3",
92
- "unplugin-oxc": "^0.5.4",
91
+ "unplugin-oxc": "^0.5.5",
93
92
  "vite": "^7.2.2",
94
- "vitest": "^4.0.9"
93
+ "vitest": "^4.0.10"
95
94
  },
96
95
  "engines": {
97
96
  "node": ">=20.18.0"
package/dist/api.js DELETED
@@ -1,3 +0,0 @@
1
- import { a as tsTransform, i as swcTransform, r as oxcTransform } from "./transformer-DIxtVpUn.js";
2
-
3
- export { oxcTransform, swcTransform, tsTransform };
package/dist/index.js DELETED
@@ -1,4 +0,0 @@
1
- import "./transformer-DIxtVpUn.js";
2
- import { t as IsolatedDecl } from "./src-B1bL5Pcm.js";
3
-
4
- export { IsolatedDecl };
File without changes
File without changes
File without changes