Support TypeScript plugins in find plugin manager via esbuild#187
Merged
abdulahmad307 merged 22 commits intomainfrom Apr 20, 2026
Merged
Support TypeScript plugins in find plugin manager via esbuild#187abdulahmad307 merged 22 commits intomainfrom
abdulahmad307 merged 22 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/github/accessibility-scanner/sessions/874fd265-9e9f-4ac4-930d-8d26cb424035 Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/accessibility-scanner/sessions/874fd265-9e9f-4ac4-930d-8d26cb424035 Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
abdulahmad307
April 8, 2026 17:50
View session
- change reflow to .ts file - add temporary test scan for testing js files
- add new success path logs
- refactor code - restructure files for testing
a108816 to
aefd2f4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a proof-of-concept for loading TypeScript-based scanner plugins in the find GitHub Action by compiling index.ts at runtime with esbuild and falling back to index.js.
Changes:
- Add TS plugin loading via
esbuild+data:URL imports, with JS fallback. - Update
dynamicImportto support importingdata:andfile:URLs directly. - Expand unit tests around plugin entrypoint preference/fallback behavior and add
esbuilddependency.
Show a summary per file
| File | Description |
|---|---|
| .github/scanner-plugins/temp-test-scan/index.js | Adds a new JS plugin folder (appears to be a temporary/POC plugin). |
| .github/scanner-plugins/reflow-scan/index.ts | Formatting-only adjustments to built-in plugin code. |
| .github/actions/find/src/pluginManager/pluginFileLoaders.ts | New TS/JS plugin loader helpers (TS loader compiles with esbuild). |
| .github/actions/find/src/pluginManager/types.d.ts | Introduces plugin types (currently as a .d.ts). |
| .github/actions/find/src/pluginManager/index.ts | Updates plugin discovery to prefer TS entrypoints and introduces exported plugin access for tests. |
| .github/actions/find/src/dynamicImport.ts | Adds support for importing data:/file: URLs. |
| .github/actions/find/src/findForUrl.ts | Updates pluginManager import to the new module path. |
| .github/actions/find/tests/pluginManager.test.ts | Adds/updates tests for TS-vs-JS plugin loading behavior. |
| .github/actions/find/tests/findForUrl.test.ts | Adjusts imports/types after pluginManager module changes. |
| .github/actions/find/package.json | Adds esbuild dependency. |
| .github/actions/find/package-lock.json | Lockfile update to include esbuild and platform packages. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Files not reviewed (1)
- .github/actions/find/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
.github/actions/find/src/pluginManager/index.ts:12
types.d.tsis a declaration-only file and isn’t included by this package’stsconfig.json(include: ["src/**/*.ts"]), so it won’t produce any runtime output indist. ImportingPlugin/PluginDefaultParamsas values from./types.d.jswill therefore break at runtime/build. Move these types to a.tsmodule (or inline them) and import them withimport typeso no runtime import is emitted.
- Files reviewed: 8/11 changed files
- Comments generated: 6
lindseywild
reviewed
Apr 20, 2026
Contributor
lindseywild
left a comment
There was a problem hiding this comment.
In addition to these comments, I think we should update the documentation as well so users know they can now use TS files when creating custom plugins, too!
- add type keyword to type imports - add comment clarifying test scanner plugin
lindseywild
reviewed
Apr 20, 2026
Contributor
lindseywild
left a comment
There was a problem hiding this comment.
Some docs nits, feel free to do with them what you want!
lindseywild
reviewed
Apr 20, 2026
Co-authored-by: Lindsey Wild <35239154+lindseywild@users.noreply.github.com>
lindseywild
approved these changes
Apr 20, 2026
Contributor
lindseywild
left a comment
There was a problem hiding this comment.
Nice work on this! 🎉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the ability to load custom and built-in plugins from
index.tsfirst (compiled at runtime withesbuild) and fall back toindex.js.Changes
pluginManager.tsto a modulepluginManagerwith anindex.tsfile export, and other files that are internal to the module - this enables unit test mockingpluginManager:data:andfile:URLs directly..github/actions/find/tests/pluginManager.test.tsfor:esbuilddependency in.github/actions/find/package.jsonand updated lockfile.