-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: removing publishConfigs
, using .d.ts
for types
#1055
Conversation
This PR is published in NPM with version 0.0.0-pr-1055-20230619152516 |
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.
Lgtm
bfff8e0
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.
🚀
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.
LGTM
TL;DR
This PR favors
.d.ts
files (over.ts
ones) as type definitions, even for local development. This requires rebuilding the workspace to see changes but increases reliability and compatibility with other tools.tsup
tsup
configspostbuilld
script (code)package.json
configstsup
for generating typestsc
for generating types w/ Declaration Mapsinternal
directory for validating configsSummary
The attempt to use
.ts
files instead of.d.ts
for development (introduced by #984), didn't work as expected. VSCode only fully worked for main entry points (not secondary ones), and other apps/bundlers would malfunction locally—probably due to the format discrepancies between DTS and TS.Because of this, I'm bringing back the use of Declaration Maps files (
d.ts.map
), from my first experiments in #827. Although it adds an extra step, it is more reliable and compatible with other tools. (sorry @camsjams, I tried a lot)This approach offers
publishConfig
overrides)BUT
pnpm dev
automates thisFinal Notes
If you can, please review this other PR before this one:
I separated that into another PR to make it easier to review this PR without the bulkiness of the demo apps, but I will need to merge that PR into this one before sending it to
master
.