Skip to content

fix: correct package exports and update docs (#3)#4

Merged
stevan-borus merged 2 commits intomainfrom
fix/package-exports-missing-dist-files
Apr 2, 2026
Merged

fix: correct package exports and update docs (#3)#4
stevan-borus merged 2 commits intomainfrom
fix/package-exports-missing-dist-files

Conversation

@stevan-borus
Copy link
Copy Markdown
Owner

Summary

Resolves #3 — users got an error on import because package.json pointed to dist/index.js which doesn't exist (tsdown outputs .cjs/.mjs).

  • Fix package exports: maindist/index.cjs, moduledist/index.mjs, added proper exports map with conditional import/require entries
  • Fix README: removed async/await from examples (parse() has been synchronous since v2.0.0), corrected API signature (string | null, returns Referer not Promise<Referer>), fixed casing in example output
  • Fix .npmignore: referenced tsup.config.ts (old build tool) instead of tsdown.config.ts
  • Bump all deps to latest: biome 2.4.10, tsdown 0.21.7, typescript 6.0.2, vite 8.0.3, vitest 4.1.2

Test plan

  • All 23 existing tests pass
  • Build succeeds and produces correct dist files (index.cjs, index.mjs, index.d.cts, index.d.mts)
  • exports map matches actual build output

- Fix main/module/types paths to match actual tsdown output (.cjs/.mjs)
- Add conditional exports map for proper ESM/CJS resolution
- Update README: remove async/await (parse() is synchronous since v2.0.0)
- Fix API signature docs (string | null, returns Referer not Promise)
- Fix .npmignore to reference tsdown.config.ts instead of tsup.config.ts
- Bump all deps to latest

Closes #3
- Install @changesets/cli and @changesets/changelog-github
- Configure changesets with GitHub changelog generation
- Add version, changeset, and release scripts
@stevan-borus stevan-borus merged commit dc5ed6d into main Apr 2, 2026
4 checks passed
@stevan-borus stevan-borus deleted the fix/package-exports-missing-dist-files branch April 2, 2026 13:29
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.

I got an Error when upgrade 1.0.8

1 participant