robuild 0.0.18 → 0.0.20
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 +6 -6
- package/dist/_chunks/build-B-lzI2ff.mjs +3 -0
- package/dist/_chunks/{build-omZA_xD-.mjs → build-ZNO1BJMb.mjs} +584 -560
- package/dist/_chunks/package-CspMOSID.mjs +80 -0
- package/dist/_chunks/{plugin-manager-w5yRGJRn.mjs → plugin-manager-CwMXjVtp.mjs} +2 -2
- package/dist/_chunks/plugin-manager-pCQvlo7q.mjs +3 -0
- package/dist/cli.mjs +12 -16
- package/dist/config.d.mts +726 -2
- package/dist/config.mjs +5 -1
- package/dist/config2.d.mts +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +7 -10
- package/package.json +16 -9
- package/dist/_chunks/build-S2eglIZn.mjs +0 -4
- package/dist/_chunks/config-2CRkKJ3l.d.mts +0 -726
- package/dist/_chunks/config-BsKCDKT5.mjs +0 -7
- package/dist/_chunks/package-B75WwJYL.mjs +0 -88
- package/dist/_chunks/plugin-manager-WN1-NA--.mjs +0 -3
package/dist/config.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as RobuildPlugin, i as BundleEntry, n as BuildConfig, o as TransformEntry, r as BuildEntry, t as defineConfig } from "./config.mjs";
|
|
2
2
|
import { Plugin } from "rolldown";
|
|
3
3
|
|
|
4
4
|
//#region src/build.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import { defineConfig } from "./_chunks/config-BsKCDKT5.mjs";
|
|
1
|
+
import { a as makeExecutable, i as hasShebang, l as logger, o as shebangPlugin, r as SHEBANG_RE, s as nodeProtocolPlugin, t as build } from "./_chunks/build-ZNO1BJMb.mjs";
|
|
2
|
+
import { defineConfig } from "./config.mjs";
|
|
4
3
|
|
|
5
4
|
//#region src/features/plugin-utils.ts
|
|
6
5
|
/**
|
|
@@ -62,11 +61,10 @@ function combinePlugins(name, plugins) {
|
|
|
62
61
|
combinedPlugin.transform = async (code, id) => {
|
|
63
62
|
let currentCode = code;
|
|
64
63
|
if (prevHook) {
|
|
65
|
-
const result
|
|
66
|
-
if (result
|
|
64
|
+
const result = await callHook(prevHook, currentCode, id);
|
|
65
|
+
if (result) currentCode = typeof result === "string" ? result : result.code;
|
|
67
66
|
}
|
|
68
|
-
|
|
69
|
-
return result;
|
|
67
|
+
return await callHook(plugin.transform, currentCode, id);
|
|
70
68
|
};
|
|
71
69
|
}
|
|
72
70
|
if (plugin.robuildSetup) {
|
|
@@ -134,7 +132,7 @@ function textPlugin(extensions = [".txt", ".md"]) {
|
|
|
134
132
|
const content = await readFile(id, "utf-8");
|
|
135
133
|
return `export default ${JSON.stringify(content)}`;
|
|
136
134
|
} catch (error) {
|
|
137
|
-
|
|
135
|
+
logger.error(`Failed to load text file ${id}:`, error);
|
|
138
136
|
return null;
|
|
139
137
|
}
|
|
140
138
|
return null;
|
|
@@ -160,8 +158,7 @@ function urlPlugin(extensions = [
|
|
|
160
158
|
load: async (id) => {
|
|
161
159
|
if (extensions.some((ext) => id.endsWith(ext))) {
|
|
162
160
|
const { basename } = await import("node:path");
|
|
163
|
-
|
|
164
|
-
return `export default "./${filename}"`;
|
|
161
|
+
return `export default "./${basename(id)}"`;
|
|
165
162
|
}
|
|
166
163
|
return null;
|
|
167
164
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robuild",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"packageManager": "pnpm@10.11.1",
|
|
6
6
|
"description": "Zero-config ESM/TS package builder. Powered by Rolldown and Oxc",
|
|
7
7
|
"license": "MIT",
|
|
@@ -17,23 +17,29 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
22
|
-
"
|
|
20
|
+
"build": "turbo build:raw --filter=robuild",
|
|
21
|
+
"build:raw": "pnpm test:types && pnpm robuild",
|
|
22
|
+
"dev": "pnpm test:raw",
|
|
23
|
+
"lint": "turbo lint:raw --filter=robuild",
|
|
24
|
+
"lint:raw": "eslint .",
|
|
23
25
|
"lint:fix": "automd && eslint . --fix",
|
|
24
26
|
"robuild": "esno src/cli.ts",
|
|
25
27
|
"prepack": "pnpm build",
|
|
26
28
|
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
|
|
27
|
-
"test": "
|
|
29
|
+
"test": "turbo test:raw --filter=robuild",
|
|
30
|
+
"test:raw": "vitest run",
|
|
28
31
|
"test:watch": "vitest",
|
|
29
|
-
"test:coverage": "
|
|
32
|
+
"test:coverage": "turbo test:coverage:raw --filter=robuild",
|
|
33
|
+
"test:coverage:raw": "vitest run --coverage",
|
|
30
34
|
"test:coverage:watch": "vitest --coverage",
|
|
31
35
|
"test:ui": "vitest --ui",
|
|
32
36
|
"test:types": "tsc --noEmit --skipLibCheck src/**/*.ts",
|
|
33
37
|
"docs:dev": "vitepress dev docs",
|
|
34
|
-
"docs:build": "
|
|
38
|
+
"docs:build": "turbo docs:build:raw --filter=robuild",
|
|
39
|
+
"docs:build:raw": "vitepress build docs",
|
|
35
40
|
"docs:preview": "vitepress preview docs",
|
|
36
|
-
"commit": "git-cz"
|
|
41
|
+
"commit": "git-cz",
|
|
42
|
+
"clean": "rm -rf .turbo dist coverage"
|
|
37
43
|
},
|
|
38
44
|
"dependencies": {
|
|
39
45
|
"c12": "^3.0.4",
|
|
@@ -49,7 +55,7 @@
|
|
|
49
55
|
"oxc-parser": "^0.98.0",
|
|
50
56
|
"oxc-transform": "^0.98.0",
|
|
51
57
|
"pretty-bytes": "^7.0.1",
|
|
52
|
-
"rolldown": "1.0.0-
|
|
58
|
+
"rolldown": "1.0.0-rc.3",
|
|
53
59
|
"rolldown-plugin-dts": "^0.16.5",
|
|
54
60
|
"tinyglobby": "^0.2.14",
|
|
55
61
|
"typescript": "^5.8.3"
|
|
@@ -65,6 +71,7 @@
|
|
|
65
71
|
"esno": "^4.8.0",
|
|
66
72
|
"git-cz": "^4.9.0",
|
|
67
73
|
"prettier": "^3.5.3",
|
|
74
|
+
"turbo": "^2.8.7",
|
|
68
75
|
"vitepress": "^1.6.3",
|
|
69
76
|
"vitest": "^3.2.2"
|
|
70
77
|
}
|