The LockfileResolver is responsible for transforming package descriptors (e.g., webpack@^4.0.0) into specific package resolutions (e.g., webpack@4.28.0) to produce a lockfile. It utilizes three primary data structures:
- Descriptors: Contain a package name and a range (e.g.,
^4.0.0). A descriptor identifies what is needed but not necessarily a unique remote location. - Locators: Contain a package name and a unique reference (e.g.,
4.28.0) used to identify and fetch a package from its remote location. Locators also function as valid descriptors. - Packages: Full package definitions derived from locators, containing detailed information such as the package's dependency list.