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

esbuild-plugins-node-modules-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
371
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugins-node-modules-polyfill - npm Package Compare versions

Comparing version 1.4.1-next.6e2ba6b.0 to 1.4.1-next.6e84c9b.0

10

dist/index.js

@@ -5,4 +5,4 @@ 'use strict';

var path = require('path');
var localPkg = require('local-pkg');
var esbuild = require('esbuild');
var localPkg = require('local-pkg');
var resolve_exports = require('resolve.exports');

@@ -158,3 +158,2 @@

const resolver = /* @__PURE__ */ __name(async (args) => {
const moduleName = normalizeNodeBuiltinPath(args.path);
const emptyResult = {

@@ -165,2 +164,9 @@ namespace: emptyNamespace,

};
if (initialOptions.platform === "browser") {
const packageJson = await localPkg.loadPackageJSON(args.resolveDir);
const browserFieldValue = packageJson?.browser?.[args.path];
if (browserFieldValue !== void 0)
return;
}
const moduleName = normalizeNodeBuiltinPath(args.path);
const fallbackResult = fallback === "empty" ? emptyResult : void 0;

@@ -167,0 +173,0 @@ if (!modules[moduleName]) {

2

package.json
{
"name": "esbuild-plugins-node-modules-polyfill",
"version": "1.4.1-next.6e2ba6b.0",
"version": "1.4.1-next.6e84c9b.0",
"description": "Polyfills nodejs builtin modules and globals for the browser.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -22,2 +22,3 @@ <div align="center">

- Supports `node:` protocol
- Supports [`browser` field in `package.json`](https://github.com/defunctzombie/package-browser-field-spec)
- Optionally injects globals

@@ -24,0 +25,0 @@ - Optionally provides empty fallbacks

Sorry, the diff of this file is not supported yet

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