Skip to content

Commit 1aace35

Browse files
Update module github.com/jsonnet-bundler/jsonnet-bundler to v0.6.0 (#197)
* Update module github.com/jsonnet-bundler/jsonnet-bundler to v0.6.0 * Use orderedMap methods to get, set and delete dependencies --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matthias Loibl <[email protected]>
1 parent 448a81c commit 1aace35

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ require (
1616
github.com/Masterminds/semver/v3 v3.2.0 // indirect
1717
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
1818
github.com/edsrzf/mmap-go v1.1.0 // indirect
19+
github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect
1920
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect
2021
github.com/go-logr/logr v1.4.2 // indirect
2122
github.com/go-logr/stdr v1.2.2 // indirect
@@ -58,7 +59,7 @@ require (
5859
github.com/gobuffalo/packr/v2 v2.8.3
5960
github.com/google/go-jsonnet v0.20.0
6061
github.com/grafana/tanka v0.28.0
61-
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1
62+
github.com/jsonnet-bundler/jsonnet-bundler v0.6.0
6263
github.com/pkg/errors v0.9.1
6364
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
6465
github.com/prometheus/client_golang v1.19.1 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE=
9696
github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA=
9797
github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ=
9898
github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
99+
github.com/elliotchance/orderedmap/v2 v2.2.0 h1:7/2iwO98kYT4XkOjA9mBEIwvi4KpGB4cyHeOFOnj4Vk=
100+
github.com/elliotchance/orderedmap/v2 v2.2.0/go.mod h1:85lZyVbpGaGvHvnKa7Qhx7zncAdBIBq6u56Hb1PRU5Q=
99101
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
100102
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
101103
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -256,6 +258,8 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
256258
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
257259
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk=
258260
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I=
261+
github.com/jsonnet-bundler/jsonnet-bundler v0.6.0 h1:DBnynmjyWBVQ9gUBmTh49x3Dw5/u4CvGO3k2k1CsYNo=
262+
github.com/jsonnet-bundler/jsonnet-bundler v0.6.0/go.mod h1:5esRxD59TyScj6qxT3o7GH0sryBKvVmx2zaEYDXtQkg=
259263
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
260264
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
261265
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=

pkg/jsonnetbundler/install.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ func InstallCommand(dir, jsonnetHome string, uris []string, single bool) error {
7171
d.Single = true
7272
}
7373

74-
if !depEqual(jsonnetFile.Dependencies[d.Name()], *d) {
74+
value, ok := jsonnetFile.Dependencies.Get(d.Name())
75+
if !ok {
76+
return fmt.Errorf("failed to find package %s", d.Name())
77+
}
78+
if !depEqual(value, *d) {
7579
// the dep passed on the cli is different from the jsonnetFile
76-
jsonnetFile.Dependencies[d.Name()] = *d
80+
jsonnetFile.Dependencies.Set(d.Name(), *d)
7781

7882
// we want to install the passed version (ignore the lock)
79-
delete(lockFile.Dependencies, d.Name())
83+
lockFile.Dependencies.Delete(d.Name())
8084
}
8185
}
8286

0 commit comments

Comments
 (0)