From 7807475a6b6f17cd65a085ed001473bfd5153304 Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Wed, 31 Mar 2021 17:52:39 +0200 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=94=A7=20do=20not=20pre-fetch=20all?= =?UTF-8?q?=20resources=20for=20sample=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ sample-app/src/components/Validator.vue | 10 ++++------ sample-app/vue.config.js | 5 +++++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 sample-app/vue.config.js diff --git a/.gitignore b/.gitignore index 0efd754f..29a1a488 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ /__tests__/r4/ /r4/ /stu3/ +/sample-app/node_modules/ +/fhirValidatorr4.js +/fhirValidatorstu3.js +/index.js diff --git a/sample-app/src/components/Validator.vue b/sample-app/src/components/Validator.vue index 509c229a..9ee13076 100644 --- a/sample-app/src/components/Validator.vue +++ b/sample-app/src/components/Validator.vue @@ -2,7 +2,7 @@ - +
@@ -23,7 +23,7 @@ v-model="version" />
-
+

✅ Valid!

@@ -73,7 +73,6 @@ import "vue-json-pretty/lib/styles.css"; export default defineComponent({ name: "Validator", - // components: { VueJsonPretty, "d4l-button": d4lButton }, components: { VueJsonPretty, AppSection }, data: function() { return { @@ -116,7 +115,6 @@ export default defineComponent({ this.result = false; } if (validatorModule) { - // todo: extension const validatorFunction = validatorModule.default; const validationResult = validatorFunction(sourceAsJson); @@ -204,14 +202,14 @@ button:disabled { background: #faf8f8; } -formgroup { +.formgroup { margin-top: 20px; display: flex; align-items: center; justify-content: space-evenly; } -formgroup label { +.formgroup label { display: inline; } diff --git a/sample-app/vue.config.js b/sample-app/vue.config.js new file mode 100644 index 00000000..5f0bae4b --- /dev/null +++ b/sample-app/vue.config.js @@ -0,0 +1,5 @@ +module.exports = { + chainWebpack: config => { + config.plugins.delete("prefetch"); + } +}; From 1866488039dd9aaef23310aa881190bbf5e12ad4 Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 10:34:28 +0200 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=94=A7=20run=20tests=20sequentially?= =?UTF-8?q?=20to=20avoid=20memory=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49d2f5b7..45d535e9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Runtime FHIR Validator", "main": "index.js", "scripts": { - "test": "jest __tests__/r4; jest __tests__/stu3", + "test": "jest __tests__/r4 --runInBand; jest __tests__/stu3 --runInBand", "build": "npm run build:r4; npm run build:index; npm run build:stu3; npm run compress-files", "build:index": "npx ajv compile -s fhir.schema.v401.json -o index.js", "build:test": "node ./scripts/generate-test-scripts.js", From ba48e61c6ee7eba03fddce5442c40073a8c604db Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 10:56:42 +0200 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=94=A7=20prevent=20tests=20from=20exc?= =?UTF-8?q?essive=20console=20output=20to=20avoid=20memory=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45d535e9..34bd649a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Runtime FHIR Validator", "main": "index.js", "scripts": { - "test": "jest __tests__/r4 --runInBand; jest __tests__/stu3 --runInBand", + "test": "jest __tests__/r4 --runInBand --silent; jest __tests__/stu3 --runInBand --silent", "build": "npm run build:r4; npm run build:index; npm run build:stu3; npm run compress-files", "build:index": "npx ajv compile -s fhir.schema.v401.json -o index.js", "build:test": "node ./scripts/generate-test-scripts.js", From 4ce6f7c740ca7cd7a38b2d9bf936834b7bc16133 Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 15:10:58 +0200 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=94=A7=20add=20more=20RAM=20for=20tes?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 34bd649a..e178543e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Runtime FHIR Validator", "main": "index.js", "scripts": { - "test": "jest __tests__/r4 --runInBand --silent; jest __tests__/stu3 --runInBand --silent", + "test": "jest __tests__/r4 --runInBand --max-old-space-size=32768; jest __tests__/stu3 --runInBand --max-old-space-size=32768 ", "build": "npm run build:r4; npm run build:index; npm run build:stu3; npm run compress-files", "build:index": "npx ajv compile -s fhir.schema.v401.json -o index.js", "build:test": "node ./scripts/generate-test-scripts.js", From adc5432d56d1c27862724ad33763db3265fc8d8c Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 17:09:22 +0200 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=94=A7=20add=20more=20RAM=20via=20.np?= =?UTF-8?q?mrc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..2399683a --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-options=--max_old_space_size=32768 diff --git a/package.json b/package.json index e178543e..45d535e9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Runtime FHIR Validator", "main": "index.js", "scripts": { - "test": "jest __tests__/r4 --runInBand --max-old-space-size=32768; jest __tests__/stu3 --runInBand --max-old-space-size=32768 ", + "test": "jest __tests__/r4 --runInBand; jest __tests__/stu3 --runInBand", "build": "npm run build:r4; npm run build:index; npm run build:stu3; npm run compress-files", "build:index": "npx ajv compile -s fhir.schema.v401.json -o index.js", "build:test": "node ./scripts/generate-test-scripts.js", From 9694fd001afbc50fed34a75ccd27353ba2a5e92d Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 18:58:56 +0200 Subject: [PATCH 6/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=F0=9F=94=A7=20bump=20?= =?UTF-8?q?AJV,=20do=20no=20use=20strict=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 +++--- package.json | 2 +- scripts/generate-validator-scripts.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c644c97..9be806f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -775,9 +775,9 @@ "dev": true }, "ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.3.tgz", + "integrity": "sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", diff --git a/package.json b/package.json index 45d535e9..26cd7ff7 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "generate-validator-scripts": "node ./scripts/generate-validator-scripts.js" }, "dependencies": { - "ajv": "^7.2.3", + "ajv": "^8.0.3", "terser": "^5.3.8" }, "devDependencies": { diff --git a/scripts/generate-validator-scripts.js b/scripts/generate-validator-scripts.js index bdab15b4..3218d023 100644 --- a/scripts/generate-validator-scripts.js +++ b/scripts/generate-validator-scripts.js @@ -23,7 +23,7 @@ fs.readdir(jsonDirectory, (err, files) => { process.stdout.write(`Current progress: [${index + 1}/${files.length}]`); execSync( - `npx ajv compile -s ${jsonDirectory}${file} -o ${jsDirectory}${jsFileName}` + `npx ajv compile --strict=false -s ${jsonDirectory}${file} -o ${jsDirectory}${jsFileName}` ); }); }); From 5b713d542539a8c1bd0378c3c76e711ec7269e0c Mon Sep 17 00:00:00 2001 From: Christian Burtchen Date: Thu, 1 Apr 2021 19:17:17 +0200 Subject: [PATCH 7/7] bump version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9be806f7..780474c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@d4l/js-fhir-validator", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 26cd7ff7..b41a78dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d4l/js-fhir-validator", - "version": "1.0.3", + "version": "1.0.4", "description": "Runtime FHIR Validator", "main": "index.js", "scripts": {