Comparing version 2.2.0 to 2.2.1
/// <reference types="node" /> | ||
import { EventEmitter } from 'events'; | ||
import File from 'vinyl'; | ||
import File = require('vinyl'); | ||
import { PassThrough } from 'stream'; | ||
@@ -5,0 +5,0 @@ export declare class Store extends EventEmitter { |
@@ -17,14 +17,11 @@ "use strict"; | ||
})(); | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.create = exports.Store = void 0; | ||
var events_1 = require("events"); | ||
var path_1 = __importDefault(require("path")); | ||
var vinyl_file_1 = __importDefault(require("vinyl-file")); | ||
var vinyl_1 = __importDefault(require("vinyl")); | ||
var path = require("path"); | ||
var vinylFile = require("vinyl-file"); | ||
var File = require("vinyl"); | ||
var stream_1 = require("stream"); | ||
function createFile(filepath) { | ||
return new vinyl_1.default({ | ||
return new File({ | ||
cwd: process.cwd(), | ||
@@ -46,3 +43,3 @@ base: process.cwd(), | ||
try { | ||
file = vinyl_file_1.default.readSync(filepath); | ||
file = vinylFile.readSync(filepath); | ||
} | ||
@@ -56,7 +53,7 @@ catch (err) { | ||
Store.prototype.get = function (filepath) { | ||
filepath = path_1.default.resolve(filepath); | ||
filepath = path.resolve(filepath); | ||
return this.store[filepath] || this.load(filepath); | ||
}; | ||
Store.prototype.existsInMemory = function (filepath) { | ||
filepath = path_1.default.resolve(filepath); | ||
filepath = path.resolve(filepath); | ||
return !!this.store[filepath]; | ||
@@ -63,0 +60,0 @@ }; |
{ | ||
"name": "mem-fs", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Simple in-memory vinyl file store", | ||
"scripts": { | ||
"test": "tsc && mocha", | ||
"test": "tsc && mocha && tsc -b ./type-test/tsconfig.build.json", | ||
"prepare": "tsc" | ||
@@ -19,2 +19,4 @@ }, | ||
"dependencies": { | ||
"@types/node": "^15.6.1", | ||
"@types/vinyl": "^2.0.4", | ||
"vinyl": "^2.0.1", | ||
@@ -24,3 +26,2 @@ "vinyl-file": "^3.0.0" | ||
"devDependencies": { | ||
"@types/vinyl": "^2.0.4", | ||
"@types/vinyl-file": "^3.0.0", | ||
@@ -27,0 +28,0 @@ "mocha": "^8.3.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
5609
4
104
+ Added@types/node@^15.6.1
+ Added@types/vinyl@^2.0.4
+ Added@types/expect@1.20.4(transitive)
+ Added@types/node@15.14.9(transitive)
+ Added@types/vinyl@2.0.12(transitive)