-
- Notifications
You must be signed in to change notification settings - Fork 108
Drop unnecessary regexp.prototype.flags #91
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
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #91 +/- ## ========================================== - Coverage 98.12% 98.11% -0.01% ========================================== Files 2 2 Lines 213 212 -1 Branches 88 88 ========================================== - Hits 209 208 -1 Misses 4 4
Continue to review full report at Codecov.
|
ljharb left a comment
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.
a) dependency “weight” is only relevant if correctness is achievable with a lighter dependency
b) this is absolutely necessary; flags was added in ES6, and thus is not present in, for example, node 0.4, which this package supports.
c) if tests pass with this removed, that simply means I’ve failed to provide adequate test coverage, something i will remedy tomorrow, and then rebase this PR to ensure that indeed it makes the tests fail (in which case, thank you for bringing it to my attention!)
Ouch!
Indeed. It just feels unnecessary to support something a handful of people use, at the expense of everyone else. If people haven't moved on from Node 0.4, I wouldn't expect them to update dependencies either, so an hypothetic deep-equal v3 with Node 6+ wouldn't affect them. |
| If you know you only target browsers with flags support, you can (and should) certainly configure your bundler to alias out the package in favor of |
| Also, updating node is much harder than updating deps, so your assumption doesn’t hold up. Certainly a v3 could drop that support, but that seems capricious. |
3557fd5 to adee886 Compare | Rebased; I expect to see everything fail below node 6 (when flags was added). |
I disagree:
|
Yeah but would you connect Windows XP to internet? So why would one run a severely outdated server? 😄 |
| You're right that there's some install time impact. At runtime, the impact should be negligible. In other words, the cost isn't precisely zero, but it's effectively zero, as I said. Regardless, a minor inconvenience for modern node/browser users, versus "you can't use this package" for users that need to run on older node/browsers, is not an equivalent comparison. |
| Would it make sense to leave them on v2 and release a v3 for modern engines? They can use v2 forever. |
| Even if i wanted to sign up for the maintenance burden of two simultaneous release lines (otherwise the v2 users would miss out on bugfixes and new features), |
b8c179c introduced this heavy-ish dependency but it didn't explain why. Tests pass without it as the property has been supported forever.