Socket
Socket
Sign inDemoInstall

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.6 to 1.1.7

12

CHANGELOG.md
# master
# 1.1.7
* seems like the last release had an issue
# 1.1.6
* add work-around for fininky Windows Subsystem Linux path + symlink issues
# 1.1.5
* only package files required for usage
# 1.1.4

@@ -4,0 +16,0 @@

15

index.js

@@ -50,2 +50,12 @@ var fs = require('fs')

function cleanup(path) {
if (typeof path !== 'string' ) { return }
// WSL (Windows Subsystem Linux) has issues with:
// * https://github.com/ember-cli/ember-cli/issues/6338
// * trailing `/` on symlinked directories
// * extra/duplicate `/` mid-path
// issue: https://github.com/Microsoft/BashOnWindows/issues/1421
return path.replace(/\/$/,'').replace(/\/\//g, '/');
}
module.exports.sync = symlinkOrCopySync

@@ -60,3 +70,6 @@ function symlinkOrCopySync (srcPath, destPath) {

function symlink(srcPath, destPath) {
function symlink(_srcPath, _destPath) {
var srcPath = cleanup(_srcPath);
var destPath = cleanup(_destPath);
var lstat = options.fs.lstatSync(srcPath)

@@ -63,0 +76,0 @@ if (lstat.isSymbolicLink()) {

2

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

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

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