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

rdfa-streaming-parser

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdfa-streaming-parser - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0

6

index.js
"use strict";
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]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

6

lib/RdfaParser.d.ts

@@ -5,3 +5,3 @@ /// <reference types="node" />

import * as RDF from "@rdfjs/types";
import { Transform, TransformCallback } from "stream";
import { Transform } from "readable-stream";
import { IActiveTag } from "./IActiveTag";

@@ -31,4 +31,4 @@ import { IHtmlParseListener } from "./IHtmlParseListener";

import(stream: EventEmitter): RDF.Stream;
_transform(chunk: any, encoding: string, callback: TransformCallback): void;
_flush(callback: TransformCallback): void;
_transform(chunk: any, encoding: string, callback: (error?: Error | null, data?: any) => void): void;
_flush(callback: (error?: Error | null, data?: any) => void): void;
onTagOpen(name: string, attributes: {

@@ -35,0 +35,0 @@ [s: string]: string;

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

const htmlparser2_1 = require("htmlparser2");
const stream_1 = require("stream");
const readable_stream_1 = require("readable-stream");
const INITIAL_CONTEXT_XHTML = require("./initial-context-xhtml.json");

@@ -14,3 +14,3 @@ const INITIAL_CONTEXT = require("./initial-context.json");

*/
class RdfaParser extends stream_1.Transform {
class RdfaParser extends readable_stream_1.Transform {
constructor(options) {

@@ -48,3 +48,3 @@ super({ readableObjectMode: true });

import(stream) {
const output = new stream_1.PassThrough({ readableObjectMode: true });
const output = new readable_stream_1.PassThrough({ readableObjectMode: true });
stream.on('error', (error) => parsed.emit('error', error));

@@ -57,3 +57,3 @@ stream.on('data', (data) => output.push(data));

_transform(chunk, encoding, callback) {
this.parser.write(chunk);
this.parser.write(chunk.toString());
callback();

@@ -60,0 +60,0 @@ }

@@ -110,3 +110,3 @@ "use strict";

}
return this.dataFactory.namedNode(relative_to_absolute_iri_1.resolve(href, this.baseIRI.value));
return this.dataFactory.namedNode((0, relative_to_absolute_iri_1.resolve)(href, this.baseIRI.value));
}

@@ -167,3 +167,3 @@ /**

if (!vocab) {
term = relative_to_absolute_iri_1.resolve(term, this.getBaseIriTerm(activeTag).value);
term = (0, relative_to_absolute_iri_1.resolve)(term, this.getBaseIriTerm(activeTag).value);
}

@@ -197,6 +197,6 @@ if (!Util.isValidIri(term)) {

if (!vocab) {
iri = relative_to_absolute_iri_1.resolve(iri, this.getBaseIriTerm(activeTag).value);
iri = (0, relative_to_absolute_iri_1.resolve)(iri, this.getBaseIriTerm(activeTag).value);
}
else if (term !== iri) {
iri = relative_to_absolute_iri_1.resolve(iri, this.baseIRIDocument.value);
iri = (0, relative_to_absolute_iri_1.resolve)(iri, this.baseIRIDocument.value);
}

@@ -203,0 +203,0 @@ if (!Util.isValidIri(iri)) {

{
"name": "rdfa-streaming-parser",
"version": "1.5.0",
"version": "2.0.0",
"description": "A fast and lightweight streaming RDFa parser",

@@ -32,5 +32,6 @@ "keywords": [

"@rdfjs/types": "*",
"htmlparser2": "^6.0.0",
"htmlparser2": "^8.0.0",
"rdf-data-factory": "^1.1.0",
"relative-to-absolute-iri": "^1.0.2"
"relative-to-absolute-iri": "^1.0.2",
"readable-stream": "^4.0.0"
},

@@ -43,9 +44,9 @@ "pre-commit": [

"devDependencies": {
"@types/jest": "^26.0.0",
"@types/jest": "^28.0.0",
"@types/jest-each": "^24.3.0",
"@types/node": "^13.1.0",
"arrayify-stream": "^1.0.0",
"@types/readable-stream": "^2.3.14",
"arrayify-stream": "^2.0.0",
"coveralls": "^3.0.0",
"jest": "^26.0.0",
"jest-each": "^26.0.0",
"jest": "^28.0.0",
"jest-each": "^28.0.0",
"jest-rdf": "^1.7.0",

@@ -57,6 +58,9 @@ "manual-git-changelog": "^1.0.1",

"streamify-string": "^1.0.1",
"ts-jest": "^26.0.0",
"ts-jest": "^28.0.0",
"ts-loader": "^9.3.1",
"tslint": "^6.0.0",
"tslint-eslint-rules": "^5.3.1",
"typescript": "^4.0.0"
"typescript": "^4.0.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0"
},

@@ -66,3 +70,3 @@ "jest": {

"ts-jest": {
"tsConfig": "test/tsconfig.json"
"tsconfig": "test/tsconfig.json"
}

@@ -130,5 +134,3 @@ },

},
"resolutions": {
"@types/rdf-js": "^4.0.0"
}
"sideEffects": false
}
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