Socket
Socket
Sign inDemoInstall

elm-tooling

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elm-tooling - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

36

commands/postinstall.js

@@ -34,25 +34,13 @@ "use strict";

const linkPath = path.join(nodeModulesBinPath, tool.name);
// Just like npm, just overwrite whatever links are already in
// `node_modules/.bin/`. Most likely it’s either old links from for example
// the `elm` npm package, or links from previous runs of this script.
try {
const target = fs.readlinkSync(linkPath);
if (target === tool.absolutePath) {
console.error(`${mixed_1.bold(`${tool.name} ${tool.version}`)} link already exists: ${mixed_1.dim(`${linkPath} -> ${target}`)}`);
continue;
}
else {
console.error(wrongSymlinkError(linkPath, target, tool.absolutePath));
return 1;
}
fs.unlinkSync(linkPath);
}
catch (errorAny) {
const error = errorAny;
switch (error.code) {
case "ENOENT":
// Does not exist yet – move on.
break;
case "EINVAL":
console.error(`${linkPath} already exists, but is not a link to ${tool.absolutePath}\n${error.message}\nRemove it and try again.`);
return 1;
default:
console.error(`Failed to create ${linkPath}:\n${error.message}`);
return 1;
if (error.code !== "ENOENT") {
console.error(`Failed to remove old link for ${tool.name} at ${linkPath}: ${error.message}`);
return 1;
}

@@ -65,3 +53,3 @@ }

const error = errorAny;
console.error(`Failed to create ${linkPath}: ${error.message}`);
console.error(`Failed to create link for ${tool.name} at ${linkPath}: ${error.message}`);
return 1;

@@ -73,9 +61,1 @@ }

}
function wrongSymlinkError(linkPath, actual, expected) {
return `
${linkPath} already exists, but links to something else.
Expected: ${expected}
Actual: ${actual}
Remove it and try again.
`.trim();
}
{
"name": "elm-tooling",
"version": "0.1.2",
"version": "0.1.3",
"author": "Simon Lydell",

@@ -5,0 +5,0 @@ "license": "MIT",

{
"name": "elm-tooling",
"version": "0.1.2",
"version": "0.1.3",
"author": "Simon Lydell",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -57,3 +57,3 @@ # elm-tooling CLI

- "elm-format": "0.8.3"
+ "elm-tooling": "0.1.2"
+ "elm-tooling": "0.1.3"
},

@@ -60,0 +60,0 @@ "scripts": {

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