Skip to content

Commit

Permalink
Merge pull request #37 in LFOR/fhirpath.js from bugfix/LF-2221/repeat…
Browse files Browse the repository at this point in the history
…-function to master

* commit 'e484231e226513abe739dc80ec52b1a53c620289':
  Fixed incorrect styles for the demo app
  Fixed issues found during review
  Fixed comment.
  npm audit fix
  Add version info to fhirpath.js
  Add hash comparison to avoid O(n**2)
  npm audit fix
  Fixed issues found during review
  Fixed issues found during review
  Fixed issues related to the repeat function
  • Loading branch information
yuriy-sedinkin committed Apr 12, 2022
2 parents 36290bf + e484231 commit 1fae12b
Show file tree
Hide file tree
Showing 20 changed files with 361 additions and 349 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
This log documents significant changes for each release. This project follows
[Semantic Versioning](http://semver.org/).

## [2.14.1] - 2022-03-31
### Added
- Added a "version" field with the release version to the object exported by fhirpath.js.
### Fixed
- Previously, the `repeat` function changed the contents of the `%someVar` value
when used in a `%someVar.repeat(...)` expression.
- Previously, `a.repeat('b')` went into an infinite loop.
- The `repeat` function should no longer return duplicates.
- Optimized functions: `distinct`, `union`, `subsetOf`, `intersect`, and `repeat`
by changing complexity of the algorithm from O(n**2) to O(n).

## [2.14.0] - 2022-03-02
### Added
- Function to get the intersection of two collections: intersect().
### Fixed
- The distinct, union, subsetOf, and intersect functions now use
- The `distinct`, `union`, `subsetOf`, and `intersect` functions now use
the "6.1.1. = (Equals)" function to compare collection items instead of using
a map with JSON keys, which can affect their performance because the
complexity of the algorithm has changed from O(n) to O(n**2).
Expand Down
6 changes: 6 additions & 0 deletions browser-build/package-json-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Removes all content except version.
// When we import package.json we need only the application version.
module.exports = function loader(source) {
const { version } = JSON.parse(source);
return JSON.stringify({ version });
};
9 changes: 9 additions & 0 deletions browser-build/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');

/**
* Returns a base webpack configuration object with settings used by more than
Expand Down Expand Up @@ -30,6 +31,14 @@ function makeBaseConfig() {
]]
}
}
},
{
test: /package.json$/,
use: [
{
loader: path.resolve('package-json-loader.js')
}
]
}
]
}
Expand Down
Loading

0 comments on commit 1fae12b

Please sign in to comment.