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

@whatwg-node/server

Package Overview
Dependencies
Maintainers
1
Versions
736
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/server - npm Package Compare versions

Comparing version 0.9.46 to 0.9.47-alpha-20240814155933-2365ba5d093b5b9d61934ab89d7b8a0cb135d4af

37

cjs/utils.js

@@ -535,18 +535,23 @@ "use strict";

const possibleEncodings = ['deflate', 'gzip', 'deflate-raw', 'br'];
supportedEncodings = possibleEncodings.filter(encoding => {
// deflate-raw is not supported in Node.js >v20
if (globalThis.process?.version?.startsWith('v2') &&
fetchAPI.DecompressionStream === globalThis.DecompressionStream &&
encoding === 'deflate-raw') {
return false;
}
try {
// eslint-disable-next-line no-new
new fetchAPI.DecompressionStream(encoding);
return true;
}
catch {
return false;
}
});
if (fetchAPI.DecompressionStream['supportedFormats']) {
supportedEncodings = fetchAPI.DecompressionStream['supportedFormats'];
}
else {
supportedEncodings = possibleEncodings.filter(encoding => {
// deflate-raw is not supported in Node.js >v20
if (globalThis.process?.version?.startsWith('v2') &&
fetchAPI.DecompressionStream === globalThis.DecompressionStream &&
encoding === 'deflate-raw') {
return false;
}
try {
// eslint-disable-next-line no-new
new fetchAPI.DecompressionStream(encoding);
return true;
}
catch {
return false;
}
});
}
supportedEncodingsByFetchAPI.set(fetchAPI, supportedEncodings);

@@ -553,0 +558,0 @@ }

@@ -513,18 +513,23 @@ import { URL } from '@whatwg-node/fetch';

const possibleEncodings = ['deflate', 'gzip', 'deflate-raw', 'br'];
supportedEncodings = possibleEncodings.filter(encoding => {
// deflate-raw is not supported in Node.js >v20
if (globalThis.process?.version?.startsWith('v2') &&
fetchAPI.DecompressionStream === globalThis.DecompressionStream &&
encoding === 'deflate-raw') {
return false;
}
try {
// eslint-disable-next-line no-new
new fetchAPI.DecompressionStream(encoding);
return true;
}
catch {
return false;
}
});
if (fetchAPI.DecompressionStream['supportedFormats']) {
supportedEncodings = fetchAPI.DecompressionStream['supportedFormats'];
}
else {
supportedEncodings = possibleEncodings.filter(encoding => {
// deflate-raw is not supported in Node.js >v20
if (globalThis.process?.version?.startsWith('v2') &&
fetchAPI.DecompressionStream === globalThis.DecompressionStream &&
encoding === 'deflate-raw') {
return false;
}
try {
// eslint-disable-next-line no-new
new fetchAPI.DecompressionStream(encoding);
return true;
}
catch {
return false;
}
});
}
supportedEncodingsByFetchAPI.set(fetchAPI, supportedEncodings);

@@ -531,0 +536,0 @@ }

{
"name": "@whatwg-node/server",
"version": "0.9.46",
"version": "0.9.47-alpha-20240814155933-2365ba5d093b5b9d61934ab89d7b8a0cb135d4af",
"description": "Fetch API compliant HTTP Server adapter",

@@ -5,0 +5,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