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
54
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 7.1.0 to 8.0.0-beta.0

22

lib/actions/commit.js

@@ -6,4 +6,3 @@ 'use strict';

var through = require('through2');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var {pipeline} = require('stream');

@@ -13,3 +12,3 @@ function write(file) {

if (!fs.existsSync(dir)) {
mkdirp.sync(dir);
fs.mkdirSync(dir, {recursive: true});
}

@@ -23,3 +22,3 @@

function remove(file) {
rimraf.sync(file.path);
fs.rmdirSync(file.path, {recursive: true});
}

@@ -64,10 +63,9 @@

filters.unshift(modifiedFilter);
filters.push(commitFilter);
stream = filters.reduce(function (stream, filter) {
return stream.pipe(filter);
}, stream);
stream.on('finish', cb);
pipeline(
stream,
modifiedFilter,
...filters,
commitFilter,
(...args) => cb(...args)
);
};

@@ -6,3 +6,2 @@ 'use strict';

var path = require('path');
var glob = require('glob');
var globby = require('globby');

@@ -12,2 +11,3 @@ var multimatch = require('multimatch');

var util = require('../util');
var normalize = require('normalize-path');

@@ -29,3 +29,3 @@ function applyProcessingFunc(process, contents, filename) {

// The store may have a glob path and when we try to copy it will fail because not real file
if (!glob.hasMagic(file.path) && multimatch([file.path], fromGlob).length !== 0) {
if (!globby.hasMagic(normalize(file.path)) && multimatch([file.path], fromGlob).length !== 0) {
storeFiles.push(file.path);

@@ -37,3 +37,3 @@ }

var generateDestination = () => to;
if (Array.isArray(from) || !this.exists(from) || glob.hasMagic(from)) {
if (Array.isArray(from) || !this.exists(from) || globby.hasMagic(normalize(from))) {
assert(

@@ -40,0 +40,0 @@ !this.exists(to) || fs.statSync(to).isDirectory(),

@@ -6,3 +6,4 @@ 'use strict';

var commondir = require('commondir');
var glob = require('glob');
var globby = require('globby');
var normalize = require('normalize-path');

@@ -34,6 +35,8 @@ function notNullOrExclusion(file) {

if (Array.isArray(filePath)) {
return filePath.reduce((memo, pattern) => memo.concat(this.globify(pattern)), []);
return filePath.reduce((memo, pattern) => memo.concat(this.globify(normalize(pattern))), []);
}
if (glob.hasMagic(filePath)) {
filePath = normalize(filePath);
if (globby.hasMagic(filePath)) {
return filePath;

@@ -47,3 +50,3 @@ }

filePath,
path.join(filePath, '**')
normalize(path.join(filePath, '**'))
];

@@ -58,3 +61,3 @@ }

if (fsStats.isDirectory()) {
return path.join(filePath, '**');
return normalize(path.join(filePath, '**'));
}

@@ -61,0 +64,0 @@

{
"name": "mem-fs-editor",
"version": "7.1.0",
"version": "8.0.0-beta.0",
"description": "File edition helpers working on top of mem-fs",

@@ -20,9 +20,7 @@ "scripts": {

"ejs": "^3.1.5",
"glob": "^7.1.4",
"globby": "^9.2.0",
"globby": "^11.0.1",
"isbinaryfile": "^4.0.0",
"mkdirp": "^1.0.0",
"multimatch": "^4.0.0",
"rimraf": "^3.0.0",
"through2": "^3.0.2",
"multimatch": "^5.0.0",
"normalize-path": "^3.0.0",
"through2": "^4.0.2",
"vinyl": "^2.2.1"

@@ -45,4 +43,4 @@ },

"engines": {
"node": ">=10.0.0"
"node": ">=12.10.0"
}
}

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

# mem-fs-editor [![Build Status](https://api.travis-ci.org/SBoudrias/mem-fs-editor.svg?branch=master)](https://travis-ci.org/SBoudrias/mem-fs-editor) [![NPM version](https://badge.fury.io/js/mem-fs-editor.svg)](http://badge.fury.io/js/mem-fs-editor) [![Coverage Status](https://coveralls.io/repos/github/SBoudrias/mem-fs-editor/badge.svg)](https://coveralls.io/github/SBoudrias/mem-fs-editor)
# mem-fs-editor [![Node.js CI](https://github.com/SBoudrias/mem-fs-editor/workflows/Node.js%20CI/badge.svg)](https://github.com/SBoudrias/mem-fs-editor/actions?query=workflow%3A%22Node.js+CI%22) [![NPM version](https://badge.fury.io/js/mem-fs-editor.svg)](http://badge.fury.io/js/mem-fs-editor) [![Coverage Status](https://coveralls.io/repos/github/SBoudrias/mem-fs-editor/badge.svg)](https://coveralls.io/github/SBoudrias/mem-fs-editor)

@@ -3,0 +3,0 @@ File edition helpers working on top of [mem-fs](https://github.com/SBoudrias/mem-fs)

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