Skip to content

[Feature] - publishConfig.typesVersions #5874

@thomasleduc

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions