@bytecodealliance/jco 1.13.0 → 1.13.1-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytecodealliance/jco",
3
- "version": "1.13.0",
3
+ "version": "1.13.1-rc.3",
4
4
  "description": "JavaScript tooling for working with WebAssembly Components",
5
5
  "homepage": "https://github.com/bytecodealliance/jco#readme",
6
6
  "author": "Guy Bedford",
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "devDependencies": {
79
79
  "@commitlint/config-conventional": "^19.8.1",
80
- "@types/node": "^24.0.15",
80
+ "@types/node": "^24.2.0",
81
81
  "@typescript-eslint/eslint-plugin": "^8.37.0",
82
82
  "@typescript-eslint/parser": "^8.37.0",
83
83
  "commitlint": "^19.8.1",
@@ -90,7 +90,7 @@
90
90
  "puppeteer": "^24.14.0",
91
91
  "semver": "^7.7.1",
92
92
  "smol-toml": "^1.4.1",
93
- "typescript": "^5.8.3",
93
+ "typescript": "^5.9.2",
94
94
  "vitest": "^3.2.4"
95
95
  }
96
96
  }
@@ -1,3 +1,5 @@
1
+ /* global Buffer */
2
+
1
3
  import { platform } from 'node:process';
2
4
  import { extname, basename, resolve } from 'node:path';
3
5
 
@@ -427,19 +429,24 @@ ${autoInstantiate}`;
427
429
  }
428
430
 
429
431
  if (opts.minify) {
430
- ({ code: jsFile[1] } = await minify(
431
- Buffer.from(jsFile[1]).toString('utf8'),
432
- {
433
- module: true,
434
- compress: {
435
- ecma: 9,
436
- unsafe: true,
437
- },
438
- mangle: {
439
- keep_classnames: true,
440
- },
441
- }
442
- ));
432
+ try {
433
+ ({ code: jsFile[1] } = await minify(
434
+ Buffer.from(jsFile[1]).toString('utf8'),
435
+ {
436
+ module: true,
437
+ compress: {
438
+ ecma: 9,
439
+ unsafe: true,
440
+ },
441
+ mangle: {
442
+ keep_classnames: true,
443
+ },
444
+ }
445
+ ));
446
+ } catch (err) {
447
+ console.error(`error while minifying JS: ${err}`);
448
+ throw err;
449
+ }
443
450
  }
444
451
 
445
452
  return { files: Object.fromEntries(files), imports, exports };
package/src/jco.js CHANGED
@@ -25,7 +25,7 @@ program
25
25
  )
26
26
  .usage('<command> [options]')
27
27
  .enablePositionalOptions()
28
- .version('1.13.0');
28
+ .version('1.13.1-rc.3');
29
29
 
30
30
  function myParseInt(value) {
31
31
  return parseInt(value, 10);