Socket
Socket
Sign inDemoInstall

@nodelib/fs.walk

Package Overview
Dependencies
6
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.5 to 1.2.6

6

out/readers/common.js

@@ -23,4 +23,10 @@ "use strict";

}
/**
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
*/
if (a.endsWith(separator)) {
return a + b;
}
return a + separator + b;
}
exports.joinPathSegments = joinPathSegments;

@@ -73,3 +73,14 @@ "use strict";

});
it('should return correct string when the first segment ens with the separator symbol', () => {
// Unix
assert.strictEqual(common.joinPathSegments('/', 'a', '/'), '/a');
assert.strictEqual(common.joinPathSegments('//', 'a', '/'), '//a');
assert.strictEqual(common.joinPathSegments('/a/', 'b', '/'), '/a/b');
// Windows
assert.strictEqual(common.joinPathSegments('C:/', 'Users', '/'), 'C:/Users');
assert.strictEqual(common.joinPathSegments('C:\\', 'Users', '\\'), 'C:\\Users');
assert.strictEqual(common.joinPathSegments('//?/C:/', 'Users', '/'), '//?/C:/Users');
assert.strictEqual(common.joinPathSegments('\\\\?\\C:\\', 'Users', '\\'), '\\\\?\\C:\\Users');
});
});
});

4

package.json
{
"name": "@nodelib/fs.walk",
"version": "1.2.5",
"version": "1.2.6",
"description": "A library for efficiently walking a directory recursively",

@@ -34,3 +34,3 @@ "license": "MIT",

},
"gitHead": "cb5f7e893a986164c3b847a4f1faef6c54cadd68"
"gitHead": "bd149ea6dc1ef18c234730278271f6a7f3882ed2"
}

@@ -100,3 +100,16 @@ import * as assert from 'assert';

});
it('should return correct string when the first segment ens with the separator symbol', () => {
// Unix
assert.strictEqual(common.joinPathSegments('/', 'a', '/'), '/a');
assert.strictEqual(common.joinPathSegments('//', 'a', '/'), '//a');
assert.strictEqual(common.joinPathSegments('/a/', 'b', '/'), '/a/b');
// Windows
assert.strictEqual(common.joinPathSegments('C:/', 'Users', '/'), 'C:/Users');
assert.strictEqual(common.joinPathSegments('C:\\', 'Users', '\\'), 'C:\\Users');
assert.strictEqual(common.joinPathSegments('//?/C:/', 'Users', '/'), '//?/C:/Users');
assert.strictEqual(common.joinPathSegments('\\\\?\\C:\\', 'Users', '\\'), '\\\\?\\C:\\Users');
});
});
});

@@ -25,3 +25,10 @@ import Settings, { FilterFunction } from '../settings';

/**
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
*/
if (a.endsWith(separator)) {
return a + b;
}
return a + separator + b;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc