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

fix: don't overwrite config keys unless they've really changed #6328

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

wraithgar
Copy link
Member

  • fix: move to private attributes where possible
  • fix: save raw data to file, not parsed data

@wraithgar wraithgar requested a review from a team as a code owner April 5, 2023 16:23
@wraithgar wraithgar requested review from nlf and removed request for a team April 5, 2023 16:23
@wraithgar
Copy link
Member Author

npm tests fail w/ this, need to fix that first.

@nlf nlf changed the title gar/config env save fix: don't overwrite config keys unless they've really changed Apr 12, 2023
Copy link
Member Author

@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.

👍 on the last mile fix, thanks!

_loadError and _valid still have some magic to them
When ${X} values are read from an rc file, those values should be written back as-is when config is re-saved

Fixes #6183
@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Apr 12, 2023

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
show-version run-script
npm@9 38.945 ±1.60 20.401 ±0.16 19.604 ±0.21 22.714 ±0.59 3.595 ±0.05 3.600 ±0.04 2.829 ±0.05 13.421 ±0.10 2.803 ±0.03 4.120 ±0.13 0.629 ±0.04 0.647 ±0.06
#6328 37.857 ±2.94 20.824 ±0.28 19.867 ±0.29 22.741 ±0.72 3.686 ±0.02 3.790 ±0.03 3.090 ±0.01 13.565 ±0.06 2.793 ±0.02 4.319 ±0.36 0.645 ±0.03 0.616 ±0.00
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
show-version run-script
npm@9 27.852 ±0.43 15.238 ±0.11 14.980 ±0.04 15.842 ±0.22 3.248 ±0.07 3.245 ±0.04 2.807 ±0.01 10.170 ±0.17 2.689 ±0.05 3.663 ±0.02 0.613 ±0.00 0.618 ±0.01
#6328 27.570 ±0.95 15.464 ±0.12 14.993 ±0.16 16.123 ±0.26 3.294 ±0.10 3.339 ±0.07 2.860 ±0.08 10.312 ±0.16 2.675 ±0.02 3.720 ±0.06 0.598 ±0.00 0.616 ±0.01

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.

2 participants