Skip to content

Commit d6416ec

Browse files
committed
Update to Components.js context version 4
1 parent 0eb3fc7 commit d6416ec

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

lib/serialize/ContextConstructor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { PrefetchedDocumentLoader } from 'componentsjs';
12
import type { PackageMetadata } from '../parse/PackageMetadataLoader';
23
import type { ComponentDefinitions } from './ComponentDefinitions';
34

@@ -37,7 +38,7 @@ export class ContextConstructor {
3738

3839
return {
3940
'@context': [
40-
'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld',
41+
PrefetchedDocumentLoader.CONTEXT_URL,
4142
{
4243
npmd: 'https://linkedsoftwaredependencies.org/bundles/npm/',
4344
[prefix]: `npmd:${this.packageMetadata.name}/`,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"@types/jest": "^26.0.0",
8484
"@types/jsonld": "^1.5.0",
8585
"@types/minimist": "^1.2.0",
86-
"@types/node": "^12.6.9",
86+
"@types/node": "^14.14.7",
8787
"@types/rimraf": "^3.0.0",
8888
"@typescript-eslint/eslint-plugin": "^4.2.0",
8989
"@typescript-eslint/parser": "^4.1.1",

test/serialize/ContextConstructor.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ContextConstructor', () => {
3939
it('should handle undefined component definitions', () => {
4040
expect(ctor.constructContext()).toEqual({
4141
'@context': [
42-
'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld',
42+
'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld',
4343
{
4444
npmd: 'https://linkedsoftwaredependencies.org/bundles/npm/',
4545
mp: 'npmd:my-package/',
@@ -83,7 +83,7 @@ describe('ContextConstructor', () => {
8383
},
8484
})).toEqual({
8585
'@context': [
86-
'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld',
86+
'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld',
8787
{
8888
MyClass1: {
8989
'@id': 'mp:file1#MyClass1',

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -779,16 +779,16 @@
779779
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499"
780780
integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA==
781781

782-
"@types/node@^12.6.9":
783-
version "12.12.54"
784-
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.54.tgz#a4b58d8df3a4677b6c08bfbc94b7ad7a7a5f82d1"
785-
integrity sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w==
786-
787782
"@types/node@^13.1.0":
788783
version "13.13.15"
789784
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.15.tgz#fe1cc3aa465a3ea6858b793fd380b66c39919766"
790785
integrity sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw==
791786

787+
"@types/node@^14.14.7":
788+
version "14.14.20"
789+
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340"
790+
integrity sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==
791+
792792
"@types/normalize-package-data@^2.4.0":
793793
version "2.4.0"
794794
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"

0 commit comments

Comments
 (0)