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

machinepack-fs

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-fs - npm Package Compare versions

Comparing version 10.0.0-0 to 10.0.0

8

machines/ls.js

@@ -96,3 +96,3 @@ module.exports = {

var walker = Walker(inputs.dir);
walker.filterDir(function(dir, stat) {
walker.filterDir(function(dir/*, stat*/) {
// Too deep.

@@ -115,3 +115,3 @@ if (dir.split(path.sep).length > (topLvlDirDepth + inputs.depth)) {

if (inputs.includeFiles) {
walker.on('file', function (entry, stat) {
walker.on('file', function (entry/*, stat*/) {
// Add the new entry to our result list unless it is:

@@ -130,3 +130,3 @@ // • hidden (and the `includeHidden` input is set to false), or

if (inputs.includeDirs) {
walker.on('dir', function (entry, stat) {
walker.on('dir', function (entry/*, stat*/) {
// If this is the top-level directory, exclude it.

@@ -145,3 +145,3 @@ if (entry === inputs.dir) { return; }

if (inputs.includeSymlinks) {
walker.on('symlink', function (entry, stat) {
walker.on('symlink', function (entry/*, stat*/) {
// If this is the top-level directory, exclude it.

@@ -148,0 +148,0 @@ if (entry===inputs.dir) { return; }

{
"name": "machinepack-fs",
"version": "10.0.0-0",
"version": "10.0.0",
"description": "Work with the local filesystem; list files, write files, etc.",

@@ -23,3 +23,3 @@ "scripts": {

"lodash.isobject": "3.0.2",
"machine": "15.0.0-3",
"machine": "^15.0.0-12",
"machinepack-json": "^2.0.0",

@@ -26,0 +26,0 @@ "machinepack-strings": "^5.0.0",

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

var assert = require('assert');
var fsx = require('fs-extra');

@@ -3,0 +2,0 @@ var Filesystem = require('../');

@@ -1,5 +0,4 @@

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');

@@ -6,0 +5,0 @@ describe('machinepack-fs :: ensureDir', function() {

var assert = require('assert');
var fsx = require('fs-extra');
var path = require('path');
var Filesystem = require('../');
var path = require('path');

@@ -6,0 +5,0 @@ describe('machinepack-fs :: exists', function() {

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -6,0 +6,0 @@

@@ -1,6 +0,4 @@

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -7,0 +5,0 @@ describe('machinepack-fs :: mkdir', function() {

@@ -1,5 +0,4 @@

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');

@@ -6,0 +5,0 @@ describe('machinepack-fs :: mv', function() {

var assert = require('assert');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');
var Filesystem = require('../');

@@ -39,3 +38,3 @@ describe('machinepack-fs :: read-json', function() {

dict: {
key: 'val'
key: 'val'
},

@@ -73,3 +72,3 @@ array: [1, 2, 3]

},
success: function(data) {
success: function() {
return done('Expected to return through `doesNotExist` exit, but triggered `success` instead!');

@@ -103,3 +102,3 @@ }

},
success: function(data) {
success: function() {
return done('Expected to return through `couldNotParse` exit, but triggered `success` instead!');

@@ -133,3 +132,3 @@ }

},
success: function(data) {
success: function() {
return done('Expected to return through `isDirectory` exit, but triggered `success` instead!');

@@ -136,0 +135,0 @@ }

var assert = require('assert');
var fsx = require('fs-extra');
var path = require('path');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -57,3 +55,3 @@ describe('machinepack-fs :: read-stream', function() {

},
success: function(stream) {
success: function() {
return done('Expected to return through `doesNotExist` exit, but triggered `success` instead!');

@@ -77,3 +75,3 @@ }

},
success: function(stream) {
success: function() {
return done('Expected to return through `isDirectory` exit, but triggered `success` instead!');

@@ -80,0 +78,0 @@ }

var assert = require('assert');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -26,3 +24,3 @@ describe('machinepack-fs :: readSync', function() {

source: path.resolve(__dirname, 'fixtures', 'files', 'helloxxx.txt')
}).execSync();
}).now();
throw new Error('Should have triggered `doesNotExist` exit, instead triggered `success`!');

@@ -40,3 +38,3 @@ } catch (e) {

try {
var contents = Filesystem.readSync({
Filesystem.readSync({
source: path.resolve(__dirname, 'fixtures', 'files')

@@ -43,0 +41,0 @@ }).execSync();

var assert = require('assert');
var fsx = require('fs-extra');
var path = require('path');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -41,3 +39,3 @@ describe('machinepack-fs :: read', function() {

},
success: function(stream) {
success: function() {
return done('Expected to return through `doesNotExist` exit, but triggered `success` instead!');

@@ -61,3 +59,3 @@ }

},
success: function(stream) {
success: function() {
return done('Expected to return through `isDirectory` exit, but triggered `success` instead!');

@@ -64,0 +62,0 @@ }

@@ -1,6 +0,4 @@

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -7,0 +5,0 @@ describe('machinepack-fs :: rmrf-sync', function() {

@@ -1,6 +0,4 @@

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -7,0 +5,0 @@ describe('machinepack-fs :: rmrf', function() {

var assert = require('assert');
var path = require('path');
var fsx = require('fs-extra');
var Filesystem = require('../');
var path = require('path');
var _ = require('@sailshq/lodash');

@@ -7,0 +6,0 @@ describe('machinepack-fs :: template', function() {

@@ -10,7 +10,7 @@ var assert = require('assert');

before(function() {
fsx.ensureFileSync(path.resolve(__dirname, 'fixtures' ,'sandbox', 'foo.txt'));
fsx.ensureFileSync(path.resolve(__dirname, 'fixtures', 'sandbox', 'foo.txt'));
});
after(function() {
fsx.removeSync(path.resolve(__dirname, 'fixtures' ,'sandbox'));
fsx.removeSync(path.resolve(__dirname, 'fixtures', 'sandbox'));
});

@@ -26,3 +26,3 @@

dict: {
key: 'val'
key: 'val'
},

@@ -50,3 +50,3 @@ array: [1, 2, 3]

dict: {
key: 'val'
key: 'val'
},

@@ -65,3 +65,3 @@ array: [1, 2, 3]

dict: {
key: 'val'
key: 'val'
},

@@ -86,3 +86,3 @@ array: [1, 2, 3]

dict: {
key: 'val'
key: 'val'
},

@@ -100,7 +100,8 @@ array: [1, 2, 3]

dict: {
key: 'val'
key: 'val'
},
array: [1, 2, 3]
}));
return done(); },
return done();
},
alreadyExists: function() {

@@ -107,0 +108,0 @@ return done('Expected to return through `success` exit, but triggered `alreadyExists` instead!');

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