File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 3
3
### Fixed
4
4
- More support for ` "@type": "@none" ` .
5
5
- 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 ` .
6
8
7
9
## 2.0.1 - 2019-12-10
8
10
Original file line number Diff line number Diff line change @@ -458,7 +458,9 @@ async function _expandObject({
458
458
'property.' , 'jsonld.SyntaxError' ,
459
459
{ code : 'invalid reverse property map' , value} ) ;
460
460
}
461
- if ( expandedProperty in expandedParent ) {
461
+ if ( expandedProperty in expandedParent &&
462
+ expandedProperty !== '@included' &&
463
+ expandedProperty !== '@type' ) {
462
464
throw new JsonLdError (
463
465
'Invalid JSON-LD syntax; colliding keywords detected.' ,
464
466
'jsonld.SyntaxError' ,
@@ -821,6 +823,7 @@ async function _expandObject({
821
823
expandedParent,
822
824
options,
823
825
insideList,
826
+ typeScopedContext,
824
827
typeKey,
825
828
expansionMap} ) ;
826
829
}
Original file line number Diff line number Diff line change @@ -127,8 +127,6 @@ const TEST_TYPES = {
127
127
/ 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 $ / ,
128
128
/ 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 $ / ,
129
129
/ 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 $ / ,
132
130
// keywords
133
131
/ 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 $ / ,
134
132
/ 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 = {
387
385
/ t o R d f - m a n i f e s t .j s o n l d # t i n 0 4 $ / ,
388
386
/ t o R d f - m a n i f e s t .j s o n l d # t i n 0 5 $ / ,
389
387
/ 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 $ / ,
392
388
// keywords
393
389
/ t o R d f - m a n i f e s t .j s o n l d # t p r 3 0 $ / ,
394
390
/ 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