Skip to content

Commit dd571f9

Browse files
chore(deps): update @freecodecamp/curriculum helpers to v8.0.0 (freeCodeCamp#66240)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
1 parent e72a5dc commit dd571f9

3 files changed

Lines changed: 17 additions & 35 deletions

File tree

pnpm-lock.yaml

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

tools/client-plugins/browser-scripts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@freecodecamp/browser-scripts",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "The freeCodeCamp.org open-source codebase and curriculum",
55
"license": "BSD-3-Clause",
66
"private": true,
@@ -52,7 +52,7 @@
5252
"webpack-cli": "4.10.0"
5353
},
5454
"dependencies": {
55-
"@freecodecamp/curriculum-helpers": "^7.2.0",
55+
"@freecodecamp/curriculum-helpers": "^8.0.0",
5656
"pyodide": "^0.23.3",
5757
"sass.js": "0.11.1"
5858
}

tools/client-plugins/browser-scripts/python-worker.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { loadPyodide, type PyodideInterface } from 'pyodide/pyodide.js';
99
import pkg from 'pyodide/package.json';
1010
import type { PyProxy, PythonError } from 'pyodide/ffi';
11-
import * as helpers from '@freecodecamp/curriculum-helpers';
11+
import { formatException } from '@freecodecamp/curriculum-helpers';
1212

1313
const ctx: Worker & typeof globalThis = self as unknown as Worker &
1414
typeof globalThis;
@@ -59,13 +59,9 @@ async function setupPyodide() {
5959
Object.freeze(self);
6060

6161
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
62-
pyodide.FS.writeFile(
63-
'/home/pyodide/ast_helpers.py',
64-
helpers.python.astHelpers,
65-
{
66-
encoding: 'utf8'
67-
}
68-
);
62+
pyodide.FS.writeFile('/home/pyodide/format_exception.py', formatException, {
63+
encoding: 'utf8'
64+
});
6965

7066
ignoreRunMessages = true;
7167
postMessage({ type: 'stopped' });
@@ -170,7 +166,7 @@ function initRunPython() {
170166
`);
171167
runPython(`
172168
def print_exception():
173-
from ast_helpers import format_exception
169+
from format_exception import format_exception
174170
formatted = format_exception(exception=sys.last_value, traceback=sys.last_traceback, filename="<exec>", new_filename="main.py")
175171
print(formatted)
176172
`);

0 commit comments

Comments
 (0)