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

temporary

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temporary - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

6

History.md
0.0.7 / 2013-09-25
==================
* Normalize windows paths correctly
* On Windows lib/detector.js not adding trailing slash when needed.
0.0.6 / 2013-09-13

@@ -3,0 +9,0 @@ ==================

17

lib/detector.js

@@ -25,3 +25,14 @@ /**

if (process.platform !== "win32" && last !== '/') {
if (process.platform !== "win32") {
if (last !== '/') {
path += '/';
}
} else {
//This is fine b/c Windows will
//correctly resolve filepaths with additional slashes
//and it is not correct to assume that on Windows the value
//of path will be a string that terminates in '\'.
//
//See: http://stackoverflow.com/questions/4158597/extra-slashes-in-path-variable-of-file-copy-or-directory-createdirectory-met
//
path += '/';

@@ -45,2 +56,4 @@ }

return normalize(temp);
};
};
detector._normalize = normalize;

2

package.json
{
"name": "temporary"
, "version": "0.0.6"
, "version": "0.0.7"
, "description": "The lord of tmp."

@@ -5,0 +5,0 @@ , "keywords": ["tmp", "temp", "tempfile", "tempdirectory"]

@@ -23,3 +23,19 @@ /**

});
it('should normalize windows paths correctly', function () {
var platform_noConflict = process.platform;
process.platform = 'win32';
detector._normalize('c:\\windows\\foo\\bar\\')
.should.eql('c:\\windows\\foo\\bar\\/');
detector._normalize('c:/windows/foo/bar/')
.should.eql('c:/windows/foo/bar//');
detector._normalize('c:/windows/foo/bar')
.should.eql('c:/windows/foo/bar/');
detector._normalize('c:\\windows\\foo\\bar')
.should.eql('c:\\windows\\foo\\bar/');
process.platform = platform_noConflict;
});
});
});
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