You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use detect-monorepo for workspace root and rush detection (#175)
Use `detect-monorepo` to auto-detect the workspace root, replacing the
hardcoded `workspaceRoot: "../.."` default.
When `workspaceRoot` is not set explicitly (and `targetPackagePath` is
not used), `resolveWorkspacePaths` now walks upward from the target
package directory looking for `pnpm-workspace.yaml`, a `package.json`
with a `workspaces` field, or `rush.json`. If detection fails and no
`workspaceRoot` is configured, a clear error asks the user to set it
explicitly.
The `workspaceRoot` config option remains supported as an override for
cases where auto-detection fails (e.g. unusually deep nesting).
The existing `isRushWorkspace` helper is kept as a strict `rush.json`
check at the passed-in directory. It is intentionally not replaced with
`detectMonorepo`, because `detectMonorepo` walks upward and its rootDir
can diverge from `workspaceRootDir`, which would break callers that
compute lockfile importer ids or other paths relative to the same
directory.
Docs and CLI help text updated to reflect the new auto-detect behavior.
Scope: packages (isolate-package)
Visibility: user-facing
0 commit comments