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

Bump regexp_parser from 2.7.0 to 2.8.0 #403

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 17, 2023

Bumps regexp_parser from 2.7.0 to 2.8.0.

Changelog

Sourced from regexp_parser's changelog.

[2.8.0] - 2023-04-17 - Janosch Müller

Added

  • Regexp::Expression::Shared#ends_at
    • e.g. parse(/a +/x)[0].ends_at # => 3
    • e.g. parse(/a +/x)[0].ends_at(include_quantifier = false) # => 1
  • Regexp::Expression::Shared#{capturing?,comment?}
    • previously only available on capturing and comment groups
  • Regexp::Expression::Shared#{decorative?}
    • true for decorations: comment groups as well as comments and whitespace in x-mode
  • Regexp::Expression::Shared#parent
  • new format argument :original for Regexp::Expression::Base#to_s
    • includes decorative elements between node and its quantifier
    • e.g. parse(/a (?#comment) +/x)[0].to_s(:original) # => "a (?#comment) +"
    • using it is not needed when calling Root#to_s as Root can't be quantified
  • support calling Subexpression#{each_expression,flat_map} with a one-argument block
    • in this case, only the expressions are passed to the block, no indices
  • support calling test methods at Expression class level
    • capturing?, comment?, decorative?, referential?, terminal?
    • e.g. Regexp::Expression::CharacterSet.terminal? # => false

Fixed

  • Regexp::Expression::Shared#full_length with whitespace before quantifier
    • e.g. parse(/a +/x)[0].full_length used to yield 2, now it yields 3
  • Subexpression#to_s output with children with whitespace before their quantifier
    • e.g. parse(/a + /x).to_s used to yield "a+ ", now it yields "a + "
    • calling #to_s on sub-nodes still omits such decorative interludes by default
      • use new #to_s format :original to include it
      • e.g. parse(/a + /x)[0].to_s(:original) # => "a +"
  • fixed Subexpression#te behaving differently from other expressions
    • only Subexpression#te used to include the quantifier
    • now #te is the end index without quantifier, as for other expressions
  • fixed NoMethodError when calling #starts_at or #ts on empty sequences
    • e.g. Regexp::Parser.parse(/|/)[0].starts_at
    • e.g. Regexp::Parser.parse(/[&&]/)[0][0].starts_at
  • fixed nested comment groups breaking local x-options
    • e.g. in /(?x:(?#hello)) /, the x-option wrongly applied to the whitespace
  • fixed nested comment groups breaking conditionals
    • e.g. in /(a)(?(1)b|c(?#hello)d)e/, the 2nd conditional branch included "e"
  • fixed quantifiers after comment groups being mis-assigned to that group
    • e.g. in /a(?#foo){3}/ (matches 'aaa')
  • fixed Scanner accepting two cases of invalid Regexp syntax
    • unmatched closing parentheses ()) and k-backrefs with number 0 (\k<0>)
    • these are a SyntaxError in Ruby, so could only be passed as a String
    • they now raise a Regexp::Scanner::ScannerError
  • fixed some scanner errors not inheriting from Regexp::Scanner::ScannerError
  • reduced verbosity of inspect / pretty print output
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/ammar/regexp_parser/releases)
- [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md)
- [Commits](ammar/regexp_parser@v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: regexp_parser
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested review from kakipo and tknzk as code owners April 17, 2023 22:57
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 17, 2023
@tknzk tknzk merged commit 8b24a0c into master Apr 18, 2023
@tknzk tknzk deleted the dependabot/bundler/regexp_parser-2.8.0 branch April 18, 2023 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant