Skip to content

Conversation

@refi64
Copy link
Collaborator

@refi64 refi64 commented Dec 17, 2022

This:

  • Adds proper npm (bug-for-bug-compatible even though that's not really necessary) & yarn rc file parsers w/ tests. (As it turns out, I was wrong when I said .yarnrc is loaded up the directory tree, oops.)
  • Adds tests for local registries to ensure they stay working, using Verdaccio (a very simple registry that works well for this use case).


class ConfigProvider:
@property
def _filename(self) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason for the filename to be a property and not a class variable? I can't imagine npm/yarn config file name ever changing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's mostly because then we could use actual abstractproperty handling in the future, but atm it does mean that forgetting to override it gives a clearer error at the call site.

@refi64 refi64 force-pushed the wip/refi64/local-registry branch from 85a4382 to df302eb Compare December 28, 2022 23:29
- Use more "proper" package-manager-specific parsing, including what
  should be a fully-compliant (albiet over-engineered) parser for npm's
  ini format used in .npmrc.
- Moves all config loading into its own set of classes. (As it turns
  out, this *does* walk recursively, contrary to what I said before,
  oops!)
- Terminology change: rename rcfile -> config, just to match more with
  how npm describes itself.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
@refi64 refi64 force-pushed the wip/refi64/local-registry branch from df302eb to 0808f9d Compare January 13, 2023 16:58
@refi64
Copy link
Collaborator Author

refi64 commented Jan 13, 2023

Merge conflicts fixed.

This adds a test-time dependency on a running Verdaccio instance.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
@refi64 refi64 force-pushed the wip/refi64/local-registry branch from 0808f9d to b4ade5a Compare January 13, 2023 18:54
@bbhtt bbhtt added the Need Rebase The PR need rebase before merging label May 8, 2025
@bbhtt bbhtt requested a review from a team as a code owner June 4, 2025 05:45
@bbhtt bbhtt force-pushed the master branch 2 times, most recently from 8c5a0ec to ea9bfa2 Compare June 4, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Need Rebase The PR need rebase before merging node npm yarn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants