From 092efe35859803402bf10075a8072cc6702496e7 Mon Sep 17 00:00:00 2001 From: bergi Date: Mon, 2 Jan 2023 23:22:18 +0100 Subject: [PATCH] feat: use @bergos/jsonparse to remove requirement for bundler config --- lib/JsonLdParser.ts | 2 +- package.json | 2 +- yarn.lock | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/JsonLdParser.ts b/lib/JsonLdParser.ts index affc8c2..dfd7d68 100644 --- a/lib/JsonLdParser.ts +++ b/lib/JsonLdParser.ts @@ -1,6 +1,6 @@ import * as RDF from "@rdfjs/types"; // tslint:disable-next-line:no-var-requires -const Parser = require('jsonparse'); +const Parser = require('@bergos/jsonparse'); import {ERROR_CODES, ErrorCoded, IDocumentLoader, JsonLdContext, Util as ContextUtil} from "jsonld-context-parser"; import {PassThrough, Transform, Readable} from "readable-stream"; import {EntryHandlerArrayValue} from "./entryhandler/EntryHandlerArrayValue"; diff --git a/package.json b/package.json index 92603cd..870b306 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "index.js" ], "dependencies": { + "@bergos/jsonparse": "^1.4.0", "@rdfjs/types": "*", "@types/http-link-header": "^1.0.1", "@types/readable-stream": "^2.3.13", @@ -38,7 +39,6 @@ "canonicalize": "^1.0.1", "http-link-header": "^1.0.2", "jsonld-context-parser": "^2.1.3", - "jsonparse": "^1.3.1", "rdf-data-factory": "^1.1.0", "readable-stream": "^4.0.0" }, diff --git a/yarn.lock b/yarn.lock index fd052b9..d833013 100644 --- a/yarn.lock +++ b/yarn.lock @@ -284,6 +284,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@bergos/jsonparse@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@bergos/jsonparse/-/jsonparse-1.4.0.tgz#b41a00341d27da39099ac564d57b193a2f1b9741" + integrity sha512-inR67ZG/CC2l4vIl73olg1m+mvYJyZLL6C5OhwSxFNLMx0UwIRy7XnJKgrrriZ9ZZ5JDPQrW7cS2UvQb3YgeiA== + dependencies: + buffer "^6.0.3" + "@discoveryjs/json-ext@^0.5.0": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"