Add warning (and flag) for unused YarnLink #160
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.
Part of pulumi/home#4417
While working on pulumi/pulumi-gcp#3460, I discovered that the version of
@pulumi/pulumi-gcpused on the NodeJS tests was not the module under test: We were effectively testing against old versions of the library instead of using the NodeJS provider SDK release candidates.I am adding a new
opttest.Optionboolean flagRequireYarnLinksthat will gate the behavior of whenYarnLinkshave not been set.RequireYarnLinkshas three possible values:nil(or unset): Logs a warning if a NodeJS pulumi project does not specify at least oneYarnLink.true: Fail the test if there's not at least oneYarnLink.false: Suppress warning and silently ignore that there are noYarnLinks set. I am not sure if this would be immediately useful, but there may be some potential use case I don't know yet.Moving forward, on the next
pulumitestmajor version bump, we should make theRequireYarnLinksflag default totrue: That would mean that test authors would need to explicitly opt-out from requiring at least oneYarnLink.