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/dist/config.mjs CHANGED
@@ -1,3 +1,7 @@
1
- import { defineConfig } from "./_chunks/config-BsKCDKT5.mjs";
1
+ //#region src/config.ts
2
+ function defineConfig(config) {
3
+ return config;
4
+ }
2
5
 
6
+ //#endregion
3
7
  export { defineConfig };
@@ -0,0 +1,2 @@
1
+ import { t as defineConfig } from "./config.mjs";
2
+ export { defineConfig };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { BuildConfig, BuildEntry, BundleEntry, RobuildPlugin, TransformEntry, defineConfig } from "./_chunks/config-2CRkKJ3l.mjs";
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 { SHEBANG_RE, build, hasShebang, makeExecutable, nodeProtocolPlugin, shebangPlugin } from "./_chunks/build-omZA_xD-.mjs";
2
- import "./_chunks/plugin-manager-w5yRGJRn.mjs";
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$1 = await callHook(prevHook, currentCode, id);
66
- if (result$1) currentCode = typeof result$1 === "string" ? result$1 : result$1.code;
64
+ const result = await callHook(prevHook, currentCode, id);
65
+ if (result) currentCode = typeof result === "string" ? result : result.code;
67
66
  }
68
- const result = await callHook(plugin.transform, currentCode, id);
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
- console.error(`Failed to load text file ${id}:`, error);
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
- const filename = basename(id);
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.18",
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": "pnpm test:types && pnpm robuild",
21
- "dev": "pnpm test",
22
- "lint": "eslint .",
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": "vitest run",
29
+ "test": "turbo test:raw --filter=robuild",
30
+ "test:raw": "vitest run",
28
31
  "test:watch": "vitest",
29
- "test:coverage": "vitest run --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": "vitepress build docs",
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-beta.30",
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
  }
@@ -1,4 +0,0 @@
1
- import { build, performBuild } from "./build-omZA_xD-.mjs";
2
- import "./plugin-manager-w5yRGJRn.mjs";
3
-
4
- export { performBuild };