unplugin-oxc 0.5.7 → 0.6.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 +1 -1
- package/dist/esbuild.d.mts +1 -2
- package/dist/esbuild.mjs +2 -5
- package/dist/farm.d.mts +1 -2
- package/dist/farm.mjs +2 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -3
- package/dist/rolldown.d.mts +1 -2
- package/dist/rolldown.mjs +2 -5
- package/dist/rollup.d.mts +1 -2
- package/dist/rollup.mjs +2 -5
- package/dist/rspack.d.mts +1 -2
- package/dist/rspack.mjs +2 -5
- package/dist/{src-CC29LGxl.mjs → src-BevZPMjm.mjs} +3 -8
- package/dist/unloader.d.mts +1 -2
- package/dist/unloader.mjs +2 -5
- package/dist/vite.d.mts +1 -2
- package/dist/vite.mjs +2 -5
- package/dist/webpack.d.mts +1 -2
- package/dist/webpack.mjs +2 -5
- package/package.json +19 -26
- /package/dist/{index-Bkkz82qt.d.mts → index-DcCXhNky.d.mts} +0 -0
package/dist/api.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
package/dist/esbuild.d.mts
CHANGED
package/dist/esbuild.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/esbuild.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for esbuild plugin. Requires esbuild >= 0.15
|
|
@@ -18,7 +17,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
18
17
|
```
|
|
19
18
|
*/
|
|
20
19
|
const esbuild = Oxc.esbuild;
|
|
21
|
-
var esbuild_default = esbuild;
|
|
22
|
-
|
|
23
20
|
//#endregion
|
|
24
|
-
export {
|
|
21
|
+
export { esbuild as default, esbuild as "module.exports" };
|
package/dist/farm.d.mts
CHANGED
package/dist/farm.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/farm.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Farm plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const farm = Oxc.farm;
|
|
23
|
-
var farm_default = farm;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { farm as default, farm as "module.exports" };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Oxc } from "./index-
|
|
1
|
+
import { t as Oxc } from "./index-DcCXhNky.mjs";
|
|
2
2
|
export { Oxc };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
3
|
-
export { Oxc };
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
2
|
+
export { Oxc };
|
package/dist/rolldown.d.mts
CHANGED
package/dist/rolldown.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/rolldown.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Rolldown plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const rolldown = Oxc.rolldown;
|
|
23
|
-
var rolldown_default = rolldown;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { rolldown as default, rolldown as "module.exports" };
|
package/dist/rollup.d.mts
CHANGED
package/dist/rollup.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/rollup.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Rollup plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const rollup = Oxc.rollup;
|
|
23
|
-
var rollup_default = rollup;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { rollup as default, rollup as "module.exports" };
|
package/dist/rspack.d.mts
CHANGED
package/dist/rspack.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/rspack.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Rspack plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const rspack = Oxc.rspack;
|
|
23
|
-
var rspack_default = rspack;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { rspack as default, rspack as "module.exports" };
|
|
@@ -4,13 +4,11 @@ import process from "node:process";
|
|
|
4
4
|
import { ResolverFactory } from "oxc-resolver";
|
|
5
5
|
import { transformSync } from "oxc-transform";
|
|
6
6
|
import { createUnplugin } from "unplugin";
|
|
7
|
-
|
|
8
7
|
//#region node_modules/.pnpm/@antfu+utils@9.3.0/node_modules/@antfu/utils/dist/index.mjs
|
|
9
8
|
function toArray(array) {
|
|
10
9
|
array = array ?? [];
|
|
11
10
|
return Array.isArray(array) ? array : [array];
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
13
|
//#region src/core/options.ts
|
|
16
14
|
function resolveOptions(options, framework) {
|
|
@@ -25,7 +23,6 @@ function resolveOptions(options, framework) {
|
|
|
25
23
|
sourcemap: options.sourcemap ?? framework === "unloader"
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
|
-
|
|
29
26
|
//#endregion
|
|
30
27
|
//#region src/core/utils.ts
|
|
31
28
|
function getModuleFormat(id) {
|
|
@@ -39,12 +36,11 @@ function getModuleFormat(id) {
|
|
|
39
36
|
case ".tsx": return "module";
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
|
-
|
|
43
39
|
//#endregion
|
|
44
40
|
//#region src/index.ts
|
|
45
41
|
const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
46
42
|
const options = resolveOptions(rawOptions, framework);
|
|
47
|
-
const resolveId = options.resolve === false ? void 0 : (id, importer, resolveOptions
|
|
43
|
+
const resolveId = options.resolve === false ? void 0 : (id, importer, resolveOptions) => {
|
|
48
44
|
if (!options.resolveNodeModules && id[0] !== "." && !path.isAbsolute(id)) return;
|
|
49
45
|
const resolver = new ResolverFactory({
|
|
50
46
|
extensions: [
|
|
@@ -56,7 +52,7 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
|
56
52
|
".json",
|
|
57
53
|
".node"
|
|
58
54
|
],
|
|
59
|
-
conditionNames: resolveOptions
|
|
55
|
+
conditionNames: resolveOptions?.conditions ? Array.from(resolveOptions.conditions) : [
|
|
60
56
|
"import",
|
|
61
57
|
"require",
|
|
62
58
|
"browser",
|
|
@@ -157,6 +153,5 @@ function guessSourceType(id, format) {
|
|
|
157
153
|
const moduleFormat = getModuleFormat(id);
|
|
158
154
|
if (moduleFormat) return moduleFormat === "module" ? "module" : "script";
|
|
159
155
|
}
|
|
160
|
-
|
|
161
156
|
//#endregion
|
|
162
|
-
export { Oxc as t };
|
|
157
|
+
export { Oxc as t };
|
package/dist/unloader.d.mts
CHANGED
package/dist/unloader.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/unloader.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Unloader plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const unloader = Oxc.unloader;
|
|
23
|
-
var unloader_default = unloader;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { unloader as default, unloader as "module.exports" };
|
package/dist/vite.d.mts
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/vite.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for Vite plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const vite = Oxc.vite;
|
|
23
|
-
var vite_default = vite;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { vite as default, vite as "module.exports" };
|
package/dist/webpack.d.mts
CHANGED
package/dist/webpack.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as Oxc } from "./src-
|
|
2
|
-
|
|
1
|
+
import { t as Oxc } from "./src-BevZPMjm.mjs";
|
|
3
2
|
//#region src/webpack.ts
|
|
4
3
|
/**
|
|
5
4
|
* This entry file is for webpack plugin.
|
|
@@ -20,7 +19,5 @@ import { t as Oxc } from "./src-CC29LGxl.mjs";
|
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
const webpack = Oxc.webpack;
|
|
23
|
-
var webpack_default = webpack;
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
|
-
export {
|
|
23
|
+
export { webpack as default, webpack as "module.exports" };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-oxc",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "Oxc integration for unplugin.",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,17 +37,6 @@
|
|
|
37
37
|
"./webpack": "./dist/webpack.mjs",
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
|
-
"main": "./dist/index.mjs",
|
|
41
|
-
"module": "./dist/index.mjs",
|
|
42
|
-
"types": "./dist/index.d.mts",
|
|
43
|
-
"typesVersions": {
|
|
44
|
-
"*": {
|
|
45
|
-
"*": [
|
|
46
|
-
"./dist/*",
|
|
47
|
-
"./*"
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
40
|
"files": [
|
|
52
41
|
"dist"
|
|
53
42
|
],
|
|
@@ -66,27 +55,31 @@
|
|
|
66
55
|
}
|
|
67
56
|
},
|
|
68
57
|
"dependencies": {
|
|
69
|
-
"oxc-minify": ">=0.
|
|
70
|
-
"oxc-resolver": "^11.
|
|
71
|
-
"oxc-transform": ">=0.
|
|
72
|
-
"unplugin": "^
|
|
58
|
+
"oxc-minify": ">=0.116.0",
|
|
59
|
+
"oxc-resolver": "^11.19.1",
|
|
60
|
+
"oxc-transform": ">=0.116.0",
|
|
61
|
+
"unplugin": "^3.0.0"
|
|
62
|
+
},
|
|
63
|
+
"inlinedDependencies": {
|
|
64
|
+
"@antfu/utils": "9.3.0"
|
|
73
65
|
},
|
|
74
66
|
"devDependencies": {
|
|
75
67
|
"@antfu/utils": "^9.3.0",
|
|
76
|
-
"@sxzz/eslint-config": "^7.
|
|
77
|
-
"@sxzz/prettier-config": "^2.
|
|
68
|
+
"@sxzz/eslint-config": "^7.8.3",
|
|
69
|
+
"@sxzz/prettier-config": "^2.3.1",
|
|
78
70
|
"@sxzz/test-utils": "^0.5.15",
|
|
79
|
-
"@types/node": "^25.
|
|
80
|
-
"bumpp": "^10.
|
|
81
|
-
"eslint": "^
|
|
82
|
-
"prettier": "^3.
|
|
83
|
-
"rollup": "^4.
|
|
71
|
+
"@types/node": "^25.3.5",
|
|
72
|
+
"bumpp": "^10.4.1",
|
|
73
|
+
"eslint": "^10.0.3",
|
|
74
|
+
"prettier": "^3.8.1",
|
|
75
|
+
"rollup": "^4.59.0",
|
|
84
76
|
"tinyexec": "^1.0.2",
|
|
85
|
-
"tsdown": "^0.
|
|
77
|
+
"tsdown": "^0.21.0",
|
|
78
|
+
"tsdown-preset-sxzz": "^0.4.0",
|
|
86
79
|
"typescript": "^5.9.3",
|
|
87
80
|
"unloader": "^0.8.3",
|
|
88
|
-
"vite": "^7.3.
|
|
89
|
-
"vitest": "^4.0.
|
|
81
|
+
"vite": "^7.3.1",
|
|
82
|
+
"vitest": "^4.0.18"
|
|
90
83
|
},
|
|
91
84
|
"prettier": "@sxzz/prettier-config",
|
|
92
85
|
"scripts": {
|
|
File without changes
|