🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

import-fresh

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-fresh - npm Package Compare versions

Comparing version

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",