Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.1.5 #221

Merged
merged 5 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: npm-publish
on:
push:
branches:
- master
jobs:
npm-publish:
if: contains(github.event.head_commit.message, 'Release')
name: npm-publish
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install node dependencies
run: npm ci

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-models versioning has

For the versions available, see [tags on this repository](https://github.com/projecttacoma/cqm-models/tags).

## Publish a New Version
Create a PR to merge into the master branch with the title ‘Release x.y.z’, where x.y.z is the npm version number. This will trigger the npm-publish GitHub workflow.

## License

Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/basetypes/Any.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const mongoose = require('mongoose/browser');
const cql = require('cql-execution');
const QDMDate = require('./QDMDate');

function Any(key, options) {
mongoose.SchemaType.call(this, key, options, 'Any');
Expand Down Expand Up @@ -72,7 +73,7 @@ function RecursiveCast(any) {
return cql.DateTime.fromJSDate(new Date(`1984-01-01T${any}`), 0).getTime();
}
// Must be a Date
return cql.DateTime.fromJSDate(new Date(any), 0).getDate();
return new QDMDate().cast(any);
}
return any;
}
Expand Down
5 changes: 3 additions & 2 deletions dist/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3479,6 +3479,7 @@ module.exports.ResultComponent = ResultComponent;
},{"../basetypes/Any":67,"../basetypes/Code":69,"../basetypes/DateTime":71,"../basetypes/Interval":72,"../basetypes/QDMDate":73,"../basetypes/Quantity":74,"./Component":57,"mongoose/browser":211}],67:[function(require,module,exports){
const mongoose = require('mongoose/browser');
const cql = require('cql-execution');
const QDMDate = require('./QDMDate');

function Any(key, options) {
mongoose.SchemaType.call(this, key, options, 'Any');
Expand Down Expand Up @@ -3551,7 +3552,7 @@ function RecursiveCast(any) {
return cql.DateTime.fromJSDate(new Date(`1984-01-01T${any}`), 0).getTime();
}
// Must be a Date
return cql.DateTime.fromJSDate(new Date(any), 0).getDate();
return new QDMDate().cast(any);
}
return any;
}
Expand All @@ -3561,7 +3562,7 @@ Any.prototype.cast = any => RecursiveCast(any);
mongoose.Schema.Types.Any = Any;
module.exports = Any;

},{"cql-execution":135,"mongoose/browser":211}],68:[function(require,module,exports){
},{"./QDMDate":73,"cql-execution":135,"mongoose/browser":211}],68:[function(require,module,exports){
const mongoose = require('mongoose/browser');
const { PatientEntity } = require('../attributes/PatientEntity');
const { Practitioner } = require('../attributes/Practitioner');
Expand Down
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3479,6 +3479,7 @@ module.exports.ResultComponent = ResultComponent;
},{"../basetypes/Any":67,"../basetypes/Code":69,"../basetypes/DateTime":71,"../basetypes/Interval":72,"../basetypes/QDMDate":73,"../basetypes/Quantity":74,"./Component":57,"mongoose/browser":210}],67:[function(require,module,exports){
const mongoose = require('mongoose/browser');
const cql = require('cql-execution');
const QDMDate = require('./QDMDate');

function Any(key, options) {
mongoose.SchemaType.call(this, key, options, 'Any');
Expand Down Expand Up @@ -3551,7 +3552,7 @@ function RecursiveCast(any) {
return cql.DateTime.fromJSDate(new Date(`1984-01-01T${any}`), 0).getTime();
}
// Must be a Date
return cql.DateTime.fromJSDate(new Date(any), 0).getDate();
return new QDMDate().cast(any);
}
return any;
}
Expand All @@ -3561,7 +3562,7 @@ Any.prototype.cast = any => RecursiveCast(any);
mongoose.Schema.Types.Any = Any;
module.exports = Any;

},{"cql-execution":134,"mongoose/browser":210}],68:[function(require,module,exports){
},{"./QDMDate":73,"cql-execution":134,"mongoose/browser":210}],68:[function(require,module,exports){
const mongoose = require('mongoose/browser');
const { PatientEntity } = require('../attributes/PatientEntity');
const { Practitioner } = require('../attributes/Practitioner');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cqm-models",
"version": "4.1.4",
"version": "4.1.5",
"description": "This library contains auto generated Mongo (Mongoose.js) models that correspond to the QDM (Quality Data Model) specification.",
"main": "app/assets/javascripts/index.js",
"browser": {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@^2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1, function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
Expand Down
Loading