Skip to content

fix: move all definitions to @npmcli/config package - #6497

Merged
lukekarrys merged 1 commit into
latestfrom
lk/move-definitions-to-config
Jun 7, 2023
Merged

fix: move all definitions to @npmcli/config package#6497
lukekarrys merged 1 commit into
latestfrom
lk/move-definitions-to-config

Conversation

@lukekarrys

@lukekarryslukekarrys commented May 24, 2023

Copy link
Copy Markdown
Contributor

This builds on #6490 to avoid conflicts with the config changes there.

Marking this as a draft until that lands, then this can be rebased if necessary and marked as ready for review.

This is ready

@lukekarrys
lukekarrys requested a review from a team as a code ownerMay 24, 2023 22:30
@lukekarrys
lukekarrys marked this pull request as draft May 24, 2023 22:30
@lukekarrys
lukekarrysforce-pushed the lk/move-definitions-to-config branch 4 times, most recently from 1ad829d to f9468c5CompareMay 25, 2023 02:14
@lukekarrys
lukekarrys marked this pull request as ready for review May 30, 2023 17:12
Base automatically changed from bdehamer/provenance-path to latestMay 31, 2023 17:37
@lukekarrys
lukekarrysforce-pushed the lk/move-definitions-to-config branch from f9468c5 to 098c450CompareMay 31, 2023 17:54
@npm-cli-bot

npm-cli-bot commented May 31, 2023

Copy link
Copy Markdown
Collaborator

found 1 benchmarks with statistically significant performance improvements

  • app-large: clean
timing results
app-largecleanlock-onlycache-onlycache-only
peer-deps
modules-onlyno-lockno-cacheno-modulesno-cleanno-clean
audit
show-versionrun-script
npm@939.254 ±1.7517.043 ±0.1416.552 ±0.0419.297 ±0.602.706 ±0.032.691 ±0.022.211 ±0.0211.381 ±0.012.209 ±0.003.430 ±0.130.368 ±0.000.424 ±0.01
#649734.551 ±0.7017.567 ±0.4816.643 ±0.2120.024 ±0.502.775 ±0.062.724 ±0.022.284 ±0.0311.717 ±0.122.255 ±0.023.399 ±0.070.382 ±0.000.429 ±0.01
app-mediumcleanlock-onlycache-onlycache-only
peer-deps
modules-onlyno-lockno-cacheno-modulesno-cleanno-clean
audit
show-versionrun-script
npm@925.342 ±1.2113.361 ±0.1212.815 ±0.0013.590 ±0.022.404 ±0.012.394 ±0.012.197 ±0.038.618 ±0.102.117 ±0.012.903 ±0.070.365 ±0.010.412 ±0.00
#649724.911 ±0.4513.421 ±0.1212.944 ±0.0813.793 ±0.062.430 ±0.042.416 ±0.052.171 ±0.028.686 ±0.072.097 ±0.032.927 ±0.020.372 ±0.000.427 ±0.00

@lukekarrys
lukekarrysforce-pushed the lk/move-definitions-to-config branch 4 times, most recently from bc5d054 to f1c826aCompareMay 31, 2023 18:59
@matz3

matz3 commented Jun 5, 2023

Copy link
Copy Markdown

@lukekarrys does this PR change the fundamental message of the package?

It does the management of configuration files that npm uses, but importantly, does not define all the configuration defaults or types, as those parts make more sense to live within the npm CLI itself.

We're looking for the best approach to move from libnpmconfig to @npmcli/config for a use case where we download packages via pacote and want to ensure to take the user configuration into account.

@lukekarrys

lukekarrys commented Jun 5, 2023

Copy link
Copy Markdown
ContributorAuthor

does this PR change the fundamental message of the package?

good catch! yes, with this change that statement is no longer true. we've found it is best to have all the config definitions live alongside the logic in @npmcli/config.

i haven't taken a look at updating the docs yet, since i have a larger refactor in process that will contain a few breaking changes, and was updating the documentation in that branch.

this PR is a stop-gap to implement the diff-heavy work of moving the config files, without changing anything about the implementation.

We're looking for the best approach to move from libnpmconfig to @npmcli/config

one of the goals of the next major version, will be to limit what is required to be passed in to new Config(opts), so that should be helpful to your use case. i don't have any definitive timeline yet for when that might land yet.

@wraithgarwraithgar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We're getting close!

@lukekarrys
lukekarrysforce-pushed the lk/move-definitions-to-config branch from f1c826a to 39cb7bbCompareJune 6, 2023 21:56
@lukekarrys
lukekarrysforce-pushed the lk/move-definitions-to-config branch 2 times, most recently from 07dd35e to c9b7f8fCompareJune 7, 2023 17:50
@lukekarrys
lukekarrys merged commit e722439 into latestJun 7, 2023
@lukekarrys
lukekarrys deleted the lk/move-definitions-to-config branch June 7, 2023 18:28
@github-actionsgithub-actionsBot mentioned this pull request Jun 7, 2023
@d3xter666

Copy link
Copy Markdown

Hi @lukekarrys,

Do you plan a new release with those changes?

Cheers

Sign up for freeto 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.

5 participants

@lukekarrys@npm-cli-bot@matz3@d3xter666@wraithgar