Socket
Socket
Sign inDemoInstall

webpack-virtual-modules

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-virtual-modules - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

9

lib/index.js

@@ -94,2 +94,7 @@ "use strict";

}
function getRealpathBackend(fileSystem) {
if (fileSystem._realpathBackend) {
return fileSystem._realpathBackend;
}
}
class VirtualModulesPlugin {

@@ -197,2 +202,3 @@ constructor(modules) {

const readDirStorage = getReadDirBackend(finalInputFileSystem);
const realPathStorage = getRealpathBackend(finalInputFileSystem);
finalInputFileSystem._virtualFiles = finalInputFileSystem._virtualFiles || {};

@@ -229,2 +235,5 @@ finalInputFileSystem._virtualFiles[file] = { stats: stats, contents: contents };

setData(readDirStorage, dir, createWebpackData([]));
if (realPathStorage) {
setData(realPathStorage, dir, createWebpackData(dir));
}
setData(statStorage, dir, createWebpackData(dirStats));

@@ -231,0 +240,0 @@ }

2

package.json
{
"name": "webpack-virtual-modules",
"version": "0.6.1",
"version": "0.6.2",
"description": "Webpack Virtual Modules",

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

@@ -104,2 +104,10 @@ import path from 'path';

function getRealpathBackend(fileSystem) {
if (fileSystem._realpathBackend) {
return fileSystem._realpathBackend;
}
// Nothing, because not all version of webpack support it
}
class VirtualModulesPlugin {

@@ -244,2 +252,4 @@ private _staticModules: Record<string, string> | null;

const readDirStorage = getReadDirBackend(finalInputFileSystem);
const realPathStorage = getRealpathBackend(finalInputFileSystem);
finalInputFileSystem._virtualFiles = finalInputFileSystem._virtualFiles || {};

@@ -276,2 +286,5 @@ finalInputFileSystem._virtualFiles[file] = { stats: stats, contents: contents };

setData(readDirStorage, dir, createWebpackData([]));
if (realPathStorage) {
setData(realPathStorage, dir, createWebpackData(dir));
}
setData(statStorage, dir, createWebpackData(dirStats));

@@ -278,0 +291,0 @@ }

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