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

fix unambiguous regex #654

Merged
merged 2 commits into from
Nov 7, 2016
Merged

fix unambiguous regex #654

merged 2 commits into from
Nov 7, 2016

Conversation

benmosher
Copy link
Member

Key notes:

  • used a && instead of || for the auto-ignore (fail) so it wasn't even used unless the file is ignored anyway, and then it would ignore the ignore if the regex passed
  • did not set regex to multiline mode, so it would fail on files unless import/export is the first line (double fail)

I also had to comment out a parser error test for CoffeeScript that should never have passed in v2 if I had implemented this correctly to begin with.

To publish this, need to bump+publish eslint-module-utils, then bump the dep in the plugin and publish it too.

I'm thinking this should be semver-minor since it's a large enough fix that it's nearly a feature.

Technically a breaking change to eslint-module-utils, but that's not a big deal.

fixes #615
fixes #634
fixes #649

@coveralls
Copy link

coveralls commented Nov 5, 2016

Coverage Status

Coverage decreased (-0.09%) to 94.86% when pulling b35d489 on fix-unambiguous-regex into 4744468 on master.

Copy link
Collaborator

@jfmengels jfmengels left a comment

Choose a reason for hiding this comment

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

Well this is good news. I'm happy it was just silly mistakes rather than very hard performance problems :D

I just noticed a typo, but feel free to dismiss the request for changes when you've fixed that.

To be on the safe side, and since it doesn't cost much, I think eslint-module-utils should be bumped by a major version. In both cases, there may not be a lot of things affected, but you never know, and this is the right thing to do IMO when you know it's a breaking change.

@@ -344,4 +345,23 @@ describe('ExportMap', function () {

})

// todo: move to utils
describe('unambigous regex', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

unambiguous

@benmosher
Copy link
Member Author

benmosher commented Nov 7, 2016

@jfmengels I agree about bumping utils to v2 👍 I'm going to go stage the release right now

@benmosher benmosher merged commit 2517820 into master Nov 7, 2016
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 93.547% when pulling adc4398 on fix-unambiguous-regex into 4744468 on master.

@schmod
Copy link
Contributor

schmod commented Nov 7, 2016

Just tested v2.2.0 out on my codebase, and performance now appears to be comparable to v1.16.0. Thanks so much! (Details in #649)

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

Successfully merging this pull request may close these issues.

Large performance regression in v2.0 Parser error on files in node_modules v2 is SLOW
4 participants