unplugin-isolated-decl 0.16.0 → 0.17.0

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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as tsTransform, i as swcTransform, r as oxcTransform } from "./transformer-UfUlpcf6.mjs";
1
+ import { a as tsTransform, i as swcTransform, r as oxcTransform } from "./transformer-C8I6UHef.mjs";
2
2
  export { oxcTransform, swcTransform, tsTransform };
package/dist/esbuild.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  //#region src/esbuild.ts
3
3
  /**
4
4
  * This entry file is for esbuild plugin.
package/dist/farm.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  //#region src/farm.ts
3
3
  /**
4
4
  * This entry file is for Farm plugin.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  export { IsolatedDecl };
package/dist/rolldown.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  //#region src/rolldown.ts
3
3
  /**
4
4
  * This entry file is for Rolldown plugin.
package/dist/rollup.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  //#region src/rollup.ts
3
3
  /**
4
4
  * This entry file is for Rollup plugin.
@@ -1,4 +1,4 @@
1
- import { a as tsTransform, i as swcTransform, n as generateDtsMap, r as oxcTransform, t as appendMapUrl } from "./transformer-UfUlpcf6.mjs";
1
+ import { a as tsTransform, i as swcTransform, n as generateDtsMap, r as oxcTransform, t as appendMapUrl } from "./transformer-C8I6UHef.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";
@@ -256,7 +256,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
256
256
  const { inputBase, entryMap } = resolveEntry(input, options.inputBase);
257
257
  debug("[farm] input base:", inputBase);
258
258
  if (output && typeof output.entryFilename !== "string") return console.error("entryFileName must be a string");
259
- const extFormatMap = new Map([
259
+ const extFormatMap = /* @__PURE__ */ new Map([
260
260
  ["cjs", "cjs"],
261
261
  ["esm", "js"],
262
262
  ["mjs", "js"]
@@ -290,8 +290,8 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
290
290
  build.onEnd(async (result) => {
291
291
  const esbuildOptions = build.initialOptions;
292
292
  const entries = esbuildOptions.entryPoints;
293
- if (!entries || !Array.isArray(entries) || !entries.every((entry) => typeof entry === "string")) throw new Error("unsupported entryPoints, must be an string[]");
294
- const inputBase = options.inputBase || lowestCommonAncestor(...entries);
293
+ if (!entries || !Array.isArray(entries) || entries.some((entry) => typeof entry !== "string")) throw new Error("unsupported entryPoints, must be an string[]");
294
+ const inputBase = options.inputBase || lowestCommonAncestor(...entries.map((entry) => typeof entry === "string" ? entry : entry.in));
295
295
  debug("[esbuild] input base:", inputBase);
296
296
  const jsExt = esbuildOptions.outExtension?.[".js"];
297
297
  let outExt;
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as IsolatedDecl } from "./src-C4IZ1TdD.mjs";
1
+ import { t as IsolatedDecl } from "./src-BKCZkyQU.mjs";
2
2
  //#region src/vite.ts
3
3
  /**
4
4
  * This entry file is for Vite plugin.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-isolated-decl",
3
3
  "type": "module",
4
- "version": "0.16.0",
4
+ "version": "0.17.0",
5
5
  "description": "A blazing-fast tool for generating isolated declarations.",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "access": "public"
47
47
  },
48
48
  "engines": {
49
- "node": "^20.19.0 || >=22.12.0"
49
+ "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@swc/core": "^1.6.6",
@@ -61,37 +61,37 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "magic-string": "^0.30.21",
65
- "obug": "^2.1.1",
66
- "oxc-parser": ">=0.127.0",
67
- "oxc-transform": ">=0.127.0",
68
- "unplugin": "^3.0.0",
69
- "unplugin-utils": "^0.3.1"
64
+ "magic-string": "^1.1.0",
65
+ "obug": "^2.1.4",
66
+ "oxc-parser": ">=0.141.0",
67
+ "oxc-transform": ">=0.141.0",
68
+ "unplugin": "^3.3.0",
69
+ "unplugin-utils": "^0.3.2"
70
70
  },
71
71
  "devDependencies": {
72
- "@arethetypeswrong/core": "^0.18.2",
72
+ "@arethetypeswrong/core": "^0.18.5",
73
73
  "@farmfe/core": "^1.7.11",
74
- "@oxc-project/types": "^0.127.0",
74
+ "@oxc-project/types": "^0.141.0",
75
75
  "@rollup/plugin-alias": "^6.0.0",
76
- "@swc/core": "^1.15.30",
77
- "@sxzz/eslint-config": "^7.8.4",
78
- "@sxzz/prettier-config": "^2.3.1",
79
- "@sxzz/test-utils": "^0.5.16",
80
- "@types/node": "^25.6.0",
81
- "@typescript/native-preview": "7.0.0-dev.20260422.1",
82
- "bumpp": "^11.0.1",
83
- "esbuild": "^0.28.0",
84
- "eslint": "^10.2.1",
85
- "prettier": "^3.8.3",
86
- "publint": "^0.3.18",
87
- "rolldown": "^1.0.0-rc.17",
88
- "rollup": "^4.60.2",
89
- "tinyglobby": "^0.2.16",
90
- "tsdown": "^0.21.9",
76
+ "@swc/core": "^1.15.46",
77
+ "@sxzz/eslint-config": "^8.3.1",
78
+ "@sxzz/prettier-config": "^2.3.2",
79
+ "@sxzz/test-utils": "^0.5.18",
80
+ "@types/node": "^26.1.1",
81
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
82
+ "bumpp": "^12.0.0",
83
+ "esbuild": "^0.28.1",
84
+ "eslint": "^10.7.0",
85
+ "prettier": "^3.9.6",
86
+ "publint": "^0.3.22",
87
+ "rolldown": "^1.2.0",
88
+ "rollup": "^4.62.2",
89
+ "tinyglobby": "^0.2.17",
90
+ "tsdown": "^0.22.14",
91
91
  "typescript": "^6.0.3",
92
- "unplugin-oxc": "^0.6.0",
93
- "vite": "^8.0.9",
94
- "vitest": "^4.1.5"
92
+ "unplugin-oxc": "^0.6.1",
93
+ "vite": "^8.1.5",
94
+ "vitest": "^4.1.10"
95
95
  },
96
96
  "resolutions": {
97
97
  "@changesets/cli": "-",
@@ -101,6 +101,7 @@
101
101
  "scripts": {
102
102
  "lint": "eslint --cache .",
103
103
  "lint:fix": "pnpm run lint --fix",
104
+ "format": "prettier --write .",
104
105
  "build": "tsdown",
105
106
  "dev": "tsdown --watch",
106
107
  "test": "vitest",