feat!: disable types when legacy isn't passed as well#685
feat!: disable types when legacy isn't passed as well#685sxzz merged 3 commits intorolldown:mainfrom
Conversation
✅ Deploy Preview for tsdown ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
src/features/pkg/exports.ts
Outdated
| main: legacy ? main || module || pkg.main : undefined, | ||
| module: legacy ? module || pkg.module : undefined, | ||
| types: cjsTypes || esmTypes || pkg.types, | ||
| types: legacy ? cjsTypes || esmTypes || pkg.types : undefined, |
There was a problem hiding this comment.
I think the dance we did in the above packages was good and right, but if you disagree, we could also do:
| main: legacy ? main || module || pkg.main : undefined, | |
| module: legacy ? module || pkg.module : undefined, | |
| types: cjsTypes || esmTypes || pkg.types, | |
| types: legacy ? cjsTypes || esmTypes || pkg.types : undefined, | |
| main: legacy ? main || module || pkg.main : pkg.main, | |
| module: legacy ? module || pkg.module : pkg.module, | |
| types: legacy ? cjsTypes || esmTypes || pkg.types : pkg.types, |
I don't love that though, it feels a bit too magical and means we don't auto-migrate users anymore.
|
This may introduce potential issues:
As a result, we will not be merging this PR at this time. For further discussion, please visit publint/publint#24 |
sxzz
left a comment
There was a problem hiding this comment.
I prefer to keep the types field for tsdown itself, but I agree that we should no longer auto-fill the types field if it was not present originally. This change will not affect the default value of the dts option.
Description
Disables
typeswhen usingexports.Linked Issues
Additional context
Made this in the GitHub editor, test snapshots will likely need updating.