Skip to content

Commit

Permalink
Changelog + simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoikin committed Aug 21, 2024
1 parent 2c6e493 commit 0cc89f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Other improvements:
overwrite the file if the marker isn't present, assuming that the file was
manually created or edited, not generated by Spago itself.
- migrated tests to the `spec-node` runner.
- `spago publish` now allows to publish a package with some test (but only
test!) dependencies not present in the registry.

## [0.21.0] - 2023-05-04

Expand Down
16 changes: 8 additions & 8 deletions src/Spago/Command/Fetch.purs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import Data.Array.NonEmpty as NEA
import Data.Codec.JSON as CJ
import Data.Codec.JSON.Common as CJ.Common
import Data.Either as Either
import Data.FunctorWithIndex (mapWithIndex)
import Data.HTTP.Method as Method
import Data.Int as Int
import Data.Map as Map
Expand Down Expand Up @@ -351,14 +352,13 @@ writeNewLockfile reason allTransitiveDeps = do
-- so that the build uses them instead of the tags
let
updateGitDependencyRefsToCommitHashes =
Map.mapMaybeWithKey \name package -> Just
case package of
GitPackage gitPackage -> case Map.lookup name nonWorkspacePackageLockEntries of
Nothing -> package
Just (FromGit { rev }) -> GitPackage $ gitPackage { ref = rev }
Just _ -> package
_ ->
package
mapWithIndex \name package -> case package of
GitPackage gitPackage -> case Map.lookup name nonWorkspacePackageLockEntries of
Nothing -> package
Just (FromGit { rev }) -> GitPackage $ gitPackage { ref = rev }
Just _ -> package
_ ->
package

pure $ allTransitiveDeps <#> onEachEnv updateGitDependencyRefsToCommitHashes

Expand Down

0 comments on commit 0cc89f6

Please sign in to comment.