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

symlink-or-copy

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symlink-or-copy - npm Package Compare versions

Comparing version 1.1.8 to 1.2.0

24

index.js

@@ -7,3 +7,3 @@ var fs = require('fs')

// These can be overridden for testing
var options = {
var defaultOptions = {
isWindows: isWindows,

@@ -13,2 +13,3 @@ canSymlink: testCanSymlink(),

}
var options = defaultOptions;

@@ -39,2 +40,20 @@ function testCanSymlink () {

// Test symlinking a directory. For some reason, sometimes Windows allows
// symlinking a file but not symlinking a directory...
try {
fs.mkdirSync(canLinkSrc);
} catch (e) {
return false
}
try {
fs.symlinkSync(canLinkSrc, canLinkDest, 'dir')
} catch (e) {
fs.rmdirSync(canLinkSrc)
return false
}
fs.rmdirSync(canLinkSrc)
fs.rmdirSync(canLinkDest)
return true

@@ -50,3 +69,4 @@ }

function setOptions(newOptions) {
options = newOptions
options = newOptions || defaultOptions;
}

@@ -53,0 +73,0 @@

5

package.json
{
"name": "symlink-or-copy",
"description": "Symlink files or directories, falling back to copying on Windows",
"version": "1.1.8",
"version": "1.2.0",
"author": "Jo Liss <joliss42@gmail.com>",

@@ -20,4 +20,5 @@ "main": "index.js",

"devDependencies": {
"mocha": "^2.2.4"
"mocha": "^2.2.4",
"rimraf": "^2.6.2"
}
}

@@ -68,4 +68,4 @@ # node-symlink-or-copy

* There intentionally isn't an asynchronoukks version. It's not clear that we
* There intentionally isn't an asynchronous version. It's not clear that we
need or want one. Before sending a patch to add an async version, please
share your use case on the issue tracker.
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