-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
- I'd be willing to implement this feature (contributing guide)
- This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
publishConfig allows you to override package.json options during the publish.
In the case of monorepo, to not have to build cross packages, you can use publishConfig to have a "publish" exports
and typesVersions
while you have local paths inside the default exports
and typesVersions
.
Describe the solution you'd like
This solution works perfectly with exports
, meaning that exports
option is replace during the yarn npm publish.
But not the typesVersions
. I think typesVersions
should be allowed in some Whitelist we keep in this repository.
For more information on typesVersions, here the official typescript documentation
Describe the drawbacks of your solution
It is a common feature on npm, and recently on pnpm. Kind of standard of node and typescript. I can't see drawback except we will have one more option to watch and maybe some repositories that used this feature without it working may fail updating it.
Describe alternatives you've considered
Unfortunately, there is no alternative except use directly npm publish
instead of yarn npm publish
.