The project uses npm workspaces to manage dependencies between local packages. Instead of publishing a package to npm to test it in another package, npm workspaces creates symlinks in the root node_modules folder. This allows one package to import another directly from the local filesystem.
To enable workspaces, the root package.json defines the workspace directories:
{
"workspaces": [
"apps/*",
"packages/*"
]
}
After running npm install at the root, you can verify that a package is symlinked by checking its location in node_modules. For example, @asyncapi/openapi-schema-parser will point to ../../packages/openapi-schema-parser.
Note on Jest Configuration: Because dependencies are hoisted to the root node_modules, Jest configurations within individual packages may need to reference dependencies using relative paths from the package root to the root node_modules (e.g., <rootDir>/../../node_modules/...).
ls -la node_modules/@asyncapi/openapi-schema-parser
# → this is a symlink pointing to ../../packages/openapi-schema-parser