New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tybys/native-require

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tybys/native-require - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "@tybys/native-require",
"version": "3.0.1",
"version": "3.0.2",
"description": "Try to get native require function in any environment.",

@@ -5,0 +5,0 @@ "module": "index.esm.js",

@@ -5,3 +5,4 @@ exports.nativeRequireRollupPlugin = function () {

renderChunk (code /*, chunk, options */) {
return code.replace(/function\s+commonjsRequire\s+\(\)\s+\{\s*(\r?\n)*throw new Error\(['"]Dynamic requires are not currently supported by @rollup\/plugin-commonjs['"]\);\s*(\r?\n)*\s*}/g, '')
return code.replace(/function\s+commonjsRequire\s+\(\)\s+\{\s*(\r?\n)*\s*throw new Error\(['"]Dynamic requires are not currently supported by @rollup\/plugin-commonjs['"]\);\s*(\r?\n)*\s*\}/g, '')
.replace(/function\s+commonjsRequire\s+\((.+?)\)\s+\{\s*(\r?\n)*\s*throw new Error\(['"]Could not dynamically require ['"](.+?)\);\s*(\r?\n)*\s*\}/g, '')
.replace(/commonjsRequire/g, 'require')

@@ -8,0 +9,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