chore: modernize tooling and convert to ESM#30
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) - Replace deprecated substr() with slice() - Replace default export of parseNpmTarballUrl with a named export - Drop unused typings/ directory (stub for semver-regex which is not used)
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR modernizes a npm-tarball-url parser from CommonJS to ES modules (ESM) with TypeScript, updates the Node.js engine requirement to >=22.13, migrates from Travis CI to GitHub Actions, replaces Tape tests with Node.js native test runner, and removes deprecated tooling (TSLint, ambient typings). ChangesESM Migration & Toolchain Modernization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 instead of resolving the published package name.String.prototype.substr→slice; CJS-styleimport x = require(...)→ ESM imports; export aParsedTarballUrltype.parseNpmTarballUrlswitched from default export to named export, consistent with the rest of the pnpm ecosystem.typings/index.d.ts— it stubbedsemver-regex, which the source does not use.Breaking changes
import { parseNpmTarballUrl } from 'parse-npm-tarball-url'(was a default import).Test plan
pnpm installcleanpnpm run buildproduces ESMlib/index.js+lib/index.d.tspnpm test— all 6 tests pass onnode:testSummary by CodeRabbit
Release Notes
Breaking Changes
New Features
Improvements
Documentation