@powerlines/plugin-oxc-transform 0.5.298 → 0.5.300
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/index.cjs +4 -4
- package/dist/index.d.cts +6 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +3 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +3 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -16,13 +16,13 @@ const plugin = (options = {}) => {
|
|
|
16
16
|
return {
|
|
17
17
|
name: "oxc-transform",
|
|
18
18
|
config() {
|
|
19
|
-
return {
|
|
19
|
+
return { oxcTransform: (0, defu.default)(options, {
|
|
20
20
|
sourceType: "module",
|
|
21
|
-
cwd: this.config.
|
|
21
|
+
cwd: this.config.root,
|
|
22
22
|
envName: this.config.mode,
|
|
23
23
|
outputPath: this.config.output.buildPath,
|
|
24
24
|
sourcemap: this.config.mode === "development"
|
|
25
|
-
}) }
|
|
25
|
+
}) };
|
|
26
26
|
},
|
|
27
27
|
async transform(code, id) {
|
|
28
28
|
const result = await (0, oxc_transform.transform)(id, code, {
|
|
@@ -31,7 +31,7 @@ const plugin = (options = {}) => {
|
|
|
31
31
|
"d.cts",
|
|
32
32
|
"d.mts"
|
|
33
33
|
].includes((0, __stryke_path_find.findFileExtensionSafe)(id)) ? "dts" : (0, __stryke_path_find.findFileExtension)(id),
|
|
34
|
-
...this.config.
|
|
34
|
+
...this.config.oxcTransform
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
37
|
id,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { OxcTransformPluginContext, OxcTransformPluginOptions, OxcTransformPluginResolvedConfig, OxcTransformPluginUserConfig, __ΩOxcTransformPluginContext, __ΩOxcTransformPluginOptions, __ΩOxcTransformPluginResolvedConfig, __ΩOxcTransformPluginUserConfig } from "./types/plugin.cjs";
|
|
2
2
|
import "./types/index.cjs";
|
|
3
|
-
import { Plugin } from "powerlines
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface UserConfig {
|
|
8
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
12
|
* A Powerlines plugin to integrate oxc-transform for code transformation.
|
|
9
13
|
*
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA4BwB,YAAA,CAAA,EAIL,yBAJK;EAAA;;;;AAcxB;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,yBAGT,GAHqC,yBAGrC,CAAA,CAAA,OAAA,CAAA,EADC,yBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { OxcTransformPluginContext, OxcTransformPluginOptions, OxcTransformPluginResolvedConfig, OxcTransformPluginUserConfig, __ΩOxcTransformPluginContext, __ΩOxcTransformPluginOptions, __ΩOxcTransformPluginResolvedConfig, __ΩOxcTransformPluginUserConfig } from "./types/plugin.mjs";
|
|
2
2
|
import "./types/index.mjs";
|
|
3
|
-
import { Plugin } from "powerlines
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface UserConfig {
|
|
8
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
12
|
* A Powerlines plugin to integrate oxc-transform for code transformation.
|
|
9
13
|
*
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA4BwB,YAAA,CAAA,EAIL,yBAJK;EAAA;;;;AAcxB;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,yBAGT,GAHqC,yBAGrC,CAAA,CAAA,OAAA,CAAA,EADC,yBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -13,13 +13,13 @@ const plugin = (options = {}) => {
|
|
|
13
13
|
return {
|
|
14
14
|
name: "oxc-transform",
|
|
15
15
|
config() {
|
|
16
|
-
return {
|
|
16
|
+
return { oxcTransform: defu(options, {
|
|
17
17
|
sourceType: "module",
|
|
18
|
-
cwd: this.config.
|
|
18
|
+
cwd: this.config.root,
|
|
19
19
|
envName: this.config.mode,
|
|
20
20
|
outputPath: this.config.output.buildPath,
|
|
21
21
|
sourcemap: this.config.mode === "development"
|
|
22
|
-
}) }
|
|
22
|
+
}) };
|
|
23
23
|
},
|
|
24
24
|
async transform(code, id) {
|
|
25
25
|
const result = await transform(id, code, {
|
|
@@ -28,7 +28,7 @@ const plugin = (options = {}) => {
|
|
|
28
28
|
"d.cts",
|
|
29
29
|
"d.mts"
|
|
30
30
|
].includes(findFileExtensionSafe(id)) ? "dts" : findFileExtension(id),
|
|
31
|
-
...this.config.
|
|
31
|
+
...this.config.oxcTransform
|
|
32
32
|
});
|
|
33
33
|
return {
|
|
34
34
|
id,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { findFileExtension, findFileExtensionSafe } from \"@stryke/path/find\";\nimport defu from \"defu\";\nimport { transform } from \"oxc-transform\";\nimport { Plugin } from \"powerlines
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { findFileExtension, findFileExtensionSafe } from \"@stryke/path/find\";\nimport defu from \"defu\";\nimport { transform } from \"oxc-transform\";\nimport { Plugin } from \"powerlines\";\nimport {\n OxcTransformPluginContext,\n OxcTransformPluginOptions,\n OxcTransformPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n oxcTransform?: OxcTransformPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate oxc-transform for code transformation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends OxcTransformPluginContext = OxcTransformPluginContext\n>(\n options: OxcTransformPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"oxc-transform\",\n config() {\n return {\n oxcTransform: defu(options, {\n sourceType: \"module\",\n cwd: this.config.root,\n envName: this.config.mode,\n outputPath: this.config.output.buildPath,\n sourcemap: this.config.mode === \"development\"\n })\n } as Partial<OxcTransformPluginUserConfig>;\n },\n async transform(code, id) {\n const result = await transform(id, code, {\n lang: ([\"d.ts\", \"d.cts\", \"d.mts\"].includes(findFileExtensionSafe(id))\n ? \"dts\"\n : findFileExtension(id)) as OxcTransformPluginOptions[\"lang\"],\n ...this.config.oxcTransform\n });\n\n return { id, code: result.code, map: result.map };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AA0CA,MAAa,UAGX,UAAqC,EAAE,KAClB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,cAAc,KAAK,SAAS;IAC1B,YAAY;IACZ,KAAK,KAAK,OAAO;IACjB,SAAS,KAAK,OAAO;IACrB,YAAY,KAAK,OAAO,OAAO;IAC/B,WAAW,KAAK,OAAO,SAAS;IACjC,CAAC,EACH;;EAEH,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,SAAS,MAAM,UAAU,IAAI,MAAM;IACvC,MAAO;KAAC;KAAQ;KAAS;KAAQ,CAAC,SAAS,sBAAsB,GAAG,CAAC,GACjE,QACA,kBAAkB,GAAG;IACzB,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,UAAO;IAAE;IAAI,MAAM,OAAO;IAAM,KAAK,OAAO;IAAK;;EAEpD;;AAGH,kBAAe"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
1
2
|
import { TransformOptions } from "oxc-transform";
|
|
2
|
-
import { UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
3
|
|
|
6
4
|
//#region src/types/plugin.d.ts
|
|
7
5
|
type OxcTransformPluginOptions = Partial<TransformOptions>;
|
|
8
6
|
type OxcTransformPluginUserConfig = UserConfig & {
|
|
9
|
-
|
|
10
|
-
oxc?: OxcTransformPluginOptions;
|
|
11
|
-
};
|
|
7
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
12
8
|
};
|
|
13
9
|
type OxcTransformPluginResolvedConfig = ResolvedConfig & {
|
|
14
|
-
|
|
15
|
-
oxc?: OxcTransformPluginOptions;
|
|
16
|
-
};
|
|
10
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
17
11
|
};
|
|
18
12
|
type OxcTransformPluginContext<TResolvedConfig extends OxcTransformPluginResolvedConfig = OxcTransformPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
19
13
|
declare type __ΩOxcTransformPluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,yBAAA,GAA4B,QAAQ;KAEpC,4BAAA,GAA+B;EAF/B,YAAA,CAAA,EAGK,yBAH+B;AAEhD,CAAA;AAIY,KAAA,gCAAA,GAAmC,cAAA,GAAA;EAInC,YAAA,CAAA,EAHK,yBAGoB;CACX;AACtB,KAFQ,yBAER,CAAA,wBADsB,gCACtB,GAAA,gCAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,4CAAA,GAAA,EAAA;AAAd,+CAAA,GAAA,EAAA;AAAa,mDAAA,GAAA,EAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { TransformOptions } from "oxc-transform";
|
|
2
|
-
import { UserConfig } from "powerlines
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
5
3
|
|
|
6
4
|
//#region src/types/plugin.d.ts
|
|
7
5
|
type OxcTransformPluginOptions = Partial<TransformOptions>;
|
|
8
6
|
type OxcTransformPluginUserConfig = UserConfig & {
|
|
9
|
-
|
|
10
|
-
oxc?: OxcTransformPluginOptions;
|
|
11
|
-
};
|
|
7
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
12
8
|
};
|
|
13
9
|
type OxcTransformPluginResolvedConfig = ResolvedConfig & {
|
|
14
|
-
|
|
15
|
-
oxc?: OxcTransformPluginOptions;
|
|
16
|
-
};
|
|
10
|
+
oxcTransform?: OxcTransformPluginOptions;
|
|
17
11
|
};
|
|
18
12
|
type OxcTransformPluginContext<TResolvedConfig extends OxcTransformPluginResolvedConfig = OxcTransformPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
19
13
|
declare type __ΩOxcTransformPluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,yBAAA,GAA4B,QAAQ;KAEpC,4BAAA,GAA+B;EAF/B,YAAA,CAAA,EAGK,yBAH+B;AAEhD,CAAA;AAIY,KAAA,gCAAA,GAAmC,cAAA,GAAA;EAInC,YAAA,CAAA,EAHK,yBAGoB;CACX;AACtB,KAFQ,yBAER,CAAA,wBADsB,gCACtB,GAAA,gCAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,4CAAA,GAAA,EAAA;AAAd,+CAAA,GAAA,EAAA;AAAa,mDAAA,GAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-oxc-transform",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.300",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform project code with Oxc Transformer.",
|
|
6
6
|
"repository": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"
|
|
58
|
+
"./*": "./*",
|
|
59
59
|
"./types": {
|
|
60
60
|
"require": {
|
|
61
61
|
"types": "./dist/types/index.d.cts",
|
|
@@ -97,13 +97,13 @@
|
|
|
97
97
|
"@stryke/path": "^0.26.6",
|
|
98
98
|
"defu": "^6.1.4",
|
|
99
99
|
"oxc-transform": "^0.99.0",
|
|
100
|
-
"powerlines": "^0.
|
|
100
|
+
"powerlines": "^0.39.0"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
104
|
-
"@types/node": "^25.3.
|
|
103
|
+
"@powerlines/plugin-plugin": "^0.12.242",
|
|
104
|
+
"@types/node": "^25.3.2"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": { "access": "public" },
|
|
107
107
|
"types": "./dist/index.d.cts",
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "0dcb16f054b8a69915b074578e6d4dfa3ecc1529"
|
|
109
109
|
}
|