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

dc-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dc-polyfill - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

.README.md.swo

9

checks.js

@@ -59,1 +59,10 @@ const [ MAJOR, MINOR, PATCH ] = process.versions.node.split('.').map(Number);

module.exports.hasSyncUnsubscribeBug = hasSyncUnsubscribeBug;
// if there is a TracingChannel#hasSubscribers() getter
// @see https://github.com/nodejs/node/pull/51915
// TODO: note that we still need to add the TC early exit from this same version
function hasTracingChannelHasSubscribers() {
return MAJOR >= 22
|| (MAJOR == 20 && MINOR >= 13);
};
module.exports.hasTracingChannelHasSubscribers = hasTracingChannelHasSubscribers;

4

dc-polyfill.js

@@ -33,3 +33,7 @@ const checks = require('./checks.js');

if (!checks.hasTracingChannelHasSubscribers()) {
dc = require('./patch-tracing-channel-has-subscribers.js')(dc);
}
module.exports = dc;

2

package.json
{
"name": "dc-polyfill",
"version": "0.1.4",
"version": "0.1.5",
"description": "A polyfill for the internal diagnostics_channel module",

@@ -5,0 +5,0 @@ "main": "dc-polyfill.js",

@@ -16,2 +16,4 @@ # `dc-polyfill`: Diagnostics Channel Polyfill

> Note that `dc-polyfill` currently has the `TracingChannel#hasSubscribers` getter backported from Node.js v22 however it doesn't yet support the tracing channel early exit feature. Once that's been added we'll delete this clause and update the above table.
Whenever the currently running version of Node.js ships with `diagnostics_channel` (i.e. v16+, v15.14+, v14.17+), **dc-polyfill** will make sure to use the global registry of channels provided by the core module. For older versions of Node.js **dc-polyfill** instead uses its own global collection of channels. This global collection remains in the same location and is shared across all instances of **dc-polyfill**. This avoids the issue wherein multiple versions of an npm library installed in a module dependency hierarchy would otherwise provide different singleton instances.

@@ -18,0 +20,0 @@

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