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
366
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.6.1-next.46a4ea0.0 to 1.6.1-next.5ad8f06.0

17

dist/index.js

@@ -7,3 +7,3 @@ 'use strict';

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

@@ -41,3 +41,3 @@

__require.resolve(`@jspm/core/nodelibs/${importPath}`),
// ensure "fs/promises" is resolved properly
// ensure sub path modules are resolved properly
"../../.." + (importPath.includes("/") ? "/.." : "")

@@ -71,8 +71,3 @@ );

const exportFullPath = await getCachedPolyfillPath(importPath);
const content = (await esbuild.build({
write: false,
format: "esm",
bundle: true,
entryPoints: [exportFullPath]
})).outputFiles[0].text;
const content = await promises.readFile(exportFullPath, "utf8");
return content.replace(/eval\(/g, "(0,eval)(");

@@ -260,8 +255,2 @@ }, "polyfillContentAndTransform");

}, "nodeModulesPolyfillPlugin");
/**
* `polyfillPath` and `getCachedPolyfillContent` are taken from below source with some modifications for my use case.
* https://github.com/Aslemammad/modern-node-polyfills
* @author Aslemammad
* @license MIT
*/

@@ -268,0 +257,0 @@ exports.commonJsTemplate = commonJsTemplate;

2

package.json
{
"name": "esbuild-plugins-node-modules-polyfill",
"version": "1.6.1-next.46a4ea0.0",
"version": "1.6.1-next.5ad8f06.0",
"description": "Polyfills nodejs builtin modules and globals for the browser.",

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

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