mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-25 08:08:14 -05:00
This commit is contained in:
7
.changeset/nervous-months-argue.md
Normal file
7
.changeset/nervous-months-argue.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-deploy": major
|
||||
"pnpm": major
|
||||
"@pnpm/plugin-commands-installation": patch
|
||||
---
|
||||
|
||||
The deploy command works only in workspaces that use the `inject-workspace-packages=true` setting.
|
||||
@@ -141,6 +141,7 @@
|
||||
"nodetouch",
|
||||
"noent",
|
||||
"nonexec",
|
||||
"noninjected",
|
||||
"nopadding",
|
||||
"noproxy",
|
||||
"nosystem",
|
||||
|
||||
@@ -267,6 +267,7 @@ export type InstallCommandOptions = Pick<Config,
|
||||
| 'hooks'
|
||||
| 'ignorePnpmfile'
|
||||
| 'ignoreScripts'
|
||||
| 'injectWorkspacePackages'
|
||||
| 'linkWorkspacePackages'
|
||||
| 'rawLocalConfig'
|
||||
| 'lockfileDir'
|
||||
|
||||
@@ -62,6 +62,9 @@ export async function handler (
|
||||
if (!opts.workspaceDir) {
|
||||
throw new PnpmError('CANNOT_DEPLOY', 'A deploy is only possible from inside a workspace')
|
||||
}
|
||||
if (!opts.injectWorkspacePackages) {
|
||||
throw new PnpmError('DEPLOY_NONINJECTED_WORKSPACE', 'We only support deploy from workspaces that use the inject-workspace-packages=true setting')
|
||||
}
|
||||
const selectedDirs = Object.keys(opts.selectedProjectsGraph ?? {})
|
||||
if (selectedDirs.length === 0) {
|
||||
throw new PnpmError('NOTHING_TO_DEPLOY', 'No project was selected for deployment')
|
||||
|
||||
@@ -27,6 +27,7 @@ export const DEFAULT_OPTS = {
|
||||
optionalDependencies: true,
|
||||
},
|
||||
key: undefined,
|
||||
injectWorkspacePackages: true,
|
||||
linkWorkspacePackages: true,
|
||||
localAddress: undefined,
|
||||
lock: false,
|
||||
|
||||
Reference in New Issue
Block a user