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

@meteor-it/fs

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meteor-it/fs - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

16

index.js
import fsNative from 'fs';
import path from 'path';
import { asyncEach } from '@meteor-it/utils';
import constants from 'constants';
/**

@@ -51,4 +52,13 @@ * Returns true if path is a valid data url

const dirStruct = (await walkDirStruct(from)).map(e => e.replace(from, to));
await asyncEach(dirStruct, dir => mkdir(dir, true));
await asyncEach(await walkDir(from), f => options && options.filter && !options.filter(f) && Promise.resolve(true) || copy(f, f.replace(from, to)));
try {
await asyncEach(dirStruct, dir => mkdir(dir, true));
}
catch (e) { }
try {
await asyncEach(await walkDir(from), f => options && options.filter && !options.filter(f) && Promise.resolve(true) || copy(f, f.replace(from, to)));
}
catch (e) {
if (e.code != constants.ENOENT)
throw e;
}
return;

@@ -222,2 +232,2 @@ }

//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInhyZXN0L25vZGVfbW9kdWxlcy9AbWV0ZW9yLWl0L2ZzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sUUFBbUIsTUFBTSxJQUFJLENBQUM7QUFDckMsT0FBTyxJQUFJLE1BQU0sTUFBTSxDQUFDO0FBQ3hCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUc3Qzs7O0dBR0c7QUFDSCxTQUFTLFNBQVMsQ0FBQyxJQUFZO0lBQzlCLE9BQU8sc0JBQXNCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDLENBQUE7QUFDeEQsQ0FBQztBQU1EOzs7R0FHRzt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FtKHBhdGgsIG9wdGlvbnMpO1xufVxuIl19
import fsNative, { Stats } from 'fs';
import path from 'path';
import { asyncEach } from '@meteor-it/utils';
import constants from 'constants';

@@ -67,4 +68,10 @@ type FileHandle = fsNative.promises.FileHandle;

const dirStruct = (await walkDirStruct(from)).map(e => e.replace(from, to));
await asyncEach(dirStruct, dir => mkdir(dir, true));
await asyncEach(await walkDir(from), f => options && options.filter && !options.filter(f) && Promise.resolve(true) as any as Promise<void> || copy(f, f.replace(from, to)));
try {
await asyncEach(dirStruct, dir => mkdir(dir, true));
} catch (e) { }
try {
await asyncEach(await walkDir(from), f => options && options.filter && !options.filter(f) && Promise.resolve(true) as any as Promise<void> || copy(f, f.replace(from, to)));
} catch (e) {
if (e.code != constants.ENOENT) throw e;
}
return;

@@ -71,0 +78,0 @@ }

4

package.json
{
"name": "@meteor-it/fs",
"version": "1.2.1",
"version": "1.2.2",
"description": "Wrappers for native fs module",

@@ -20,3 +20,3 @@ "module": "index.mjs",

},
"gitHead": "1ba15bdfab1bb8e6a4babc2f5ed897c3753b8cb0"
"gitHead": "a05a4d98386bf058e5ebac4dddd068d9381e6e26"
}

Sorry, the diff of this file is not supported yet

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