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: npm pkg #3487

Closed
wants to merge 1 commit into from
Closed

feat: npm pkg #3487

wants to merge 1 commit into from

Conversation

ruyadorno
Copy link
Collaborator

@ruyadorno ruyadorno commented Jun 30, 2021

feat: npm pkg

Implements npm pkg get|set|delete support. It enables retrieving and
modifying values in a package.json file of any given project.

Included are the implementation based on npm/rfcs#402
along with extensive tests and user documentation.

Relates to: npm/rfcs#402
Fixes: npm/statusboard#368

@ruyadorno
Copy link
Collaborator Author

cc @ljharb

docs/content/commands/npm-pkg.md Outdated Show resolved Hide resolved
docs/content/commands/npm-pkg.md Outdated Show resolved Hide resolved
docs/content/commands/npm-pkg.md Outdated Show resolved Hide resolved
lib/pkg.js Show resolved Hide resolved
lib/utils/queryable.js Show resolved Hide resolved
lib/utils/queryable.js Outdated Show resolved Hide resolved
@ruyadorno
Copy link
Collaborator Author

ruyadorno commented Jul 2, 2021

in this first pass I'm also making it so that we just JSON.parse values when using npm pkg set --json (as suggested by @ljharb), I know during discussions @isaacs mentioned it may be a source of user frustration since it's hard to handle json input across different cli/shell envs but after @wraithgar pointed out it would enable stuff like:

npm pkg set scripts="$(npm pkg get scripts --prefix=../some-other-project)" --json

I'm now sold on it and want it to happen 😍

Implements `npm pkg get|set|delete` support. It enables retrieving and
modifying values in a `package.json` file of any given project.

Included are the implementation based on npm/rfcs#402
along with extensive tests and user documentation.

Relates to: npm/rfcs#402
Fixes: npm/statusboard#368
@ruyadorno ruyadorno marked this pull request as ready for review July 2, 2021 21:33
@ruyadorno ruyadorno requested a review from a team as a code owner July 2, 2021 21:33
Copy link
Member

@wraithgar wraithgar left a comment

Choose a reason for hiding this comment

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

Big thanks to @ljharb for helping review this. Gave it another look and the code itself looks well laid out and maintainable, docs are all good. Functionality is as planned.

@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release semver:minor new backwards-compatible feature release: next These items should be addressed in the next release labels Jul 12, 2021
ruyadorno added a commit that referenced this pull request Jul 12, 2021
Implements `npm pkg get|set|delete` support. It enables retrieving and
modifying values in a `package.json` file of any given project.

Included are the implementation based on npm/rfcs#402
along with extensive tests and user documentation.

Relates to: npm/rfcs#402
Fixes: npm/statusboard#368

PR-URL: #3487
Credit: @ruyadorno
Close: #3487
Reviewed-by: @wraithgar
@ruyadorno
Copy link
Collaborator Author

Landed in f17aca5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 7.x work is associated with a specific npm 7 release semver:minor new backwards-compatible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants