Skip to content

Decouple active modules from js-slang and archive the legacy dev server - #1024

Open
AaravMalani wants to merge 6 commits into
masterfrom
refactor/remove-js-slang
Open

AaravMalani wants to merge 6 commits into
masterfrom
refactor/remove-js-slang

Conversation

@AaravMalani

@AaravMalani AaravMalani commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Description

Active bundles and tabs must load without the frontend supplying js-slang through requireProvider. Remove their direct imports and dependency declarations, make the shared library independent of interpreter internals, and stop externalizing js-slang* in buildtools.

Fixes #1010.

  • Use Conductor errors and locally owned types; remove unused interpreter-specific helpers and re-exports. Share hexToColor through modules-lib while preserving RGB output and rune alpha values.
  • Remove the throw-runtime-error lint rule, its configuration, documentation, and suppression comments.
  • Move the legacy development server to src/archive/devserver, outside active workspaces, test discovery, and CI. Update commands and documentation accordingly.
  • Remove redundant root peer dependencies and have the tab generator obtain React's version from devDependencies. Keep plugin peer contracts.
  • Migrate checked error-handling and tab guides to current Conductor APIs, document public helper types, and identify the retained legacy loader examples.

Companion frontend change: source-academy/frontend#4662. Deploy the rebuilt bundles and tabs before removing the frontend's js-slang provider entries.

Type of change

  • Breaking change (removes legacy shared-library exports and development-server commands)
  • This change requires a documentation update

How Has This Been Tested?

  • Full docs build passed with Twoslash validation enabled and zero TypeDoc warnings. Documentation spellcheck passed across all 95 pages.
  • Modules-lib type checks and the two animation browser tests passed after documenting its public types.
  • yarn build:libs, yarn build:modules, and yarn tsc:modules passed.
  • 174 focused unit/browser tests passed across MIDI, rune, Curve/Rune tabs, shared utilities, the documentation plugin, repository tooling, builders, templates, and GitHub Actions.
  • Buildtools and GitHub Actions builds and type checks passed after the archive changes.
  • yarn constraints and yarn lint:global passed; lint reports 10 existing warnings and no errors.
  • Audited all 23 active bundle/tab build artifacts: no js-slang imports or requires remain. The archived server is absent from Yarn's workspace list.

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Affected unit and browser tests pass locally

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple modules and modules-lib from js-slang (so the frontend can drop it)

1 participant