fix(patch): improve printing of the pnpm patch command (#8239)

* style(patch): improve printin of the `pnpm patch` command

* fix: add missing dep

* test: fix

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
Christoph NakazawaandZoltan Kochan authored and GitHub committed 2024-06-28 01:28:00 +02:00
1 parent 497fea8de5
commit fd884c1915
6 files changed
+51 -6

No files matched your search

+10 -2
View File
@@ -9,6 +9,8 @@ import {
} from '@pnpm/store-connection-manager'
import pick from 'ramda/src/pick'
import renderHelp from 'render-help'
import chalk from 'chalk'
import terminalLink from 'terminal-link'
import tempy from 'tempy'
import { PnpmError } from '@pnpm/error'
import { type ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency'
@@ -101,9 +103,15 @@ export async function handler (opts: PatchCommandOptions, params: string[]): Pro
})
}
}
return `You can now edit the following folder: ${editDir}
return `Patch: You can now edit the package at:
Once you're done with your changes, run "pnpm patch-commit '${editDir}'"`
${terminalLink(chalk.blue(editDir), 'file://' + editDir)}
To commit your changes, run:
${chalk.green(`pnpm patch-commit '${editDir}'`)}
`
}
function tryPatchWithExistingPatchFile (