mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
Merge pull request #275 from tgunnoe/gitplus-version-fix
fix: yarn-lock: remove unneeded parsing of version
This commit is contained in:
commit
666b9452a8
@ -168,14 +168,7 @@
|
||||
else lib.head split;
|
||||
|
||||
version = rawObj: finalObj:
|
||||
if l.hasInfix "@git+" rawObj.yarnName
|
||||
then let
|
||||
split = l.splitString "@git+" rawObj.yarnName;
|
||||
gitUrl = l.last split;
|
||||
in
|
||||
l.strings.sanitizeDerivationName
|
||||
"${rawObj.version}@git+${gitUrl}"
|
||||
else if l.hasInfix "@npm:" rawObj.yarnName
|
||||
if l.hasInfix "@npm:" rawObj.yarnName
|
||||
then let
|
||||
split = l.splitString "@" rawObj.version;
|
||||
version = l.last split;
|
||||
|
@ -0,0 +1,28 @@
|
||||
# test: yarn-lock evaluation with @git+ in versions
|
||||
#
|
||||
# Detecting regressions of #275.
|
||||
#
|
||||
# Evaluation of a package.json and a yarn.lock with special cases for
|
||||
# versions would cause mismatches between the two:
|
||||
# ''error: attribute '*' missing'
|
||||
#
|
||||
# 1. package.json has a dependency with a version starting with "@git+"
|
||||
# 2. yarn resolves it in its yarn.lock file to the proper version and reference
|
||||
# 3. the two are either not parsed correctly or mismatched on evaluation
|
||||
#
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
}:
|
||||
dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
packageOverrides = {};
|
||||
source = ./.;
|
||||
};
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "test-git-versions",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.2"
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"browser-image-resizer@git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.2":
|
||||
version "2.2.1-misskey.2"
|
||||
resolved "git+https://github.com/misskey-dev/browser-image-resizer#a58834f5fe2af9f9f31ff115121aef3de6f9d416"
|
Loading…
Reference in New Issue
Block a user