{"versions":{"4.0.0":{"name":"global-directory","version":"4.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-directory.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","prefix","path","paths","npm","yarn","node","modules","node-modules","package","packages","binary","binaries","bin","directory","directories","npmrc","rc","config","root","resolve"],"dependencies":{"ini":"4.1.1"},"devDependencies":{"ava":"^5.3.1","execa":"^8.0.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"695dc057789d08fcb5c820d4b3669e52dc72779b","bugs":{"url":"https://github.com/sindresorhus/global-directory/issues"},"homepage":"https://github.com/sindresorhus/global-directory#readme","_id":"global-directory@4.0.0","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-3vKugswCmRx+wqK8azY+6yFXfi3DzPLyMtzUmVbBp6CqV+7v6vcOwUJGt50fmc9orIyCh29g2ypcXWfbCMZVWw==","shasum":"8078838682ddf95d1a17265a6b208bf5570a302b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/global-directory/-/global-directory-4.0.0.tgz","fileCount":5,"unpackedSize":8045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUpliOd46GhlwYOiSY9FxXClZ0ymks+i0aX8NVtmH6KAiA6N6RbJDME97EpVn0N821EhWJBu3cb/AtVckyvnqHjIw=="}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-directory_4.0.0_1699285327792_0.31894163192859804"},"_hasShrinkwrap":false,"contributors":[]},"4.0.1":{"name":"global-directory","version":"4.0.1","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-directory.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","prefix","path","paths","npm","yarn","node","modules","node-modules","package","packages","binary","binaries","bin","directory","directories","npmrc","rc","config","root","resolve"],"dependencies":{"ini":"4.1.1"},"devDependencies":{"ava":"^5.3.1","execa":"^8.0.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"df9fdcd383faf601d16e855f281d131270717c33","bugs":{"url":"https://github.com/sindresorhus/global-directory/issues"},"homepage":"https://github.com/sindresorhus/global-directory#readme","_id":"global-directory@4.0.1","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==","shasum":"4d7ac7cfd2cb73f304c53b8810891748df5e361e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/global-directory/-/global-directory-4.0.1.tgz","fileCount":5,"unpackedSize":8055,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBn51MroNR3+9WlK8yuuSnVgt5uJsyxt9NKZ0o1TCddxAiB2FpOFdWEXfRutDfx2+NWgoWB5dgoWGHd1MfpiSsgrrg=="}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-directory_4.0.1_1699285444811_0.2563203949199935"},"_hasShrinkwrap":false,"contributors":[]},"5.0.0":{"name":"global-directory","version":"5.0.0","description":"Get the directory of globally installed packages and binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/global-directory.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","prefix","path","paths","npm","yarn","pnpm","node","modules","node-modules","package","packages","binary","binaries","bin","directory","directories","npmrc","rc","config","root","resolve"],"dependencies":{"ini":"6.0.0"},"devDependencies":{"ava":"^6.4.1","execa":"^9.6.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"e1ed110e19db77e94b586c73e2a94356327d5e4f","types":"./index.d.ts","_id":"global-directory@5.0.0","bugs":{"url":"https://github.com/sindresorhus/global-directory/issues"},"homepage":"https://github.com/sindresorhus/global-directory#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-1pgFdhK3J2LeM+dVf2Pd424yHx2ou338lC0ErNP2hPx4j8eW1Sp0XqSjNxtk6Tc4Kr5wlWtSvz8cn2yb7/SG/w==","shasum":"0f66a94212acd0f81ee838d0a991e88d1c2836cf","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/global-directory/-/global-directory-5.0.0.tgz","fileCount":5,"unpackedSize":11403,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAJaxPND9tC8UcuO08Nnx+aJGPxRDHC3gCuj26wR9sIFAiEAvrKJqjj10c/MzlhDTXzXukwO1cKtoosdZiAoq7x0Tg8="}],"size":3401},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/global-directory_5.0.0_1770051864246_0.7220049578716725"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-02T17:04:24.387Z","publish_time":1770051864387,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"5.0.0"},"name":"global-directory","time":{"created":"2023-11-06T16:14:20.655Z","4.0.0":"2023-11-06T15:42:07.969Z","modified":"2026-02-02T17:04:38.947Z","4.0.1":"2023-11-06T15:44:04.954Z","5.0.0":"2026-02-02T17:04:24.387Z"},"readme":"# global-directory\n\n> Get the directory of globally installed packages and binaries\n\nUses the same resolution logic as `npm`, `yarn`, and `pnpm`.\n\n## Install\n\n```sh\nnpm install global-directory\n```\n\n## Usage\n\n```js\nimport globalDirectory from 'global-directory';\n\nconsole.log(globalDirectory.npm.prefix);\n//=> '/usr/local'\n\nconsole.log(globalDirectory.npm.packages);\n//=> '/usr/local/lib/node_modules'\n\nconsole.log(globalDirectory.npm.binaries);\n//=> '/usr/local/bin'\n\nconsole.log(globalDirectory.yarn.packages);\n//=> '/Users/sindresorhus/.config/yarn/global/node_modules'\n\nconsole.log(globalDirectory.pnpm.prefix);\n//=> '/Users/sindresorhus/Library/pnpm'\n\nconsole.log(globalDirectory.pnpm.packages);\n//=> '/Users/sindresorhus/Library/pnpm/global/5/node_modules'\n```\n\n## API\n\n### globalDirectory\n\n#### npm\n#### yarn\n#### pnpm\n\n##### packages\n\nThe directory with globally installed packages.\n\nEquivalent to `npm root --global`.\n\n##### binaries\n\nThe directory with globally installed binaries.\n\nEquivalent to `npm bin --global`.\n\n##### prefix\n\nThe directory with directories for packages and binaries. You probably want either of the above.\n\nEquivalent to `npm prefix --global`.\n\n## Related\n\n- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module\n- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module\n- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally","users":{}}