mem-fs-editor
Advanced tools
Comparing version 9.0.2 to 9.1.0
@@ -22,4 +22,11 @@ 'use strict'; | ||
const globOptions = {...options.globOptions, nodir: true}; | ||
const diskFiles = globby.sync(fromGlob, globOptions).map(file => path.resolve(file)); | ||
let diskFiles = []; | ||
if (options.noGlob) { | ||
const fromFiles = Array.isArray(fromGlob) ? fromGlob : [fromGlob]; | ||
diskFiles = fromFiles.filter(filepath => fs.existsSync(filepath)); | ||
} else { | ||
const globOptions = {...options.globOptions, nodir: true}; | ||
diskFiles = globby.sync(fromGlob, globOptions).map(file => path.resolve(file)); | ||
} | ||
const storeFiles = []; | ||
@@ -26,0 +33,0 @@ this.store.each(file => { |
{ | ||
"name": "mem-fs-editor", | ||
"version": "9.0.2", | ||
"version": "9.1.0", | ||
"description": "File edition helpers working on top of mem-fs", | ||
@@ -42,3 +42,3 @@ "scripts": { | ||
"jest": "^27.0.6", | ||
"mem-fs": "^2.1.0", | ||
"mem-fs": "^2.2.1", | ||
"sinon": "^11.1.2" | ||
@@ -45,0 +45,0 @@ }, |
@@ -85,2 +85,4 @@ # 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) | ||
`options.noGlob` can be used to by bypass glob matching entirely. In that case, `from` will directly match file paths against the file system. | ||
### `#copyAsync(from, to, [options], context[, templateOptions ])` | ||
@@ -87,0 +89,0 @@ |
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
29106
598
145