Skip to content

Commit 884bb67

Browse files
Merge branch 'bugfix/LF-3386/fix-the-div-operator' into 'master'
Fixed the div operator See merge request lfor/fhirpath.js!46
2 parents 3edd395 + 9d8c969 commit 884bb67

11 files changed

Lines changed: 3515 additions & 17366 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
This log documents significant changes for each release. This project follows
44
[Semantic Versioning](http://semver.org/).
55

6+
## [4.6.1] - 2025-10-03
7+
### Fixed
8+
- an issue where the `div` operator used `Math.floor` instead of `Math.trunc`.
9+
610
## [4.6.0] - 2025-08-21
711
### Added
812
- the ability to pass HTTP headers in requests to FHIR servers, which can be

demo/package-lock.json

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

demo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
"codemirror": "^5.61.1",
88
"json-loader": "^0.5.7",
99
"lz-string": "^1.5.0",
10-
"yaml-loader": "^0.5.0"
10+
"yaml-loader": "^0.8.1"
1111
},
1212
"devDependencies": {
1313
"css-loader": "^6.7.3",
1414
"file-loader": "^6.2.0",
1515
"html-webpack-plugin": "^5.5.0",
16-
"js-yaml": "^3.13.1",
16+
"js-yaml": "^4.1.1",
1717
"style-loader": "^3.3.2",
18-
"webpack": "^5.78.0",
18+
"webpack": "^5.102.1",
1919
"webpack-cli": "^5.0.1",
2020
"webpack-dev-server": "^5.2.2"
2121
},

demo/public/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function handleInputTypeChange(event) {
125125
cm.setOption('mode', 'javascript');
126126
cm.setOption('json', 'true');
127127
if (yamlVal) {
128-
cm.setValue(fhirpath.util.toJSON(yaml.safeLoad(yamlVal), 2));
128+
cm.setValue(fhirpath.util.toJSON(yaml.load(yamlVal), 2));
129129
}
130130
}
131131
else { // yaml
@@ -179,7 +179,7 @@ function updateCurrentVariable() {
179179
const selected = document.querySelector('#variables label.selected');
180180
const editorText = cm.getValue();
181181
if (cm.getOption('mode') === 'yaml') {
182-
selected.setAttribute('data-json', editorText ? fhirpath.util.toJSON(yaml.safeLoad(cm.getValue()), 2) : '');
182+
selected.setAttribute('data-json', editorText ? fhirpath.util.toJSON(yaml.load(cm.getValue()), 2) : '');
183183
} else {
184184
selected.setAttribute('data-json', editorText);
185185
}

demo/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = {
5151
test: /\.yaml$/,
5252
use: [
5353
{ loader: 'json-loader' },
54-
{ loader: 'yaml-loader' }
54+
{ loader: 'yaml-loader', options: { asJSON: true } }
5555
]
5656
}
5757

0 commit comments

Comments
 (0)