Add CI workflow for transformer testing with ESM/CommonJS compatibility fix#9
Conversation
Co-authored-by: evilbocchi <71329833+evilbocchi@users.noreply.github.com>
Co-authored-by: evilbocchi <71329833+evilbocchi@users.noreply.github.com>
|
@copilot Workflow is failing. |
Co-authored-by: evilbocchi <71329833+evilbocchi@users.noreply.github.com>
... Fixed the ESM/CommonJS compatibility issue. The problem was that vitest was trying to require() an ES module. I resolved this by:
The fix is in commit 1724cc9. The CI should now work correctly - tests run successfully locally with the same 4 pre-existing test failures mentioned in the PR description. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
This reverts commit 1724cc9.
Removes Node.js 18.x from the test matrix in the GitHub Actions workflow, so tests now run exclusively on Node.js 20.x.
This PR adds a GitHub Actions CI workflow to automatically test the transformer package on code changes, with fixes for module compatibility issues.
What's Added
.github/workflows/test-transformer.ymlthat runs on pushes and pull requests to the main branchWorkflow Features
npm cifor reproducible, fast buildsModule Compatibility Fix
Fixed ESM/CommonJS compatibility issues that were causing CI failures:
The fix includes:
"type": "commonjs"to package.jsonERR_REQUIRE_ESMerrors in CI environmentTesting
The workflow has been validated to work with the current transformer setup:
npm run buildnpm test(59 tests total)This provides automated testing for the transformer package without affecting the runtime or demo components, laying the foundation for reliable CI/CD as the project grows.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.