@hypernym/bundler 0.30.1 → 0.30.3

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/bin/index.js CHANGED
@@ -9,7 +9,7 @@ import { build as build$1 } from "../build/index.js";
9
9
 
10
10
  //#region src/bin/meta.ts
11
11
  const name = `Hyperbundler`;
12
- const version = `0.30.1`;
12
+ const version = `0.30.3`;
13
13
 
14
14
  //#endregion
15
15
  //#region src/utils/logger.ts
@@ -130,8 +130,7 @@ async function loadConfig(filePath, defaults) {
130
130
  async function createConfigLoader(args) {
131
131
  const cwdir = args.cwd && args.cwd.trim() !== "" ? resolve(args.cwd) : cwd();
132
132
  const tsconfig = await getTSConfigPath(cwdir, args.tsconfig);
133
- const pkgPath = resolve(cwdir, "package.json");
134
- const pkgFile = await read(pkgPath).catch(error);
133
+ const pkgFile = await read(resolve(cwdir, "package.json")).catch(error);
135
134
  const { dependencies } = JSON.parse(pkgFile);
136
135
  const defaults = {
137
136
  cwd: cwdir,
@@ -191,9 +190,7 @@ async function createBuilder(config) {
191
190
  //#endregion
192
191
  //#region src/bin/index.ts
193
192
  async function main() {
194
- const args = createArgs({ alias: { config: "c" } });
195
- const config = await createConfigLoader(args);
196
- await createBuilder(config);
193
+ await createBuilder(await createConfigLoader(createArgs({ alias: { config: "c" } })));
197
194
  }
198
195
  main().catch(error);
199
196
 
@@ -181,10 +181,7 @@ async function build(options) {
181
181
  await hooks?.["build:entry:start"]?.(entryOptions, entryStats);
182
182
  const bundle = await rolldown(entryInput);
183
183
  if (isChunk) await bundle.write(entryOutput);
184
- else {
185
- const generated = await bundle.generate(entryOutput);
186
- await write(outputResolvePath, generated.output[0].code);
187
- }
184
+ else await write(outputResolvePath, (await bundle.generate(entryOutput)).output[0].code);
188
185
  const stats = await stat(outputResolvePath);
189
186
  entryStats.size = stats.size;
190
187
  entryStats.buildTime = Date.now() - entryStart;
@@ -208,8 +205,7 @@ async function build(options) {
208
205
  else {
209
206
  const files = await readdir(outputResolvePath);
210
207
  for (const file of files) {
211
- const filePath = resolve(outputResolvePath, file);
212
- const fileStat = await stat(filePath);
208
+ const fileStat = await stat(resolve(outputResolvePath, file));
213
209
  totalSize = totalSize + fileStat.size;
214
210
  }
215
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypernym/bundler",
3
- "version": "0.30.1",
3
+ "version": "0.30.3",
4
4
  "author": "Hypernym Studio",
5
5
  "description": "ESM & TS module bundler.",
6
6
  "license": "MIT",
@@ -58,17 +58,17 @@
58
58
  "@hypernym/args": "^0.3.3",
59
59
  "@hypernym/colors": "^1.0.5",
60
60
  "@hypernym/utils": "^3.4.5",
61
- "rolldown": "^1.0.0-beta.40",
62
- "rolldown-plugin-dts": "^0.16.9"
61
+ "rolldown": "^1.0.0-beta.42",
62
+ "rolldown-plugin-dts": "^0.16.11"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@hypernym/eslint-config": "^3.6.4",
66
66
  "@hypernym/prettier-config": "^3.2.7",
67
67
  "@hypernym/tsconfig": "^2.6.2",
68
- "@types/node": "^24.5.2",
69
- "eslint": "^9.36.0",
68
+ "@types/node": "^24.7.1",
69
+ "eslint": "^9.37.0",
70
70
  "prettier": "^3.6.2",
71
- "typescript": "^5.9.2"
71
+ "typescript": "^5.9.3"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "bun -b run ./src/bin/index.ts",