Improved build packaging with dts sourcemaps#30
Merged
Conversation
- Migrated to `tsdown` from `tsup` b/c `tsup` is no longer actively maintained. - Generated dts sourcemaps to link generated types to canonical source types in `lib`. - removed `./dist/*` from package.json `exports`.
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the build tooling from tsup to tsdown and improves TypeScript declaration file generation by adding source maps to link generated types back to their canonical source.
- Migrated from
tsuptotsdownfor build tooling - Added DTS source maps to improve developer experience with type definitions
- Updated package.json exports and build configuration
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tsdown.config.ts | Migrated configuration from tsup to tsdown with DTS source maps enabled |
| package.json | Updated build script and dependencies, modified exports configuration |
| test-integration/esm-project/import.test.ts | Updated test description for clarity |
| test-integration/cjs-project/import.test.js | Updated test description for clarity |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "type": "module", | ||
| "license": "Apache-2.0", | ||
| "main": "dist/index.mjs", | ||
| "main": "dist/index.js", |
There was a problem hiding this comment.
The main field points to 'dist/index.js' but the exports show ESM uses 'dist/index.js' and CJS uses 'dist/index.cjs'. Consider updating main to point to 'dist/index.cjs' since main is typically used for CommonJS entry point.
Suggested change
| "main": "dist/index.js", | |
| "main": "dist/index.cjs", |
ndeloof
approved these changes
Oct 8, 2025
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.
- What I did
Improved build packaging with dts sourcemaps
- How I did it
tsdownfromtsupb/ctsupis no longer actively maintained.lib../dist/*from package.jsonexports.- How to verify it
test-integration/cjs-projectandtest-integration/esm-project- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)