Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@esbuild-plugins/node-modules-polyfill
Advanced tools
@esbuild-plugins/node-modules-polyfill is a plugin for esbuild that provides polyfills for Node.js core modules. This allows developers to use Node.js modules in environments where they are not natively supported, such as in the browser.
Polyfill Node.js core modules
This feature allows you to polyfill Node.js core modules like 'fs', 'path', etc., so that they can be used in environments like the browser. The code sample demonstrates how to use the NodeModulesPolyfillPlugin with esbuild to bundle an application.
const esbuild = require('esbuild');
const { NodeModulesPolyfillPlugin } = require('@esbuild-plugins/node-modules-polyfill');
esbuild.build({
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js',
plugins: [NodeModulesPolyfillPlugin()]
}).catch(() => process.exit(1));
Browserify is a tool that allows you to write Node.js-style modules that compile for use in the browser. It provides similar functionality to @esbuild-plugins/node-modules-polyfill by enabling the use of Node.js core modules in the browser. However, Browserify is a standalone bundler, whereas @esbuild-plugins/node-modules-polyfill is a plugin specifically for esbuild.
Webpack is a powerful module bundler for JavaScript applications. It can be configured to provide polyfills for Node.js core modules using plugins like 'node-polyfill-webpack-plugin'. While Webpack offers a broader range of features and configurations compared to @esbuild-plugins/node-modules-polyfill, it is also more complex to set up and use.
Rollup-plugin-node-polyfills is a plugin for Rollup that provides polyfills for Node.js core modules. It offers similar functionality to @esbuild-plugins/node-modules-polyfill but is designed to work with the Rollup bundler instead of esbuild.
FAQs
Unknown package
We found that @esbuild-plugins/node-modules-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.