File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11# jsonld ChangeLog
22
3+ ### Fixed
4+ - Always pass typeScopedContext to _ expandObject.
5+ - Allow a keyword to exist when expanding in _ expandObject when the key is ` @included ` or ` @type ` .
6+
37## 2.0.2 - 2020-01-17
48
59### Fixed
Original file line number Diff line number Diff line change @@ -458,7 +458,9 @@ async function _expandObject({
458458 'property.' , 'jsonld.SyntaxError' ,
459459 { code : 'invalid reverse property map' , value} ) ;
460460 }
461- if ( expandedProperty in expandedParent ) {
461+ if ( expandedProperty in expandedParent &&
462+ expandedProperty !== '@included' &&
463+ expandedProperty !== '@type' ) {
462464 throw new JsonLdError (
463465 'Invalid JSON-LD syntax; colliding keywords detected.' ,
464466 'jsonld.SyntaxError' ,
@@ -821,6 +823,7 @@ async function _expandObject({
821823 expandedParent,
822824 options,
823825 insideList,
826+ typeScopedContext,
824827 typeKey,
825828 expansionMap} ) ;
826829 }
Original file line number Diff line number Diff line change @@ -127,8 +127,6 @@ const TEST_TYPES = {
127127 / e x p a n d - m a n i f e s t .j s o n l d # t i n 0 7 $ / ,
128128 / e x p a n d - m a n i f e s t .j s o n l d # t i n 0 8 $ / ,
129129 / e x p a n d - m a n i f e s t .j s o n l d # t i n 0 9 $ / ,
130- // @nest
131- / e x p a n d - m a n i f e s t .j s o n l d # t n 0 0 8 $ / ,
132130 // keywords
133131 / e x p a n d - m a n i f e s t .j s o n l d # t p r 3 0 $ / ,
134132 / e x p a n d - m a n i f e s t .j s o n l d # t p r 3 1 $ / ,
@@ -390,8 +388,6 @@ const TEST_TYPES = {
390388 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 4 $ / ,
391389 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 5 $ / ,
392390 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 6 $ / ,
393- // @next
394- / t o R d f - m a n i f e s t .j s o n l d # t n 0 0 8 $ / ,
395391 // keywords
396392 / t o R d f - m a n i f e s t .j s o n l d # t p r 3 0 $ / ,
397393 / t o R d f - m a n i f e s t .j s o n l d # t p r 3 1 $ / ,
You can’t perform that action at this time.
0 commit comments