unplugin-isolated-decl 0.10.5 → 0.10.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/README.md +1 -1
- package/dist/core/options.d.cts +1 -1
- package/dist/core/options.d.ts +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/farm.cjs +1 -1
- package/dist/farm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.js +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.js +1 -1
- package/dist/{src-DJODA3hJ.js → src-BKZ7wewR.js} +3 -3
- package/dist/{src-CiuRRYoo.cjs → src-CimtWZd6.cjs} +4 -4
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ export interface Options {
|
|
|
102
102
|
enforce?: 'pre' | 'post' | undefined
|
|
103
103
|
/**
|
|
104
104
|
* You need to install one of the supported transformers yourself.
|
|
105
|
-
* oxc:
|
|
105
|
+
* oxc: oxc-transform
|
|
106
106
|
* swc: @swc/core
|
|
107
107
|
* typescript: typescript
|
|
108
108
|
*
|
package/dist/core/options.d.cts
CHANGED
package/dist/core/options.d.ts
CHANGED
package/dist/esbuild.cjs
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/farm.cjs
CHANGED
package/dist/farm.js
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/rolldown.cjs
CHANGED
package/dist/rolldown.js
CHANGED
package/dist/rollup.cjs
CHANGED
package/dist/rollup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { appendMapUrl, generateDtsMap, oxcTransform, swcTransform, tsTransform } from "./transformer-CBYRFUWY.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
|
-
import { createFilter } from "@rollup/pluginutils";
|
|
5
4
|
import MagicString from "magic-string";
|
|
6
5
|
import { parseAsync } from "oxc-parser";
|
|
7
6
|
import { createUnplugin } from "unplugin";
|
|
7
|
+
import { createFilter } from "unplugin-utils";
|
|
8
8
|
import Debug from "debug";
|
|
9
9
|
|
|
10
10
|
//#region src/core/utils.ts
|
|
@@ -19,7 +19,7 @@ function lowestCommonAncestor(...filepaths) {
|
|
|
19
19
|
const directories = filepath.split("/", ancestor.length);
|
|
20
20
|
let index = 0;
|
|
21
21
|
for (const directory of directories) if (directory === ancestor[index]) index += 1;
|
|
22
|
-
else {
|
|
22
|
+
else {
|
|
23
23
|
ancestor = ancestor.slice(0, index);
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
@@ -163,7 +163,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
163
163
|
const { code: dts, errors, map } = result;
|
|
164
164
|
debug(label, "transformed", id, errors.length ? "with errors" : "successfully");
|
|
165
165
|
if (errors.length) if (options.ignoreErrors) context.warn(errors[0]);
|
|
166
|
-
else {
|
|
166
|
+
else {
|
|
167
167
|
context.error(errors[0]);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
const require_transformer = require('./transformer-DzpBM_tn.cjs');
|
|
3
3
|
const node_path = require_transformer.__toESM(require("node:path"));
|
|
4
4
|
const node_fs_promises = require_transformer.__toESM(require("node:fs/promises"));
|
|
5
|
-
const __rollup_pluginutils = require_transformer.__toESM(require("@rollup/pluginutils"));
|
|
6
5
|
const magic_string = require_transformer.__toESM(require("magic-string"));
|
|
7
6
|
const oxc_parser = require_transformer.__toESM(require("oxc-parser"));
|
|
8
7
|
const unplugin = require_transformer.__toESM(require("unplugin"));
|
|
8
|
+
const unplugin_utils = require_transformer.__toESM(require("unplugin-utils"));
|
|
9
9
|
const debug = require_transformer.__toESM(require("debug"));
|
|
10
10
|
|
|
11
11
|
//#region src/core/utils.ts
|
|
@@ -20,7 +20,7 @@ function lowestCommonAncestor(...filepaths) {
|
|
|
20
20
|
const directories = filepath.split("/", ancestor.length);
|
|
21
21
|
let index = 0;
|
|
22
22
|
for (const directory of directories) if (directory === ancestor[index]) index += 1;
|
|
23
|
-
else {
|
|
23
|
+
else {
|
|
24
24
|
ancestor = ancestor.slice(0, index);
|
|
25
25
|
break;
|
|
26
26
|
}
|
|
@@ -112,7 +112,7 @@ function resolveOptions(options) {
|
|
|
112
112
|
//#region src/index.ts
|
|
113
113
|
const IsolatedDecl = (0, unplugin.createUnplugin)((rawOptions = {}) => {
|
|
114
114
|
const options = resolveOptions(rawOptions);
|
|
115
|
-
const filter = (0,
|
|
115
|
+
const filter = (0, unplugin_utils.createFilter)(options.include, options.exclude);
|
|
116
116
|
let farmPluginContext;
|
|
117
117
|
let outputFiles = Object.create(null);
|
|
118
118
|
function addOutput(filename, output) {
|
|
@@ -164,7 +164,7 @@ const IsolatedDecl = (0, unplugin.createUnplugin)((rawOptions = {}) => {
|
|
|
164
164
|
const { code: dts, errors, map } = result;
|
|
165
165
|
debug$1(label, "transformed", id, errors.length ? "with errors" : "successfully");
|
|
166
166
|
if (errors.length) if (options.ignoreErrors) context.warn(errors[0]);
|
|
167
|
-
else {
|
|
167
|
+
else {
|
|
168
168
|
context.error(errors[0]);
|
|
169
169
|
return;
|
|
170
170
|
}
|
package/dist/vite.cjs
CHANGED
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-isolated-decl",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"description": "A blazing-fast tool for generating isolated declarations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -88,37 +88,37 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@rollup/pluginutils": "^5.1.4",
|
|
92
91
|
"debug": "^4.4.0",
|
|
93
92
|
"magic-string": "^0.30.17",
|
|
94
|
-
"oxc-parser": "^0.
|
|
95
|
-
"unplugin": "^2.1.2"
|
|
93
|
+
"oxc-parser": "^0.48.2",
|
|
94
|
+
"unplugin": "^2.1.2",
|
|
95
|
+
"unplugin-utils": "^0.2.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@farmfe/core": "^1.6.
|
|
99
|
-
"@oxc-project/types": "^0.
|
|
98
|
+
"@farmfe/core": "^1.6.6",
|
|
99
|
+
"@oxc-project/types": "^0.48.2",
|
|
100
100
|
"@rollup/plugin-alias": "^5.1.1",
|
|
101
|
-
"@swc/core": "^1.10.
|
|
102
|
-
"@sxzz/eslint-config": "^
|
|
103
|
-
"@sxzz/prettier-config": "^2.
|
|
104
|
-
"@sxzz/test-utils": "^0.
|
|
101
|
+
"@swc/core": "^1.10.14",
|
|
102
|
+
"@sxzz/eslint-config": "^5.0.1",
|
|
103
|
+
"@sxzz/prettier-config": "^2.1.1",
|
|
104
|
+
"@sxzz/test-utils": "^0.5.1",
|
|
105
105
|
"@types/debug": "^4.1.12",
|
|
106
|
-
"@types/node": "^22.
|
|
107
|
-
"bumpp": "^
|
|
106
|
+
"@types/node": "^22.13.1",
|
|
107
|
+
"bumpp": "^10.0.2",
|
|
108
108
|
"esbuild": "^0.24.2",
|
|
109
|
-
"eslint": "^9.
|
|
109
|
+
"eslint": "^9.19.0",
|
|
110
110
|
"fast-glob": "^3.3.3",
|
|
111
|
-
"oxc-transform": "^0.
|
|
111
|
+
"oxc-transform": "^0.48.2",
|
|
112
112
|
"prettier": "^3.4.2",
|
|
113
|
-
"rolldown": "^1.0.0-beta.
|
|
114
|
-
"rollup": "^4.
|
|
113
|
+
"rolldown": "^1.0.0-beta.3",
|
|
114
|
+
"rollup": "^4.34.4",
|
|
115
115
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
116
116
|
"tinyglobby": "^0.2.10",
|
|
117
|
-
"tsdown": "^0.5.
|
|
117
|
+
"tsdown": "^0.5.7",
|
|
118
118
|
"tsx": "^4.19.2",
|
|
119
119
|
"typescript": "^5.7.3",
|
|
120
|
-
"vite": "^6.0
|
|
121
|
-
"vitest": "^
|
|
120
|
+
"vite": "^6.1.0",
|
|
121
|
+
"vitest": "^3.0.5"
|
|
122
122
|
},
|
|
123
123
|
"engines": {
|
|
124
124
|
"node": ">=18.12.0"
|