Skip to content

Add Module Loader#47

Open
AaravMalani wants to merge 5 commits into
mainfrom
feat/add-module-loader
Open

Add Module Loader#47
AaravMalani wants to merge 5 commits into
mainfrom
feat/add-module-loader

Conversation

@AaravMalani

@AaravMalani AaravMalani commented Jul 1, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new pluginset to load Source Academy modules via Conductor plugins. It adds three new packages, @sourceacademy/common-module-loader, @sourceacademy/runner-module-loader, and @sourceacademy/web-module-loader. It also reverts the repository to Yarn PnP

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9179da3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@sourceacademy/web-stepper" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Module Loader protocol and its implementation across three packages: a common package for shared types, a runner-side plugin to request and register modules, and a web-side plugin to fetch the module directory and serve module bundles. The feedback highlights critical improvements needed for protocol robustness and safety, including adding moduleName to response messages to prevent race conditions, handling potential promise rejections in asynchronous operations (such as dynamic imports and fetch requests), and securing the module name validation regex with anchors to prevent path traversal or input validation bypasses.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/common/module-loader/src/index.ts
Comment thread src/runner/module-loader/src/index.ts
Comment thread src/web/module-loader/src/index.ts
Comment thread src/web/module-loader/src/index.ts
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.

1 participant