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

fs-merger

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-merger - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

index.js

@@ -69,2 +69,8 @@ "use strict";

}
} else if (self[propertyName] && !target[propertyName]) { // when fsMerger.fs.hasOwnProperty is accessed we shouldn't be hijacking it to self.hasOwnProperty
return function() {
return self[propertyName](...arguments);
}
} else if (typeof target[propertyName] !== 'function') {
return target[propertyName];
}

@@ -71,0 +77,0 @@ return function() {

2

package.json
{
"name": "fs-merger",
"version": "2.0.0",
"version": "2.0.1",
"description": "Reads files from a real location",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -245,2 +245,12 @@ "use strict";

it('hasOwnProperty works', function() {
debugger
let content = fsMerger.fs.hasOwnProperty('existsSync');
expect(content).to.be.true;
});
it('non function property works', function() {
expect(fsMerger.fs.F_OK).to.be.equal(fs.F_OK);
});
it('exists works', function(done) {

@@ -267,5 +277,5 @@ fsMerger.fs.exists('test-1', function (content) {

describe('Returns entries for', function() {
let fs = new FSMerge(['fixtures/test-1', 'fixtures/test-2', 'fixtures/test-3']);
let fsMerger = new FSMerge(['fixtures/test-1', 'fixtures/test-2', 'fixtures/test-3']);
it('root path', function () {
let fsEntries = fs.entries();
let fsEntries = fsMerger.entries();
let fileList = [];

@@ -279,3 +289,3 @@ let walkList = ['a.txt', 'b.txt', 'c.txt', 'd.txt', 'test-1/', 'test-1/b.txt', 'test-sub-1/', 'test-sub-1/sub-b.txt', 'test-sub-1/sub-c.txt', 'test-sub-1/test-sub-sub-1/', 'test-sub-1/test-sub-sub-1/sub-sub-b.txt', 'test-sub-1/test-sub-sub-1/sub-sub-c.txt', 'test-sub-2/' ,'x.txt'];

it('test-1', function () {
let fsEntries = fs.entries('test-1');
let fsEntries = fsMerger.entries('test-1');
let fileList = [];

@@ -290,3 +300,3 @@ let walkList = [ 'b.txt' ];

it('test-sub-1', function() {
let fsEntries = fs.entries('test-sub-1');
let fsEntries = fsMerger.entries('test-sub-1');
let fileList = [];

@@ -301,3 +311,3 @@ let walkList = [ 'sub-b.txt', 'sub-c.txt', 'test-sub-sub-1/', 'test-sub-sub-1/sub-sub-b.txt', 'test-sub-sub-1/sub-sub-c.txt' ];

it('test-sub-1/test-sub-sub-1', function() {
let fsEntries = fs.entries('test-sub-1/test-sub-sub-1');
let fsEntries = fsMerger.entries('test-sub-1/test-sub-sub-1');
let fileList = [];

@@ -308,3 +318,13 @@ let walkList = [ 'sub-sub-b.txt', 'sub-sub-c.txt' ];

});
expect(fileList).to.be.deep.equal(walkList);
});
it('can read entries from fsMeger.fs as well', function () {
fsMerger = new FSMerge(['fixtures/test-1', 'fixtures/test-2', 'fixtures/test-3']).fs;
let fsEntries = fsMerger.entries();
let fileList = [];
let walkList = ['a.txt', 'b.txt', 'c.txt', 'd.txt', 'test-1/', 'test-1/b.txt', 'test-sub-1/', 'test-sub-1/sub-b.txt', 'test-sub-1/sub-c.txt', 'test-sub-1/test-sub-sub-1/', 'test-sub-1/test-sub-sub-1/sub-sub-b.txt', 'test-sub-1/test-sub-sub-1/sub-sub-c.txt', 'test-sub-2/' ,'x.txt'];
fsEntries.forEach(entry => {
fileList.push(entry.relativePath);
});
expect(fileList).to.be.deep.equal(walkList);

@@ -311,0 +331,0 @@ });

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