@bytecodealliance/jco 0.9.2 → 0.9.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,12 +1,18 @@
1
1
  {
2
2
  "name": "@bytecodealliance/jco",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "JavaScript tooling for working with WebAssembly Components",
5
5
  "author": "Guy Bedford",
6
6
  "bin": {
7
7
  "jco": "src/jco.js"
8
8
  },
9
9
  "exports": "./src/api.js",
10
+ "imports": {
11
+ "#ora": {
12
+ "browser": "./src/ora-shim.js",
13
+ "default": "ora"
14
+ }
15
+ },
10
16
  "type": "module",
11
17
  "dependencies": {
12
18
  "@bytecodealliance/preview2-shim": "0.0.10",
@@ -18,7 +24,7 @@
18
24
  "terser": "^5.16.1"
19
25
  },
20
26
  "devDependencies": {
21
- "@bytecodealliance/componentize-js": "0.0.7",
27
+ "@bytecodealliance/componentize-js": "^0.1.0",
22
28
  "@types/node": "^18.11.17",
23
29
  "@typescript-eslint/eslint-plugin": "^5.41.0",
24
30
  "@typescript-eslint/parser": "^5.41.0",
package/src/cmd/opt.js CHANGED
@@ -3,7 +3,7 @@ import { writeFile } from 'fs/promises';
3
3
  import { fileURLToPath } from 'url';
4
4
  import c from 'chalk-template';
5
5
  import { readFile, sizeStr, fixedDigitDisplay, table, spawnIOTmp, setShowSpinner, getShowSpinner } from '../common.js';
6
- import ora from 'ora';
6
+ import ora from '#ora';
7
7
 
8
8
  let WASM_OPT;
9
9
  try {
@@ -7,7 +7,7 @@ import { readFile, sizeStr, table, spawnIOTmp, setShowSpinner, getShowSpinner }
7
7
  import { optimizeComponent } from './opt.js';
8
8
  import { minify } from 'terser';
9
9
  import { fileURLToPath } from 'url';
10
- import ora from 'ora';
10
+ import ora from '#ora';
11
11
 
12
12
  export async function transpile (componentPath, opts, program) {
13
13
  const varIdx = program.parent.rawArgs.indexOf('--');
package/src/jco.js CHANGED
@@ -10,7 +10,7 @@ program
10
10
  .name('jco')
11
11
  .description(c`{bold jco - WebAssembly JS Component Tools}\n JS Component Transpilation Bindgen & Wasm Tools for JS`)
12
12
  .usage('<command> [options]')
13
- .version('0.9.2');
13
+ .version('0.9.3');
14
14
 
15
15
  function myParseInt(value) {
16
16
  return parseInt(value, 10);
@@ -0,0 +1,9 @@
1
+ // browser shim for ora
2
+ export default function ora () {
3
+ return new Ora();
4
+ }
5
+
6
+ class Ora {
7
+ start () {}
8
+ stop () {}
9
+ }