Verify
The verify feature exists to help detect issues with a project.
Detecting Missing Workspace Dependencies
pacwich uses workspaces' package.json files to detect when a workspace depends on another workspace.
In Bun and pnpm, explicit dependencies are required to import/export from another workspace, by adding "my-workspace": "workspace:*" to package.json dependencies.
However, npm workspaces do not require explicit package.json dependencies, so pacwich cannot detect implicit dependencies without source code analysis.
The verify feature performs simple analysis to detect imports/exports in JS/TS files from other workspaces not listed in a workspace's package.json.
Analysis is only performed on workspace input files. You can further configure the verify command's behavior at the project level or workspace level.
Usage
Adding pacwich verify to your root package.json "prepare" script, a pre-commit hook, or a CI pipeline can be especially helpful to catch issues.
pacwich verify --strict will fail if implicit workspace dependencies are detected.
See the CLI reference or the API reference for more information.
Example output:


