Comparing version 1.19.0 to 1.19.1
{ | ||
"name": "re2", | ||
"version": "1.19.0", | ||
"version": "1.19.1", | ||
"description": "Bindings for RE2: fast, safe alternative to backtracking regular expression engines.", | ||
@@ -16,8 +16,8 @@ "homepage": "https://github.com/uhop/node-re2", | ||
"nan": "^2.17.0", | ||
"node-gyp": "^9.3.1" | ||
"node-gyp": "^9.4.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.2.3", | ||
"@types/node": "^20.3.1", | ||
"heya-unit": "^0.3.0", | ||
"typescript": "^5.0.4" | ||
"typescript": "^5.1.3" | ||
}, | ||
@@ -24,0 +24,0 @@ "scripts": { |
@@ -356,2 +356,3 @@ # node-re2 [![NPM version][npm-img]][npm-url] | ||
- 1.19.1 *Bugfix: indices for the `d` flag when `lastIndex` is non zero. Bugfix: the match result. Thx, [teebu](https://github.com/teebu).* | ||
- 1.19.0 *Added `hasIndices` AKA the `d` flag. Thx, [teebu](https://github.com/teebu).* | ||
@@ -358,0 +359,0 @@ - 1.18.3 *Fixed bug with non-matched groups. Thx, [Dan Setterquist](https://github.com/dset).* |
@@ -417,3 +417,25 @@ 'use strict'; | ||
} | ||
}, | ||
function test_hasIndexLastIndex(t) { | ||
'use strict'; | ||
const re2 = new RE2('a', 'dg'); | ||
eval(t.TEST('re2.lastIndex === 0')); | ||
let result = re2.exec('abca'); | ||
eval(t.TEST('re2.lastIndex === 1')); | ||
eval(t.TEST('result.index === 0')); | ||
eval(t.TEST('t.unify(result.indices, [[0, 1]])')); | ||
result = re2.exec('abca'); | ||
eval(t.TEST('re2.lastIndex === 4')); | ||
eval(t.TEST('result.index === 3')); | ||
eval(t.TEST('t.unify(result.indices, [[3, 4]])')); | ||
result = re2.exec('abca'); | ||
eval(t.TEST('re2.lastIndex === 0')); | ||
eval(t.TEST('result === null')); | ||
} | ||
]); |
@@ -154,3 +154,3 @@ 'use strict'; | ||
var re = new RE2('(aa)(?<b>b)?(?<c>ccc)', 'd'), | ||
const re = new RE2('(aa)(?<b>b)?(?<c>ccc)', 'd'), | ||
str1 = '1aabccc2', | ||
@@ -161,3 +161,14 @@ str2 = '1aaccc2'; | ||
eval(t.TEST("t.unify(str2.match(re), re.exec(str2))")); | ||
}, | ||
function test_matchHasIndicesGlobal(t) { | ||
'use strict'; | ||
const re = new RE2('(?<zzz>a)', 'dg'), | ||
result = 'abca'.match(re); | ||
eval(t.TEST("t.unify(result, ['a', 'a'])")); | ||
eval(t.TEST("!('indices' in result)")); | ||
eval(t.TEST("!('groups' in result)")); | ||
} | ||
]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1313783
1849
388
563
Updatednode-gyp@^9.4.0