@hypernym/bundler 0.31.1 → 0.31.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/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025, Ivo Dolenc <https://github.com/ivodolenc>
4
- Copyright (c) 2025, Hypernym Studio <https://github.com/hypernym-studio>
3
+ Copyright (c) 2026, Ivo Dolenc <https://github.com/ivodolenc>
4
+ Copyright (c) 2026, Hypernym Studio <https://github.com/hypernym-studio>
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
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.31.1`;
12
+ const version = `0.31.3`;
13
13
 
14
14
  //#endregion
15
15
  //#region src/utils/logger.ts
@@ -103,20 +103,20 @@ const externals = [
103
103
 
104
104
  //#endregion
105
105
  //#region src/bin/loader.ts
106
- async function getTSConfigPath(cwd$1, filePath = "tsconfig.json") {
107
- const tsconfigPath = resolve(cwd$1, filePath);
106
+ async function getTSConfigPath(cwd, filePath = "tsconfig.json") {
107
+ const tsconfigPath = resolve(cwd, filePath);
108
108
  if (await exists(tsconfigPath)) return tsconfigPath;
109
109
  }
110
110
  async function loadConfig(filePath, defaults) {
111
- const cwd$1 = defaults.cwd;
111
+ const cwd = defaults.cwd;
112
112
  const result = await build({
113
- input: resolve(cwd$1, filePath),
113
+ input: resolve(cwd, filePath),
114
114
  write: false,
115
115
  external: (id) => !(isAbsolute(id) || /^(\.|@\/|~\/)/.test(id)),
116
116
  tsconfig: defaults.tsconfig,
117
117
  output: { format: "esm" }
118
118
  });
119
- const tempConfig = resolve(cwd$1, "node_modules/.hypernym/bundler/config.js");
119
+ const tempConfig = resolve(cwd, "node_modules/.hypernym/bundler/config.js");
120
120
  await write(tempConfig, result.output[0].code);
121
121
  const config = (await import(tempConfig)).default;
122
122
  return {
@@ -162,14 +162,14 @@ async function createConfigLoader(args) {
162
162
  async function createBuilder(config) {
163
163
  const { options, path: configPath } = config;
164
164
  const { hooks } = options;
165
- const cl$1 = console.log;
165
+ const cl = console.log;
166
166
  await hooks?.["bundle:start"]?.(options);
167
- cl$1();
167
+ cl();
168
168
  logger.info(dim(`v${version}`));
169
- cl$1("Config", dim(configPath));
170
- cl$1();
171
- cl$1("Processing specified entries...");
172
- cl$1();
169
+ cl("Config", dim(configPath));
170
+ cl();
171
+ cl("Processing specified entries...");
172
+ cl();
173
173
  await build$1(options).then((stats) => {
174
174
  const entriesLength = options.entries.length;
175
175
  const totalEntries = `${entriesLength} ${entriesLength > 1 ? "entries" : "entry"}`;
@@ -177,12 +177,12 @@ async function createBuilder(config) {
177
177
  const totalFiles = `${stats.files.length} file${filesLength > 1 ? "s" : ""}`;
178
178
  const buildTime = formatMs(stats.buildTime);
179
179
  const buildSize = formatBytes(stats.size);
180
- cl$1();
181
- cl$1("Stats:", dim(`${totalEntries}, ${totalFiles}, ${buildSize}, ${buildTime}`));
182
- cl$1();
183
- cl$1("All entries successfully processed.");
184
- cl$1("Bundle is optimized and ready for production.");
185
- cl$1();
180
+ cl();
181
+ cl("Stats:", dim(`${totalEntries}, ${totalFiles}, ${buildSize}, ${buildTime}`));
182
+ cl();
183
+ cl("All entries successfully processed.");
184
+ cl("Bundle is optimized and ready for production.");
185
+ cl();
186
186
  }).catch(error);
187
187
  await hooks?.["bundle:end"]?.(options);
188
188
  }
@@ -101,7 +101,7 @@ function parseOutputPath(path) {
101
101
  //#endregion
102
102
  //#region src/bin/build.ts
103
103
  function logEntryStats(stats) {
104
- const cl$1 = console.log;
104
+ const cl = console.log;
105
105
  const base = parse(stats.path).base;
106
106
  const path = stats.path.replace(base, "");
107
107
  let format = stats.format;
@@ -109,8 +109,8 @@ function logEntryStats(stats) {
109
109
  if (format === "es" || format === "module") format = "esm";
110
110
  const output = dim(path) + base;
111
111
  const outputLength = output.length + 2;
112
- cl$1(dim("+"), format.padEnd(5), output.padEnd(outputLength), dim(`[${formatBytes(stats.size)}, ${formatMs(stats.buildTime)}]`));
113
- if (stats.logs) for (const log of stats.logs) cl$1("!", log.level.padEnd(5), output.padEnd(outputLength), dim(log.log.message));
112
+ cl(dim("+"), format.padEnd(5), output.padEnd(outputLength), dim(`[${formatBytes(stats.size)}, ${formatMs(stats.buildTime)}]`));
113
+ if (stats.logs) for (const log of stats.logs) cl("!", log.level.padEnd(5), output.padEnd(outputLength), dim(log.log.message));
114
114
  }
115
115
  async function build(options) {
116
116
  const { cwd: cwdir = cwd(), outDir = "dist", entries, externals, tsconfig, hooks, minify } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypernym/bundler",
3
- "version": "0.31.1",
3
+ "version": "0.31.3",
4
4
  "author": "Hypernym Studio",
5
5
  "description": "ESM & TS module bundler.",
6
6
  "license": "MIT",
@@ -57,17 +57,17 @@
57
57
  "dependencies": {
58
58
  "@hypernym/args": "^0.3.4",
59
59
  "@hypernym/colors": "^1.0.6",
60
- "@hypernym/utils": "^3.4.6",
61
- "rolldown": "^1.0.0-beta.58",
62
- "rolldown-plugin-dts": "^0.20.0"
60
+ "@hypernym/utils": "^3.4.7",
61
+ "rolldown": "^1.0.0-rc.2",
62
+ "rolldown-plugin-dts": "^0.21.9"
63
63
  },
64
64
  "devDependencies": {
65
- "@hypernym/eslint-config": "^3.6.6",
66
- "@hypernym/prettier-config": "^3.2.10",
67
- "@hypernym/tsconfig": "^2.6.4",
68
- "@types/node": "^24.10.4",
65
+ "@hypernym/eslint-config": "^3.6.7",
66
+ "@hypernym/prettier-config": "^3.2.11",
67
+ "@hypernym/tsconfig": "^2.6.5",
68
+ "@types/node": "^24.10.10",
69
69
  "eslint": "^9.39.2",
70
- "prettier": "^3.7.4",
70
+ "prettier": "^3.8.1",
71
71
  "typescript": "^5.9.3"
72
72
  },
73
73
  "scripts": {