Skip to content

Commit e82a9b0

Browse files
authored
Merge pull request #41 from jg-rp/fix-40
Update iregexp-check
2 parents 0207bc7 + 394d4ae commit e82a9b0

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# JSON P3 Change Log
22

3+
## Version 2.2.1
4+
5+
**Fixes**
6+
7+
- Update iregexp-check to fix range quantifiers with multiple digits. See [issue 40](https://github.com/jg-rp/json-p3/issues/40).
8+
39
## Version 2.2.0
410

511
**Fixes**

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-p3",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"author": "James Prior",
55
"license": "MIT",
66
"description": "JSONPath, JSON Pointer and JSON Patch",
@@ -67,7 +67,7 @@
6767
"eslint-plugin-promise": "^6.6.0",
6868
"eslint-plugin-sonarjs": "^0.23.0",
6969
"eslint-plugin-tsdoc": "^0.2.17",
70-
"iregexp-check": "^0.1.1",
70+
"iregexp-check": "^0.1.2",
7171
"jest": "^29.7.0",
7272
"prettier": "^3.4.2",
7373
"rollup": "^4.28.0",

tests/path/issues.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { query } from "../../src/path";
2+
3+
describe("issues", () => {
4+
test("issue 40", () => {
5+
const data = { a: "d449f7a5-9153-4f39-a05d-dca1c35538ec" };
6+
const path =
7+
'$[?search(@, "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{10}")]';
8+
const nodes = query(path, data);
9+
expect(nodes.values()).toStrictEqual([
10+
"d449f7a5-9153-4f39-a05d-dca1c35538ec",
11+
]);
12+
});
13+
});

0 commit comments

Comments
 (0)