Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ajv-validator/ajv
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.8.1
Choose a base ref
...
head repository: ajv-validator/ajv
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.8.2
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 21, 2021

  1. Copy the full SHA
    61c7a4a View commit details
  2. 8.8.2

    epoberezkin committed Nov 21, 2021

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    b2bf750 View commit details
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/vocabularies/code.ts
  2. +1 −1 package.json
5 changes: 3 additions & 2 deletions lib/vocabularies/code.ts
Original file line number Diff line number Diff line change
@@ -95,10 +95,11 @@ const newRegExp = _`new RegExp`
export function usePattern({gen, it: {opts}}: KeywordCxt, pattern: string): Name {
const u = opts.unicodeRegExp ? "u" : ""
const {regExp} = opts.code
const rx = regExp(pattern, u)

return gen.scopeValue("pattern", {
key: pattern,
ref: regExp(pattern, u),
key: rx.toString(),
ref: rx,
code: _`${regExp.code === "new RegExp" ? newRegExp : useFunc(gen, regExp)}(${pattern}, ${u})`,
})
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ajv",
"version": "8.8.1",
"version": "8.8.2",
"description": "Another JSON Schema Validator",
"main": "dist/ajv.js",
"types": "dist/ajv.d.ts",