cda-schematron-validator 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # [cda-schematron-validator](https://github.com/priyaranjan-tokachichu/cda-schematron-validator)
2
2
  ## Release History
3
3
  Starting release history with 1.0.7
4
+ ### 1.0.8
5
+ - Bug fix identifying the ignored errors
4
6
  ### 1.0.7
5
7
  - Added async validate function `validateAsync`
6
8
  - Added `testsAsync` to test `validateAsync`
package/SECURITY.md ADDED
@@ -0,0 +1,21 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ All releases within a major version will be supported with security updates. The first release from 1.x.x version is 1.0.7.
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | 1.0.7 | :white_check_mark: |
10
+ | 1.0.6 | :x: |
11
+ | 1.0.5 | :x: |
12
+ | 1.0.4 | :x: |
13
+ | 1.0.3 | :x: |
14
+ | 1.0.2 | :x: |
15
+ | 1.0.1 | :x: |
16
+ | 1.0.0 | :x: |
17
+
18
+ ## Reporting a Vulnerability
19
+
20
+ Please, open an issue with the vulnerability discovered. If possible open a branch from main,
21
+ add a fix, and open a PR. I will review the security vulnerability and merge the PR if it is accepted.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cda-schematron-validator",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Fork of Eric Wadkins' javascript implementation of schematron testing for C-CDA XML documents. This includes bug fixes and some house keeping.",
5
5
  "main": "validator.js",
6
6
  "scripts": {
package/validator.js CHANGED
@@ -108,7 +108,7 @@ function validate(xml, schematron, options = {}) {
108
108
  for (let j = 0; j < failedAssertions.length; j++) {
109
109
  const assertionObject = failedAssertions[j];
110
110
  const { type, assertionId, test, simplifiedTest, description, errorMessage, results } = assertionObject;
111
- if (!results.ignored) {
111
+ if (!assertionObject.ignored) {
112
112
  for (let k = 0; k < results.length; k++) {
113
113
  const resultObject = results[k];
114
114
  const { result, line, path, xml } = resultObject;
@@ -321,7 +321,7 @@ async function validateAsync(xml, schematron, options = {}) {
321
321
  for (let j = 0; j < failedAssertions.length; j++) {
322
322
  const assertionObject = failedAssertions[j];
323
323
  const { type, assertionId, test, simplifiedTest, description, errorMessage, results } = assertionObject;
324
- if (!results.ignored) {
324
+ if (!assertionObject.ignored) {
325
325
  for (let k = 0; k < results.length; k++) {
326
326
  const resultObject = results[k];
327
327
  const { result, line, path, xml } = resultObject;