Skip to content

Commit 04e8a85

Browse files
committed
fix: rename retrieval to tag
1 parent e4aa322 commit 04e8a85

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@multiformats/multiaddr",
3-
"version": "12.4.0",
2+
"name": "@vascosantos/multiaddr",
3+
"version": "12.4.1",
44
"description": "multiaddr implementation (binary + string representation of network addresses)",
55
"license": "Apache-2.0 OR MIT",
66
"homepage": "https://github.com/multiformats/js-multiaddr#readme",

src/convert.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function convertToString (proto: number | string, buf: Uint8Array): strin
5454
case 54: // dns4
5555
case 55: // dns6
5656
case 56: // dnsaddr
57-
case 384: // retrieval
57+
case 384: // tag
5858
case 400: // unix
5959
case 449: // sni
6060
case 777: // memory
@@ -98,7 +98,7 @@ export function convertToBytes (proto: string | number, str: string): Uint8Array
9898
case 54: // dns4
9999
case 55: // dns6
100100
case 56: // dnsaddr
101-
case 384: // retrieval
101+
case 384: // tag
102102
case 400: // unix
103103
case 449: // sni
104104
case 777: // memory

src/protocols-table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const table: Array<[number, number, string, boolean?, boolean?]> = [
4747
[479, 0, 'p2p-websocket-star'],
4848
[480, 0, 'http'],
4949
[481, V, 'http-path'],
50-
[384, V, 'retrieval'],
50+
[384, V, 'tag'],
5151
[777, V, 'memory']
5252
]
5353

test/index.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -549,16 +549,16 @@ describe('variants', () => {
549549
expect(addr.toString()).to.equal(str)
550550
})
551551

552-
it('ip4 + tcp + http + retrieval', () => {
553-
const str = '/ip4/127.0.0.1/tcp/8000/http/retrieval/http'
552+
it('ip4 + tcp + http + tag', () => {
553+
const str = '/ip4/127.0.0.1/tcp/8000/http/tag/http'
554554
const addr = multiaddr(str)
555555
expect(addr).to.have.property('bytes')
556556
expect(addr.toString()).to.equal(str)
557557
})
558558

559-
it('ws + p2p + retrieval tuple', () => {
559+
it('ws + p2p + tag tuple', () => {
560560
const str =
561-
'/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/retrieval/bitswap/retrieval/graphsync'
561+
'/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tag/bitswap/tag/graphsync'
562562
const addr = multiaddr(str)
563563
expect(addr).to.have.property('bytes')
564564
expect(addr.toString()).to.equal(str)
@@ -747,16 +747,16 @@ describe('helpers', () => {
747747
])
748748
})
749749

750-
it('returns the tuples for retrieval', () => {
751-
expect(multiaddr('/ip4/127.0.0.1/tcp/8000/http/retrieval/http').tuples())
750+
it('returns the tuples for tag', () => {
751+
expect(multiaddr('/ip4/127.0.0.1/tcp/8000/http/tag/http').tuples())
752752
.to.eql([
753753
[4, Uint8Array.from([127, 0, 0, 1])],
754754
[6, Uint8Array.from([31, 64])],
755755
[480],
756756
[384, Uint8Array.from([4, 104, 116, 116, 112])]
757757
])
758758

759-
expect(multiaddr('/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/retrieval/bitswap/retrieval/graphsync').tuples())
759+
expect(multiaddr('/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tag/bitswap/tag/graphsync').tuples())
760760
.to.eql([
761761
[4, Uint8Array.from([127, 0, 0, 1])],
762762
[6, Uint8Array.from([35, 130])],
@@ -785,16 +785,16 @@ describe('helpers', () => {
785785
])
786786
})
787787

788-
it('returns the string parts for retrieval', () => {
789-
expect(multiaddr('/ip4/127.0.0.1/tcp/8000/http/retrieval/http').stringTuples())
788+
it('returns the string parts for tag', () => {
789+
expect(multiaddr('/ip4/127.0.0.1/tcp/8000/http/tag/http').stringTuples())
790790
.to.eql([
791791
[4, '127.0.0.1'],
792792
[6, '8000'],
793793
[480],
794794
[384, 'http']
795795
])
796796

797-
expect(multiaddr('/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/retrieval/bitswap/retrieval/graphsync').stringTuples())
797+
expect(multiaddr('/ip4/127.0.0.1/tcp/9090/ws/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tag/bitswap/tag/graphsync').stringTuples())
798798
.to.eql([
799799
[4, '127.0.0.1'],
800800
[6, '9090'],

0 commit comments

Comments
 (0)