Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonld-streaming-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonld-streaming-parser - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
<a name="v2.0.1"></a>
## [v2.0.1](https://github.com/rubensworks/streaming-jsonld-parser.js/compare/v2.0.0...v2.0.1) - 2020-04-27
### Fixed
* [Fix multiple aliased type entries causing a stream key order error](https://github.com/rubensworks/streaming-jsonld-parser.js/commit/bab4d7de1a1d6fc4e40308191929eff158ec019f)
<a name="v2.0.0"></a>

@@ -5,0 +11,0 @@ ## [v2.0.0](https://github.com/rubensworks/streaming-jsonld-parser.js/compare/v1.1.2...v2.0.0) - 2020-04-03

2

lib/entryhandler/IEntryHandler.d.ts

@@ -13,3 +13,3 @@ import { ParsingContext } from "../ParsingContext";

* @return {boolean} If this handler should flag {@link ParsingContext#processingStack} for the given depth.
* Handlers for things like @id, @context and return false, while property handlers return true.
* Handlers for things like @id, @context and @type return false, while prop handlers return true.
*/

@@ -16,0 +16,0 @@ isStackProcessor(): boolean;

@@ -18,3 +18,5 @@ "use strict";

if (parsingContext.streamingProfile
&& (parsingContext.processingStack[depth] || parsingContext.idStack[depth] !== undefined)) {
&& (parsingContext.processingStack[depth]
|| parsingContext.processingType[depth]
|| parsingContext.idStack[depth] !== undefined)) {
parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded('Found an out-of-order context, while streaming is enabled.' +

@@ -21,0 +23,0 @@ '(disable `streamingProfile`)', jsonld_context_parser_1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));

@@ -9,3 +9,4 @@ import { ParsingContext } from "../../ParsingContext";

constructor();
isStackProcessor(): boolean;
handle(parsingContext: ParsingContext, util: Util, key: any, keys: any[], value: any, depth: number): Promise<any>;
}

@@ -14,2 +14,5 @@ "use strict";

}
isStackProcessor() {
return false;
}
async handle(parsingContext, util, key, keys, value, depth) {

@@ -69,2 +72,4 @@ const keyOriginal = keys[depth];

}
// Flag that type has been processed at this depth
parsingContext.processingType[depth] = true;
}

@@ -71,0 +76,0 @@ }

@@ -217,2 +217,3 @@ "use strict";

this.parsingContext.processingStack.splice(depth, 1);
this.parsingContext.processingType.splice(depth, 1);
this.parsingContext.emittedStack.splice(depth, 1);

@@ -219,0 +220,0 @@ this.parsingContext.idStack.splice(depth, 1);

@@ -26,2 +26,3 @@ import { ContextParser, IExpandOptions, IJsonLdContextNormalizedRaw, JsonLdContext, JsonLdContextNormalized } from "jsonld-context-parser";

readonly processingStack: boolean[];
readonly processingType: boolean[];
readonly emittedStack: boolean[];

@@ -28,0 +29,0 @@ readonly idStack: RDF.Term[][];

@@ -29,2 +29,3 @@ "use strict";

this.processingStack = [];
this.processingType = [];
this.emittedStack = [];

@@ -31,0 +32,0 @@ this.idStack = [];

{
"name": "jsonld-streaming-parser",
"version": "2.0.0",
"version": "2.0.1",
"description": "A fast and lightweight streaming JSON-LD parser",

@@ -98,5 +98,5 @@ "keywords": [

"spec-earl": "npm run spec-earl-tordf && npm run spec-earl-stream-tordf",
"spec-tordf": "rdf-test-suite spec/parser.js https://w3c.github.io/json-ld-api/tests/toRdf-manifest.jsonld -c .rdf-test-suite-cache/ -e",
"spec-tordf": "rdf-test-suite spec/parser.js https://w3c.github.io/json-ld-api/tests/toRdf-manifest.jsonld -c .rdf-test-suite-cache/",
"spec-earl-tordf": "rdf-test-suite spec/parser.js https://w3c.github.io/json-ld-api/tests/toRdf-manifest.jsonld -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-tordf.ttl",
"spec-stream-tordf": "rdf-test-suite spec/parser.js -i '{ \"streamingProfile\": true }' https://w3c.github.io/json-ld-streaming/tests/stream-toRdf-manifest.jsonld -c .rdf-test-suite-cache/ -e",
"spec-stream-tordf": "rdf-test-suite spec/parser.js -i '{ \"streamingProfile\": true }' https://w3c.github.io/json-ld-streaming/tests/stream-toRdf-manifest.jsonld -c .rdf-test-suite-cache/",
"spec-earl-stream-tordf": "rdf-test-suite spec/parser.js -i '{ \"streamingProfile\": true }' https://w3c.github.io/json-ld-streaming/tests/stream-toRdf-manifest.jsonld -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-stream-tordf.ttl",

@@ -103,0 +103,0 @@ "spec-clean": "rm -r .rdf-test-suite-cache/"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc