Socket
Socket
Sign inDemoInstall

@inrupt/jest-jsdom-polyfills

Package Overview
Dependencies
Maintainers
9
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inrupt/jest-jsdom-polyfills - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

16

index.js

@@ -36,4 +36,20 @@ //

globalThis.TextDecoder = utils.TextDecoder;
// TextEncoder references a Uint8Array constructor different than the global
// one used by users in tests. The following enforces the same constructor to
// be referenced by both.
// FIXME: currently this doesn't work, and must be set in a custom environment.
globalThis.Uint8Array = Uint8Array;
}
if (
typeof globalThis.crypto !== "undefined" &&
// jsdom doesn't implement the subtle Web Crypto API
typeof globalThis.crypto.subtle === "undefined"
) {
// Requires OPENSSL_CONF=/dev/null (see https://github.com/nodejs/node/discussions/43184)
const { Crypto, CryptoKey } = require("@peculiar/webcrypto");
Object.assign(globalThis.crypto, new Crypto());
globalThis.CryptoKey = CryptoKey;
}
// Node.js doesn't support Blob or File, so we're polyfilling those with

@@ -40,0 +56,0 @@ // https://github.com/web-std/io

5

package.json
{
"name": "@inrupt/jest-jsdom-polyfills",
"version": "1.3.0",
"version": "1.3.1",
"description": "This package provides various polyfills needed on jest/jsdom when using the Inrupt SDKs",

@@ -28,2 +28,3 @@ "main": "index.js",

"dependencies": {
"@peculiar/webcrypto": "^1.4.0",
"@web-std/blob": "^3.0.4",

@@ -35,3 +36,3 @@ "@web-std/file": "^3.0.2"

},
"gitHead": "04f770c015d82f4a60b7a56726de69f9ddf230de"
"gitHead": "122a1fbe9a22ce396fd90c03b96c9961d20229d5"
}
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