File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 33### Fixed
44- More support for ` "@type": "@none" ` .
55- JSON literal value handling issues (` null ` and ` [] ` ).
6+ - Always pass typeScopedContext to _ expandObject.
7+ - Allow a keyword to exist when expanding in _ expandObject when the key is ` @included ` or ` @type ` .
68
79## 2.0.1 - 2019-12-10
810
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 $ / ,
@@ -387,8 +385,6 @@ const TEST_TYPES = {
387385 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 4 $ / ,
388386 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 5 $ / ,
389387 / t o R d f - m a n i f e s t .j s o n l d # t i n 0 6 $ / ,
390- // @next
391- / t o R d f - m a n i f e s t .j s o n l d # t n 0 0 8 $ / ,
392388 // keywords
393389 / t o R d f - m a n i f e s t .j s o n l d # t p r 3 0 $ / ,
394390 / 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