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.2 to 1.1.3

4

CHANGELOG.md
# master
# 1.1.3
* [BUGFIX}] Instruct Win32 to suspend path parsing by prefixing the path with a \\?\.
# 1.1.2

@@ -4,0 +8,0 @@

@@ -82,2 +82,6 @@ var fs = require('fs')

// Instruct Win32 to suspend path parsing by prefixing the path with a \\?\.
// Fix for https://github.com/broccolijs/broccoli-merge-trees/issues/42
var WINDOWS_PREFIX = "\\\\?\\";
function symlinkWindows(srcPath, destPath) {

@@ -94,7 +98,10 @@ var stat = options.fs.lstatSync(srcPath)

srcPath = WINDOWS_PREFIX + (wasResolved ? srcPath : path.resolve(srcPath));
destPath = WINDOWS_PREFIX + path.resolve(path.normalize(destPath));
if (options.canSymlink) {
options.fs.symlinkSync(wasResolved ? srcPath : path.resolve(srcPath), destPath, isDir ? 'dir' : 'file')
options.fs.symlinkSync(srcPath, destPath, isDir ? 'dir' : 'file');
} else {
if (isDir) {
options.fs.symlinkSync(wasResolved ? srcPath : path.resolve(srcPath), destPath, 'junction');
options.fs.symlinkSync(srcPath, destPath, 'junction');
} else {

@@ -101,0 +108,0 @@ options.fs.writeFileSync(destPath, options.fs.readFileSync(srcPath), { flag: 'wx', mode: stat.mode })

2

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

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

@@ -113,3 +113,3 @@ var assert = require('assert');

});
symLinkOrCopy.sync();
symLinkOrCopy.sync('foo', 'bar');
assert.equal(count, 3);

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