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

@lerna/create-symlink

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/create-symlink - npm Package Compare versions

Comparing version 3.13.0 to 3.14.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [3.14.0](https://github.com/lerna/lerna/compare/v3.13.4...v3.14.0) (2019-05-14)
### Features
* **link:** generate shims for missing 'bin' scripts ([#2059](https://github.com/lerna/lerna/issues/2059)) ([90acdde](https://github.com/lerna/lerna/commit/90acdde)), closes [#1444](https://github.com/lerna/lerna/issues/1444)
# [3.13.0](https://github.com/lerna/lerna/compare/v3.12.1...v3.13.0) (2019-02-15)

@@ -8,0 +19,0 @@

25

create-symlink.js

@@ -34,5 +34,16 @@ "use strict";

const type = _type === "exec" ? "file" : _type;
const src = path.relative(path.dirname(dest), origin);
const relativeSymlink = path.relative(path.dirname(dest), origin);
return createSymbolicLink(src, dest, type);
if (_type === "exec") {
// If the target exists, create real symlink. If the target doesn't exist yet,
// create a shim shell script.
return fs.pathExists(origin).then(exists => {
if (exists) {
return createSymbolicLink(relativeSymlink, dest, type).then(() => fs.chmod(origin, "755"));
}
return shShim(origin, dest, type).then(() => fs.chmod(dest, "755"));
});
}
return createSymbolicLink(relativeSymlink, dest, type);
}

@@ -55,1 +66,11 @@

}
function shShim(target, script, type) {
log.silly("shShim", [target, script, type]);
const absTarget = path.resolve(path.dirname(script), target);
const scriptLines = ["#!/bin/sh", `chmod +x ${absTarget} && exec ${absTarget} "$@"`];
return fs.writeFile(script, scriptLines.join("\n"));
}

4

package.json
{
"name": "@lerna/create-symlink",
"version": "3.13.0",
"version": "3.14.0",
"description": "An internal Lerna tool",

@@ -38,3 +38,3 @@ "keywords": [

},
"gitHead": "9a47201f3fdd1df09cfb1922f26329d1dc4c8cc5"
"gitHead": "39da145c67ea587457694f318f32f967b9d66ea9"
}
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