Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Validates that JavaScript scripts compiled into lock files export main functions and are properly packaged in custom actions.

Changes

  • Added pkg/workflow/js_exports_test.go - Comprehensive validation covering:
    • Scripts used in lock files via const { main } = require('/tmp/gh-aw/actions/SCRIPT.cjs') export main
    • Setup action packages all 117 .cjs files
    • Safe-inputs/safe-outputs actions embed MCP server files correctly

Findings

All 31 scripts used in lock files already export main correctly. Helper modules (e.g., generate_footer.cjs, is_truthy.cjs) correctly export utility functions instead of main, as expected.

Test prevents regressions in the three-layer JavaScript packaging system:

  1. Lock files → require main export
  2. Setup action → copies all .cjs to /tmp/gh-aw/actions
  3. MCP server actions → embed/copy server files
Original prompt

Review each JavaScript script compiled in the lock files and ensure it exports main function and it is packaged in the custom actions/setup.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ctions

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review JavaScript scripts for main function export Add validation test for JavaScript main exports in lock files Dec 24, 2025
Copilot AI requested a review from pelikhan December 24, 2025 05:13
@pelikhan pelikhan closed this Dec 24, 2025
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