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

mem-fs-editor

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem-fs-editor - npm Package Compare versions

Comparing version 11.1.3 to 11.1.4

2

dist/actions/commit-file-async.js

@@ -11,3 +11,3 @@ import fs from 'fs/promises';

if (!(await fs.stat(dir)).isDirectory()) {
throw new Error(`${file.path} is not a directory`);
throw new Error(`${dir} is not a directory`);
}

@@ -14,0 +14,0 @@ }

@@ -1,3 +0,2 @@

import { Duplex } from 'stream';
import type { MemFsEditorFile } from './index.js';
export declare const createCommitTransform: <EditorFile extends MemFsEditorFile = MemFsEditorFile>() => Duplex;
import { Transform } from 'stream';
export declare const createCommitTransform: () => Transform;

@@ -1,8 +0,8 @@

import { Duplex } from 'stream';
import { Transform } from 'stream';
import commitFileAsync from './actions/commit-file-async.js';
export const createCommitTransform = () => Duplex.from(async function* (generator) {
for await (const file of generator) {
await commitFileAsync(file);
yield file;
}
export const createCommitTransform = () => new Transform({
objectMode: true,
transform(file, _encoding, callback) {
commitFileAsync(file).then(() => callback(null, file), (error) => callback(error));
},
});
{
"name": "mem-fs-editor",
"version": "11.1.3",
"version": "11.1.4",
"description": "File edition helpers working on top of mem-fs",
"type": "module",
"scripts": {
"build": "tsc",
"fix": "eslint . --fix",
"prepare": "npm run build",
"pretest": "eslint .",
"test": "vitest --run"
},
"repository": "SBoudrias/mem-fs-editor",
"license": "MIT",
"author": "Simon Boudrias",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"exports": {

@@ -32,5 +23,14 @@ ".": {

},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"fix": "eslint . --fix",
"prepare": "npm run build",
"pretest": "eslint .",
"test": "vitest --run"
},
"dependencies": {

@@ -51,8 +51,2 @@ "@types/ejs": "^3.1.4",

},
"peerDependencies": {
"mem-fs": "^4.0.0"
},
"acceptDependencies": {
"isbinaryfile": "^5.0.3"
},
"devDependencies": {

@@ -74,5 +68,11 @@ "@typescript-eslint/eslint-plugin": "^7.18.0",

},
"peerDependencies": {
"mem-fs": "^4.0.0"
},
"engines": {
"node": ">=18.0.0"
},
"acceptDependencies": {
"isbinaryfile": "^5.0.3"
}
}

@@ -19,3 +19,3 @@ # mem-fs-editor

fs.write('somefile.js', 'var a = 1;');
await fs.commit()
await fs.commit();
```

@@ -22,0 +22,0 @@

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