Skip to content

Commit 9bfb93a

Browse files
committed
Updated MicroPython to its latest
1 parent f3a18c3 commit 9bfb93a

File tree

9 files changed

+125
-128
lines changed

9 files changed

+125
-128
lines changed

docs/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/interpreter/_utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const dirname = (path) => {
3333
const mkdirTree = (FS, path) => {
3434
const current = [];
3535
for (const branch of path.split('/')) {
36-
if (branch === '.') continue;
36+
if (branch === '.' || branch === '..') continue;
3737
current.push(branch);
3838
if (branch) FS.mkdir(current.join('/'));
3939
}

esm/interpreter/micropython.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetchFiles, fetchJSModules, fetchPaths, writeFile } from './_utils.js';
1+
import { fetchFiles, fetchJSModules, fetchPaths, writeFileShim } from './_utils.js';
22
import { registerJSModule, run, runAsync, runEvent } from './_python.js';
33
import { stdio } from './_io.js';
44
import mip from '../python/mip.js';
@@ -9,7 +9,7 @@ const type = 'micropython';
99
/* c8 ignore start */
1010
export default {
1111
type,
12-
module: (version = '1.21.0-279') =>
12+
module: (version = '1.22.0-269') =>
1313
`https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@${version}/micropython.mjs`,
1414
async engine({ loadMicroPython }, config, url) {
1515
const { stderr, stdout, get } = stdio();
@@ -32,12 +32,8 @@ export default {
3232
run,
3333
runAsync,
3434
runEvent,
35-
transform: (interpreter, value) => (
36-
value instanceof interpreter.PyProxy ?
37-
interpreter.PyProxy.toJs(value) :
38-
value
39-
),
40-
writeFile: ({ FS, _module: { PATH, PATH_FS } }, path, buffer) =>
41-
writeFile({ FS, PATH, PATH_FS }, path, buffer),
35+
transform: (interpreter, value) => interpreter.PyProxy.toJs(value),
36+
writeFile: ({ FS }, path, buffer) =>
37+
writeFileShim(FS, path, buffer),
4238
};
4339
/* c8 ignore stop */

node.importmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"imports": {
33
"http://pyodide": "./test/mocked/pyodide.mjs",
44
"https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.mjs": "./test/mocked/pyodide.mjs",
5-
"https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@1.21.0-279/micropython.mjs": "./test/mocked/micropython.mjs",
5+
"https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@1.22.0-269/micropython.mjs": "./test/mocked/micropython.mjs",
66
"./3rd-party/toml.js": "./test/mocked/toml.mjs"
77
}
88
}

package-lock.json

Lines changed: 103 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@
3838
"license": "APACHE-2.0",
3939
"devDependencies": {
4040
"@node-loader/import-maps": "^1.1.0",
41-
"@playwright/test": "^1.41.2",
41+
"@playwright/test": "^1.42.1",
4242
"@rollup/plugin-node-resolve": "^15.2.3",
4343
"@rollup/plugin-terser": "^0.4.4",
44-
"@zip.js/zip.js": "^2.7.35",
44+
"@zip.js/zip.js": "^2.7.40",
4545
"ascjs": "^6.0.3",
4646
"c8": "^9.1.0",
4747
"chokidar": "^3.6.0",
48-
"eslint": "^8.56.0",
49-
"linkedom": "^0.16.8",
50-
"rollup": "^4.12.0",
48+
"eslint": "^8.57.0",
49+
"linkedom": "^0.16.10",
50+
"rollup": "^4.13.0",
5151
"static-handler": "^0.4.3",
52-
"typescript": "^5.3.3"
52+
"typescript": "^5.4.2"
5353
},
5454
"type": "module",
5555
"module": "./dist/index.js",
@@ -77,17 +77,17 @@
7777
"dependencies": {
7878
"@ungap/structured-clone": "^1.2.0",
7979
"@ungap/with-resolvers": "^0.1.0",
80-
"@webreflection/fetch": "^0.1.4",
80+
"@webreflection/fetch": "^0.1.5",
8181
"basic-devtools": "^0.1.6",
8282
"codedent": "^0.1.2",
83-
"coincident": "^1.2.2",
83+
"coincident": "^1.2.3",
8484
"gc-hook": "^0.3.1",
8585
"html-escaper": "^3.0.3",
86-
"proxy-target": "^3.0.1",
86+
"proxy-target": "^3.0.2",
8787
"sticky-module": "^0.1.1",
8888
"to-json-callback": "^0.1.1"
8989
},
9090
"worker": {
91-
"blob": "sha256-IxVHCm/doR/CVNO9urvV6owVVePCTl1xDm5ead/MXN0="
91+
"blob": "sha256-zz411zHZTrOorw0BiT4Kv/TPirQWq8BnzpUgZOb810k="
9292
}
9393
}

test/mocked/micropython.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const loadMicroPython = () => ({
3030
FS: {
3131
mkdirTree() {},
3232
writeFile() {},
33+
cwd() { return '/' }
3334
},
3435
_module: {
3536
PATH: { dirname },

versions/micropython

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.0-279
1+
1.22.0-269

0 commit comments

Comments
 (0)