quickbundle 0.0.0-next-9474b9e → 0.0.0-next-d3fa7f0

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 CHANGED
@@ -10,9 +10,9 @@
10
10
 
11
11
  Quickbundle allows you to bundle a library in a **quick**, **fast** and **easy** way:
12
12
 
13
- - Fast build and watch mode powered by Rollup[^1] and SWC[^2].
14
- - Compile mode to compile and cross compile standalone binaries for systems that do not have Node.js installed[^3].
15
13
  - Zero configuration: define the build artifacts in your `package.json`, and you're all set!
14
+ - Fast build and watch mode powered by Rollup[^1] and SWC[^2].
15
+ - Compile and cross compile standalone executables for systems that do not have Node.js installed[^3].
16
16
  - Support of `cjs` & `esm` module formats output.
17
17
  - Support of several loaders including JavaScript, TypeScript, JSX, JSON, and Images.
18
18
  - TypeScript's declaration file (`.d.ts`) bundling.
@@ -191,12 +191,6 @@ quickbundle compile --target node-v23.1.0-win-x64 # Embeds Node v23 runtime buil
191
191
 
192
192
  <br>
193
193
 
194
- ## ☑️ Roadmap
195
-
196
- - [ ] Support cross compilation to other platforms (ala [Bun](https://bun.sh/docs/bundler/executables#cross-compile-to-other-platforms)). For now, Quickbundle only supports local compilation (i.e. generate executables compatible only with machines running the same operating system / architecture). Action: add a `--target` flag to specify a different operating system compilation target than the machine running the command.
197
-
198
- <br>
199
-
200
194
  ## 🤩 Used by
201
195
 
202
196
  - [@adbayb/stack](https://github.com/adbayb/stack) My opinionated toolbox for JavaScript/TypeScript projects.
package/bin/index.mjs CHANGED
@@ -3,6 +3,6 @@
3
3
  import { join } from "node:path";
4
4
  import { createRequire } from "node:module";
5
5
 
6
- const pkg = createRequire(import.meta.url)("../package.json");
6
+ const package_ = createRequire(import.meta.url)("../package.json");
7
7
 
8
- import(join("..", pkg.exports["."].default));
8
+ import(join("..", package_.exports["."].default));
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { finished } from 'node:stream/promises';
3
3
  import { Readable } from 'node:stream';
4
4
  import process from 'node:process';
5
5
  import { resolve, dirname, join, basename } from 'node:path';
6
- import { copyFile as copyFile$1, rm, writeFile as writeFile$1, rename, mkdir, readFile as readFile$1 } from 'node:fs/promises';
6
+ import { mkdir, copyFile as copyFile$1, rename, writeFile as writeFile$1, rm, readFile as readFile$1 } from 'node:fs/promises';
7
7
  import { createWriteStream } from 'node:fs';
8
8
  import decompress from 'decompress';
9
9
  import { watch as watch$1, rollup } from 'rollup';
@@ -19,7 +19,7 @@ import os from 'node:os';
19
19
  import { gzipSize } from 'gzip-size';
20
20
 
21
21
  var name = "quickbundle";
22
- var version = "0.0.0-next-9474b9e";
22
+ var version = "0.0.0-next-d3fa7f0";
23
23
 
24
24
  /**
25
25
  * Resolve a relative path from the Quickbundle node modules directory.
@@ -121,14 +121,16 @@ const watch = (input)=>{
121
121
  case "START":
122
122
  {
123
123
  startDuration = Date.now();
124
- clearLog(`Build in progress...`, {
124
+ clearLog("Build in progress…", {
125
125
  type: "information"
126
126
  });
127
127
  return;
128
128
  }
129
129
  case "BUNDLE_END":
130
- await event.result.close();
131
- break;
130
+ {
131
+ await event.result.close();
132
+ break;
133
+ }
132
134
  case "END":
133
135
  {
134
136
  const duration = Date.now() - startDuration;
@@ -156,11 +158,12 @@ const clearLog = (...input)=>{
156
158
 
157
159
  const require = createRequire(import.meta.url);
158
160
  const PKG = require(resolveFromExternalDirectory("package.json"));
159
- const createConfiguration = (options = {
161
+ const DEFAULT_OPTIONS = {
160
162
  minification: false,
161
163
  sourceMaps: false,
162
164
  standalone: false
163
- })=>{
165
+ };
166
+ const createConfiguration = (options = DEFAULT_OPTIONS)=>{
164
167
  const buildableExports = getBuildableExports(options);
165
168
  return {
166
169
  data: buildableExports.flatMap((buildableExport)=>{
@@ -377,8 +380,8 @@ const build = async (input)=>{
377
380
  elapsedTime: Date.now() - initialTime,
378
381
  filePath: outputFilePath
379
382
  });
380
- }).catch((reason)=>{
381
- reject(reason);
383
+ }).catch((error)=>{
384
+ reject(error);
382
385
  });
383
386
  }));
384
387
  }
@@ -468,15 +471,23 @@ const getOsType = (input)=>{
468
471
  switch(input){
469
472
  case "Windows_NT":
470
473
  case "win":
471
- return "windows";
474
+ {
475
+ return "windows";
476
+ }
472
477
  case "Darwin":
473
478
  case "darwin":
474
- return "macos";
479
+ {
480
+ return "macos";
481
+ }
475
482
  case "Linux":
476
483
  case "linux":
477
- return "linux";
484
+ {
485
+ return "linux";
486
+ }
478
487
  default:
479
- throw new Error(`Unsupported operating system \`${input}\``);
488
+ {
489
+ throw new Error(`Unsupported operating system \`${input}\``);
490
+ }
480
491
  }
481
492
  };
482
493
  const matchRuntimeParts = createRegExpMatcher(/^node-(?<version>v\d+\.\d+\.\d+)-(?<os>darwin|linux|win)-(?<architecture>arm64|x64|x86)$/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickbundle",
3
- "version": "0.0.0-next-9474b9e",
3
+ "version": "0.0.0-next-d3fa7f0",
4
4
  "description": "The zero-configuration transpiler and bundler for the web",
5
5
  "author": {
6
6
  "name": "Ayoub Adib",
@@ -52,10 +52,10 @@
52
52
  "@rollup/plugin-json": "^6.1.0",
53
53
  "@rollup/plugin-node-resolve": "^15.3.0",
54
54
  "@rollup/plugin-url": "^8.0.2",
55
- "@swc/core": "^1.9.1",
55
+ "@swc/core": "^1.9.2",
56
56
  "decompress": "^4.2.1",
57
57
  "gzip-size": "^7.0.0",
58
- "rollup": "^4.24.4",
58
+ "rollup": "^4.27.2",
59
59
  "rollup-plugin-dts": "^6.1.1",
60
60
  "rollup-plugin-node-externals": "^7.1.3",
61
61
  "rollup-plugin-swc3": "^0.12.1",