Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mem-fs

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem-fs - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

dist/index.d.ts
/// <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",

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