{"_id":"resolve-workspace-root","_rev":"4-98ddaadbfe8b3326c8d20b5c8da41f9d","name":"resolve-workspace-root","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"resolve-workspace-root","version":"1.0.0","keywords":["monorepo","workspace","bun","npm","pnpm","yarn"],"author":{"name":"Cedric van Putten","email":"me@cedric.dev"},"license":"MIT","_id":"resolve-workspace-root@1.0.0","maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"homepage":"https://github.com/byCedric/resolve-workspace-root#readme","bugs":{"url":"https://github.com/byCedric/resolve-workspace-root/issues"},"dist":{"shasum":"c5c0b393e446b6a20bb608d710757635051d6158","tarball":"https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-1.0.0.tgz","fileCount":5,"integrity":"sha512-1TUtBwAjc5DAxF6OcZvrUn9o9tFJWT4JQEey7lRlUN2mh5Y66PwhKXnWP2kAr7cBYjc8gF86KgejocApDdBuhg==","signatures":[{"sig":"MEQCIETvQhAEpuKm8HPHUYiJlxdCxG7lRhS7CXzzeYJ+VkFDAiB8lXoc0XNU7/RTujjqpDutfonJz0EW8x1aQ4UzYIYdxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100944},"main":"build/index.js","types":"build/index.d.ts","gitHead":"c38e29738ef602c16d46bcf9d61ad9824ed861f0","scripts":{"lint":"eslint . --ext ts","test":"bun test","build":"ncc build src/index.ts --out build --minify --no-cache --no-source-map-register && tsc --declaration --emitDeclarationOnly"},"_npmUser":{"name":"bycedric","email":"me@bycedric.com"},"prettier":{"tabWidth":2,"printWidth":100,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/byCedric/resolve-workspace-root.git","type":"git"},"_npmVersion":"10.8.2","description":"Resolve the workspace root using bun, npm, pnpm, or yarn","directories":{},"_nodeVersion":"20.16.0","eslintConfig":{"extends":"universe/node","ignorePatterns":["build","node_modules"]},"_hasShrinkwrap":false,"devDependencies":{"memfs":"^4.11.1","eslint":"^8.57.0","js-yaml":"^4.1.0","prettier":"^3.3.3","@types/bun":"^1.1.6","micromatch":"^4.0.7","typescript":"^5.5.4","@types/node":"^22.5.0","@vercel/ncc":"^0.38.1","@types/js-yaml":"^4.0.9","@tsconfig/node20":"^20.1.4","@types/micromatch":"^4.0.9","eslint-config-universe":"^13.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resolve-workspace-root_1.0.0_1724339295991_0.6040674454951516","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"resolve-workspace-root","version":"1.0.1","keywords":["monorepo","workspace","bun","npm","pnpm","yarn"],"author":{"name":"Cedric van Putten","email":"me@cedric.dev"},"license":"MIT","_id":"resolve-workspace-root@1.0.1","maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"homepage":"https://github.com/byCedric/resolve-workspace-root#readme","bugs":{"url":"https://github.com/byCedric/resolve-workspace-root/issues"},"dist":{"shasum":"b9c9f93b76098ba8722d46cd7dbd1569cba16ff8","tarball":"https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-1.0.1.tgz","fileCount":5,"integrity":"sha512-bYKYqZKJklZtuK0/pXSuT/wwYkFq5AkHtTOl3B8rczU2Z/ssN/DPG9/Zbj9gMGhJjouARpaY/R4wFeP1NU9Ckg==","signatures":[{"sig":"MEUCIBjqLqbFpDr2RW7eVFgegr0u6pZ7E+iQKr1KbO3giqsPAiEAn+0rTxO3CL6Ah1bbqYBSaVBuE9FtWIVVZSqn1L+b1xs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":101025},"main":"build/index.js","types":"build/index.d.ts","gitHead":"56c790f94dc25d0a6b32d1c3a1dd98be50171015","scripts":{"lint":"eslint . --ext ts","test":"bun test","build":"ncc build src/index.ts --out build --minify --no-cache --no-source-map-register && tsc --declaration --emitDeclarationOnly"},"_npmUser":{"name":"bycedric","email":"me@bycedric.com"},"prettier":{"tabWidth":2,"printWidth":100,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/byCedric/resolve-workspace-root.git","type":"git"},"_npmVersion":"10.8.2","description":"Resolve the workspace root using bun, npm, pnpm, or yarn","directories":{},"_nodeVersion":"20.16.0","eslintConfig":{"extends":"universe/node","ignorePatterns":["build","node_modules"]},"_hasShrinkwrap":false,"devDependencies":{"memfs":"^4.11.1","eslint":"^8.57.0","js-yaml":"^4.1.0","prettier":"^3.3.3","@types/bun":"^1.1.6","micromatch":"^4.0.7","typescript":"^5.5.4","@types/node":"^22.5.0","@vercel/ncc":"^0.38.1","@types/js-yaml":"^4.0.9","@tsconfig/node20":"^20.1.4","@types/micromatch":"^4.0.9","eslint-config-universe":"^13.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resolve-workspace-root_1.0.1_1724398791654_0.45707015543065044","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"resolve-workspace-root","version":"2.0.0","keywords":["monorepo","workspace","bun","npm","pnpm","yarn"],"author":{"name":"Cedric van Putten","email":"me@cedric.dev"},"license":"MIT","_id":"resolve-workspace-root@2.0.0","maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"homepage":"https://github.com/byCedric/resolve-workspace-root#readme","bugs":{"url":"https://github.com/byCedric/resolve-workspace-root/issues"},"dist":{"shasum":"a0098daa0067cd0efa6eb525c57c8fb4a61e78f8","tarball":"https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-2.0.0.tgz","fileCount":5,"integrity":"sha512-IsaBUZETJD5WsI11Wt8PKHwaIe45or6pwNc8yflvLJ4DWtImK9kuLoH5kUva/2Mmx/RdIyr4aONNSa2v9LTJsw==","signatures":[{"sig":"MEUCIQCXwbLhF0lHiCU7+N9ea0biw+SNEyO2xMhVJ9+iytPukAIgYeAkHfDERo+QQyofN25A+VQb24U5sKjhlwabVSeHOvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103472},"main":"build/index.js","types":"build/index.d.ts","gitHead":"6e77a4b87761c086932de1ac3469e320ef5a6251","scripts":{"lint":"eslint . --ext ts","test":"bun test","build":"ncc build src/index.ts --out build --minify --no-cache --no-source-map-register && tsc --declaration --emitDeclarationOnly"},"_npmUser":{"name":"bycedric","email":"me@bycedric.com"},"prettier":{"tabWidth":2,"printWidth":100,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/byCedric/resolve-workspace-root.git","type":"git"},"_npmVersion":"10.8.3","description":"Resolve the workspace root using bun, npm, pnpm, or yarn","directories":{},"_nodeVersion":"20.17.0","eslintConfig":{"extends":"universe/node","ignorePatterns":["build","node_modules"]},"_hasShrinkwrap":false,"devDependencies":{"memfs":"^4.11.1","eslint":"^8.57.0","js-yaml":"^4.1.0","prettier":"^3.3.3","@types/bun":"^1.1.6","micromatch":"^4.0.7","typescript":"^5.5.4","@types/node":"^22.5.0","@vercel/ncc":"^0.38.1","@types/js-yaml":"^4.0.9","@tsconfig/node20":"^20.1.4","@types/micromatch":"^4.0.9","eslint-config-universe":"^13.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resolve-workspace-root_2.0.0_1728572347940_0.6331017856272161","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"resolve-workspace-root","version":"2.0.1","description":"Resolve the workspace root using bun, npm, pnpm, or yarn","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"ncc build src/index.ts --out build --minify --no-cache --no-source-map-register && tsc --declaration --emitDeclarationOnly","lint":"eslint . --ext ts","test":"bun test"},"repository":{"type":"git","url":"git+https://github.com/byCedric/resolve-workspace-root.git"},"keywords":["monorepo","workspace","bun","npm","pnpm","yarn"],"author":{"name":"Cedric van Putten","email":"me@cedric.dev"},"license":"MIT","bugs":{"url":"https://github.com/byCedric/resolve-workspace-root/issues"},"homepage":"https://github.com/byCedric/resolve-workspace-root#readme","devDependencies":{"@tsconfig/node20":"^20.1.4","@types/bun":"^1.1.6","@types/js-yaml":"^4.0.9","@types/micromatch":"^4.0.9","@types/node":"^22.5.0","@vercel/ncc":"^0.38.1","eslint":"^8.57.0","eslint-config-universe":"^13.0.0","js-yaml":"^4.1.0","memfs":"^4.11.1","micromatch":"^4.0.7","prettier":"^3.3.3","typescript":"^5.5.4"},"eslintConfig":{"extends":"universe/node","ignorePatterns":["build","node_modules"]},"prettier":{"printWidth":100,"tabWidth":2,"singleQuote":true,"trailingComma":"es5"},"_id":"resolve-workspace-root@2.0.1","gitHead":"72f675ae9ea952e832c63f1138346406b0d8630b","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-nR23LHAvaI6aHtMg6RWoaHpdR4D881Nydkzi2CixINyg9T00KgaJdJI6Vwty+Ps8WLxZHuxsS0BseWjxSA4C+w==","shasum":"9cbbf8321ebccaaf0e4ffea5274aa26b611ccd62","tarball":"https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-2.0.1.tgz","fileCount":5,"unpackedSize":103456,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIERHj75/G0ccTbBkm4HJrDcJ/64g8UihxFxnXaq81I+AAiBoihio4ct6vhmUHxMp0eYcrfALIt2FWYPytsSfaoEOqQ=="}]},"_npmUser":{"name":"bycedric","email":"me@bycedric.com"},"directories":{},"maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resolve-workspace-root_2.0.1_1767614854372_0.25764440480495576"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-22T15:08:15.990Z","modified":"2026-01-05T12:07:34.742Z","1.0.0":"2024-08-22T15:08:16.155Z","1.0.1":"2024-08-23T07:39:51.808Z","2.0.0":"2024-10-10T14:59:08.127Z","2.0.1":"2026-01-05T12:07:34.574Z"},"bugs":{"url":"https://github.com/byCedric/resolve-workspace-root/issues"},"author":{"name":"Cedric van Putten","email":"me@cedric.dev"},"license":"MIT","homepage":"https://github.com/byCedric/resolve-workspace-root#readme","keywords":["monorepo","workspace","bun","npm","pnpm","yarn"],"repository":{"type":"git","url":"git+https://github.com/byCedric/resolve-workspace-root.git"},"description":"Resolve the workspace root using bun, npm, pnpm, or yarn","maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"readme":"# resolve-workspace-root\n\nResolve the root of a workspace using [bun](https://bun.sh/guides/install/workspaces), [npm](https://docs.npmjs.com/cli/configuring-npm/package-json#workspaces), [pnpm](https://pnpm.io/workspaces), or [yarn](https://yarnpkg.com/features/workspaces).\n\n- For bun, npm, and yarn - it looks for a parent **package.json** file, containing the `workspaces` config.\n- For pnpm - it looks for a **package.json** and **pnpm-workspaces.yaml** file, containing the workspaces config.\n\n## 🚀 How to use it\n\nThis package supports both synchronous and asynchronous lookups.\n\n```ts\nimport { resolveWorkspaceRoot, resolveWorkspaceRootAsync } from 'resolve-workspace-root';\n\n// Synchronous lookup, supporting bun, npm, pnpm, and yarn\nconst workspaceRoot = resolveWorkspaceRoot(__dirname);\n// Synchronous lookup, supporting only bun, npm, and yarn\nconst workspaceRoot = resolveWorkspaceRoot(__dirname, { packageWorkspaces: false });\n// Synchronous lookup, supporting only pnpm\nconst workspaceRoot = resolveWorkspaceRoot(__dirname, { pnpmWorkspaces: false });\n\n// Asynchronous lookup, supporting bun, npm, pnpm, and yarn\nconst workspaceRoot = await resolveWorkspaceRootAsync(__dirname);\n// Asynchronous lookup, supporting only bun, npm, and yarn\nconst workspaceRoot = await resolveWorkspaceRootAsync(__dirname, { packageWorkspaces: false });\n// Asynchronous lookup, supporting only pnpm\nconst workspaceRoot = await resolveWorkspaceRootAsync(__dirname, { pnpmWorkspaces: false });\n\nimport { getWorkspaceGlobs, getWorkspaceGlobsAsync } from 'resolve-workspace-root';\n\n// Synchronous lookup, supporting bun, npm, pnpm, and yarn\nconst workspaces = getWorkspaceGlobs(resolveWorkspaceRoot(__dirname));\n// Asynchronous lookup, supporting bun, npm, pnpm, and yarn\nconst workspaces = await getWorkspaceGlobsAsync(resolveWorkspaceRoot(__dirname));\n```\n\n<div align=\"center\">\n  <br />\n  with&nbsp;❤️&nbsp;&nbsp;<strong><a href=\"https://cedric.dev\">Cedric</a></strong>\n  <br />\n</div>\n","readmeFilename":"README.md"}