chore: modernize tooling and convert to ESM#21
Conversation
- Convert package to ESM (type=module, exports map) - Bump Node engine to >=22.13 - Replace tape/ts-node/tslint/package-preview with node:test + tsx - Switch tsconfig to NodeNext, target es2022 - Replace Travis CI with GitHub Actions (Node 22, 24 on Ubuntu/macOS/Windows) - Convert CJS-style imports to ESM; use createRequire for the fallback pnpm binary lookup - Bump bundled pnpm runtime dep from v6 to v11 - Drop typings/ in favor of @types/command-exists and @types/cross-spawn - Replace anonymous default export with named export pnpmExec - Mark test fixture as its own pnpm workspace root so installs run in isolation; ignore the auto-generated fixture lockfile - Drop legacy test/fixture/shrinkwrap.yaml (pnpm v0/v1 era)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThis PR migrates the ChangesESM Migration & Modernization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
type: module,exportsmap with types/default).>=22.13; modern tsconfig (module/moduleResolution: nodenext,target: es2022,verbatimModuleSyntax).package-previewwith the built-innode:testrunner driven bytsx. Tests now import from../src/index.tsdirectly.import x = require(...)to ESM imports; usecreateRequire(import.meta.url)for the fallbackpnpm/bin/pnpm.cjslookup that previously relied onrequire.resolve.pnpmruntime dep from v6 to v11.typings/stubs in favor of@types/command-existsand@types/cross-spawn.pnpmExecis now a named export (was an anonymous default export). Pulling the function name into the source means consumers and the README no longer rely on.default.pnpm-workspace.yaml) so the install pnpm runs during the test doesn't bubble up into the outer workspace; gitignore the fixture's auto-generated lockfile.test/fixture/shrinkwrap.yaml(pnpm v0/v1 era).Breaking changes
import { pnpmExec } from '@pnpm/exec'(wasrequire('@pnpm/exec').default).Test plan
pnpm installcleanpnpm run buildproduces ESMlib/index.js+lib/index.d.tspnpm test— fixture install runs andfindsDep()returns trueSummary by CodeRabbit
Breaking Changes
pnpmExecfunctionNew Features
Chores