Skip to content

chore: add package exports - #7

Merged
ahmed-hashi-01 merged 1 commit into
mainfrom
chore/add-package-exports
Jun 18, 2026
Merged

ahmed-hashi-01 merged 1 commit into
mainfrom
chore/add-package-exports

Conversation

@ahmed-hashi-01

Copy link
Copy Markdown
Contributor

Summary

Adds a modern exports field to package.json.

What changed

  • Added package export map for the root entrypoint
  • Supports ESM imports through import
  • Supports CommonJS usage through require
  • Exposes TypeScript declarations through types
  • Keeps main, module, and types for compatibility with older tooling

Why

The exports field makes the package entrypoint explicit and prevents accidental imports from internal files.

Checks

  • npm run typecheck
  • npm test -- --run
  • npm run build
  • npm run example:basic
  • npm run example:fallback
  • npm run example:expired
  • npm pack --dry-run

@ahmed-hashi-01
ahmed-hashi-01 merged commit 2e1aee8 into main Jun 18, 2026
2 checks passed
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.

1 participant