Skip to content

POC: support TypeScript plugins in find plugin manager via esbuild#187

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/implement-esbuild-plugin-support
Draft

POC: support TypeScript plugins in find plugin manager via esbuild#187
Copilot wants to merge 2 commits intomainfrom
copilot/implement-esbuild-plugin-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

Summary

Implement a proof-of-concept in .github/actions/find/src/pluginManager.ts to load custom and built-in plugins from index.ts first (compiled at runtime with esbuild) and fall back to index.js.

Changes

  • Added runtime TypeScript plugin support in pluginManager:
    • resolve plugin entry as index.ts first, then index.js
    • compile index.ts with esbuild (bundle, esm, platform: node, target: node24)
    • import compiled output via data: URL
    • keep existing plugin skip/registration behavior
  • Updated dynamic import helper to support importing data: and file: URLs directly.
  • Added tests in .github/actions/find/tests/pluginManager.test.ts for:
    • preferring index.ts when both TS/JS entrypoints exist
    • falling back to index.js when TS entrypoint is absent
  • Added esbuild dependency in .github/actions/find/package.json and updated lockfile.

Validation

  • npm run lint (repo root)
  • npx vitest run .github/actions/find/tests/pluginManager.test.ts .github/actions/find/tests/findForUrl.test.ts
  • npm --prefix .github/actions/find run build
  • parallel_validation (Code Review + CodeQL): no remaining comments, no CodeQL alerts

Notes

  • Baseline repo-wide npm test still includes an existing environment-dependent failure when CACHE_PATH is not set (tests/site-with-errors.test.ts), unrelated to this change.

Copilot AI and others added 2 commits April 8, 2026 17:46
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>
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.

2 participants