@thi.ng/wasm-api 2.4.21 → 2.4.22

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.
Files changed (2) hide show
  1. package/bridge.js +18 -12
  2. package/package.json +7 -7
package/bridge.js CHANGED
@@ -113,19 +113,25 @@ let WasmBridge = class {
113
113
  if (!unique.has(d)) queue.push(d);
114
114
  }
115
115
  }
116
- const graph = [...unique].reduce((acc, mod) => {
117
- assert(
118
- (acc[mod.id] === void 0 || acc[mod.id] === mod) && mod.id !== this.id,
119
- `duplicate API module ID: ${mod.id}`
120
- );
121
- acc[mod.id] = mod;
122
- return acc;
123
- }, {});
116
+ const graph = [...unique].reduce(
117
+ (acc, mod) => {
118
+ assert(
119
+ (acc[mod.id] === void 0 || acc[mod.id] === mod) && mod.id !== this.id,
120
+ `duplicate API module ID: ${mod.id}`
121
+ );
122
+ acc[mod.id] = mod;
123
+ return acc;
124
+ },
125
+ {}
126
+ );
124
127
  this.order = topoSort(graph, (mod) => mod.deps?.map((x) => x.id));
125
- this.modules = this.order.reduce((acc, id) => {
126
- acc[id] = graph[id].factory(this);
127
- return acc;
128
- }, {});
128
+ this.modules = this.order.reduce(
129
+ (acc, id) => {
130
+ acc[id] = graph[id].factory(this);
131
+ return acc;
132
+ },
133
+ {}
134
+ );
129
135
  }
130
136
  /**
131
137
  * Instantiates WASM module from given `src` (and optional provided extra
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api",
3
- "version": "2.4.21",
3
+ "version": "2.4.22",
4
4
  "description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -43,12 +43,12 @@
43
43
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
44
44
  },
45
45
  "dependencies": {
46
- "@thi.ng/api": "^8.12.16",
47
- "@thi.ng/arrays": "^2.14.12",
48
- "@thi.ng/checks": "^3.8.6",
49
- "@thi.ng/errors": "^2.6.5",
46
+ "@thi.ng/api": "^8.12.17",
47
+ "@thi.ng/arrays": "^2.14.13",
48
+ "@thi.ng/checks": "^3.8.7",
49
+ "@thi.ng/errors": "^2.6.6",
50
50
  "@thi.ng/hex": "^2.4.9",
51
- "@thi.ng/idgen": "^2.2.90",
51
+ "@thi.ng/idgen": "^2.2.91",
52
52
  "@thi.ng/logger": "^3.3.0"
53
53
  },
54
54
  "devDependencies": {
@@ -127,5 +127,5 @@
127
127
  "tag": "wasm",
128
128
  "year": 2022
129
129
  },
130
- "gitHead": "7a21075f27ba00b28a6eb77e70918a4c7f4e6e68\n"
130
+ "gitHead": "1107498d31504dc63d1a457b5def387d7a134f69\n"
131
131
  }