Skip to content

Commit

Permalink
fix: use ajv-dist instead of ajv to solve rollup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Apr 6, 2022
1 parent 0a5eca4 commit a663a1b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 52 deletions.
65 changes: 16 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@fontsource/fira-mono": "4.5.7",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"ajv": "^8.11.0",
"ajv-dist": "^8.11.0",
"classnames": "^2.3.1",
"diff-sequences": "^27.5.1",
"immutable-json-patch": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/plugins/validator/createAjvValidator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Ajv from 'ajv'
import Ajv from 'ajv-dist'
import { parseJSONPointerWithArrayIndices } from '../../utils/jsonPointer.js'

/**
Expand All @@ -10,7 +10,7 @@ import { parseJSONPointerWithArrayIndices } from '../../utils/jsonPointer.js'
* @return {function (json: JSON) : Array<Object>} Returns a validation function
*/
export function createAjvValidator(schema, schemaDefinitions) {
const ajv = new (Ajv.default || Ajv)({
const ajv = new Ajv({
allErrors: true,
verbose: true,
$data: true
Expand Down

0 comments on commit a663a1b

Please sign in to comment.