Skip to content

Commit

Permalink
fix: update @webassemblyjs/ deps to 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 29, 2024
1 parent 908dd27 commit ce6021e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 46 deletions.
81 changes: 49 additions & 32 deletions lib/wasm-parser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ var require_index_cjs = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+ieee754@1.11.6/node_modules/@webassemblyjs/ieee754/lib/index.js
// node_modules/.pnpm/@webassemblyjs+ieee754@1.12.1/node_modules/@webassemblyjs/ieee754/lib/index.js
var require_lib2 = __commonJS({
"node_modules/.pnpm/@webassemblyjs+ieee754@1.11.6/node_modules/@webassemblyjs/ieee754/lib/index.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+ieee754@1.12.1/node_modules/@webassemblyjs/ieee754/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -309,19 +309,19 @@ var require_lib2 = __commonJS({
return buffer;
}
function decodeF32(bytes) {
var buffer = Buffer.from(bytes);
var buffer = new Uint8Array(bytes);
return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
}
function decodeF64(bytes) {
var buffer = Buffer.from(bytes);
var buffer = new Uint8Array(bytes);
return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
}
}
});

// node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/decoder.js
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/decoder.js
var require_decoder = __commonJS({
"node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/decoder.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/decoder.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -383,9 +383,9 @@ var require_decoder = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/encoder.js
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/encoder.js
var require_encoder = __commonJS({
"node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/encoder.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/encoder.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -470,9 +470,9 @@ var require_encoder = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/index.js
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/index.js
var require_lib3 = __commonJS({
"node_modules/.pnpm/@webassemblyjs+utf8@1.11.6/node_modules/@webassemblyjs/utf8/lib/index.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -3054,9 +3054,9 @@ var require_signatures = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.11.6/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js
// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js
var require_section = __commonJS({
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.11.6/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -3088,9 +3088,9 @@ var require_section = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.11.6/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js
// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js
var require_lib6 = __commonJS({
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.11.6/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -3381,6 +3381,11 @@ var require_lib6 = __commonJS({
189: createSymbolObject("reinterpret/f64", "i64"),
190: createSymbolObject("reinterpret/i32", "f32"),
191: createSymbolObject("reinterpret/i64", "f64"),
192: createSymbolObject("extend8_s", "i32"),
193: createSymbolObject("extend16_s", "i32"),
194: createSymbolObject("extend8_s", "i64"),
195: createSymbolObject("extend16_s", "i64"),
196: createSymbolObject("extend32_s", "i64"),
// Atomic Memory Instructions
65024: createSymbol("memory.atomic.notify", 1),
65025: createSymbol("memory.atomic.wait32", 1),
Expand Down Expand Up @@ -4291,9 +4296,9 @@ var require_lib7 = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/bits.js
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bits.js
var require_bits = __commonJS({
"node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/bits.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bits.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -4381,9 +4386,9 @@ var require_bits = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/bufs.js
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bufs.js
var require_bufs = __commonJS({
"node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/bufs.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bufs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -4424,7 +4429,7 @@ var require_bufs = __commonJS({
if (result) {
bufPool[length] = void 0;
} else {
result = new Buffer(length);
result = new Uint8Array(length);
}
result.fill(0);
return result;
Expand All @@ -4440,7 +4445,9 @@ var require_bufs = __commonJS({
return buffer;
}
var newBuf = alloc(length);
buffer.copy(newBuf);
for (var i = 0; i <= buffer.length; i++) {
newBuf[i] = buffer[i];
}
free(buffer);
return newBuf;
}
Expand Down Expand Up @@ -4506,15 +4513,21 @@ var require_bufs = __commonJS({
}
var lowWord = value % BIT_32;
var highWord = Math.floor(value / BIT_32);
buffer.writeUInt32LE(lowWord, 0);
buffer.writeUInt32LE(highWord, 4);
buffer[0] = lowWord & 255;
buffer[1] = lowWord >> 8 & 255;
buffer[2] = lowWord >> 16 & 255;
buffer[3] = lowWord >> 24 & 255;
buffer[4] = highWord & 255;
buffer[5] = highWord >> 8 & 255;
buffer[6] = highWord >> 16 & 255;
buffer[7] = highWord >> 24 & 255;
}
}
});

// node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/leb.js
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/leb.js
var require_leb = __commonJS({
"node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/leb.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/leb.js"(exports) {
"use strict";
function _typeof(obj) {
"@babel/helpers - typeof";
Expand Down Expand Up @@ -4660,10 +4673,12 @@ var require_leb = __commonJS({
return decodeBufferCommon(encodedBuffer, index, true);
}
function encodeInt32(num) {
var buf = bufs.alloc(4);
buf.writeInt32LE(num, 0);
var buf = new Uint8Array(4);
buf[0] = num & 255;
buf[1] = num >> 8 & 255;
buf[2] = num >> 16 & 255;
buf[3] = num >> 24 & 255;
var result = encodeIntBuffer(buf);
bufs.free(buf);
return result;
}
function decodeInt32(encodedBuffer, index) {
Expand Down Expand Up @@ -4708,10 +4723,12 @@ var require_leb = __commonJS({
return decodeBufferCommon(encodedBuffer, index, false);
}
function encodeUInt32(num) {
var buf = bufs.alloc(4);
buf.writeUInt32LE(num, 0);
var buf = new Uint8Array(4);
buf[0] = num & 255;
buf[1] = num >> 8 & 255;
buf[2] = num >> 16 & 255;
buf[3] = num >> 24 & 255;
var result = encodeUIntBuffer(buf);
bufs.free(buf);
return result;
}
function decodeUInt32(encodedBuffer, index) {
Expand Down Expand Up @@ -4762,9 +4779,9 @@ var require_leb = __commonJS({
}
});

// node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/index.js
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/index.js
var require_lib8 = __commonJS({
"node_modules/.pnpm/@webassemblyjs+leb128@1.11.6/node_modules/@webassemblyjs/leb128/lib/index.js"(exports) {
"node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,11 @@
"vite": "^5.2.7",
"vitest": "^1.4.0"
},
"resolutions": {
"@webassemblyjs/helper-wasm-bytecode": "1.12.1",
"@webassemblyjs/ieee754": "1.12.1",
"@webassemblyjs/leb128": "1.12.1",
"@webassemblyjs/utf8": "1.12.1"
},
"packageManager": "[email protected]"
}
}
32 changes: 19 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce6021e

Please sign in to comment.