Socket
Socket
Sign inDemoInstall

jsdom

Package Overview
Dependencies
111
Maintainers
6
Versions
258
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 16.7.0 to 17.0.0

2

lib/jsdom/browser/resources/resource-loader.js

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

const promise = new Promise(resolve => {
timeoutId = setTimeout(resolve, 0, dataURL.body);
timeoutId = setTimeout(resolve, 0, Buffer.from(dataURL.body));
});

@@ -31,0 +31,0 @@ promise.abort = () => {

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

// TODO remove when we drop Node v10 support.
const anyNodeVersionQueueMicrotask = typeof queueMicrotask === "function" ? queueMicrotask : process.nextTick;
// https://html.spec.whatwg.org/#the-window-object

@@ -549,3 +546,3 @@ function setupWindow(windowInstance, { runScripts }) {

anyNodeVersionQueueMicrotask(() => {
queueMicrotask(() => {
try {

@@ -552,0 +549,0 @@ callback();

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

_onMessageReceived(data) {
_onMessageReceived(data, isBinary) {
if (this.readyState !== OPEN) {

@@ -206,4 +206,4 @@ return;

let dataForEvent;
if (typeof data === "string") {
dataForEvent = data;
if (!isBinary) {
dataForEvent = data.toString();
} else if (this.binaryType === "arraybuffer") {

@@ -240,3 +240,3 @@ if (isArrayBuffer(data)) {

code,
reason
reason: reason.toString()
});

@@ -243,0 +243,0 @@ }

@@ -9,3 +9,4 @@ "use strict";

const urlString = whatwgURL.serializeURL(urlRecord);
const scriptSource = whatwgURL.percentDecode(Buffer.from(urlString)).toString();
const encodedScriptSource = urlString.substring("javascript:".length);
const scriptSource = Buffer.from(whatwgURL.percentDecodeString(encodedScriptSource)).toString();
if (window._runScripts === "dangerously") {

@@ -12,0 +13,0 @@ try {

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

const contentType = parsed.mimeType.toString();
buffer = parsed.body;
buffer = Buffer.from(parsed.body);
response.statusCode = 200;

@@ -222,0 +222,0 @@ response.rawHeaders = ["Content-Type", contentType];

{
"name": "jsdom",
"version": "16.7.0",
"version": "17.0.0",
"description": "A JavaScript implementation of many web standards",

@@ -24,11 +24,11 @@ "keywords": [

"abab": "^2.0.5",
"acorn": "^8.2.4",
"acorn": "^8.4.1",
"acorn-globals": "^6.0.0",
"cssom": "^0.4.4",
"cssom": "^0.5.0",
"cssstyle": "^2.3.0",
"data-urls": "^2.0.0",
"decimal.js": "^10.2.1",
"data-urls": "^3.0.0",
"decimal.js": "^10.3.1",
"domexception": "^2.0.1",
"escodegen": "^2.0.0",
"form-data": "^3.0.0",
"form-data": "^4.0.0",
"html-encoding-sniffer": "^2.0.1",

@@ -48,4 +48,4 @@ "http-proxy-agent": "^4.0.1",

"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^8.5.0",
"ws": "^7.4.6",
"whatwg-url": "^9.0.0",
"ws": "^8.0.0",
"xml-name-validator": "^3.0.0"

@@ -69,8 +69,8 @@ },

"chai": "^4.3.4",
"eslint": "^7.27.0",
"eslint": "^7.32.0",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-jsdom-internal": "link:./scripts/eslint-plugin",
"js-yaml": "^4.1.0",
"karma": "^6.3.2",
"karma-browserify": "^8.0.0",
"karma": "^6.3.4",
"karma-browserify": "^8.1.0",
"karma-chrome-launcher": "^3.1.0",

@@ -80,10 +80,10 @@ "karma-mocha": "^2.0.1",

"minimatch": "^3.0.4",
"mocha": "^8.4.0",
"mocha": "^9.0.3",
"mocha-sugar-free": "^1.4.0",
"optimist": "0.6.1",
"pngjs": "^6.0.0",
"rimraf": "^3.0.2",
"server-destroy": "^1.0.1",
"watchify": "^4.0.0",
"wd": "^1.14.0",
"webidl2js": "^16.2.0"
"webidl2js": "^16.2.0",
"yargs": "^17.0.1"
},

@@ -118,4 +118,4 @@ "browser": {

"engines": {
"node": ">=10"
"node": ">=12"
}
}

@@ -8,3 +8,3 @@ <h1 align="center">

The latest versions of jsdom require Node.js v10 or newer. (Versions of jsdom below v16 still work with previous Node.js versions, but are unsupported.)
The latest versions of jsdom require Node.js v12 or newer. (Versions of jsdom below v17 still work with previous Node.js versions, but are unsupported.)

@@ -11,0 +11,0 @@ ## Basic usage

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc