Skip to content

Migrate to esm#290

Merged
Ma11hewThomas merged 6 commits into
mainfrom
migrate-to-esm
May 3, 2026
Merged

Migrate to esm#290
Ma11hewThomas merged 6 commits into
mainfrom
migrate-to-esm

Conversation

@Ma11hewThomas
Copy link
Copy Markdown
Contributor

No description provided.

- Add 'type: module' to package.json for native ESM
- Replace ncc with tsup (esbuild-based bundler with first-class ESM)
- Replace Jest/ts-jest with Vitest 3
- Replace ts-node with tsx
- Upgrade @actions/artifact from v5 to v6 (pure ESM)
- Add .js extensions to all relative imports (NodeNext requirement)
- Fix bare directory imports (from '.' → './index.js')
- Fix path alias imports to include .js extensions for NodeNext
- Replace __dirname with import.meta.dirname in reports/core.ts
- Add eslint.config.mjs (ESLint v9 flat config)
- Add tsconfig.eslint.json for linting test files with Vitest globals
- Update tsconfig.json excludes for new config files
- Delete .eslintignore (replaced by ignores in eslint.config.mjs)

All 89 tests pass. Full pipeline: format → lint → test → coverage → bundle ✓
Bundle CJS deps (like @actions/core and yargs) need require(), __dirname
and __filename to be available in ESM scope. Add a banner that injects
these via createRequire and import.meta properties (Node 21.2+).
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

build-and-test: Run #1536

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
89 89 0 0 0 0 0 1.5s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

@Ma11hewThomas Ma11hewThomas merged commit db0a55c into main May 3, 2026
37 checks passed
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.

1 participant