unplugin-isolated-decl 0.4.3 → 0.4.5
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/esbuild.cjs +1 -1
- package/dist/esbuild.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_index-XND_hrJh.cjs → src_index-5Xl2iCUQ.cjs} +13 -11
- package/dist/{src_index-2hhWj0Ml.js → src_index-QT5bMpQf.js} +13 -11
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/package.json +7 -7
package/dist/esbuild.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_transformer = require('./transformer-oh0-JTHH.cjs');
|
|
3
|
-
const require_src_index = require('./src_index-
|
|
3
|
+
const require_src_index = require('./src_index-5Xl2iCUQ.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/esbuild.ts
|
|
6
6
|
var esbuild_default = require_src_index.IsolatedDecl.esbuild;
|
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_transformer = require('./transformer-oh0-JTHH.cjs');
|
|
3
|
-
const require_src_index = require('./src_index-
|
|
3
|
+
const require_src_index = require('./src_index-5Xl2iCUQ.cjs');
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, 'IsolatedDecl', {
|
|
6
6
|
enumerable: true,
|
package/dist/index.js
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_transformer = require('./transformer-oh0-JTHH.cjs');
|
|
3
|
-
const require_src_index = require('./src_index-
|
|
3
|
+
const require_src_index = require('./src_index-5Xl2iCUQ.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown.ts
|
|
6
6
|
var rolldown_default = require_src_index.IsolatedDecl.rolldown;
|
package/dist/rolldown.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_transformer = require('./transformer-oh0-JTHH.cjs');
|
|
3
|
-
const require_src_index = require('./src_index-
|
|
3
|
+
const require_src_index = require('./src_index-5Xl2iCUQ.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.ts
|
|
6
6
|
var rollup_default = require_src_index.IsolatedDecl.rollup;
|
package/dist/rollup.js
CHANGED
|
@@ -90,21 +90,23 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
90
90
|
outExt = "ts";
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
const write = build.initialOptions.write ?? true;
|
|
94
|
+
if (write) {
|
|
94
95
|
if (!build.initialOptions.outdir) throw new Error("outdir is required when write is true");
|
|
95
|
-
for (const [filename, source] of Object.entries(outputFiles)) {
|
|
96
|
-
const outFile = `${path.relative(outBase, filename)}.d.${outExt}`;
|
|
97
|
-
const filePath = path.resolve(build.initialOptions.outdir, outFile);
|
|
98
|
-
await mkdir(path.dirname(filePath), { recursive: true });
|
|
99
|
-
await writeFile(filePath, source);
|
|
100
|
-
}
|
|
101
96
|
} else {
|
|
102
97
|
result.outputFiles ||= [];
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
}
|
|
99
|
+
const textEncoder = new TextEncoder();
|
|
100
|
+
for (const [filename, source] of Object.entries(outputFiles)) {
|
|
101
|
+
const outDir = build.initialOptions.outdir;
|
|
102
|
+
const outFile = `${path.relative(outBase, filename)}.d.${outExt}`;
|
|
103
|
+
const filePath = outDir ? path.resolve(outDir, outFile) : outFile;
|
|
104
|
+
if (write) {
|
|
105
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
106
|
+
await writeFile(filePath, source);
|
|
107
|
+
} else {
|
|
106
108
|
result.outputFiles.push({
|
|
107
|
-
path:
|
|
109
|
+
path: filePath,
|
|
108
110
|
contents: textEncoder.encode(source),
|
|
109
111
|
hash: "",
|
|
110
112
|
text: source
|
|
@@ -89,21 +89,23 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
89
89
|
outExt = "ts";
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
const write = build.initialOptions.write ?? true;
|
|
93
|
+
if (write) {
|
|
93
94
|
if (!build.initialOptions.outdir) throw new Error("outdir is required when write is true");
|
|
94
|
-
for (const [filename, source] of Object.entries(outputFiles)) {
|
|
95
|
-
const outFile = `${path.relative(outBase, filename)}.d.${outExt}`;
|
|
96
|
-
const filePath = path.resolve(build.initialOptions.outdir, outFile);
|
|
97
|
-
await mkdir(path.dirname(filePath), { recursive: true });
|
|
98
|
-
await writeFile(filePath, source);
|
|
99
|
-
}
|
|
100
95
|
} else {
|
|
101
96
|
result.outputFiles ||= [];
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
}
|
|
98
|
+
const textEncoder = new TextEncoder();
|
|
99
|
+
for (const [filename, source] of Object.entries(outputFiles)) {
|
|
100
|
+
const outDir = build.initialOptions.outdir;
|
|
101
|
+
const outFile = `${path.relative(outBase, filename)}.d.${outExt}`;
|
|
102
|
+
const filePath = outDir ? path.resolve(outDir, outFile) : outFile;
|
|
103
|
+
if (write) {
|
|
104
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
105
|
+
await writeFile(filePath, source);
|
|
106
|
+
} else {
|
|
105
107
|
result.outputFiles.push({
|
|
106
|
-
path:
|
|
108
|
+
path: filePath,
|
|
107
109
|
contents: textEncoder.encode(source),
|
|
108
110
|
hash: "",
|
|
109
111
|
text: source
|
package/dist/vite.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_transformer = require('./transformer-oh0-JTHH.cjs');
|
|
3
|
-
const require_src_index = require('./src_index-
|
|
3
|
+
const require_src_index = require('./src_index-5Xl2iCUQ.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/vite.ts
|
|
6
6
|
var vite_default = require_src_index.IsolatedDecl.vite;
|
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-isolated-decl",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "A blazing-fast tool for generating isolated declarations, powered by Oxc.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -81,22 +81,22 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@rollup/pluginutils": "^5.1.0",
|
|
84
|
-
"oxc-transform": "^0.
|
|
84
|
+
"oxc-transform": "^0.24.1",
|
|
85
85
|
"unplugin": "^1.12.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@swc/core": "^1.7.
|
|
88
|
+
"@swc/core": "^1.7.10",
|
|
89
89
|
"@sxzz/eslint-config": "^3.17.0",
|
|
90
90
|
"@sxzz/prettier-config": "^2.0.2",
|
|
91
|
-
"@types/node": "^20.14.
|
|
91
|
+
"@types/node": "^20.14.15",
|
|
92
92
|
"bumpp": "^9.4.2",
|
|
93
93
|
"esbuild": "^0.23.0",
|
|
94
|
-
"eslint": "^9.
|
|
94
|
+
"eslint": "^9.9.0",
|
|
95
95
|
"fast-glob": "^3.3.2",
|
|
96
96
|
"prettier": "^3.3.3",
|
|
97
97
|
"rollup": "^4.20.0",
|
|
98
|
-
"tsdown": "^0.2.
|
|
99
|
-
"tsx": "^4.
|
|
98
|
+
"tsdown": "^0.2.5",
|
|
99
|
+
"tsx": "^4.17.0",
|
|
100
100
|
"typescript": "^5.5.4",
|
|
101
101
|
"vite": "^5.4.0",
|
|
102
102
|
"vitest": "^2.0.5"
|