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

Change black/Black -> deny/Deny; white/White -> allow/Allow #242

Closed
wants to merge 1 commit into from

Conversation

dsafanyuk
Copy link

@dsafanyuk dsafanyuk commented Jul 10, 2020

closes #241

@bithavoc
Copy link
Owner

@dsafanyuk great stuff, but I'm worried this is going to break typescript project where warnings are treated as errors. is there a way we can keep both for the 4.x series with warnings for typescript and then maybe drop in the 5x series?

@dsafanyuk
Copy link
Author

@dsafanyuk great stuff, but I'm worried this is going to break typescript project where warnings are treated as errors. is there a way we can keep both for the 4.x series with warnings for typescript and then maybe drop in the 5x series?

So keep black/white list, while adding allow/deny list?

@dsafanyuk
Copy link
Author

And i'm not that familiar with typescript, can you give me an example of what you're worried about!

(ps. this is my first OSS contribution, so please let me know if I'm following best practices!)

@bithavoc
Copy link
Owner

wow this is going to be harder than I thought, but yeah we can't break backward compatibility without a warning and the closes thing to a deprecation is the JSDoc for @deprecated which apparently only works if you have eslint enabled (?).

So I'm thinking the first step should be Updating the readme stating our something like "We no longer feel comfortable with the terms "whitelist" and "blacklist" and therefore these terms and configuration options are going away in the upcoming 5.x series, we prefer to use allowlist and denylist instead".

So for now we only rename all the private members such as req. _routeWhitelists and function variables such as requestAllowlist like you have it in your PR, and we update the Readme to introduce the new members in the documentation and also add comments to the typescript interfaces.

Thoughts?

@bithavoc
Copy link
Owner

@dsafanyuk, unfortunately, we're gonna have to come up with a new PR targetting the 5.x branch which still does not exists, see #247

Thank you, this PR really inspired me and highlighted some of the issues in the transition in order to address the situation with respect to both the black community and the users of this project.

@bithavoc bithavoc closed this Jul 22, 2020
@dsafanyuk dsafanyuk deleted the use_inclusive_terms branch July 22, 2020 14:43
@forivall
Copy link

@bithavoc typescript itself has support for @deprecated, you don't need eslint for it (it's a new feature tho)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using inclusive terms rather than Blacklist/Whitelist
3 participants