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

Add support for recursiveDenylist option as an alternative to recursiveBlacklist #10649

Merged
merged 1 commit into from Oct 19, 2020
Merged

Add support for recursiveDenylist option as an alternative to recursiveBlacklist #10649

merged 1 commit into from Oct 19, 2020

Conversation

wojtekmaj
Copy link
Contributor

Summary

Clone of #10236 which has to be closed because the original repo was deleted by me.

Part of #10235.

  • Adds support for recursiveDenylist option as an alternative to recursiveBlacklist in jest-validate. Does NOT remove recursiveBlacklist option. It will continue to work, unless overwritten with recursiveDenylist, to which I've given the priority.
  • Updates documentation not to mention recursiveBlacklist (in favor of the newly added option).
  • Changes internal calls to validate() to use new config (Maintainers: I'm not sure if that's a good idea - can you please advise? Should we expect jest-config, say, v26.2 work with other dependencies @ v26.1 at all times? Shall I roll that back and add it as a TODO to Replace non-inclusive terms used in configuration of jest-validate #10235 instead? TIA)

Motivation

Part of continuous effort to get rid of non-inclusive terms like "whitelist" and "blacklist" implying that white = good and black = bad.

Test plan

jest-validate had one suite where recursiveBlacklist option was used, in two cases:

  • test the very recursiveBlacklist option
  • test for warning against unknown config options

The former was left intact, and copied 1:1 over to create a new test, testing whether recursiveDenylist beaves exactly the same as recursiveBlacklist.

The latter was updated to use recursiveDenylist.

Tests were ran successfully.

obraz

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you fix the linting errors in jest-validate/src/validate.ts?

@wojtekmaj
Copy link
Contributor Author

I'm a complete idiot, I was so happy there are no errors, and turns out there were none because I forgot to install it 🙄

@SimenB SimenB merged commit 194701f into jestjs:master Oct 19, 2020
@SimenB
Copy link
Member

SimenB commented Oct 19, 2020

Thanks @wojtekmaj! A PR which removes the old alias would be very much welcome, and I can land that when we start landing breaking changes 🙂 Just don't delete your fork so I can merge in master once I start landing 😀

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants