Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

mem-fs

Package Overview
Dependencies
Maintainers
2
Versions
20
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
4.1.2
to
4.1.3
+12
-1
dist/index.js

@@ -7,2 +7,3 @@ import { EventEmitter } from 'events';

import { pipeline } from 'stream/promises';
import fs from 'node:fs';
export function isFileTransform(transform) {

@@ -14,6 +15,16 @@ return (typeof transform === 'function' ||

export function loadFile(filepath) {
const stat = fs.statSync(filepath, { throwIfNoEntry: false });
if (stat?.isDirectory?.()) {
return new File({
cwd: process.cwd(),
base: process.cwd(),
path: filepath,
stat,
contents: null,
});
}
try {
return vinylFileSync(filepath);
}
catch (err) {
catch {
return new File({

@@ -20,0 +31,0 @@ cwd: process.cwd(),

+9
-11
{
"name": "mem-fs",
"version": "4.1.2",
"version": "4.1.3",
"description": "Simple in-memory vinyl file store",

@@ -9,3 +9,3 @@ "type": "module",

"prepare": "tsc",
"pretest": "eslint ."
"pretest": "eslint . && prettier --check --ignore-unknown --no-error-on-unmatched-pattern ."
},

@@ -22,3 +22,3 @@ "repository": "SBoudrias/mem-fs",

"@types/node": ">=18",
"@types/vinyl": "^2.0.8",
"@types/vinyl": "^2.0.12",
"vinyl": "^3.0.0",

@@ -28,12 +28,10 @@ "vinyl-file": "^5.0.0"

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-xo": "^0.43.1",
"eslint-plugin-prettier": "^5.0.0",
"@vitest/coverage-v8": "^4.0.16",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-config-xo": "^0.49.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
"typescript-eslint": "^8.32.1",
"vitest": "^4.0.16"
},

@@ -40,0 +38,0 @@ "engines": {