Skip to content

Commit

Permalink
package_managers: yarn: Enable Yarn support officially
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Skultety <[email protected]>
  • Loading branch information
eskultety committed Jan 4, 2024
1 parent 714a6a7 commit c2e5f59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 2 additions & 3 deletions cachi2/core/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
"gomod": gomod.fetch_gomod_source,
"npm": npm.fetch_npm_source,
"pip": pip.fetch_pip_source,
"yarn": yarn.fetch_yarn_source,
}

# This is where we put package managers currently under development in order to
# invoke them via CLI
_dev_package_managers: dict[PackageManagerType, Handler] = {
"yarn": yarn.fetch_yarn_source,
}
_dev_package_managers: dict[PackageManagerType, Handler] = {}

# This is *only* used to provide a list for `cachi2 --version`
supported_package_managers = list(_package_managers)
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/test_yarn.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
flags=["--dev-package-managers"],
expected_exit_code=2,
expected_output="PackageRejected: Yarn zero install detected, PnP zero installs are unsupported by cachi2",
),
Expand All @@ -33,7 +32,6 @@
check_output=False,
check_vendor_checksums=False,
check_deps_checksums=False,
flags=["--dev-package-managers"],
expected_exit_code=2,
expected_output="UnsupportedFeature: Found 8 unsupported dependencies, more details in the logs.",
),
Expand All @@ -47,7 +45,6 @@
check_vendor_checksums=False,
expected_exit_code=0,
expected_output="Processing the request using [email protected]",
flags=["--dev-package-managers"],
),
id="yarn_correct_version_installed_by_corepack",
),
Expand All @@ -59,7 +56,6 @@
check_output=False,
check_vendor_checksums=False,
check_deps_checksums=False,
flags=["--dev-package-managers"],
expected_exit_code=1,
expected_output="The lockfile would have been modified by this install, which is explicitly forbidden.",
),
Expand All @@ -73,7 +69,6 @@
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
flags=["--dev-package-managers"],
expected_exit_code=1,
expected_output="typescript@npm:5.3.3: The remote archive doesn't match the expected checksum",
),
Expand Down Expand Up @@ -114,7 +109,6 @@ def test_yarn_packages(
ref="70515793108df42547d3320c7ea4cd6b6e505c46",
packages=({"path": ".", "type": "yarn"},),
check_vendor_checksums=False,
flags=["--dev-package-managers"],
expected_exit_code=0,
expected_output="All dependencies fetched successfully",
),
Expand Down

0 comments on commit c2e5f59

Please sign in to comment.