Skip to content

Commit f4c607c

Browse files
committed
moved remote packages before
1 parent 05f371a commit f4c607c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs/index.js

Lines changed: 1 addition & 1 deletion
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/micropython.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ export default {
4141
globalThis[js_modules].set('-T-', this.transform.bind(this, interpreter));
4242
const py_imports = importPackages.bind(this, interpreter, baseURL);
4343
loader.set(interpreter, py_imports);
44+
if (config.experimental_remote_packages) {
45+
progress('Loading remote packages');
46+
config.packages = await _remote_package(config);
47+
progress('Loaded remote packages');
48+
}
4449
await loadProgress(this, progress, interpreter, config, baseURL);
4550
// Install Micropython Package
4651
this.writeFile(interpreter, './mip.py', mip);
4752
if (config.packages) {
48-
if (config.experimental_remote_packages) {
49-
progress('Loading remote packages');
50-
config.packages = await _remote_package(config);
51-
progress('Loaded remote packages');
52-
}
5353
progress('Loading packages');
5454
await py_imports(config.packages.map(fixedRelative, baseURL));
5555
progress('Loaded packages');

esm/interpreter/pyodide.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ export default {
9797
}
9898
}
9999
}
100+
if (config.experimental_remote_packages) {
101+
progress('Loading remote packages');
102+
config.packages = (packages = await _remote_package(config, packages));
103+
progress('Loaded remote packages');
104+
}
100105
}
101106
progress('Loading Storage');
102107
const indexURL = url.slice(0, url.lastIndexOf('/'));
@@ -112,11 +117,6 @@ export default {
112117
if (!save) storage.clear();
113118
// otherwise check if cache is known
114119
if (packages) {
115-
if (config.experimental_remote_packages) {
116-
progress('Loading remote packages');
117-
config.packages = (packages = await _remote_package(config, packages));
118-
progress('Loaded remote packages');
119-
}
120120
if (save) {
121121
// packages_cache = 'passthrough' means: do not use micropip.install
122122
if (config.packages_cache === 'passthrough') {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@
9595
"to-json-callback": "^0.1.1"
9696
},
9797
"worker": {
98-
"blob": "sha256-OsfM7DVeojPLy1YAjeokTVuQFBu7RgbGtj2MEoRzKPI="
98+
"blob": "sha256-KAjqLKnATwMGpCYHIqvKU0qTsPMg89Hg6gH2nz5FBys="
9999
}
100100
}

0 commit comments

Comments
 (0)