From 988afa5843af24c9302f30c52899dcd979bf18b1 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Sun, 12 Jan 2020 10:01:10 +0530 Subject: [PATCH 1/2] chore: migrate to memfs --- package.json | 2 +- test/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4d676686d..3a9ba3476 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "jsdom": "^11.6.2", "lint-staged": "^7.0.0", "markdown-loader": "^2.0.2", - "memory-fs": "^0.4.1", + "memfs": "^3.0.3", "mini-css-extract-plugin": "^0.4.1", "node-sass": "^4.7.2", "normalize-newline": "^3.0.0", diff --git a/test/utils.js b/test/utils.js index c5735fb73..577823da6 100644 --- a/test/utils.js +++ b/test/utils.js @@ -4,9 +4,9 @@ const hash = require('hash-sum') const { JSDOM, VirtualConsole } = require('jsdom') const webpack = require('webpack') const merge = require('webpack-merge') -const MemoryFS = require('memory-fs') +const { createFsFromVolume, Volume } = require('memfs') -const mfs = new MemoryFS() +const mfs = new createFsFromVolume(new Volume()) // eslint-disable-line const VueLoaderPlugin = require('../lib/plugin') const baseConfig = { From 9b8f0ce02a8350cd139168644394f3b7176a329c Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Sun, 12 Jan 2020 10:16:47 +0530 Subject: [PATCH 2/2] fix: outputFileSystem --- test/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/utils.js b/test/utils.js index 577823da6..94743d77a 100644 --- a/test/utils.js +++ b/test/utils.js @@ -76,6 +76,7 @@ function bundle (options, cb, wontThrowError) { const webpackCompiler = webpack(config) webpackCompiler.outputFileSystem = mfs + webpackCompiler.outputFileSystem.join = path.join.bind(path) webpackCompiler.run((err, stats) => { const errors = stats.compilation.errors if (!wontThrowError) {