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

A polyfill for the internal diagnostics_channel module

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
decreased by-26.26%
Maintainers
1
Weekly downloads
 
Created
Source

dc-polyfill: Diagnostics Channel Polyfill

This package provides a polyfill (or ponyfill) for the diagnostics_channel core Node.js module (including TracingChannel) for use with older versions of Node.js. It aims to remain simple, with zero dependencies, and only taking up a few kilobytes of space.

dc-polyfill attempts to backport every feature and bugfix that is added to Node.js core. If a feature hasn't been backported then please open a Pull Request or open an issue.

Currently this package provides an API compatible with diagnostics_channel as of Node.js v20.6. Therefore, to view the capabilities of this package, read the Node.js diagnostics_channel documentation.

Whenever the currently running version of Node.js ships with diagnostics_channel, dc-polyfill will make sure to use the global registry of channels provided by the core module. However, for old versions of Node.js which lack it, dc-polyfill instead uses a global symbol to track the channels. This symbol will remain the same for all versions of dc-polyfill to avoid the issue where multiple versions of an npm library installed in a dependency hierarchy usually provide different singletons.

Ideally, this package will forever remain backwards compatible, and there will never be a v2.x release.

Usage

npm install dc-polyfill
const diagnostics_channel = require('dc-polyfill');

Contributing

When a Pull Request is created the code runs against many different versions of Node.js. Notably, versions right before a change and versions right after a change, the first version of a release line, and the last version of a release line.

Currently this module tests Node.js >= v12.17. If you would like to use dc-polyfill for versions of Node.js older than this then feel free to submit a Pull Request or open an issue.

See LICENSE.txt for full details.

MIT License - Copyright (c) 2023 Datadog, Inc.

Keywords

FAQs

Package last updated on 16 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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