Skip to content

Commit 524318c

Browse files
Merge branch 'feature/upgrade-dependencies' into develop
2 parents 12549ff + 1a14eb2 commit 524318c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@babel/plugin-proposal-class-properties": "^7.5.5",
4848
"@babel/preset-env": "^7.5.5",
4949
"@babel/preset-typescript": "^7.3.3",
50-
"@types/escape-string-regexp": "^1.0.0",
50+
"@types/escape-string-regexp": "^2.0.1",
5151
"@types/history": "^4.7.3",
5252
"@types/jest": "^26.0.10",
5353
"@types/jest-when": "^2.4.1",
@@ -79,9 +79,9 @@
7979
"worker-loader": "^2.0.0"
8080
},
8181
"dependencies": {
82-
"escape-string-regexp": "^1.0.5",
82+
"escape-string-regexp": "^4.0.0",
8383
"pandemonium": "^1.4.1",
84-
"regexp-tree": "0.1.11"
84+
"regexp-tree": "^0.1.21"
8585
},
8686
"snyk": true
8787
}

src/pattern.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,6 @@ describe('expand', () => {
716716
expect(iterator2.next().value).toBe('z z');
717717
});
718718

719-
it('expands backreferences with numeric names', () => {
720-
const result = expandAll('(?<20>a) \\k<20> (?<50>z) \\k<50>');
721-
expect(result).toEqual(['a a z z']);
722-
});
723-
724719
it('is performant', () => {
725720
const trial = () => expand(/([ab]|(c|[d-e]){2,3})(\w?) \1/);
726721
const averageTime = measureAverageTime(trial, 5);
@@ -900,6 +895,7 @@ describe('expand', () => {
900895
['capture group', "(?'x'abc)"],
901896
['capture group', '(?P<x>abc)'],
902897
['capture group with duplicate names', '(?<x>a)|(?<x>b)'],
898+
['capture group with numeric name', '(?<20>a)'],
903899
['capture group with negative number name', '(?<-17>abc)'],
904900
['backreference', '(?<x>a) (?P=x)'],
905901
['backreference nested with group', '(?<x>a\\k<x>?)'],
@@ -1472,7 +1468,6 @@ describe('expand', () => {
14721468
['backreference', "(?<x>ab) \\k'x'"],
14731469
['backreference', '(?<x>ab) \\k{x}'],
14741470
['backreference', '(?<x>ab) \\g{x}'],
1475-
['capture groups override numbered index', '(?<17>ab) \\17'],
14761471
['failed backreference', '(?<x>ab)? \\k<x>'],
14771472
])(
14781473
'does not recognize RegEx syntax: %s /%s/',

0 commit comments

Comments
 (0)