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

Document exports in package.json's (for the regular use and for within publishConfig) #6243

Open
1 of 2 tasks
Ayc0 opened this issue Apr 22, 2024 · 3 comments
Open
1 of 2 tasks
Labels
documentation This issue or pull request is about the documentation enhancement New feature or request

Comments

@Ayc0
Copy link
Contributor

Ayc0 commented Apr 22, 2024

  • 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 can be used to override some top level fields on publish.
According to https://yarnpkg.com/configuration/manifest#publishConfig, you can only set in it:

  • access
  • bin
  • browser
  • executableFiles
  • main
  • module
  • registry
  • type

But not exports. To note: exports field replaces main, module, and type so it'd make sense to support it

According to #5874, exports does work in here, but I haven't tested it myself.

Describe the solution you'd like

Support exports in publishConfig

And if it's already supported, document it

Describe the drawbacks of your solution

None

Describe alternatives you've considered

None

@Ayc0 Ayc0 added the enhancement New feature or request label Apr 22, 2024
@merceyz
Copy link
Member

merceyz commented Apr 22, 2024

And if it's already supported, document it

Support was added in #2431 so this is indeed a documentation issue.

@merceyz merceyz added the documentation This issue or pull request is about the documentation label Apr 22, 2024
@Ayc0
Copy link
Contributor Author

Ayc0 commented Apr 22, 2024

Support was added in #2431 so this is indeed a documentation issue.

Amazing! I can draft a PR if you want

@Ayc0
Copy link
Contributor Author

Ayc0 commented Apr 22, 2024

Actually, even exports isn't documented in the top level package.json. So it's not related to just publishConfig

@Ayc0 Ayc0 changed the title [publishConfig] support exports in package.json's publishConfig [publishConfig] document exports in package.json's (for the regular use and for within publishConfig) Apr 22, 2024
@Ayc0 Ayc0 changed the title [publishConfig] document exports in package.json's (for the regular use and for within publishConfig) Document exports in package.json's (for the regular use and for within publishConfig) Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This issue or pull request is about the documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants