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 4.1.0 to 4.2.0

17

dist/index.js
"use strict";
const betterPathResolve = require("better-path-resolve");
const fs = require("graceful-fs");
const fs_1 = require("fs");
const path = require("path");
const renameOverwrite = require("rename-overwrite");
const util_1 = require("util");
const symlink = util_1.promisify(fs.symlink);
const readlink = util_1.promisify(fs.readlink);
const unlink = util_1.promisify(fs.unlink);
const mkdir = util_1.promisify(fs.mkdir);
const IS_WINDOWS = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);

@@ -36,3 +31,3 @@ // Always use "junctions" on Windows. Even though support for "symbolic links" was added in Vista+, users by default

try {
await symlink(src, dest, symlinkType);
await fs_1.promises.symlink(src, dest, symlinkType);
return { reused: false };

@@ -44,3 +39,3 @@ }

try {
await mkdir(path.dirname(dest), { recursive: true });
await fs_1.promises.mkdir(path.dirname(dest), { recursive: true });
}

@@ -53,3 +48,3 @@ catch (mkdirError) {

}
await symlink(src, dest, symlinkType);
await fs_1.promises.symlink(src, dest, symlinkType);
return { reused: false };

@@ -67,3 +62,3 @@ case 'EEXIST':

try {
linkString = await readlink(dest);
linkString = await fs_1.promises.readlink(dest);
}

@@ -83,3 +78,3 @@ catch (err) {

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

@@ -86,0 +81,0 @@ }

{
"name": "symlink-dir",
"version": "4.1.0",
"description": "Cross-platform directory symlinking",
"main": "dist/index.js",
"files": [
"dist/",
"!*.map"
],
"typings": "dist/index.d.ts",
"bin": "dist/cli.js",
"keywords": [
"symlink",
"symlinking",
"junction",
"directory",
"dir",
"folder"
],
"scripts": {
"pretest": "rimraf node_modules/src",
"test": "ts-node test",
"test-md": "mos t",
"premd": "rimraf node_modules/src && npm run tsc",
"md": "mos",
"tsc": "rimraf dist && tsc",
"prepublishOnly": "npm run tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zkochan/symlink-dir.git"
},
"author": {
"name": "Zoltan Kochan",
"email": "z@kochan.io",
"url": "https://www.kochan.io"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/zkochan/symlink-dir/issues"
},
"homepage": "https://github.com/zkochan/symlink-dir#readme",
"devDependencies": {
"@types/node": "^14.0.11",
"@types/tape": "^4.13.0",
"mos": "^1.3.1",
"mos-plugin-readme": "^1.0.4",
"rimraf": "^3.0.2",
"tape": "^5.0.1",
"tempy": "^0.5.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.5",
"write-json-file": "^4.3.0"
},
"dependencies": {
"better-path-resolve": "^1.0.0",
"graceful-fs": "^4.1.11",
"rename-overwrite": "^3.0.0"
},
"mos": {
"plugins": [
"readme"
],
"installation": {
"useShortAlias": true
}
},
"engines": {
"node": ">=10.12"
}
"name": "symlink-dir",
"version": "4.2.0",
"description": "Cross-platform directory symlinking",
"main": "dist/index.js",
"files": [
"dist/",
"!*.map"
],
"typings": "dist/index.d.ts",
"bin": "dist/cli.js",
"keywords": [
"symlink",
"symlinking",
"junction",
"directory",
"dir",
"folder"
],
"scripts": {
"pretest": "rimraf node_modules/src",
"test": "ts-node test",
"test-md": "mos t",
"premd": "rimraf node_modules/src && npm run tsc",
"md": "mos",
"tsc": "rimraf dist && tsc",
"prepublishOnly": "npm run tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zkochan/symlink-dir.git"
},
"author": {
"name": "Zoltan Kochan",
"email": "z@kochan.io",
"url": "https://www.kochan.io"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/zkochan/symlink-dir/issues"
},
"homepage": "https://github.com/zkochan/symlink-dir#readme",
"devDependencies": {
"@types/node": "^14.0.11",
"@types/tape": "^4.13.0",
"mos": "^1.3.1",
"mos-plugin-readme": "^1.0.4",
"rimraf": "^3.0.2",
"tape": "^5.0.1",
"tempy": "^1.0.0",
"ts-node": "^9.0.0",
"typescript": "^4.0.0",
"write-json-file": "^4.3.0"
},
"dependencies": {
"better-path-resolve": "^1.0.0",
"rename-overwrite": "^3.1.0"
},
"mos": {
"plugins": [
"readme"
],
"installation": {
"useShortAlias": true
}
},
"engines": {
"node": ">=10.12"
}
}

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