When finding package versions in the package lock, ncc will try to find a satisfying version rather than the exact version, this is to prevent errors when the package lock contains a version that is not available in the repository.
This commit is contained in:
parent
930c206fa9
commit
c736a896fb
3 changed files with 20 additions and 1 deletions
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.0.3] - Unreleased
|
||||
|
||||
### Fixed
|
||||
- When finding package versions in the package lock, ncc will try to find a satisfying version rather than the exact
|
||||
version, this is to prevent errors when the package lock contains a version that is not available in the repository.
|
||||
|
||||
|
||||
## [2.0.2] - 2023-10-13
|
||||
|
||||
In this new update, the software introduces a feature for importing static packages without extra dependencies and
|
||||
|
|
|
@ -681,7 +681,14 @@
|
|||
$path = substr($path, 0, -1);
|
||||
}
|
||||
|
||||
$destination_path .= DIRECTORY_SEPARATOR . hash('crc32', $path);
|
||||
if($path === '')
|
||||
{
|
||||
$destination_path .= DIRECTORY_SEPARATOR . hash('crc32', $project_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
$destination_path .= DIRECTORY_SEPARATOR . hash('crc32', $path);
|
||||
}
|
||||
|
||||
if(is_file($source_path))
|
||||
{
|
||||
|
|
|
@ -259,6 +259,11 @@
|
|||
{
|
||||
return $version_entry;
|
||||
}
|
||||
|
||||
if(Semver::satisfies($version_entry->getVersion(), $version))
|
||||
{
|
||||
return $version_entry;
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException(sprintf('Version %s does not exist in package %s', $version, $this->name));
|
||||
|
|
Loading…
Add table
Reference in a new issue