Add support for extendedPublishConfig, apply to workspace resolver #2146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks @steveukx for providing prior art in git-js! My implementation is very similar, but I've come up with some alternative naming, let me know what you think.
extendedPublishConfig
block in thepackage.json
of any packages in the project. The idea is that we can make changes to the project before publishing, very similar to the native publishConfig option, however, is not restricted to what fields we can change.extendedPublishConfig
will override fields of the same name at publish timescripts
, since they are useless in published packages. This isn't required to achieve the desired result here, but could help avoid confusion should a user attempt to use scripts in the wrong wayextendedPublishConfig
to the workspace resolver package. In this case, we have made themain
andtypes
fields change to the built versions at publish time.The end result is that developers no longer need to build the workspace resolver package in local dev - the dependency can be imported right away, and the types just work.