-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Support static snapshots in .percy.yml
configuration file
#159
Conversation
src/utils/configuration.ts
Outdated
@@ -22,7 +29,9 @@ const configuration = (relativePath = '.percy.yml'): Configuration => { | |||
// in a chain. snapshot specific options -> agent configuration -> default values | |||
|
|||
const defaultConfiguration: Configuration = { | |||
version: 1.0, snapshot: {}, | |||
version: 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this version be updated since it introduces static_site
? It is still 100% compatible with the existing format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, 1.1?
ca7fc2b
to
7a07c6d
Compare
5019d9c
to
1faf252
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -2,3 +2,7 @@ version: 1 | |||
snapshot: | |||
widths: [375, 1280] | |||
min-height: 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-existing, but interesting this is not camel cased.
src/utils/configuration.ts
Outdated
@@ -22,7 +29,9 @@ const configuration = (relativePath = '.percy.yml'): Configuration => { | |||
// in a chain. snapshot specific options -> agent configuration -> default values | |||
|
|||
const defaultConfiguration: Configuration = { | |||
version: 1.0, snapshot: {}, | |||
version: 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, 1.1?
@@ -22,11 +29,12 @@ const configuration = (relativePath = '.percy.yml'): Configuration => { | |||
// in a chain. snapshot specific options -> agent configuration -> default values | |||
|
|||
const defaultConfiguration: Configuration = { | |||
version: 1.0, snapshot: {}, | |||
'version': 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should stay as 1.0
. These new options are completely compatible with the current configuration. We don't actually have any configuration version handling in place, this was just added for future proofing if we do find ourselves with breaking changes.
…ous configuration interfaces into multiple files
.percy.yml
configuration file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏁 LGTM 😃
# [0.6.0](v0.5.3...v0.6.0) (2019-06-06) ### Features * Support static snapshots in `.percy.yml` configuration file ([#159](#159)) ([d9e5efe](d9e5efe))
Description
This PR adds the static snapshot flags to the percy.yml file.
Since each flag has a default, the preference is to look for the yml file setting, and fall back to the flags passed in through the command line. Otherwise the defaults will always be used and the percy.yml settings will never be picked up.