Skip to content

Commit 1e248b6

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # addons/goboscript/addon.json # addons/goboscript/sb2gs.js
2 parents 3df4b1f + aa6ae3d commit 1e248b6

9 files changed

Lines changed: 41581 additions & 2555 deletions

File tree

addons-l10n/en/goboscript.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
3-
}
1+
{}

addons/goboscript/pyodide/console.html

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
<script src="https://cdn.jsdelivr.net/npm/jquery"></script>
1414
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.35.2/js/jquery.terminal.min.js"></script>
1515
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.35.2/js/unix_formatting.min.js"></script>
16-
<link
17-
href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.35.2/css/jquery.terminal.min.css"
18-
rel="stylesheet"
19-
/>
16+
<link href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.35.2/css/jquery.terminal.min.css" rel="stylesheet" />
2017
<link
2118
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🐍</text></svg>"
2219
rel="icon"
@@ -89,16 +86,9 @@
8986
const buildParam = urlParams.get("build");
9087
if (buildParam) {
9188
if (["full", "debug", "pyc"].includes(buildParam)) {
92-
indexURL = indexURL.replace(
93-
"/full/",
94-
"/" + urlParams.get("build") + "/",
95-
);
89+
indexURL = indexURL.replace("/full/", "/" + urlParams.get("build") + "/");
9690
} else {
97-
console.warn(
98-
'Invalid URL parameter: build="' +
99-
buildParam +
100-
'". Using default "full".',
101-
);
91+
console.warn('Invalid URL parameter: build="' + buildParam + '". Using default "full".');
10292
}
10393
}
10494
const { loadPyodide } = await import(indexURL + "pyodide.mjs");
@@ -113,11 +103,8 @@
113103
return result;
114104
},
115105
});
116-
let { repr_shorten, BANNER, PyodideConsole } =
117-
pyodide.pyimport("pyodide.console");
118-
BANNER =
119-
`Welcome to the Pyodide ${pyodide.version} terminal emulator 🐍\n` +
120-
BANNER;
106+
let { repr_shorten, BANNER, PyodideConsole } = pyodide.pyimport("pyodide.console");
107+
BANNER = `Welcome to the Pyodide ${pyodide.version} terminal emulator 🐍\n` + BANNER;
121108
const pyconsole = PyodideConsole(pyodide.globals);
122109

123110
const namespace = pyodide.globals.get("dict")();
@@ -134,17 +121,12 @@
134121
135122
await_fut
136123
`,
137-
{ globals: namespace },
124+
{ globals: namespace }
138125
);
139126
namespace.destroy();
140127

141128
const echo = (msg, ...opts) =>
142-
term.echo(
143-
msg
144-
.replaceAll("]]", "&rsqb;&rsqb;")
145-
.replaceAll("[[", "&lsqb;&lsqb;"),
146-
...opts,
147-
);
129+
term.echo(msg.replaceAll("]]", "&rsqb;&rsqb;").replaceAll("[[", "&lsqb;&lsqb;"), ...opts);
148130

149131
const ps1 = ">>> ";
150132
const ps2 = "... ";
@@ -188,7 +170,7 @@
188170
echo(
189171
repr_shorten.callKwargs(value, {
190172
separator: "\n<long output truncated>\n",
191-
}),
173+
})
192174
);
193175
}
194176
if (value instanceof pyodide.ffi.PyProxy) {
@@ -248,9 +230,7 @@
248230
term.error(e);
249231
term.error("Pyodide exited and can no longer be used.");
250232
} else {
251-
term.error(
252-
"Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.",
253-
);
233+
term.error("Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.");
254234
term.error("The cause of the fatal error was:");
255235
term.error(e);
256236
term.error("Look in the browser console for more details.");
@@ -269,9 +249,7 @@
269249
let idbkvPromise;
270250
async function getIDBKV() {
271251
if (!idbkvPromise) {
272-
idbkvPromise = await import(
273-
"https://unpkg.com/idb-keyval@5.0.2/dist/esm/index.js"
274-
);
252+
idbkvPromise = await import("https://unpkg.com/idb-keyval@5.0.2/dist/esm/index.js");
275253
}
276254
return idbkvPromise;
277255
}
@@ -290,8 +268,7 @@
290268
directoryHandle = await showDirectoryPicker(opts);
291269
await set(directoryKey, directoryHandle);
292270
}
293-
const permissionStatus =
294-
await directoryHandle.requestPermission(opts);
271+
const permissionStatus = await directoryHandle.requestPermission(opts);
295272
if (permissionStatus !== "granted") {
296273
throw new Error("readwrite access to directory not granted");
297274
}

0 commit comments

Comments
 (0)