Socket
Socket
Sign inDemoInstall

import-fresh

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.1

8

index.js

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

// Delete module from cache
delete require.cache[filePath];
delete require.cache[filePath]; // Delete module from cache
// Return fresh module
return require.cache[parentPath].require(filePath);
const parent = require.cache[parentPath]; // If `filePath` and `parentPath` are the same, cache will already be deleted so we won't get a memory leak in next step
return parent === undefined ? require(filePath) : parent.require(filePath); // In case cache doesn't have parent, fall back to normal require
};
{
"name": "import-fresh",
"version": "3.2.0",
"version": "3.2.1",
"description": "Import a module while bypassing the cache",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc