fix(medusa-dev): include packages/ subdirectories in discovery (#3293)
## What Include packages/ subdirectories in medusa-dev packages discovery. ## Why We started to use subdirectories in the monorepo `packages/` directory in order to better organize packages. Packages in subdirectories were invisible to `medusa-dev` and could not be copied. ## How Rely on monorepo package.json workspace glob patterns to discover packages that can be published to the local npm registry.
This commit is contained in:
@@ -24,9 +24,16 @@ const installPackages = async ({
|
||||
// in workspaces which should preserve node_modules structure
|
||||
// (packages being mostly hoisted to top-level node_modules)
|
||||
|
||||
const { stdout: yarnVersion } = await promisifiedSpawn([
|
||||
`yarn`,
|
||||
[`--version`],
|
||||
{ stdio: `pipe` },
|
||||
])
|
||||
const workspaceCommand = !yarnVersion.startsWith("1") ? "list" : "info"
|
||||
|
||||
const { stdout } = await promisifiedSpawn([
|
||||
`yarn`,
|
||||
[`workspaces`, `info`, `--json`],
|
||||
[`workspaces`, workspaceCommand, `--json`],
|
||||
{ stdio: `pipe` },
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user