Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm deploy generate multiple deploy target directories in different directories #6858

Closed
await-ovo opened this issue Jul 25, 2023 · 1 comment · Fixed by #6859
Closed

pnpm deploy generate multiple deploy target directories in different directories #6858

await-ovo opened this issue Jul 25, 2023 · 1 comment · Fixed by #6859

Comments

@await-ovo
Copy link
Member

pnpm version: 8.6.10

Code to reproduce the issue:

As commented in #6697 (comment), give a workspaces with the following directory structure:

./
├── project-1
│   └── package.json
├── project-3
│   └── package.json
├── sub-dir
│   └── project-2
│       └── package.json
├── package.json
└── pnpm-workspace.yaml


// project-1/package.json
{
	"name": "project-1",
	"version": "1.0.0",
	"dependencies": {
		"is-positive": "1.0.0"
	}
}

// project-3/package.json
{
	"name": "project-3",
	"version": "2.0.0",
	"dependencies": {
		"is-number": "1.0.0"
	}
}

// sub-dir/project-2/package.json
{
	"name": "project-2",
	"version": "2.0.0",
	"dependencies": {
		"is-odd": "1.0.0"
	}
}

// pnpm-workspace.yaml
packages:
  - project-1
  - project-3
  - sub-dir/project-2

After run pnpm --filter project-1 deploy ./dist, you will find that dist directory occurs in the project root directory and ./sub-dir.

Expected behavior:

Deploy target directory(./dist) should only generated to project root directory.

Actual behavior:

Deploy generate multiple deploy target directories in different directories

Additional information:

  • node -v prints: v16.15.1
  • Windows, macOS, or Linux?: macOS
@await-ovo
Copy link
Member Author

In addition, when dedupe-peer-dependents=true, I wonder if it is possible to filter out unselected packages in linkPackages, so that there should be no dependencies of other packages in node_modules of the deploy target. I'm not sure if this approach is doable or if there are any additional issues? What's your opinion on this? cc @zkochan Thanks ~

zkochan added a commit that referenced this issue Jul 29, 2023
…irectory (#6859)

close #6858

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant