Skip to content

Commit cc19417

Browse files
committed
Fixed ajv error on sandbox
1 parent 47a3b9d commit cc19417

File tree

7 files changed

+60
-8
lines changed

7 files changed

+60
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
> Starting from this release the Sandbox pages are not included in fractal-web anymore, instead they are static pages published together with the documentation.
66
7+
* Fixed issue with ajv formats on sandbox (\#522);
78
* Removed "Clear" button from tuples (\#521);
89
* Added "Reset" button on top-level properties having a default value (\#521);
910
* Added task manifest sandbox (\#521);

jschema/package-lock.json

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

jschema/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"vitest": "^0.32.4"
4848
},
4949
"dependencies": {
50-
"ajv": "^8.12.0"
50+
"ajv": "^8.12.0",
51+
"ajv-formats": "^3.0.1"
5152
},
5253
"svelte": "./dist/index.js",
5354
"types": "./dist/index.d.ts",

jschema/src/lib/components/jschema_validation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import Ajv from 'ajv';
2+
import addFormats from 'ajv-formats';
23

34
export class SchemaValidator {
45
/**
56
* @param {boolean} allErrors if true, check all rules collecting all errors. Default is to return after the first error.
67
*/
78
constructor(allErrors = false) {
89
this.ajv = new Ajv({ allErrors });
10+
addFormats(this.ajv);
911
this.canValidate = false;
1012
}
1113

package-lock.json

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

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"dependencies": {
4343
"@vincjo/datatables": "^1.6.0",
4444
"ajv": "^8.12.0",
45+
"ajv-formats": "^3.0.1",
4546
"dompurify": "^3.0.5",
4647
"jose": "^4.14.4",
4748
"log4js": "^6.9.1",
@@ -51,5 +52,15 @@
5152
"files": [
5253
"build"
5354
],
54-
"bundledDependencies": true
55+
"bundledDependencies": true,
56+
"bundleDependencies": [
57+
"@vincjo/datatables",
58+
"ajv",
59+
"ajv-formats",
60+
"dompurify",
61+
"jose",
62+
"log4js",
63+
"marked",
64+
"slim-select"
65+
]
5566
}

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const config = defineConfig({
5353
'marked',
5454
'dompurify',
5555
'ajv',
56+
'ajv-formats',
5657
'@vincjo/datatables',
5758
'semver/functions/coerce',
5859
'semver/functions/gte',

0 commit comments

Comments
 (0)