Skip to content
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

Rename uses of term 'whitelist' #7782

Merged
merged 17 commits into from Jun 30, 2020
Merged

Rename uses of term 'whitelist' #7782

merged 17 commits into from Jun 30, 2020

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Jun 23, 2020

User facing changelog

  • The Cypress.Cookies.defaults() whitelist option has been renamed to preserve to more closely reflect its behavior.
  • The cy.server() whitelist option has been renamed to ignore to more closely reflect its behavior.

Additional details

  • This PR renames all instances of the the word whitelist in user-facing APIs, code, and tests.
  • When renaming the keys, we decided to rename them based on the real intent/behavior of the keys, as opposed to maintaining a 1to1 matching change of what whitelist typically means. I think this will be more explicit upfront about what the keys function is rather than a generic whitelist or allow key.
  • This PR does not change occurrences of the word for 3rd party integrations (Chrome and Firefox both have keys we need to send that include whitelist.

How has the user experience changed?

cy.server()

// Before
cy.server({ whitelist: () => {}})

// After
cy.server({ ignore: () => {}})

An error will now throw when defining whitelist function on cy.server().

Screen Shot 2020-06-24 at 5 31 50 PM

// Before
Cypress.Cookies.default({ whitelist: 'session_id'})

// After
Cypress.Cookies.default({ preserve: 'session_id'})

An error will now throw when defining whitelist option on Cypress.Cookies.default().

Screen Shot 2020-06-24 at 5 56 48 PM

This change makes it more inclusive by replacing terms that can be perceived as offensive to more self-explanatory names (blacklist/whitelist can reinforce the association of black as bad and white as good).

Examples of projects that already made the change:
Rails
Golang
Graphite Web
HTML

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 23, 2020

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jun 23, 2020



Test summary

7824 0 107 0


Run details

Project cypress
Status Passed
Commit 314f3c5
Started Jun 30, 2020 5:52 AM
Ended Jun 30, 2020 5:59 AM
Duration 06:33 💡
OS Linux Debian - 10.2
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@jennifer-shehane jennifer-shehane changed the base branch from develop to v5.0-release June 23, 2020 09:26
@jennifer-shehane jennifer-shehane marked this pull request as draft June 23, 2020 09:26
@jennifer-shehane jennifer-shehane added the type: breaking change Requires a new major release version label Jun 24, 2020
@jennifer-shehane jennifer-shehane self-assigned this Jun 24, 2020
@jennifer-shehane jennifer-shehane requested review from a team, brian-mann and kuceb and removed request for a team June 25, 2020 07:41
@jennifer-shehane jennifer-shehane marked this pull request as ready for review June 25, 2020 08:39
@jennifer-shehane jennifer-shehane requested review from flotwig and removed request for brian-mann June 26, 2020 05:55
@flotwig flotwig mentioned this pull request Jun 26, 2020
21 tasks
@Saibamen

This comment has been minimized.

@jennifer-shehane
Copy link
Member Author

@Saibamen This was an unanimous decision by our team to implement in this way and goes along with many other breaking changes as part of 5.0.0 release.

Please also keep in mind our code of conduct when commenting within our GitHub repo. Thank you.

vfedrunov added a commit to vfedrunov/cypress-social-logins that referenced this pull request Aug 24, 2020
renamed 'whitelist' option to 'preserve' in README according to cypress-io/cypress#7782
lirantal pushed a commit to lirantal/cypress-social-logins that referenced this pull request Aug 24, 2020
renamed 'whitelist' option to 'preserve' in README according to cypress-io/cypress#7782
alvincrespo added a commit to alvincrespo/cypress-on-rails that referenced this pull request Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking change Requires a new major release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cy.server whitelist behaves as blacklist
3 participants