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

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

to
0.2.2

24

index.js

@@ -53,3 +53,3 @@ var VirtualStats = require('./virtual-stats');

// wrappers, giving us access to the "real" watchFileSystem.
let finalWatchFileSystem = self._watcher && self._watcher.watchFileSystem;
var finalWatchFileSystem = self._watcher && self._watcher.watchFileSystem;

@@ -60,3 +60,8 @@ while (finalWatchFileSystem && finalWatchFileSystem.wfs) {

self._compiler.inputFileSystem._writeVirtualFile(modulePath, stats, contents);
var finalInputFileSystem = self._compiler.inputFileSystem;
while (finalInputFileSystem && finalInputFileSystem._inputFileSystem) {
finalInputFileSystem = finalInputFileSystem._inputFileSystem;
}
finalInputFileSystem._writeVirtualFile(modulePath, stats, contents);
if (finalWatchFileSystem && finalWatchFileSystem.watcher.fileWatchers.length) {

@@ -94,6 +99,11 @@ finalWatchFileSystem.watcher.fileWatchers.forEach(function(fileWatcher) {

var afterEnvironmentHook = function() {
if (!compiler.inputFileSystem._writeVirtualFile) {
var originalPurge = compiler.inputFileSystem.purge;
var finalInputFileSystem = compiler.inputFileSystem;
while (finalInputFileSystem && finalInputFileSystem._inputFileSystem) {
finalInputFileSystem = finalInputFileSystem._inputFileSystem;
}
compiler.inputFileSystem.purge = function() {
if (!finalInputFileSystem._writeVirtualFile) {
var originalPurge = finalInputFileSystem.purge;
finalInputFileSystem.purge = function() {
originalPurge.apply(this, arguments);

@@ -108,3 +118,3 @@ if (this._virtualFiles) {

compiler.inputFileSystem._writeVirtualFile = function(file, stats, contents) {
finalInputFileSystem._writeVirtualFile = function(file, stats, contents) {
this._virtualFiles = this._virtualFiles || {};

@@ -120,3 +130,3 @@ this._virtualFiles[file] = {stats: stats, contents: contents};

try {
compiler.inputFileSystem.readdirSync(dir);
finalInputFileSystem.readdirSync(dir);
} catch (e) {

@@ -123,0 +133,0 @@ var time = Date.now();

{
"name": "webpack-virtual-modules",
"version": "0.2.1",
"version": "0.2.2",
"description": "Webpack Virtual Modules",

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