{"_id":"@bernierllc/workspace-manager","_rev":"8-f1c21bba00e9ad971d251c577a5402c4","name":"@bernierllc/workspace-manager","dist-tags":{"latest":"0.7.0"},"versions":{"0.1.0":{"name":"@bernierllc/workspace-manager","version":"0.1.0","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.1.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"dbd7be203d06af414cd6325110c9a354e24df961","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.1.0.tgz","fileCount":15,"integrity":"sha512-ouc509232zDIfEG6ayz/9PHGKDXGdNJUrU9x+PzCL6QJw89JIevnJWUasuuChT4+HLX5YCaUSCSj6Tt1hpNcrQ==","signatures":[{"sig":"MEQCICYZC5X7KVJbNlZC6hZEv6i4R6HzPpID6deVk6MxG+k0AiAmwD/DtV2SyQsWtlGt/EC8GaN3FTzXSLUwLCOSFrzlvQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41563},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"59d1c618de59b7cd157618c343ebf6ecaa6b8fc3","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"11.4.2","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.1.0_1755554175304_0.2767786736545941","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bernierllc/workspace-manager","version":"0.3.0","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.3.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"d5142734c83d5af59f66500e6d0eeaaa24640456","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.3.0.tgz","fileCount":15,"integrity":"sha512-6EmRodrHRVQGd8X3jwb0judgLK39jyuwR0ZuTwNs5Dmw39o/kn2mMci0aBAQMQtJqp9cv8Zou6rcqXmgPc35vg==","signatures":[{"sig":"MEUCIH/s9y9aiaqAbVoGk1uLULvVzLDVNSC7yDMZpmJ61JUVAiEA1udAwc715E5rTlHlZAtTWzXrc0alP7VPJY7KOKrKklE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41717},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.3.0_1767642339203_0.5680803683864617","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@bernierllc/workspace-manager","version":"0.3.1","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.3.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"950510318cc952b66e516996c18a287a1e75938b","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.3.1.tgz","fileCount":15,"integrity":"sha512-9Rddhe9SmX2ipnwJ+IaCm3VYgtEbQiGnx2VYzPt+i70Jc01QqCQ9O6lcsQZ2glxSgTvYVIv+wXarMWVFmXBrqQ==","signatures":[{"sig":"MEQCIDVgbU8Q3NOAgjP2IbOHeolsqDqU+M1hqiB2F6KkynQdAiBOgr6LHiRlt6ZXhEdQISgwA/mBuKAgF1udB626cazSZQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41659},"main":"dist/index.js","_from":"file:bernierllc-workspace-manager-0.3.1.tgz","types":"dist/index.d.ts","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"_resolved":"/tmp/7322886136d6fc18cdd603435c60f73b/bernierllc-workspace-manager-0.3.1.tgz","_integrity":"sha512-9Rddhe9SmX2ipnwJ+IaCm3VYgtEbQiGnx2VYzPt+i70Jc01QqCQ9O6lcsQZ2glxSgTvYVIv+wXarMWVFmXBrqQ==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"11.11.0","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.3.1_1773078095283_0.009225960673692857","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@bernierllc/workspace-manager","version":"0.3.2","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.3.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"48e410034af03becf460cc72264dc1014095220a","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.3.2.tgz","fileCount":15,"integrity":"sha512-pqk33Bco2MbFDrFDiMo+WQdBt/6Heh71Sl7FIWNayV80zkAtd9OdolRtBNtdaNm0QxOWBcqf50a+lQ2sV3R5Wg==","signatures":[{"sig":"MEQCIDD9Dg6Qd8vtBjKfQG6uaaqRkFlx4atV8sWMyUPYDbf2AiA6NbsdXkRAutHLnPByWK0xD2uI628oCdJH2gJt+cJ0QQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41659},"main":"dist/index.js","_from":"file:bernierllc-workspace-manager-0.3.2.tgz","types":"dist/index.d.ts","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/workspace-manager/bernierllc-workspace-manager-0.3.2.tgz","_integrity":"sha512-pqk33Bco2MbFDrFDiMo+WQdBt/6Heh71Sl7FIWNayV80zkAtd9OdolRtBNtdaNm0QxOWBcqf50a+lQ2sV3R5Wg==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"11.11.0","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.3.2_1773163370908_0.40374125241604863","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bernierllc/workspace-manager","version":"0.4.0","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"c210e79576f9080cc875ddeec9b9f11ab0fa4300","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.4.0.tgz","fileCount":15,"integrity":"sha512-85EsNMGEQD7bUThldfTJzGnGy4wrmNkgj4KS5JJ5r9fJ4NFcvOtVu8CY9aZZGObXTpyF+J4iGMTY+zn19pZrsQ==","signatures":[{"sig":"MEUCIFDyVAZGn57FgBbB79jeqgolX/IuIpgIpMnKXxCsgtiBAiEAiUqmQm1OjsojNnVgsORnckeTae3+KZVefM0berDe9r4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41659},"main":"dist/index.js","_from":"file:bernierllc-workspace-manager-0.4.0.tgz","types":"dist/index.d.ts","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/workspace-manager/bernierllc-workspace-manager-0.4.0.tgz","_integrity":"sha512-85EsNMGEQD7bUThldfTJzGnGy4wrmNkgj4KS5JJ5r9fJ4NFcvOtVu8CY9aZZGObXTpyF+J4iGMTY+zn19pZrsQ==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"11.14.1","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.4.0_1779241501350_0.4171989444427209","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@bernierllc/workspace-manager","version":"0.6.0","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","_id":"@bernierllc/workspace-manager@0.6.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"fa2147c47397a119d4934ff4b44458f355b18995","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.6.0.tgz","fileCount":19,"integrity":"sha512-6RFd6LFwn5ID/lz0sri+K+kvzoclUi71kzhVUg8iAaZ8UiRjQ62s8GggM696KABW/1lYXQm6qC+Jqj8xcw1jXA==","signatures":[{"sig":"MEUCIQD2ExODzdD9LEVFJfJY0wItsERpVyLYgFnqWMnDvsGORAIgBEyOgCTdeMJ6EBuK6045szTBYyS1nzKHt1WyBbctRCE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44751},"main":"dist/index.js","_from":"file:bernierllc-workspace-manager-0.6.0.tgz","types":"dist/index.d.ts","private":false,"scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/workspace-manager/bernierllc-workspace-manager-0.6.0.tgz","_integrity":"sha512-6RFd6LFwn5ID/lz0sri+K+kvzoclUi71kzhVUg8iAaZ8UiRjQ62s8GggM696KABW/1lYXQm6qC+Jqj8xcw1jXA==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/workspace-manager"},"_npmVersion":"11.14.1","description":"Pure workspace management utilities for monorepo package discovery and configuration","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/workspace-manager_0.6.0_1779243371243_0.6805275844288625","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@bernierllc/workspace-manager","version":"0.7.0","private":false,"description":"Pure workspace management utilities for monorepo package discovery and configuration","main":"dist/index.js","types":"dist/index.d.ts","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"author":{"name":"Bernier LLC"},"license":"Bernier LLC","repository":{"type":"git","url":"git+https://github.com/bernierllc/tools.git","directory":"packages/core/workspace-manager"},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","test":"jest","lint":"eslint src/**/*.ts","type-check":"tsc --noEmit","clean":"rm -rf dist"},"_id":"@bernierllc/workspace-manager@0.7.0","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"homepage":"https://github.com/bernierllc/tools#readme","_integrity":"sha512-htvlCGY6EDp5p1kZ+6GQ6BRA9CwGRiMpACAEZleYU7p5+c9N1QJhMvP4a6SM3fohOI7Pv2JeiDz2woBRV7ePow==","_resolved":"/home/runner/work/tools/tools/packages/core/workspace-manager/bernierllc-workspace-manager-0.7.0.tgz","_from":"file:bernierllc-workspace-manager-0.7.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-htvlCGY6EDp5p1kZ+6GQ6BRA9CwGRiMpACAEZleYU7p5+c9N1QJhMvP4a6SM3fohOI7Pv2JeiDz2woBRV7ePow==","shasum":"b9c236e71c858f3908041d53c5de53ac044af27f","tarball":"https://registry.npmjs.org/@bernierllc/workspace-manager/-/workspace-manager-0.7.0.tgz","fileCount":19,"unpackedSize":44751,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEtIbm3UnxPPyz0J2d2o5ojJCHv+2LypjbCVa92ye9NtAiEA2KyTXfaIZaDMKzCRUx3zv/t/pgh5zuy9Fli8lomfUak="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39d97eca-765c-4c30-9256-de47ab36693a"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/workspace-manager_0.7.0_1779250247637_0.8554644347143723"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-18T21:56:14.822Z","modified":"2026-05-20T04:10:47.919Z","0.1.0":"2025-08-18T21:56:15.496Z","0.3.0":"2026-01-05T19:45:39.418Z","0.3.1":"2026-03-09T17:41:35.416Z","0.3.2":"2026-03-10T17:22:51.043Z","0.4.0":"2026-05-20T01:45:01.496Z","0.6.0":"2026-05-20T02:16:11.384Z","0.7.0":"2026-05-20T04:10:47.792Z"},"bugs":{"url":"https://github.com/bernierllc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"Bernier LLC","homepage":"https://github.com/bernierllc/tools#readme","keywords":["workspace","monorepo","package","discovery","configuration","npm","yarn","pnpm"],"repository":{"type":"git","url":"git+https://github.com/bernierllc/tools.git","directory":"packages/core/workspace-manager"},"description":"Pure workspace management utilities for monorepo package discovery and configuration","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/workspace-manager\n\nPure workspace management utilities for monorepo package discovery and configuration.\n\n## Features\n\n- **Workspace Detection**: Automatically detect npm, yarn, pnpm, and lerna workspaces\n- **Package Discovery**: Find all packages in a workspace with proper path resolution\n- **Package Categorization**: Organize packages by type (core, service, suite, ui, util, legacy)\n- **Workspace Validation**: Validate workspace structure and configuration\n- **Changeset Integration**: Resolve package paths correctly for changeset CLI\n\n## Installation\n\n```bash\nnpm install @bernierllc/workspace-manager\n```\n\n## Usage\n\n### Basic Workspace Detection\n\n```typescript\nimport { detectWorkspaceType, getWorkspaceConfig } from '@bernierllc/workspace-manager';\n\n// Detect workspace type\nconst detection = detectWorkspaceType();\nconsole.log(detection.type); // 'npm', 'yarn', 'pnpm', 'lerna', or 'unknown'\n\n// Get full workspace configuration\nconst config = getWorkspaceConfig();\nconsole.log(config.isValid); // true/false\nconsole.log(config.packages); // Array of package paths\n```\n\n### Package Discovery\n\n```typescript\nimport { getWorkspacePackages, getCategorizedPackages } from '@bernierllc/workspace-manager';\n\n// Get all packages with detailed information\nconst packages = getWorkspacePackages();\npackages.forEach(pkg => {\n  console.log(`${pkg.name}: ${pkg.relativePath}`);\n  console.log(`  Has package.json: ${pkg.hasPackageJson}`);\n  console.log(`  Is directory: ${pkg.isDirectory}`);\n});\n\n// Get packages organized by category\nconst categorized = getCategorizedPackages();\ncategorized.forEach(pkg => {\n  console.log(`${pkg.name} (${pkg.category}): ${pkg.relativePath}`);\n});\n```\n\n### Workspace Validation\n\n```typescript\nimport { validateWorkspaceStructure } from '@bernierllc/workspace-manager';\n\n// Validate workspace structure\nconst result = validateWorkspaceStructure();\n\nif (result.isValid) {\n  console.log('✅ Workspace is valid');\n} else {\n  console.log('❌ Workspace has issues:');\n  result.errors.forEach(error => console.log(`  - ${error}`));\n}\n\n// Validate with strict options\nconst strictResult = validateWorkspaceStructure('.', {\n  requirePackageJson: true,\n  allowedCategories: ['core', 'service', 'suite']\n});\n```\n\n### Changeset Integration\n\n```typescript\nimport { resolvePackagePaths } from '@bernierllc/workspace-manager';\n\n// Get package paths for changeset CLI\ntry {\n  const paths = resolvePackagePaths();\n  console.log('Package paths for changeset:', paths);\n} catch (error) {\n  console.error('Invalid workspace configuration:', error.message);\n}\n```\n\n## API Reference\n\n### `detectWorkspaceType(rootPath?: string): WorkspaceDetectionResult`\n\nDetect the type of workspace in the given directory.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- `WorkspaceDetectionResult` with type, confidence, and detection reason\n\n### `getWorkspaceConfig(rootPath?: string): WorkspaceConfig`\n\nGet complete workspace configuration.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- `WorkspaceConfig` with type, packages, validation status, and errors\n\n### `getWorkspacePackages(rootPath?: string): PackageInfo[]`\n\nGet detailed information about all packages in the workspace.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- Array of `PackageInfo` objects with package details\n\n### `getPackageCategories(rootPath?: string): Record<PackageCategory, string[]>`\n\nGet packages organized by category.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- Object mapping categories to arrays of package paths\n\n### `getCategorizedPackages(rootPath?: string): CategorizedPackage[]`\n\nGet packages with category information.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- Array of `CategorizedPackage` objects\n\n### `validateWorkspaceStructure(rootPath?: string, options?: WorkspaceValidationOptions): WorkspaceValidationResult`\n\nValidate workspace structure and configuration.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n- `options` (optional): Validation options\n\n**Returns:**\n- `WorkspaceValidationResult` with validation status, errors, and warnings\n\n### `resolvePackagePaths(rootPath?: string): string[]`\n\nResolve package paths for changeset CLI integration.\n\n**Parameters:**\n- `rootPath` (optional): Path to workspace root (defaults to `process.cwd()`)\n\n**Returns:**\n- Array of package paths relative to workspace root\n\n**Throws:**\n- Error if workspace configuration is invalid\n\n## Types\n\n### `WorkspaceType`\n```typescript\ntype WorkspaceType = 'npm' | 'yarn' | 'pnpm' | 'lerna' | 'unknown';\n```\n\n### `PackageCategory`\n```typescript\ntype PackageCategory = 'core' | 'service' | 'suite' | 'ui' | 'util' | 'legacy' | 'unknown';\n```\n\n### `WorkspaceConfig`\n```typescript\ninterface WorkspaceConfig {\n  type: WorkspaceType;\n  packages: string[];\n  rootPath: string;\n  configPath?: string;\n  isValid: boolean;\n  errors: string[];\n}\n```\n\n### `PackageInfo`\n```typescript\ninterface PackageInfo {\n  name: string;\n  path: string;\n  relativePath: string;\n  packageJsonPath: string;\n  hasPackageJson: boolean;\n  isDirectory: boolean;\n}\n```\n\n## Supported Workspace Types\n\n### npm Workspaces\nDetected by `package.json` with `workspaces` field:\n```json\n{\n  \"workspaces\": [\"packages/*\"]\n}\n```\n\n### Yarn Workspaces\nDetected by presence of `yarn.lock` and `package.json` with `workspaces` field.\n\n### pnpm Workspaces\nDetected by presence of `pnpm-workspace.yaml`:\n```yaml\npackages:\n  - 'packages/*'\n```\n\n### Lerna Workspaces\nDetected by presence of `lerna.json`:\n```json\n{\n  \"packages\": [\"packages/*\"]\n}\n```\n\n## Package Categories\n\nPackages are automatically categorized based on their directory structure:\n\n- **core**: `packages/core/*` - Atomic utilities and pure functions\n- **service**: `packages/service/*` - Business logic and orchestration\n- **suite**: `packages/suite/*` - Complete end-to-end solutions\n- **ui**: `packages/ui/*` - React components and UI utilities\n- **util**: `packages/util/*` - Utility packages\n- **legacy**: Other packages or legacy structure\n- **unknown**: Unable to determine category\n\n## Error Handling\n\nThe package provides comprehensive error handling:\n\n```typescript\ntry {\n  const config = getWorkspaceConfig();\n  if (!config.isValid) {\n    console.error('Workspace configuration errors:', config.errors);\n    return;\n  }\n  \n  const packages = getWorkspacePackages();\n  console.log(`Found ${packages.length} packages`);\n} catch (error) {\n  console.error('Failed to analyze workspace:', error.message);\n}\n```\n\n## Testing\n\n```bash\nnpm test\n```\n\n## Contributing\n\nThis package is part of the Bernier LLC tools ecosystem. Please follow the project's contribution guidelines.\n\n## License\n\nUNLICENSED - Bernier LLC proprietary software ","readmeFilename":"README.md"}