chore(deps): update @freecodecamp/curriculum helpers to v8.0.0 (#66240)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Dario
2026-03-05 18:03:25 +01:00
committed by GitHub
parent e72a5dc1bb
commit dd571f965b
3 changed files with 17 additions and 35 deletions

View File

@@ -8,7 +8,7 @@
import { loadPyodide, type PyodideInterface } from 'pyodide/pyodide.js';
import pkg from 'pyodide/package.json';
import type { PyProxy, PythonError } from 'pyodide/ffi';
import * as helpers from '@freecodecamp/curriculum-helpers';
import { formatException } from '@freecodecamp/curriculum-helpers';
const ctx: Worker & typeof globalThis = self as unknown as Worker &
typeof globalThis;
@@ -59,13 +59,9 @@ async function setupPyodide() {
Object.freeze(self);
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
pyodide.FS.writeFile(
'/home/pyodide/ast_helpers.py',
helpers.python.astHelpers,
{
encoding: 'utf8'
}
);
pyodide.FS.writeFile('/home/pyodide/format_exception.py', formatException, {
encoding: 'utf8'
});
ignoreRunMessages = true;
postMessage({ type: 'stopped' });
@@ -170,7 +166,7 @@ function initRunPython() {
`);
runPython(`
def print_exception():
from ast_helpers import format_exception
from format_exception import format_exception
formatted = format_exception(exception=sys.last_value, traceback=sys.last_traceback, filename="<exec>", new_filename="main.py")
print(formatted)
`);