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

symlink-dir

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symlink-dir - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

22

dist/index.js

@@ -46,3 +46,3 @@ "use strict";

}
await forceSymlink(src, dest);
await forceSymlink(src, dest, opts);
return { reused: false };

@@ -68,7 +68,17 @@ case 'EEXIST':

const parentDir = path.dirname(dest);
const ignore = `.ignored_${path.basename(dest)}`;
await renameOverwrite(dest, path.join(parentDir, ignore));
let warn;
if (opts === null || opts === void 0 ? void 0 : opts.renameTried) {
// This is needed in order to fix a mysterious bug that sometimes happens on macOS.
// It is hard to reproduce and is described here: https://github.com/pnpm/pnpm/issues/5909#issuecomment-1400066890
await fs_1.promises.unlink(dest);
warn = `Symlink wanted name was occupied by directory or file. Old entity removed: "${parentDir}${path.sep}{${path.basename(dest)}".`;
}
else {
const ignore = `.ignored_${path.basename(dest)}`;
await renameOverwrite(dest, path.join(parentDir, ignore));
warn = `Symlink wanted name was occupied by directory or file. Old entity moved: "${parentDir}${path.sep}{${path.basename(dest)} => ${ignore}".`;
}
return {
...await forceSymlink(src, dest),
warn: `Symlink wanted name was occupied by directory or file. Old entity moved: "${parentDir}${path.sep}{${path.basename(dest)} => ${ignore}}".`,
...await forceSymlink(src, dest, { ...opts, renameTried: true }),
warn,
};

@@ -80,3 +90,3 @@ }

await fs_1.promises.unlink(dest);
return await forceSymlink(src, dest);
return await forceSymlink(src, dest, opts);
}

@@ -83,0 +93,0 @@ // for backward compatibility

{
"name": "symlink-dir",
"version": "5.1.0",
"version": "5.1.1",
"description": "Cross-platform directory symlinking",

@@ -37,4 +37,2 @@ "main": "dist/index.js",

"@types/tape": "^4.13.2",
"mos": "^1.3.1",
"mos-plugin-readme": "^1.0.4",
"rimraf": "^3.0.2",

@@ -65,7 +63,5 @@ "tape": "^5.6.1",

"test": "ts-node test",
"test-md": "mos t",
"premd": "rimraf node_modules/src && npm run tsc",
"md": "mos",
"tsc": "rimraf dist && tsc"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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