Comparing version 3.0.3 to 4.0.0-test
@@ -41,5 +41,27 @@ 'use strict'; | ||
// Streaming | ||
exports.ParserStream = require('./parser/parser_stream'); | ||
exports.PlainTextConversionStream = require('./parser/plain_text_conversion_stream'); | ||
exports.SerializerStream = require('./serializer/serializer_stream'); | ||
exports.SAXParser = require('./sax'); | ||
// NOTE: streaming API is lazy loadable to enable bundling for platforms | ||
// that are different from Node.js. | ||
// See https://github.com/inikulin/parse5/issues/235. | ||
var streamingAPI = { | ||
ParserStream: './parser/parser_stream', | ||
PlainTextConversionStream: './parser/plain_text_conversion_stream', | ||
SerializerStream: './serializer/serializer_stream', | ||
SAXParser: './sax' | ||
}; | ||
Object.keys(streamingAPI).forEach(function (cls) { | ||
Object.defineProperty(exports, cls, { | ||
get: function () { | ||
try { | ||
return require(streamingAPI[cls]); | ||
} | ||
catch (e) { | ||
throw new Error( | ||
cls + ' is supported only for Node.js.' + | ||
'See https://github.com/inikulin/parse5/issues/235 for details.' | ||
); | ||
} | ||
} | ||
}); | ||
}); |
{ | ||
"name": "parse5", | ||
"description": "HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant.", | ||
"version": "3.0.3", | ||
"version": "4.0.0-test", | ||
"author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)", | ||
@@ -9,2 +9,3 @@ "contributors": "https://github.com/inikulin/parse5/graphs/contributors", | ||
"devDependencies": { | ||
"@types/node": "*", | ||
"del": "^2.0.2", | ||
@@ -48,3 +49,2 @@ "gulp": "^3.9.0", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"repository": { | ||
@@ -61,6 +61,3 @@ "type": "git", | ||
"lib" | ||
], | ||
"dependencies": { | ||
"@types/node": "*" | ||
} | ||
] | ||
} |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
358083
0
7304
15
1
1
- Removed@types/node@*
- Removed@types/node@22.8.4(transitive)
- Removedundici-types@6.19.8(transitive)