• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / frontend / 25204565701

01 May 2026 06:06AM UTC coverage: 40.786% (-0.02%) from 40.805%
25204565701

push

github

web-flow
Adapt to js-slang 1.0.92 API changes (#3802)

* Adapt to js-slang 1.0.92 API changes

Bump js-slang from 1.0.90 to 1.0.92 and update the frontend to match
the breaking changes introduced by source-academy/js-slang#1893:

- `TypeError` in `js-slang/dist/utils/rttc` was renamed to
  `RuntimeTypeError`.
- `ModuleFunctions` type was removed from
  `js-slang/dist/modules/moduleTypes`.
- `loadSourceModules` now takes `Record<string, ModuleInfo>` instead of
  `Set<string>`, and its third argument is `Partial<ImportLoadingOptions>`
  instead of a boolean `loadTabs`. Callers in `CToWasmHelper` and
  `JavaHelper` now build the required `ModuleInfo` map from
  `memoizedGetModuleManifestAsync`.
- `createContext` now returns a `moduleContexts` that is a lazy-init
  `Proxy` whose `get` trap writes to its target. When Redux Toolkit
  (Immer) freezes the workspace state, `JSON.stringify` probing
  `toJSON` trips the proxy into mutating a frozen object and throws
  "Cannot add property toJSON, object is not extensible". The wrapper
  `createContext` in `JsSlangHelper` now replaces `moduleContexts` with
  a plain `{}`.
- Built-in functions like `pair` now expose `toReplString`, which made
  the CSE machine's `isSourceObject` (using lodash `isObject`, which
  returns true for functions) misclassify them as source objects and
  render them as `PrimitiveValue` with no arrow. Guard against
  functions in `isSourceObject`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Throw when a requested module is missing from the manifest

Addresses gemini-code review on #3802: the previous loader silently
skipped modules absent from the manifest, which would only surface
later as a confusing "function not found" runtime error. The pre-bump
js-slang threw in that case; restore that behavior with an explicit
error in both the C and Java module-loading paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthrop... (continued)

2406 of 7009 branches covered (34.33%)

Branch coverage included in aggregate %.

5 of 18 new or added lines in 5 files covered. (27.78%)

1 existing line in 1 file now uncovered.

6095 of 13834 relevant lines covered (44.06%)

28.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/commons/utils/JavaHelper.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc