Skip to content
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

[Feature] - publishConfig.typesVersions #5874

Open
1 of 2 tasks
thomasleduc opened this issue Oct 26, 2023 · 0 comments
Open
1 of 2 tasks

[Feature] - publishConfig.typesVersions #5874

thomasleduc opened this issue Oct 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@thomasleduc
Copy link

thomasleduc commented Oct 26, 2023

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant