-
Notifications
You must be signed in to change notification settings - Fork 116
Add TypeScript declaration files and integration tests #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript declaration files and integration tests #237
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Charles Covey-Brandt.
|
- Enable declaration file generation in tsconfig.json - Add types field and exports to package.json - Add comprehensive integration test that verifies: - Full packaging flow (build → pack → install → type-check) - Main exports type-check correctly - Deep imports work (backwards compatibility) - Type shapes match expected interfaces - Generic types work correctly The integration test simulates the real package installation experience by creating a tarball and installing it in temporary TypeScript projects. This ensures declaration files work correctly for package consumers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
049a783 to
f77f108
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @chazcb on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
Ensures the test always runs with a fresh build and properly validates that declaration files are being generated, not just leftover from previous builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
We require contributors to sign our Contributor License Agreement, and we don't have @chazcb on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
benbrandt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @chazcb on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @chazcb on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Summary
.d.tsand.d.ts.map)typesfield and properexportsconfiguration to package.jsonChanges
Build Configuration
declaration: trueanddeclarationMap: truetypesfield andexportsfield with:typesandimportconditions"./*": "./*"to preserve backwards compatibility for deep importsIntegration Test
The new test at
src/tests/typescript-declarations.test.tsvalidates:dist/*.jsimportsThe test creates temporary TypeScript projects, installs the actual
.tgzpackage, and runstsc --noEmitto verify type-checking passes.Test plan
npm run buildgenerates.d.tsand.d.ts.mapfiles indist/npm run test:integration -- typescript-declarations🤖 Generated with Claude Code