I have not checked yet, but I have a strong suspicion that this would break the existing pattern. Refactoring half of PMs is definitely not in scope, so we likely can keep it as is for now.
Actually it seems like we have overthought this. The following code should do the trick:
```python
from abc import ABC, abstractmethod
ConfigTypes = Literal["package_json", "yarnrc", "yarnlock"]...
From a purist's perspective we should be raising ParsingError here which must be converted to PackageRejected at caller's level. I am not a purist and won't block on this.
I see what you're saying; this is the pattern I copied from Yarnberry. If we have an error parsing any config file *for the current package*, we can't continue, so `PackageRejected` is appropriate....
@a-ovchinnikov; As always, the Devil is in the (typing) details...
```
cachi2/core/package_managers/yarn_classic/project.py:68: error: Signature of "_self_type" incompatible with supertype "_Co...
When running Cach2 on a source repo with the gomod package manager, changes are made to the `go.mod` file. This is presumably from running `go mod tidy`.
Cachi2 should not modify the sources tha...
> I don't think this is true. Cachi2 is quite literally in control of how much validation it does. It does not have to take the purl verbatim, it is free to decompose it into individual attributes ...
We used an explicit env because we were calling into the Yarn cmd executor wrapper directly. That is now abstracted by the new version parser helper and so the helper can hardcode this bit, no need...
I may not have been very clear on this especially using the whole hunk as context. Admittedly, there was a slight oversight on my side regarding the version mismatch check which stays in this funct...