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 12
12
- Don't set ` @base ` in initial context and don't resolve a relative IRI
13
13
when setting ` @base ` in a context, so that the document location can
14
14
be kept separate from the context itself.
15
+ - Use ` package.json ` ` version ` field for EARL reports.
15
16
16
17
## 3.0.1 - 2020-03-10
17
18
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ function EarlReport(options) {
70
70
'subjectOf' : [ ]
71
71
} ;
72
72
/* eslint-enable quote-props */
73
- // FIXME: read this from somewhere
74
- version = 'v3.0.1'
73
+ const version = require ( '../package.json' ) . version ;
75
74
this . _report [ '@id' ] += '#' + this . id ;
76
75
this . _report [ 'doap:name' ] += ' ' + this . id ;
77
76
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 ;
79
79
this . _report [ 'doap:release' ] [ 'doap:revision' ] = version ;
80
80
}
81
81
You can’t perform that action at this time.
0 commit comments