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

feat(plugin-command-patching): add path option to patch command #5304

Merged
merged 10 commits into from Sep 4, 2022

Conversation

roseline124
Copy link
Contributor

@roseline124 roseline124 commented Sep 3, 2022

this pr is about #5293.

Background

There are cases where I want to access the existing patched project folder if I patch the package again. However, the temporary link given by 'pnpm-cli' is complicated and difficult to access again.

as is

pnpm patch <packageName>

> pnpm patch @types/jest                     

You can now edit the following folder: /private/var/folders/hl/s51yjywn6hj4v0w_mhrv8l540000gn/T/828d303a78782154638821e9da7d97b5/user

to be

pnpm patch <packageName> [--path | -p <directoryPath>]

It makes developer to access patch package directory again.

> pnpm patch @types/jest -p ~/pnpm-patches/project/@types/jest

You can now edit the following folder: /Users/.../pnpm-patches/project/@types/jest

how about this..?

It would be better the patch directory prefix is set with pnpm-patches/<project-name> when given path option?

@welcome
Copy link

welcome bot commented Sep 3, 2022

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@roseline124 roseline124 changed the title feat: add path option to patch command feat(plugin-command-patching): add path option to patch command Sep 3, 2022
Copy link
Member

@zkochan zkochan left a comment

Choose a reason for hiding this comment

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

Add changesets, as described in the contributing.md

packages/plugin-commands-patching/src/patch.ts Outdated Show resolved Hide resolved
packages/plugin-commands-patching/src/patch.ts Outdated Show resolved Hide resolved
packages/plugin-commands-patching/src/patch.ts Outdated Show resolved Hide resolved
packages/plugin-commands-patching/src/patch.ts Outdated Show resolved Hide resolved
packages/plugin-commands-patching/test/patch.test.ts Outdated Show resolved Hide resolved
@zkochan zkochan merged commit b6f788c into pnpm:main Sep 4, 2022
@welcome
Copy link

welcome bot commented Sep 4, 2022

Congrats on merging your first pull request! 🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants