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

[5.7] Add ability to update any section of package.json #25700

Closed
wants to merge 1 commit into from

Conversation

nulpatrol
Copy link
Contributor

In continuation of the previous PRs (#24189, #25457 ) I suggest one more.
I noticed that developers who need to update, for example, a section of scripts, often completely overwrite the existing package.json file.
Let's give ability to pass name of section as parameter of static::updatePackages.

static::updatePackages('scripts');

For back compatibility, we also support boolean as parameter.

Maybe there are best variants for doing this, but I think, that this variant is the least breaking.

@nulpatrol nulpatrol changed the title Add ability to update any section of package.json [Preset] Add ability to update any section of package.json Sep 19, 2018
@GrahamCampbell GrahamCampbell changed the title [Preset] Add ability to update any section of package.json [5.7] Add ability to update any section of package.json Sep 19, 2018
@taylorotwell
Copy link
Member

Passing a bool to this method feels like a really hacky way to try to keep it backward compatible. I would rather have it always be a string.

@nulpatrol
Copy link
Contributor Author

@taylorotwell Can I submit PR to 5.8 with string param?

@X-Coder264
Copy link
Contributor

@nulpatrol Please send it to 5.8, yes.

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.

3 participants