Skip to content

Commit

Permalink
package_managers: yarn: Add a _verify_repository helper
Browse files Browse the repository at this point in the history
This is purely a cosmetic change grouping all kinds of repository
checks which already live as individual helpers on their own (for unit
test purposes).

Signed-off-by: Erik Skultety <[email protected]>
  • Loading branch information
eskultety committed Jan 4, 2024
1 parent c3b8f4d commit 92fe4a8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cachi2/core/package_managers/yarn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def _check_lockfile(project: Project) -> None:
)


def _verify_repository(project: Project) -> None:
_verify_yarnrc_paths(project)
_check_zero_installs(project)
_check_lockfile(project)


def _resolve_yarn_project(project: Project, output_dir: RootedPath) -> list[Component]:
"""Process a request for a single yarn source directory.
Expand All @@ -93,9 +99,7 @@ def _resolve_yarn_project(project: Project, output_dir: RootedPath) -> list[Comp
log.info(f"Fetching the yarn dependencies at the subpath {project.source_dir}")

_configure_yarn_version(project)
_verify_yarnrc_paths(project)
_check_zero_installs(project)
_check_lockfile(project)
_verify_repository(project)

_set_yarnrc_configuration(project, output_dir)
packages = resolve_packages(project.source_dir)
Expand Down

0 comments on commit 92fe4a8

Please sign in to comment.