Skip to content

Commit c255989

Browse files
authored
Merge pull request #75 from ipfs/chore/update-dependencies
chore: update dependencies
2 parents fbaaad7 + 156e79c commit c255989

File tree

8 files changed

+259
-273
lines changed

8 files changed

+259
-273
lines changed

data/builder/dir_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111

1212
"github.com/ipfs/go-cid"
13-
ipfsutil "github.com/ipfs/go-ipfs-util"
13+
"github.com/ipfs/go-test/random"
1414
"github.com/ipfs/go-unixfsnode"
1515
dagpb "github.com/ipld/go-codec-dagpb"
1616
"github.com/ipld/go-ipld-prime"
@@ -44,7 +44,7 @@ func TestBuildUnixFSFileWrappedInDirectory_Reference(t *testing.T) {
4444
for _, tc := range referenceTestCases {
4545
t.Run(strconv.Itoa(tc.size), func(t *testing.T) {
4646
buf := make([]byte, tc.size)
47-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
47+
random.NewSeededRand(0xdeadbeef).Read(buf)
4848
r := bytes.NewReader(buf)
4949

5050
ls := cidlink.DefaultLinkSystem()

data/builder/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"io"
66

7+
chunk "github.com/ipfs/boxo/chunker"
78
"github.com/ipfs/go-cid"
8-
chunk "github.com/ipfs/go-ipfs-chunker"
99
"github.com/ipfs/go-unixfsnode/data"
1010
dagpb "github.com/ipld/go-codec-dagpb"
1111
"github.com/ipld/go-ipld-prime"

data/builder/file_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88

99
"github.com/ipfs/go-cid"
10-
ipfsutil "github.com/ipfs/go-ipfs-util"
10+
"github.com/ipfs/go-test/random"
1111
"github.com/ipfs/go-unixfsnode/file"
1212
dagpb "github.com/ipld/go-codec-dagpb"
1313
"github.com/ipld/go-ipld-prime"
@@ -24,33 +24,33 @@ var referenceTestCases = []struct {
2424
}{
2525
{
2626
size: 1024,
27-
bareExpected: cid.MustParse("bafkreibhn6gptq26tcez7zjklms4242pmhpiuql62ua2wlihyxdxua2nsa"),
28-
wrappedExpected: cid.MustParse("bafybeig6rdrdonmqxao32uihcnnbief4qdrjg4aktfo5fmu4cdeqya3glm"),
27+
bareExpected: cid.MustParse("bafkreigwqvgm5f6vgdv7wjkttdhgnkpbazhvuzvrqzaje4scb4moeinjum"),
28+
wrappedExpected: cid.MustParse("bafybeib7rloaw4vl56brrnsetobsopu23e5ezoqxq4zorxxtljoeafcpca"),
2929
},
3030
{
3131
size: 10 * 1024,
32-
bareExpected: cid.MustParse("bafkreicesdeiwmnqq6i44so2sebekotb5zz7ymxv7fnbnynzrtftomk5l4"),
33-
wrappedExpected: cid.MustParse("bafybeihzqusxng5zb3qjtmkjizvwrv3jer2nafvcwlzhzs2p7sh7mswnsi"),
32+
bareExpected: cid.MustParse("bafkreihaxm6boumj2cwzbs3t3mnktfsgcf25ratcvtcf5kqnsymgk2gxqy"),
33+
wrappedExpected: cid.MustParse("bafybeieogamws33kfbtpk5mdhoo2wkxwmd7dwnduyvo7wo65ll75d36xgi"),
3434
},
3535
{
3636
size: 100 * 1024,
37-
bareExpected: cid.MustParse("bafkreie72qttha6godppjndnmbyssddzh2ty2uog7cxwu3d5pzgn7nl72m"),
38-
wrappedExpected: cid.MustParse("bafybeidxgheulpeflagdewrjl7oe6loqtpfxncpieu6flje5hqbmgl5q7u"),
37+
bareExpected: cid.MustParse("bafkreia7ockt35s5ki5qzrm37bp57woott6bju6gw64wl7rus7xwjcoemq"),
38+
wrappedExpected: cid.MustParse("bafybeicywdnaqrwj3t7xltqgtaoi3ebk6fi2oyam6gsqle3bl4piucpzua"),
3939
},
4040
{
4141
size: 10 * 1024 * 1024,
4242
// https://github.com/ipfs/go-unixfs/blob/a7243ebfc36eaa89d79a39d3cef3fa1e60f7e49e/importer/importer_test.go#L49C1-L49C1
4343
// QmZN1qquw84zhV4j6vT56tCcmFxaDaySL1ezTXFvMdNmrK, but with --cid-version=1 all the way through the DAG
44-
bareExpected: cid.MustParse("bafybeieyxejezqto5xwcxtvh5tskowwxrn3hmbk3hcgredji3g7abtnfkq"),
45-
wrappedExpected: cid.MustParse("bafybeieyal5cus7e4bazoffk5f2ltvlowjyne3z3axupo7lvvyq7dmy37m"),
44+
bareExpected: cid.MustParse("bafybeibxlkafr6oqgflgjcjfbl5db6agozxdknpludvh7ym54oa5qoowbm"),
45+
wrappedExpected: cid.MustParse("bafybeigqbp6jog6fvxbpq4opzcgn5rsp7xqrk7xa4zbgnqo6htjmolt3iy"),
4646
},
4747
}
4848

4949
func TestBuildUnixFSFile_Reference(t *testing.T) {
5050
for _, tc := range referenceTestCases {
5151
t.Run(strconv.Itoa(tc.size), func(t *testing.T) {
5252
buf := make([]byte, tc.size)
53-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
53+
random.NewSeededRand(0xdeadbeef).Read(buf)
5454
r := bytes.NewReader(buf)
5555

5656
ls := cidlink.DefaultLinkSystem()
@@ -74,7 +74,7 @@ func TestBuildUnixFSFile_Reference(t *testing.T) {
7474

7575
func TestUnixFSFileRoundtrip(t *testing.T) {
7676
buf := make([]byte, 10*1024*1024)
77-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
77+
random.NewSeededRand(0xdeadbeef).Read(buf)
7878
r := bytes.NewReader(buf)
7979

8080
ls := cidlink.DefaultLinkSystem()

file/file_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"io"
88
"testing"
99

10-
ipfsutil "github.com/ipfs/go-ipfs-util"
10+
"github.com/ipfs/go-test/random"
1111
"github.com/ipfs/go-unixfsnode"
1212
"github.com/ipfs/go-unixfsnode/data/builder"
1313
"github.com/ipfs/go-unixfsnode/directory"
@@ -72,7 +72,7 @@ func TestFileSeeker(t *testing.T) {
7272

7373
// Make random file with 1024 bytes.
7474
buf := make([]byte, 1024)
75-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
75+
random.NewSeededRand(0xdeadbeef).Read(buf)
7676
r := bytes.NewReader(buf)
7777

7878
// Build UnixFS File as a single chunk

file/large_file_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"testing"
1313

1414
"github.com/ipfs/go-cid"
15-
ipfsutil "github.com/ipfs/go-ipfs-util"
15+
"github.com/ipfs/go-test/random"
1616
"github.com/ipfs/go-unixfsnode/data/builder"
1717
"github.com/ipfs/go-unixfsnode/file"
1818
dagpb "github.com/ipld/go-codec-dagpb"
@@ -25,7 +25,7 @@ func TestLargeFileReader(t *testing.T) {
2525
t.Skip()
2626
}
2727
buf := make([]byte, 512*1024*1024)
28-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
28+
random.NewSeededRand(0xdeadbeef).Read(buf)
2929
r := bytes.NewReader(buf)
3030

3131
ls := cidlink.DefaultLinkSystem()
@@ -76,7 +76,7 @@ func TestLargeFileSeeker(t *testing.T) {
7676

7777
// Make random file with 1024 bytes.
7878
buf := make([]byte, 1024)
79-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
79+
random.NewSeededRand(0xdeadbeef).Read(buf)
8080
r := bytes.NewReader(buf)
8181

8282
// Build UnixFS File chunked in 256 byte parts.
@@ -110,7 +110,7 @@ func TestLargeFileReaderReadsOnlyNecessaryBlocks(t *testing.T) {
110110

111111
// Make random file with 1024 bytes.
112112
buf := make([]byte, 1024)
113-
ipfsutil.NewSeededRand(0xdeadbeef).Read(buf)
113+
random.NewSeededRand(0xdeadbeef).Read(buf)
114114
r := bytes.NewReader(buf)
115115

116116
// Build UnixFS File chunked in 256 byte parts.

go.mod

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,76 @@ module github.com/ipfs/go-unixfsnode
33
go 1.22
44

55
require (
6+
github.com/ipfs/boxo v0.22.0
67
github.com/ipfs/go-bitfield v1.1.0
7-
github.com/ipfs/go-cid v0.3.2
8-
github.com/ipfs/go-ipfs-chunker v0.0.5
9-
github.com/ipfs/go-ipfs-util v0.0.2
10-
github.com/ipfs/go-ipld-format v0.4.0
11-
github.com/ipfs/go-merkledag v0.10.0
12-
github.com/ipfs/go-unixfs v0.4.4
13-
github.com/ipld/go-car/v2 v2.8.0
8+
github.com/ipfs/go-cid v0.4.1
9+
github.com/ipfs/go-ipld-format v0.6.0
10+
github.com/ipfs/go-merkledag v0.11.0
11+
github.com/ipfs/go-test v0.0.4
12+
github.com/ipfs/go-unixfs v0.4.5
13+
github.com/ipld/go-car/v2 v2.13.1
1414
github.com/ipld/go-codec-dagpb v1.6.0
15-
github.com/ipld/go-ipld-prime v0.20.0
16-
github.com/multiformats/go-multicodec v0.8.1
17-
github.com/multiformats/go-multihash v0.2.1
15+
github.com/ipld/go-ipld-prime v0.21.0
16+
github.com/multiformats/go-multicodec v0.9.0
17+
github.com/multiformats/go-multihash v0.2.3
1818
github.com/spaolacci/murmur3 v1.1.0
19-
github.com/stretchr/testify v1.8.2
20-
google.golang.org/protobuf v1.28.1
19+
github.com/stretchr/testify v1.9.0
20+
google.golang.org/protobuf v1.34.2
2121
)
2222

2323
require (
2424
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/go-logr/logr v1.2.3 // indirect
25+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
26+
github.com/go-logr/logr v1.4.2 // indirect
2627
github.com/go-logr/stdr v1.2.2 // indirect
2728
github.com/gogo/protobuf v1.3.2 // indirect
28-
github.com/google/uuid v1.3.0 // indirect
29-
github.com/hashicorp/golang-lru v0.5.4 // indirect
29+
github.com/google/uuid v1.6.0 // indirect
30+
github.com/hashicorp/golang-lru v1.0.2 // indirect
3031
github.com/ipfs/bbloom v0.0.4 // indirect
31-
github.com/ipfs/go-block-format v0.1.1 // indirect
32-
github.com/ipfs/go-blockservice v0.5.0 // indirect
32+
github.com/ipfs/go-block-format v0.2.0 // indirect
33+
github.com/ipfs/go-blockservice v0.5.2 // indirect
3334
github.com/ipfs/go-datastore v0.6.0 // indirect
34-
github.com/ipfs/go-ipfs-blockstore v1.2.0 // indirect
35-
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
36-
github.com/ipfs/go-ipfs-exchange-interface v0.2.0 // indirect
35+
github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect
36+
github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect
37+
github.com/ipfs/go-ipfs-exchange-interface v0.2.1 // indirect
3738
github.com/ipfs/go-ipfs-exchange-offline v0.3.0 // indirect
38-
github.com/ipfs/go-ipld-cbor v0.0.6 // indirect
39-
github.com/ipfs/go-ipld-legacy v0.1.1 // indirect
40-
github.com/ipfs/go-libipfs v0.6.0 // indirect
39+
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
40+
github.com/ipfs/go-ipld-cbor v0.1.0 // indirect
41+
github.com/ipfs/go-ipld-legacy v0.2.1 // indirect
4142
github.com/ipfs/go-log v1.0.5 // indirect
4243
github.com/ipfs/go-log/v2 v2.5.1 // indirect
4344
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
44-
github.com/ipfs/go-verifcid v0.0.2 // indirect
45+
github.com/ipfs/go-verifcid v0.0.3 // indirect
4546
github.com/jbenet/goprocess v0.1.4 // indirect
46-
github.com/klauspost/cpuid/v2 v2.2.3 // indirect
47+
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
4748
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
48-
github.com/mattn/go-isatty v0.0.17 // indirect
49-
github.com/minio/sha256-simd v1.0.0 // indirect
49+
github.com/libp2p/go-libp2p v0.36.1 // indirect
50+
github.com/mattn/go-isatty v0.0.20 // indirect
51+
github.com/minio/sha256-simd v1.0.1 // indirect
5052
github.com/mr-tron/base58 v1.2.0 // indirect
5153
github.com/multiformats/go-base32 v0.1.0 // indirect
5254
github.com/multiformats/go-base36 v0.2.0 // indirect
53-
github.com/multiformats/go-multibase v0.1.1 // indirect
55+
github.com/multiformats/go-multiaddr v0.13.0 // indirect
56+
github.com/multiformats/go-multibase v0.2.0 // indirect
5457
github.com/multiformats/go-varint v0.0.7 // indirect
5558
github.com/opentracing/opentracing-go v1.2.0 // indirect
5659
github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect
5760
github.com/pmezard/go-difflib v1.0.0 // indirect
5861
github.com/polydawn/refmt v0.89.0 // indirect
5962
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect
60-
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa // indirect
63+
github.com/whyrusleeping/cbor-gen v0.1.2 // indirect
6164
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect
62-
go.opentelemetry.io/otel v1.13.0 // indirect
63-
go.opentelemetry.io/otel/trace v1.13.0 // indirect
64-
go.uber.org/atomic v1.10.0 // indirect
65-
go.uber.org/multierr v1.9.0 // indirect
66-
go.uber.org/zap v1.24.0 // indirect
67-
golang.org/x/crypto v0.6.0 // indirect
68-
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
69-
golang.org/x/sync v0.1.0 // indirect
70-
golang.org/x/sys v0.5.0 // indirect
71-
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
65+
go.opentelemetry.io/otel v1.27.0 // indirect
66+
go.opentelemetry.io/otel/metric v1.27.0 // indirect
67+
go.opentelemetry.io/otel/trace v1.27.0 // indirect
68+
go.uber.org/atomic v1.11.0 // indirect
69+
go.uber.org/multierr v1.11.0 // indirect
70+
go.uber.org/zap v1.27.0 // indirect
71+
golang.org/x/crypto v0.25.0 // indirect
72+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
73+
golang.org/x/sync v0.7.0 // indirect
74+
golang.org/x/sys v0.22.0 // indirect
75+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
7276
gopkg.in/yaml.v3 v3.0.1 // indirect
73-
lukechampine.com/blake3 v1.1.7 // indirect
77+
lukechampine.com/blake3 v1.3.0 // indirect
7478
)

0 commit comments

Comments
 (0)