fix: resolve node10 type resolution for every subpath export - #74
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
publintandattwagainst the packed0.4.0tarball found two packaging defects, both invisible to any test importing fromsrc/.Fixed
node10module resolution.pagespeed,lighthouse,bundle,analyzer,context,report,types—node10has no support for"exports", so consumers onmoduleResolution: "node"saw no types at all for these paths. AddedtypesVersions, mapping each to its.d.ts.repository.urlwas missing thegit+prefixpublintexpects.Verification
publintAll good!attw💀 Resolution failedonnode10npm run checknpm run buildAlso: 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 published0.4.0— every subpath'simport.defaultpoints at a.mjsfile the tsup build never produced, confirmed by runningpublintagainst the published tarball. Moved that to aFixedentry 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.