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

vinyl-fs

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl-fs - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

14

lib/dest/index.js
'use strict';
var path = require('path');
var defaults = require('lodash.defaults');
var map = require('map-stream');
var path = require('path');
var through2 = require('through2');
var mkdirp = require('mkdirp');

@@ -30,3 +30,3 @@ var fs = require('graceful-fs');

function saveFile (file, cb) {
function saveFile (file, enc, cb) {
var basePath;

@@ -52,12 +52,12 @@ if (typeof outFolder === 'string') {

if (err) {
return cb(err);
cb(err);
} else {
writeContents(writePath, file, cb);
}
writeContents(writePath, file, cb);
});
}
var stream = map(saveFile);
return stream;
return through2.obj(saveFile);
}
module.exports = dest;
'use strict';
var map = require('map-stream');
var through2 = require('through2');

@@ -10,3 +10,3 @@ var readDir = require('./readDir');

function getContents(opt) {
return map(function (file, cb) {
return through2.obj(function (file, enc, cb) {
// don't fail to read a directory

@@ -13,0 +13,0 @@ if (file.isDirectory()) {

'use strict';
var map = require('map-stream');
var through2 = require('through2');
var fs = require('graceful-fs');
function getStats() {
return map(fetchStats);
return through2.obj(fetchStats);
}
function fetchStats(file, cb) {
function fetchStats(file, enc, cb) {
fs.stat(file.path, function (err, stat) {
if (err) {
return cb(err);
if (stat) {
file.stat = stat;
}
file.stat = stat;
cb(null, file);
cb(err, file);
});

@@ -19,0 +17,0 @@ }

{
"name": "vinyl-fs",
"description": "Vinyl adapter for the file system",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "http://github.com/wearefractal/vinyl-fs",

@@ -14,3 +14,2 @@ "repository": "git://github.com/wearefractal/vinyl-fs.git",

"lodash.defaults": "^2.4.1",
"map-stream": "^0.1.0",
"mkdirp": "^0.5.0",

@@ -30,4 +29,3 @@ "strip-bom": "^0.3.0",

"rimraf": "^2.2.5",
"should": "^4.0.0",
"through2": "^0.5.1"
"should": "^4.0.0"
},

@@ -34,0 +32,0 @@ "scripts": {

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