Set executableFile property for all scripts
#68
Merged
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.
Motivation
I've been experimenting with more recent versions of
yarnandPnPsupport for a newblockchain-toolkitlibrary.The way the
uphold-scriptscommands are set up rely oncommander'sdefault behaviour for sub-commands.I believe the reason it was worked so far for the projects that use it as a dependency is because of the existence of the
node_modulesdirectory and the waynodeis able to resolve modules/binaries/scripts resorting to it.Well, the idea behind PnP makes it so that a
node_modulesfolder is no longer necessary and the resolving is all managed byyarninstead.Because of that I think a bug has been found. According to the sub-commands the way we've currently set up the program would make it so that:
However, instead of looking at the
nameof theprogramit's looking at the filename instead.By adding the
executableFileproperty to each command we can specify the executable for each command and stop relying on this implicit behaviour.This shouldn't be a breaking change.
Examples
Before:
After:
No output but works as expected by creating a
CHANGELOG.mdfile that contains the following: