[next] Update MicroPython and other dependencies (#1535)

This commit is contained in:
Andrea Giammarchi
2023-06-15 14:04:47 +02:00
committed by GitHub
parent 8ba28989fb
commit db27d52352
6 changed files with 162 additions and 137 deletions

View File

@@ -10,19 +10,12 @@ import {
const type = "micropython";
let patchPromise = true;
// REQUIRES INTEGRATION TEST
/* c8 ignore start */
export default {
type: [type, "mpy"],
module: () => `http://localhost:8080/micropython/micropython.mjs`,
async engine({ loadMicroPython }, config, url) {
// @bug https://github.com/micropython/micropython/issues/11749
if (patchPromise) {
patchPromise = false;
globalThis.Promise = class extends Promise {};
}
const { stderr, stdout, get } = stdio();
url = url.replace(/\.m?js$/, ".wasm");
const runtime = await get(loadMicroPython({ stderr, stdout, url }));