From dd571f965b699e168de53a215ebf106e1b66e82a Mon Sep 17 00:00:00 2001 From: Dario <105294544+Dario-DC@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:03:25 +0100 Subject: [PATCH] chore(deps): update @freecodecamp/curriculum helpers to v8.0.0 (#66240) Co-authored-by: Oliver Eyton-Williams --- pnpm-lock.yaml | 34 ++++++------------- .../browser-scripts/package.json | 4 +-- .../browser-scripts/python-worker.ts | 14 +++----- 3 files changed, 17 insertions(+), 35 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8fda016a4c7..dd5989eefc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1112,8 +1112,8 @@ importers: tools/client-plugins/browser-scripts: dependencies: '@freecodecamp/curriculum-helpers': - specifier: ^7.2.0 - version: 7.2.0(debug@4.3.4)(typescript@5.9.3) + specifier: ^8.0.0 + version: 8.0.0(debug@4.3.4)(typescript@5.9.3) pyodide: specifier: ^0.23.3 version: 0.23.4 @@ -3310,8 +3310,8 @@ packages: '@fortawesome/fontawesome-svg-core': ~1 || ~6 || ~7 react: ^16.3 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@freecodecamp/curriculum-helpers@7.2.0': - resolution: {integrity: sha512-C67fRaglYLDuj4YcjiprBafIanJdACWzeWk65ywD/8IGWThT85e6qKk80pCN1Z7XjSXec/L0wB7PBykqmppP+A==} + '@freecodecamp/curriculum-helpers@8.0.0': + resolution: {integrity: sha512-7AUPwVjm1LVUUMC8WypTbH9ufTRWuk+7+upbQnC10/zB+KmzCKtoZYm9tf8S2HJljq2kbhLrlzDAnPln8kQLSg==} engines: {pnpm: '>= 10'} '@freecodecamp/loop-protect@3.0.0': @@ -8627,15 +8627,6 @@ packages: flatted@3.3.3: resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} - follow-redirects@1.15.3: - resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - follow-redirects@1.15.9: resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} @@ -17872,7 +17863,7 @@ snapshots: prop-types: 15.8.1 react: 18.2.0 - '@freecodecamp/curriculum-helpers@7.2.0(debug@4.3.4)(typescript@5.9.3)': + '@freecodecamp/curriculum-helpers@8.0.0(debug@4.3.4)(typescript@5.9.3)': dependencies: '@sinonjs/fake-timers': 14.0.0 '@types/jquery': 3.5.32 @@ -21170,7 +21161,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@24.10.14)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@24.10.14)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1) + vitest: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@24.10.14)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@24.10.14)(typescript@5.9.3))(terser@5.46.0)(tsx@4.19.1)(yaml@2.8.1) '@vitest/utils@3.2.4': dependencies: @@ -24469,10 +24460,6 @@ snapshots: flatted@3.3.3: {} - follow-redirects@1.15.3(debug@4.3.4): - optionalDependencies: - debug: 4.3.4(supports-color@8.1.1) - follow-redirects@1.15.9(debug@4.3.4): optionalDependencies: debug: 4.3.4(supports-color@8.1.1) @@ -25529,7 +25516,7 @@ snapshots: http-proxy@1.18.1(debug@4.3.4): dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.3(debug@4.3.4) + follow-redirects: 1.15.9(debug@4.3.4) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -28192,7 +28179,7 @@ snapshots: debug: 4.4.3 devtools-protocol: 0.0.1452169 typed-query-selector: 2.12.0 - ws: 8.18.2 + ws: 8.19.0 transitivePeerDependencies: - bare-buffer - bufferutil @@ -28233,7 +28220,7 @@ snapshots: dependencies: base-64: 1.0.0 node-fetch: 2.7.0 - ws: 8.18.2 + ws: 8.19.0 transitivePeerDependencies: - bufferutil - encoding @@ -31372,8 +31359,7 @@ snapshots: ws@8.18.3: {} - ws@8.19.0: - optional: true + ws@8.19.0: {} x-is-string@0.1.0: {} diff --git a/tools/client-plugins/browser-scripts/package.json b/tools/client-plugins/browser-scripts/package.json index 20aede0c746..3f18ad2fe24 100644 --- a/tools/client-plugins/browser-scripts/package.json +++ b/tools/client-plugins/browser-scripts/package.json @@ -1,6 +1,6 @@ { "name": "@freecodecamp/browser-scripts", - "version": "1.0.0", + "version": "1.0.1", "description": "The freeCodeCamp.org open-source codebase and curriculum", "license": "BSD-3-Clause", "private": true, @@ -52,7 +52,7 @@ "webpack-cli": "4.10.0" }, "dependencies": { - "@freecodecamp/curriculum-helpers": "^7.2.0", + "@freecodecamp/curriculum-helpers": "^8.0.0", "pyodide": "^0.23.3", "sass.js": "0.11.1" } diff --git a/tools/client-plugins/browser-scripts/python-worker.ts b/tools/client-plugins/browser-scripts/python-worker.ts index acc03dbbfbf..d2576b4942e 100644 --- a/tools/client-plugins/browser-scripts/python-worker.ts +++ b/tools/client-plugins/browser-scripts/python-worker.ts @@ -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="", new_filename="main.py") print(formatted) `);