sparqljson-parse
Advanced tools
Comparing version 1.6.0 to 1.6.1
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
<a name="v1.6.1"></a> | ||
## [v1.6.1](https://github.com/rubensworks/sparqljson-parse.js/compare/v1.6.0...v1.6.1) - 2021-07-27 | ||
### Fixed | ||
* [Fix not all JSON parse errors being caught](https://github.com/rubensworks/sparqljson-parse.js/commit/3389a2949f0d59a959fb43d4c7b8c248a891b30c) | ||
<a name="v1.6.0"></a> | ||
@@ -5,0 +11,0 @@ ## [v1.6.0](https://github.com/rubensworks/sparqljson-parse.js/compare/v1.5.2...v1.6.0) - 2020-09-16 |
@@ -34,10 +34,11 @@ "use strict"; | ||
parseJsonResultsStream(sparqlResponseStream) { | ||
sparqlResponseStream.on('error', (error) => resultStream.emit('error', error)); | ||
const errorListener = (error) => resultStream.emit('error', error); | ||
sparqlResponseStream.on('error', errorListener); | ||
const variables = []; | ||
sparqlResponseStream | ||
.pipe(require('JSONStream').parse('head.vars.*')) | ||
.pipe(require('JSONStream').parse('head.vars.*').on('error', errorListener)) | ||
.on('data', (variable) => variables.push(this.dataFactory.variable(variable))) | ||
.on('end', () => resultStream.emit('variables', variables)); | ||
const resultStream = sparqlResponseStream | ||
.pipe(require('JSONStream').parse('results.bindings.*')) | ||
.pipe(require('JSONStream').parse('results.bindings.*').on('error', errorListener)) | ||
.pipe(new SparqlJsonBindingsTransformer_1.SparqlJsonBindingsTransformer(this)); | ||
@@ -44,0 +45,0 @@ return resultStream; |
{ | ||
"name": "sparqljson-parse", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Parses SPARQL JSON query results", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# SPARQL-Results+JSON Parse | ||
[![Build Status](https://travis-ci.org/rubensworks/sparqljson-parse.js.svg?branch=master)](https://travis-ci.org/rubensworks/sparqljson-parse.js) | ||
[![Build status](https://github.com/rubensworks/sparqljson-parse.js/workflows/CI/badge.svg)](https://github.com/rubensworks/sparqljson-parse.js/actions?query=workflow%3ACI) | ||
[![Coverage Status](https://coveralls.io/repos/github/rubensworks/sparqljson-parse.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/sparqljson-parse.js?branch=master) | ||
@@ -5,0 +5,0 @@ [![npm version](https://badge.fury.io/js/sparqljson-parse.svg)](https://www.npmjs.com/package/sparqljson-parse) |
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
19563
220