Socket
Socket
Sign inDemoInstall

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 1.0.1 to 1.0.2

.travis.yml

6

index.js

@@ -98,3 +98,3 @@ "use strict";

for (let i=0; i < _dirList.length; i++) {
let { root, prefix } = getRootAndPrefix(_dirList[i]);
let { root, prefix, getDestinationPath } = getRootAndPrefix(_dirList[i]);
if (!root) {

@@ -108,3 +108,5 @@ throw new Error('FSReader must be instatiated with string or object');

hashStore = curEntryList.reduce((hashStoreAccumulated, entry) => {
hashStoreAccumulated[path.join(entry.relativePath, prefix)] = entry;
let relativePath = getDestinationPath ? getDestinationPath(entry.relativePath) : entry.relativePath;
relativePath = prefix ? path.join(relativePath, prefix) : relativePath;
hashStoreAccumulated[relativePath] = entry;
return hashStoreAccumulated;

@@ -111,0 +113,0 @@ }, hashStore);

{
"name": "fs-merger",
"version": "1.0.1",
"version": "1.0.2",
"description": "Reads files from a real location",

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

@@ -70,2 +70,3 @@ "use strict";

prefix: 'test-2',
getDestinationPath: undefined
}, {

@@ -78,3 +79,4 @@ outputPath: 'fixtures/test-3'

path: 'fixtures/test-1/x.txt',
prefix: ''
prefix: '',
getDestinationPath: '',
});

@@ -86,3 +88,4 @@ });

path: 'fixtures/test-2/c.txt',
prefix: 'test-2'
prefix: 'test-2',
getDestinationPath: undefined,
});

@@ -94,3 +97,4 @@ });

path: 'fixtures/test-3/d.txt',
prefix: ''
prefix: '',
getDestinationPath: undefined,
})

@@ -97,0 +101,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