Skip to content

Commit cefdff0

Browse files
committed
0.19.4
1 parent c879c6e commit cefdff0

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
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/pyodide.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,27 @@ export default {
7676
async engine({ loadPyodide, version }, config, url, baseURL) {
7777
progress('Loading Pyodide');
7878
let { packages, index_urls } = config;
79-
if (packages && !index_urls) {
79+
if (packages) {
8080
packages = packages.map(fixedRelative, baseURL);
81-
progress('Loading Packages Graph');
82-
const { default: graph } = await import(/* webpackIgnore: true */'./pyodide_graph.js');
83-
progress('Loaded Packages Graph');
84-
if (hasOwn(graph, version)) {
85-
const invalid = packages.filter(entry => {
86-
// consider only packages by name
87-
if (/^[a-zA-Z0-9_-]/.test(entry)) {
88-
const [name, ...rest] = entry.split(/[>=<]=/);
89-
const known = hasOwn(graph[version], name);
90-
return !known || (rest.length > 0 && rest[1] !== graph[version][name]);
81+
if (!index_urls) {
82+
progress('Loading Packages Graph');
83+
const { default: graph } = await import(/* webpackIgnore: true */'./pyodide_graph.js');
84+
progress('Loaded Packages Graph');
85+
if (hasOwn(graph, version)) {
86+
const invalid = packages.filter(entry => {
87+
// consider only packages by name
88+
if (/^[a-zA-Z0-9_]/.test(entry)) {
89+
const [name, ...rest] = entry.split(/[>=<]=/);
90+
const known = hasOwn(graph[version], name);
91+
return !known || (rest.length > 0 && rest[1] !== graph[version][name]);
92+
}
93+
return false;
94+
});
95+
if (invalid.length > 0) {
96+
throw new Error(
97+
`These packages are not supported in Pyodide ${version}: ${invalid.join(', ')}`
98+
);
9199
}
92-
return false;
93-
});
94-
if (invalid.length > 0) {
95-
throw new Error(
96-
`These packages are not supported in Pyodide ${version}: ${invalid.join(', ')}`
97-
);
98100
}
99101
}
100102
}

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polyscript",
3-
"version": "0.19.3",
3+
"version": "0.19.4",
44
"description": "PyScript single core to rule them all",
55
"main": "./esm/index.js",
66
"types": "./types/polyscript/esm/index.d.ts",
@@ -95,6 +95,6 @@
9595
"to-json-callback": "^0.1.1"
9696
},
9797
"worker": {
98-
"blob": "sha256-oUV6lXD0gmOsTIDaG7hhhl+jtixfGohIon4baCZCAvc="
98+
"blob": "sha256-Vk2bCgZkE6cVThumeUU072fvoMrMyrKwya7Ut//rSwc="
9999
}
100100
}

0 commit comments

Comments
 (0)