🐛 Do not replace initial overrides with empty flags#497
Merged
Conversation
samarsault
pushed a commit
that referenced
this pull request
Mar 3, 2023
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.4 to 9.6.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v9.5.4...v9.6.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is this?
The
initialOverridesvalue of the shared CLI#percyrc()method does not work as intended. Flags always override the initial overrides, even when the flag is undefined, resulting in desired values being removed from the resulting config object.This PR fixes the issue by aborting the override if the flag is null or undefined. I also borrowed the
setutil from@percy/configto set the overridden flag using a much more tested method. An existing test was also updated to remove unnecessary set up.