jsonld-streaming-parser
Advanced tools
Comparing version 2.0.2 to 2.1.0
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
<a name="v2.1.0"></a> | ||
## [v2.1.0](https://github.com/rubensworks/streaming-jsonld-parser.js/compare/v2.0.2...v2.1.0) - 2020-09-15 | ||
### Changed | ||
* [Update to @types/rdf-js 4.x](https://github.com/rubensworks/streaming-jsonld-parser.js/commit/c2293ecce10502eef0cc746eb248562790ab8977) | ||
### Fixed | ||
* [Fix import method sometimes failing on large streams](https://github.com/rubensworks/streaming-jsonld-parser.js/commit/4d4ca956a4695a0f36e363d4e11011d014c04aa2) | ||
* [Fix incompatibility with WhatWG streams](https://github.com/rubensworks/streaming-jsonld-parser.js/commit/f7318415a100d4de29f40d8216dd12a80d0f96f6) | ||
<a name="v2.0.2"></a> | ||
@@ -5,0 +15,0 @@ ## [v2.0.2](https://github.com/rubensworks/streaming-jsonld-parser.js/compare/v2.0.1...v2.0.2) - 2020-06-03 |
15
index.js
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./lib/JsonLdParser")); | ||
__exportStar(require("./lib/JsonLdParser"), exports); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContainerHandlerIdentifier = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * Container handler for @id. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContainerHandlerIndex = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const EntryHandlerPredicate_1 = require("../entryhandler/EntryHandlerPredicate"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContainerHandlerLanguage = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContainerHandlerType = void 0; | ||
const EntryHandlerPredicate_1 = require("../entryhandler/EntryHandlerPredicate"); | ||
@@ -4,0 +5,0 @@ const Util_1 = require("../Util"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContextTree = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * A tree structure that holds all contexts, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerArrayValue = void 0; | ||
const Util_1 = require("../Util"); | ||
@@ -4,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerContainer = void 0; | ||
const ContainerHandlerIdentifier_1 = require("../containerhandler/ContainerHandlerIdentifier"); | ||
@@ -4,0 +5,0 @@ const ContainerHandlerIndex_1 = require("../containerhandler/ContainerHandlerIndex"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerInvalidFallback = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * A catch-all for properties, that will either emit an error or ignore, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerPredicate = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const Util_1 = require("../Util"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeyword = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * An abstract keyword entry handler. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordContext = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordGraph = void 0; | ||
const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); | ||
@@ -4,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordId = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordIncluded = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordNest = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordType = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const Util_1 = require("../../Util"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordUnknownFallback = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntryHandlerKeywordValue = void 0; | ||
const EntryHandlerKeyword_1 = require("./EntryHandlerKeyword"); | ||
@@ -4,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JsonLdParser = void 0; | ||
// tslint:disable-next-line:no-var-requires | ||
@@ -27,3 +28,3 @@ const Parser = require('jsonparse'); | ||
constructor(options) { | ||
super({ objectMode: true }); | ||
super({ readableObjectMode: true }); | ||
options = options || {}; | ||
@@ -102,6 +103,6 @@ this.options = options; | ||
import(stream) { | ||
const output = new stream_1.PassThrough({ objectMode: true }); | ||
const output = new stream_1.PassThrough({ readableObjectMode: true }); | ||
stream.on('error', (error) => parsed.emit('error', error)); | ||
stream.on('data', (data) => output.write(data)); | ||
stream.on('end', () => output.emit('end')); | ||
stream.on('data', (data) => output.push(data)); | ||
stream.on('end', () => output.push(null)); | ||
const parsed = output.pipe(new JsonLdParser(this.options)); | ||
@@ -108,0 +109,0 @@ return parsed; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ParsingContext = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
@@ -4,0 +5,0 @@ const ErrorCoded_1 = require("jsonld-context-parser/lib/ErrorCoded"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Util = void 0; | ||
const jsonld_context_parser_1 = require("jsonld-context-parser"); | ||
const rdf_data_factory_1 = require("rdf-data-factory"); | ||
const EntryHandlerContainer_1 = require("./entryhandler/EntryHandlerContainer"); | ||
@@ -13,3 +15,3 @@ // tslint:disable-next-line:no-var-requires | ||
this.parsingContext = options.parsingContext; | ||
this.dataFactory = options.dataFactory || require('@rdfjs/data-model'); | ||
this.dataFactory = options.dataFactory || new rdf_data_factory_1.DataFactory(); | ||
this.rdfFirst = this.dataFactory.namedNode(Util.RDF + 'first'); | ||
@@ -16,0 +18,0 @@ this.rdfRest = this.dataFactory.namedNode(Util.RDF + 'rest'); |
{ | ||
"name": "jsonld-streaming-parser", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "A fast and lightweight streaming JSON-LD parser", | ||
@@ -32,9 +32,9 @@ "keywords": [ | ||
"dependencies": { | ||
"@rdfjs/data-model": "^1.1.2", | ||
"@types/http-link-header": "^1.0.1", | ||
"@types/rdf-js": "^3.0.0", | ||
"@types/rdf-js": "*", | ||
"http-link-header": "^1.0.2", | ||
"canonicalize": "^1.0.1", | ||
"jsonld-context-parser": "^2.0.1", | ||
"jsonparse": "^1.3.1" | ||
"jsonparse": "^1.3.1", | ||
"rdf-data-factory": "^1.0.2" | ||
}, | ||
@@ -47,5 +47,6 @@ "pre-commit": [ | ||
"devDependencies": { | ||
"@types/jest": "^25.1.0", | ||
"@types/jest": "^26.0.0", | ||
"@types/jest-each": "^24.3.0", | ||
"@types/node": "^13.1.0", | ||
"@types/rdf-js": "^4.0.0", | ||
"arrayify-stream": "^1.0.0", | ||
@@ -55,6 +56,6 @@ "coveralls": "^3.0.0", | ||
"jest-each": "^26.0.0", | ||
"jest-rdf": "^1.3.0", | ||
"jest-rdf": "^1.6.0", | ||
"manual-git-changelog": "^1.0.1", | ||
"pre-commit": "^1.2.2", | ||
"rdf-test-suite": "^1.13.1", | ||
"rdf-test-suite": "^1.13.4", | ||
"streamify-string": "^1.0.1", | ||
@@ -64,3 +65,3 @@ "ts-jest": "^26.0.0", | ||
"tslint-eslint-rules": "^5.3.1", | ||
"typescript": "^3.3.1" | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -67,0 +68,0 @@ "jest": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204849
3714
17
+ Addedrdf-data-factory@^1.0.2
+ Added@types/rdf-js@4.0.2(transitive)
+ Addedrdf-data-factory@1.1.2(transitive)
+ Addedrdf-js@4.0.2(transitive)
- Removed@rdfjs/data-model@^1.1.2
- Removed@rdfjs/data-model@1.3.4(transitive)
- Removed@types/rdf-js@3.0.3(transitive)
Updated@types/rdf-js@*