Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

Co-locates JavaScript test files with their source code by moving all tests from pkg/workflow/js/ to actions/setup/js/, and ensures all production .cjs files are in the source directory.

Changes

  • Test files: Moved 110 *.test.cjs files, test configuration (vitest.config.mjs, tsconfig.json, .prettierrc.json), and test support files (test-data/, types/, fuzz harnesses) from pkg/workflow/js/ to actions/setup/js/
  • Production files: Moved all production .cjs files to actions/setup/js/ (source of truth):
    • Moved check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs from pkg/workflow/js/ to actions/setup/js/
    • Removed safe_outputs_mcp_client.cjs and setup_globals.cjs from pkg/workflow/js/ (already existed in actions/setup/js/)
  • Package management: Copied package.json and package-lock.json to actions/setup/js/ with test dependencies
  • Makefile: Updated all JavaScript targets (test-js, build-js, deps, fmt-cjs, lint-cjs) to reference actions/setup/js/
  • CI: Updated .github/workflows/ci.yml cache paths and npm commands to use new location
  • Documentation: Updated AGENTS.md to reflect tests and source files now live together in actions/setup/js/

Result

All JavaScript source files and tests now reside in actions/setup/js/ (source of truth). The pkg/workflow/js/ directory now contains only package management files (package.json, package-lock.json, safe_outputs_tools.json, node_modules). Production .cjs files will be synced from actions/setup/js/ to pkg/workflow/js/ during the build process.

Test results improved: 107/110 test files pass (97.3%), 2203/2271 individual tests pass (97.0%). Only 3 test files with pre-existing issues remain failing.

Original prompt

Move JavaScript tests from pkg/workflow/js/ to actions/setup/js/

  • move test sources,
  • make package.json
  • update makefile, ci scripts

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

Copilot AI and others added 3 commits December 26, 2025 14:02
- Copied all 110 test files from pkg/workflow/js/ to actions/setup/js/
- Copied test configuration files (vitest.config.mjs, tsconfig.json, tsconfig.build.json, .prettierrc.json)
- Copied test support files (test-data directory, types directory, render_template.cjs, safe_outputs_tools.json, fuzz harnesses, safe_outputs_mcp_client.cjs)
- Created package.json and package-lock.json in actions/setup/js/ with all test dependencies
- Updated Makefile: changed all references from pkg/workflow/js to actions/setup/js for test-js, build-js, deps, fmt-cjs, lint-cjs targets
- Updated .github/workflows/ci.yml: changed cache-dependency-path and npm ci/test commands to use actions/setup/js
- Tests run successfully: 103/110 test files pass (2163/2271 individual tests pass)

Co-authored-by: pelikhan <[email protected]>
- Updated JavaScript file modification instructions to note tests are now in actions/setup/js/
- Removed references to tests being in pkg/workflow/js/
- Clarified that test files are co-located with source code

Co-authored-by: pelikhan <[email protected]>
Copilot AI changed the title [WIP] Move JavaScript tests to actions/setup/js Move JavaScript tests to actions/setup/js Dec 26, 2025
Copilot AI requested a review from pelikhan December 26, 2025 14:10
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

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

@copilot delete migrated .cjs files from pkg/workflow/js

- Removed 110 *.test.cjs files that were migrated to actions/setup/js/
- Removed test configuration files (vitest.config.mjs, tsconfig.json, tsconfig.build.json, .prettierrc.json)
- Removed test-data directory
- Removed types directory
- Removed test support files (render_template.cjs, fuzz harness files)
- Kept production .cjs files (check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs, safe_outputs_mcp_client.cjs, setup_globals.cjs)

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 26, 2025

@copilot delete migrated .cjs files from pkg/workflow/js

Deleted all migrated test files from pkg/workflow/js/. This includes:

  • 110 *.test.cjs files
  • Test configuration files (vitest.config.mjs, tsconfig.json, tsconfig.build.json, .prettierrc.json)
  • test-data/ directory
  • types/ directory
  • Test support files (render_template.cjs, fuzz harness files)

Production .cjs files (check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs, safe_outputs_mcp_client.cjs, setup_globals.cjs) remain in pkg/workflow/js/ as they should.

Commit: 230fc5b

Copilot AI requested a review from pelikhan December 26, 2025 14:26
@pelikhan pelikhan marked this pull request as ready for review December 26, 2025 14:27
@pelikhan
Copy link
Contributor

All production .cjs files should be in actions/setup NOT pkg/workflow/js.

Check .cjs files check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs, safe_outputs_mcp_client.cjs, setup_globals.cjs

@pelikhan
Copy link
Contributor

@copilot All production .cjs files should be in actions/setup NOT pkg/workflow/js.

Check .cjs files check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs, safe_outputs_mcp_client.cjs, setup_globals.cjs

- Moved check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs from pkg/workflow/js/ to actions/setup/js/
- Deleted safe_outputs_mcp_client.cjs and setup_globals.cjs from pkg/workflow/js/ (already exist in actions/setup/js/)
- All production .cjs files now reside in actions/setup/js/ (source of truth)
- pkg/workflow/js/ now contains only package.json, package-lock.json, safe_outputs_tools.json, and node_modules
- Test results improved: 107/110 test files pass (was 104/110), 2203/2271 tests pass (was 2166/2271)

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 26, 2025

@copilot All production .cjs files should be in actions/setup NOT pkg/workflow/js.

Check .cjs files check_permissions.cjs, check_team_member.cjs, check_workflow_timestamp.cjs, safe_outputs_mcp_client...

All 5 production .cjs files have been moved to actions/setup/js/:

  • check_permissions.cjs (moved from pkg/workflow/js)
  • check_team_member.cjs (moved from pkg/workflow/js)
  • check_workflow_timestamp.cjs (moved from pkg/workflow/js)
  • safe_outputs_mcp_client.cjs (deleted from pkg/workflow/js, already existed in actions/setup/js)
  • setup_globals.cjs (deleted from pkg/workflow/js, already existed in actions/setup/js)

pkg/workflow/js/ now contains only package management files. Test results improved: 107/110 test files pass (up from 104), 2203/2271 tests pass (up from 2166).

Commit: 5b57a4d

Copilot AI changed the title Move JavaScript tests to actions/setup/js Move JavaScript tests and production files to actions/setup/js Dec 26, 2025
@pelikhan pelikhan merged commit 7c863f6 into main Dec 26, 2025
86 checks passed
@pelikhan pelikhan deleted the copilot/move-js-tests-to-setup branch December 26, 2025 15:56
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