File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1212- Don't set ` @base ` in initial context and don't resolve a relative IRI
1313 when setting ` @base ` in a context, so that the document location can
1414 be kept separate from the context itself.
15+ - Use ` package.json ` ` version ` field for EARL reports.
1516
1617## 3.0.1 - 2020-03-10
1718
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ function EarlReport(options) {
7070 'subjectOf' : [ ]
7171 } ;
7272 /* eslint-enable quote-props */
73- // FIXME: read this from somewhere
74- version = 'v3.0.1'
73+ const version = require ( '../package.json' ) . version ;
7574 this . _report [ '@id' ] += '#' + this . id ;
7675 this . _report [ 'doap:name' ] += ' ' + this . id ;
7776 this . _report [ 'dc:title' ] += ' ' + this . id ;
78- this . _report [ 'doap:release' ] [ 'doap:name' ] = this . _report [ 'doap:name' ] + ' ' + version ;
77+ this . _report [ 'doap:release' ] [ 'doap:name' ] =
78+ this . _report [ 'doap:name' ] + ' ' + version ;
7979 this . _report [ 'doap:release' ] [ 'doap:revision' ] = version ;
8080}
8181
You can’t perform that action at this time.
0 commit comments