{"name":"symlink-dir","version":"7.1.0","keywords":["symlink","symlinking","junction","directory","dir","folder"],"author":{"url":"https://www.kochan.io","name":"Zoltan Kochan","email":"z@kochan.io"},"license":"MIT","_id":"symlink-dir@7.1.0","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"homepage":"https://github.com/pnpm/symlink-dir#readme","bugs":{"url":"https://github.com/pnpm/symlink-dir/issues"},"bin":{"symlink-dir":"dist/cli.js"},"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"dist":{"shasum":"0259108dfe5370e2a2a4fadf91f68f698aa52eef","tarball":"http://registry-npm.ywwl.com/symlink-dir/download/symlink-dir-7.1.0.tgz","fileCount":9,"integrity":"sha512-Nnht6e6PYs5RF2JXbc43Bm9Sskfu750yAhJfi/aniLgWjtqsfL/68bLkYSX3GSp1dTPxy7mVbO+bVbMc16XKrw==","signatures":[{"sig":"MEUCIQCMA16SxeRVu2w+ehTgMi5XIxMolPhsxaGVX4wFR2gebgIgGFPdXApgyv9pmtN+MIM4pm8PrIC8MVmZevFNcbFBuPk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25043,"size":6445,"noattachment":false,"key":"/symlink-dir/-/symlink-dir-7.1.0.tgz"},"main":"dist/index.js","_from":"file:symlink-dir-7.1.0.tgz","engines":{"node":">=18.12"},"scripts":{"tsc":"rimraf dist && tsc","test":"ts-node test/sync.ts && ts-node test/async.ts","premd":"rimraf node_modules/src && npm run tsc","pretest":"rimraf node_modules/src","test:non-develop":"ts-node -r ./test/emulateWinNonDevelopMode.js test/sync.ts && ts-node -r ./test/emulateWinNonDevelopMode.js test/async.ts"},"typings":"dist/index.d.ts","_npmUser":{"name":"zkochan","email":"z@kochan.io"},"_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/eb464771cb1dba02ffd8de332a64b508/symlink-dir-7.1.0.tgz","_integrity":"sha512-Nnht6e6PYs5RF2JXbc43Bm9Sskfu750yAhJfi/aniLgWjtqsfL/68bLkYSX3GSp1dTPxy7mVbO+bVbMc16XKrw==","repository":{"url":"git+https://github.com/pnpm/symlink-dir.git","type":"git"},"_npmVersion":"11.5.2","description":"Cross-platform directory symlinking","directories":{},"_nodeVersion":"20.19.4","dependencies":{"rename-overwrite":"^6.0.2","better-path-resolve":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.9.0","tempy":"^1.0.1","rimraf":"^3.0.2","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/tape":"5.6.4","write-json-file":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/symlink-dir_7.1.0_1759828238494_0.4697305136117609","host":"s3://npm-registry-packages-npm-production"},"readme":"# symlink-dir\n\n> Cross-platform directory symlinking\n\n<!--@shields('npm')-->\n[![npm version](https://img.shields.io/npm/v/symlink-dir.svg)](https://www.npmjs.com/package/symlink-dir)\n<!--/@-->\n\n* Uses \"junctions\" on Windows if \"symbolic links\" is disallowed. Even though support for \"symbolic links\" was added in Vista+, users by default lack permission to create them\n  * **⚠️ Windows Junction Warning**: On Windows, this library will create a junction even if the target is not a directory. However, Windows junctions can only point to directories, so creating a junction to a file will result in a broken, non-functioning junction. This library does not check if the target exists or is a directory. If there's a chance that the target is a file, either check it yourself before calling `symlink-dir` or set `noJunction` to `true` to prevent creating a broken junction.\n* If you prefer symbolic links in Windows, [turn on the Developer Mode](https://learn.microsoft.com/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode)\n* Any file or directory, that has the destination name, is renamed before creating the link\n\n## Installation\n\n```sh\npnpm add symlink-dir\n```\n\n## CLI Usage\n\nLets suppose you'd like to self-require your package. You can link it to its own `node_modules`:\n\n```sh\n# from -> to\nsymlink-dir . node_modules/my-package\n```\n\n## API Usage\n\n<!--@example('./example.js')-->\n```js\n'use strict'\nconst symlinkDir = require('symlink-dir')\nconst path = require('path')\n\nsymlinkDir('src', 'node_modules/src')\n  .then(result => {\n    console.log(result)\n    //> { reused: false }\n\n    return symlinkDir('src', 'node_modules/src')\n  })\n  .then(result => {\n    console.log(result)\n    //> { reused: true }\n  })\n  .catch(err => console.error(err))\n```\n<!--/@-->\n\n## API\n\n### `symlinkDir(target, path, opts?): Promise<{ reused: boolean, warn?: string }>`\n### `symlinkDir.sync(target, path, opts?): { reused: boolean, warn?: string }`\n\nCreates the link called `path` pointing to `target`.\n\nOptions:\n\n* `overwrite` - *boolean* - is `true` by default. When `false`, existing files at dest are not overwritten.\n* `noJunction` - *boolean* - is `false` by default. When `true`, forces creation of real symbolic links and never falls back to junctions on Windows. If symbolic links cannot be created (e.g., insufficient permissions), an error will be thrown instead of falling back to junctions.\n\nResult:\n\n* `reused` - *boolean* - is `true` if the symlink already existed pointing to the `target`.\n* `warn` - *string* - any issues that happened during linking (it does mean a failure).\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","publish_time":1759828238676,"_cnpm_publish_time":1759828238676,"dist-tags":{"latest":"10.0.3","next":"5.0.0"}}