@inrupt/jest-jsdom-polyfills
Advanced tools
Comparing version 2.1.1 to 2.1.2
23
index.js
@@ -33,4 +33,2 @@ // | ||
globalThis.TextEncoder = utils.TextEncoder; | ||
// @ts-ignore TextDecoder from util doesn't necessarily conform to that from | ||
// the Web APIs, but it's good enough: | ||
globalThis.TextDecoder = utils.TextDecoder; | ||
@@ -49,6 +47,9 @@ // TextEncoder references a Uint8Array constructor different than the global | ||
) { | ||
// 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; | ||
// Requires OPENSSL_CONF=/dev/null (see https://github.com/nodejs/node/discussions/43184) | ||
const { | ||
Crypto: WCrypto, | ||
CryptoKey: WCryptoKey, | ||
} = require("@peculiar/webcrypto"); | ||
Object.assign(globalThis.crypto, new WCrypto()); | ||
globalThis.CryptoKey = WCryptoKey; | ||
} | ||
@@ -76,7 +77,7 @@ | ||
) { | ||
const { Request, Response, Headers, fetch } = require("undici"); | ||
globalThis.Response = Response; | ||
globalThis.Request = Request; | ||
globalThis.Headers = Headers; | ||
globalThis.fetch = fetch; | ||
const undici = require("undici"); | ||
globalThis.Response = undici.Response; | ||
globalThis.Request = undici.Request; | ||
globalThis.Headers = undici.Headers; | ||
globalThis.fetch = undici.fetch; | ||
} |
{ | ||
"name": "@inrupt/jest-jsdom-polyfills", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "This package provides various polyfills needed on jest/jsdom when using the Inrupt SDKs", | ||
@@ -34,5 +34,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@types/node": "^20.3.1" | ||
"@types/node": "^20.4.5" | ||
}, | ||
"gitHead": "6b927695feed9d9c88ec2d54eaabb44f49756381" | ||
"gitHead": "f1e5e2decd68cbbcfa1b52b52fff350c3fc884af" | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
74
0
6023