Skip to content

fix: resolve node10 type resolution for every subpath export - #74

Merged
miguelcolmenares merged 1 commit into
mainfrom
fix/packaging-node10-resolution
Aug 21, 2026
Merged

fix: resolve node10 type resolution for every subpath export#74
miguelcolmenares merged 1 commit into
mainfrom
fix/packaging-node10-resolution

Conversation

@miguelcolmenares

Copy link
Copy Markdown
Member

publint and attw against the packed 0.4.0 tarball found two packaging defects, both invisible to any test importing from src/.

Fixed

  • Every subpath except the root failed node10 module resolution. pagespeed, lighthouse, bundle, analyzer, context, report, typesnode10 has no support for "exports", so consumers on moduleResolution: "node" saw no types at all for these paths. Added typesVersions, mapping each to its .d.ts.
  • repository.url was missing the git+ prefix publint expects.

Verification

Check Before After
publint 1 cosmetic suggestion All good!
attw 7/8 entries 💀 Resolution failed on node10 8/8 🟢 across node10, node16 (CJS+ESM), bundler
npm run check
npm run build

Also: CHANGELOG accuracy

The [Unreleased] section described the tsup→tsdown migration (#72) as a refactor. It is actually what fixed the 8 completely broken subpath exports currently live in the published 0.4.0 — every subpath's import.default points at a .mjs file the tsup build never produced, confirmed by running publint against the published tarball. Moved that to a Fixed entry and added this PR's fixes alongside it, so the next release's changelog accurately reflects that it repairs a real defect rather than just tidying the build.

publint and attw against the packed 0.4.0 tarball found two packaging
defects, both invisible to any test importing from src/:

- Every subpath except the root (./pagespeed, ./lighthouse,
  ./bundle, ./analyzer, ./context, ./report, ./types) failed
  node10 module resolution -- that resolution mode has no support for
  "exports", so consumers on moduleResolution: "node" saw no types at
  all for these paths. Added typesVersions mapping each to its .d.ts.
- repository.url was missing the git+ prefix publint expects.

publint now reports "All good!" and attw is green across node10,
node16 (CJS and ESM) and bundler for all 8 entry points.

Also corrects CHANGELOG.md's Unreleased section: the prior wording
described the tsup->tsdown migration as a refactor, but that migration
is what actually fixed the 8 broken subpath exports (files pointing at
.mjs the tsup build never produced) that shipped in the published
0.4.0 -- worth calling out as a Fixed entry, not folding into Changed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@miguelcolmenares
miguelcolmenares merged commit 7bd4d57 into main Aug 21, 2026
7 of 8 checks passed
@miguelcolmenares
miguelcolmenares deleted the fix/packaging-node10-resolution branch August 21, 2026 15:31
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