From 0763888eef3cc7c1cc1ec37a63a10b8d36e6b817 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 15 Mar 2021 23:59:27 +0000 Subject: [PATCH 1/3] Update dependency @stencila/schema to v1 --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5b96b062..a115d3963 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3662,9 +3662,9 @@ "integrity": "sha512-Kp5OOf7LkN1C/H8naBlQlH6cQyexrLy5FSwEQunWdF8ZkB4jz5Lpv9VyLZkX4GsRWvbJTxgo6twM7q3alprHrA==" }, "@stencila/schema": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/@stencila/schema/-/schema-0.47.2.tgz", - "integrity": "sha512-cub4aAL9ilQ5fKkGc8rtYuGvin9XIbtlEGVJFr0oFZQ2Du7eW2NmCSvF9Nq8znYLoEHHQKu6FkNrRbF1SdH2jg==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@stencila/schema/-/schema-1.1.0.tgz", + "integrity": "sha512-/PsFQkB0xeR/t8B/qb2w4Gc6LeziUdJiZ8zXZaZ6S1Fnx4L2jJPQm0Vd/EyxmV7r9gk2T4aPrsAK/SjiQIzNtQ==" }, "@stencila/semantic-release-config": { "version": "1.2.34", diff --git a/package.json b/package.json index 3a3181c09..28892cbbb 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@stencila/executa": "^1.15.7", "@stencila/logga": "^4.0.0", - "@stencila/schema": "^0.47.2", + "@stencila/schema": "^1.1.0", "@stencila/thema": "^2.22.1", "ajv": "^6.12.6", "appdata-path": "^1.0.0", From 53a3f57d7160e56dd821aa9fb68794077ed6b807 Mon Sep 17 00:00:00 2001 From: Nokome Bentley Date: Wed, 17 Mar 2021 12:49:59 +1300 Subject: [PATCH 2/3] fix(Dependencies): Changes for Schema v1 --- src/util/schemas.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/schemas.ts b/src/util/schemas.ts index 29e5c375d..dc636218f 100644 --- a/src/util/schemas.ts +++ b/src/util/schemas.ts @@ -7,8 +7,7 @@ * that effort. */ -import stencila from '@stencila/schema' -import JsonSchema from '@stencila/schema/dist/ts/jsonSchema' +import stencila, { JsonSchema } from '@stencila/schema' import Ajv from 'ajv' import betterAjvErrors from 'better-ajv-errors' import fs from 'fs-extra' @@ -206,7 +205,7 @@ const codecCoerce: Ajv.SchemaValidateFunction = async ( return true } -coercers.addKeyword('codec', { +coercers.addKeyword('parser', { type: 'string', modifying: true, async: true, From 59c082767458fa13ac716249a995ad1db7c1dda7 Mon Sep 17 00:00:00 2001 From: Nokome Bentley Date: Wed, 17 Mar 2021 12:50:14 +1300 Subject: [PATCH 3/3] test(*)): Update tests for Schema v1 --- src/codecs/jsonld/__file_snapshots__/article.jsonld | 2 +- src/codecs/xml/__file_snapshots__/kitchen-sink.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codecs/jsonld/__file_snapshots__/article.jsonld b/src/codecs/jsonld/__file_snapshots__/article.jsonld index 049a64d3d..815d6f91a 100644 --- a/src/codecs/jsonld/__file_snapshots__/article.jsonld +++ b/src/codecs/jsonld/__file_snapshots__/article.jsonld @@ -1,5 +1,5 @@ { - "@context": "http://schema.stenci.la/v0/jsonld/", + "@context": "http://schema.stenci.la/v1/jsonld/", "type": "Article", "authors": [ { diff --git a/src/codecs/xml/__file_snapshots__/kitchen-sink.xml b/src/codecs/xml/__file_snapshots__/kitchen-sink.xml index 1609472c7..fc330fb84 100644 --- a/src/codecs/xml/__file_snapshots__/kitchen-sink.xml +++ b/src/codecs/xml/__file_snapshots__/kitchen-sink.xml @@ -1,4 +1,4 @@ - + true