Skip to content

Commit

Permalink
ignore subdependencies in findInstalledPackageJsonFile
Browse files Browse the repository at this point in the history
fix #47

Change-Id: Ie021a907dd281eec43862d00b8f3aef9232780b3
  • Loading branch information
zvictor authored and IcaroG committed Aug 15, 2022
1 parent 1d8068c commit 8fea13c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmicapp/cli",
"version": "0.1.185",
"version": "0.1.186",
"description": "plasmic cli for syncing local code with Plasmic designs",
"engines": {
"node": ">=12"
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/utils/npm-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ function findInstalledPackageJsonFile(context: PlasmicContext, pkg: string) {
const rootDir = packageJsonPath
? path.dirname(packageJsonPath)
: context.rootDir;
const files = glob.sync(`${rootDir}/**/node_modules/${pkg}/package.json`);
const files = glob.sync(`${rootDir}/**/node_modules/${pkg}/package.json`, {
ignore: [`**/node_modules/**/node_modules/**`],
});
return files.length > 0 ? files[0] : undefined;
}

Expand Down

1 comment on commit 8fea13c

@vercel
Copy link

@vercel vercel bot commented on 8fea13c Aug 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vercel-workflow – ./examples/vercel-workflow

vercel-workflow-plasmic.vercel.app
vercel-workflow.vercel.app
vercel-workflow-git-master-plasmic.vercel.app

Please sign in to comment.