Releases: tjenkinson/redos-detector
Releases · tjenkinson/redos-detector
v6.1.2
What's Changed
- Respect inverted unicode property escape in character class by @tjenkinson in #656
Full Changelog: v6.1.1...v6.1.2
v6.1.1
- Fix missing types (68a0855)
Full Changelog: v6.1.0...v6.1.1
v6.1.0
What's Changed
- Update dependency regjsparser to v0.12.0 by @renovate in #605
- Move
regjsparser
to a dev dep by @tjenkinson in #653 - Always stop expanding quantifier after min iterations after loop detected by @tjenkinson in #651
Full Changelog: v6.0.2...v6.1.0
v6.0.2
What's Changed
- Share the cache between all
EnhancedTrail
's by @tjenkinson in #649
Full Changelog: v6.0.1...v6.0.2
v6.0.1
What's Changed
- Fix memory leak by making cache not global by @tjenkinson in #647
- Rename
redos-detector.es.js
=>redos-detector.mjs
by @tjenkinson in #648
Full Changelog: v6.0.0...v6.0.1
v6.0.0
What's Changed
- Switch to
score
instead ofworstCaseBacktrackCount
by @tjenkinson in #637
Breaking changes
Library:
maxBacktracks
config removedmaxScore
config addedworstCaseBacktrackCount
removedscore
addedhitMaxBacktracks
error removedhitMaxScore
error addedBacktrackCount
type removedScore
type added
CLI:
--maxBacktracks
removed--maxScore
added
How is score
calculated?
- All the different paths an input string could take through the provided pattern are calculated.
- Then for each candidate path found above, starting from just the first character, up to the complete path, all the other paths that could also match a string that matches the candidate path are found.
- The score is the highest number found above. The higher the score, the more backtracks an engine will potentially need to take if the input string doesn't match the pattern.
- If the score is
1
this means no backtracks can occur and for every possible input string the pattern could only match one way. - If there are too many different paths it can be too expensive to calculate an accurate score, so it falls back incrementing every time a new path is found.
Full Changelog: v5.1.3...v6.0.0
v5.1.3
What's Changed
- Bring back #599 and #612, with fix for performance issue by @tjenkinson in #618
Full Changelog: v5.1.2...v5.1.3
v5.1.2
What's Changed
- Revert #612 and #599 (changes in v5.1.1) by @tjenkinson in #614
Full Changelog: v5.1.1...v5.1.2
v5.1.1
What's Changed
- Make worst case backreference count accurate, and other fixes by @tjenkinson in #599
- Prepend
[^]*
to patterns that are not bounded at the start by @tjenkinson in #612
Full Changelog: v5.1.0...v5.1.1