Skip to content

Commit

Permalink
chore: release main (#2240)
Browse files Browse the repository at this point in the history
* chore: add contents permission to gh token

* chore: update token perms

* chore: update token perms

* chore: release main

---------

Co-authored-by: achingbrain <alex@achingbrain.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and achingbrain committed Nov 29, 2023
1 parent 8f921ee commit 656b149
Show file tree
Hide file tree
Showing 394 changed files with 2,152 additions and 1,826 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ jobs:
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"interop":"1.0.14","packages/crypto":"2.0.8","packages/interface":"0.1.6","packages/interface-compliance-tests":"4.1.5","packages/interface-internal":"0.1.9","packages/kad-dht":"10.0.15","packages/keychain":"3.0.8","packages/libp2p":"0.46.21","packages/logger":"3.1.0","packages/metrics-prometheus":"2.0.12","packages/multistream-select":"4.0.6","packages/peer-collections":"4.0.8","packages/peer-discovery-bootstrap":"9.0.12","packages/peer-discovery-mdns":"9.0.14","packages/peer-id":"3.0.6","packages/peer-id-factory":"3.0.8","packages/peer-record":"6.0.9","packages/peer-store":"9.0.9","packages/protocol-perf":"2.0.1","packages/pubsub":"8.0.10","packages/pubsub-floodsub":"8.0.13","packages/stream-multiplexer-mplex":"9.0.12","packages/transport-tcp":"8.0.13","packages/transport-webrtc":"3.2.11","packages/transport-websockets":"7.0.13","packages/transport-webtransport":"3.1.10","packages/utils":"4.0.7"}
{"interop":"2.0.0","packages/connection-encrypter-plaintext":"1.0.0","packages/crypto":"3.0.0","packages/interface":"1.0.0","packages/interface-compliance-tests":"5.0.0","packages/interface-internal":"0.1.10","packages/kad-dht":"11.0.0","packages/keychain":"4.0.0","packages/libp2p":"1.0.0","packages/logger":"4.0.0","packages/metrics-prometheus":"3.0.0","packages/multistream-select":"4.0.7","packages/peer-collections":"4.0.9","packages/peer-discovery-bootstrap":"10.0.0","packages/peer-discovery-mdns":"10.0.0","packages/peer-id":"4.0.0","packages/peer-id-factory":"3.0.9","packages/peer-record":"6.0.10","packages/peer-store":"9.0.10","packages/protocol-autonat":"1.0.0","packages/protocol-dcutr":"1.0.0","packages/protocol-fetch":"1.0.0","packages/protocol-identify":"1.0.0","packages/protocol-perf":"3.0.0","packages/protocol-ping":"1.0.0","packages/pubsub":"8.0.11","packages/pubsub-floodsub":"8.0.14","packages/stream-multiplexer-mplex":"10.0.0","packages/transport-circuit-relay-v2":"1.0.0","packages/transport-tcp":"9.0.0","packages/transport-webrtc":"4.0.0","packages/transport-websockets":"8.0.0","packages/transport-webtransport":"4.0.0","packages/upnp-nat":"1.0.0","packages/utils":"5.0.0"}
153 changes: 106 additions & 47 deletions doc/migrations/v0.46-v1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,56 @@ A migration guide for refactoring your application code from libp2p `v0.46` to `

## Table of Contents <!-- omit in toc -->

- [AutoNAT](#autonat)
- [Ping](#ping)
- [Identify](#identify)
- [DCUtR](#dcutr)
- [Fetch](#fetch)
- [KeyChain](#keychain)
- [UPnPNat](#upnpnat)
- [Perf](#perf)
- [Plaintext](#plaintext)
- [Pnet](#pnet)
- [Type imports](#type-imports)
- [Extracted modules](#extracted-modules)
- [Services](#services)
- [AutoNAT](#autonat)
- [Ping](#ping)
- [Identify](#identify)
- [DCUtR](#dcutr)
- [Fetch](#fetch)
- [UPnPNat](#upnpnat)
- [Perf](#perf)
- [Connection encryption](#connection-encryption)
- [Plaintext](#plaintext)
- [Misc](#misc)
- [KeyChain](#keychain)
- [Pnet](#pnet)
- [Metrics](#metrics)
- [Connection Manager](#connection-manager)

## AutoNAT
## Type imports

All exports from `@libp2p/interface` and `@libp2p/interface-internal` are
now exported from the root of the module, no more having to work out which
subpath to import from.

**Before**

```ts
import type { PeerId } from '@libp2p/interface/peer-id'
import type { Connection } from '@libp2p/interface/connection'
import type { Stream } from '@libp2p/interface/stream-muxer'
```

**After**

```ts
import type { Connection, PeerId, Stream } from '@libp2p/interface'
```

## Extracted modules

`js-libp2p` has always had a focus on being a modular, composable ecosystem of
modules. `v1.x.x` takes this further and extracts all of the optional
functionality out of the core and into modules that you can include in your app
if you need them, or omit them if you don't.

### Services

These modules can be configured as services to enable optional functionality.

#### AutoNAT

The AutoNAT service is now published in its own package.

Expand Down Expand Up @@ -48,7 +84,7 @@ const node = await createLibp2p({
})
```

## Ping
#### Ping

The Ping service is now published in its own package.

Expand Down Expand Up @@ -78,7 +114,7 @@ const node = await createLibp2p({
})
```

## Identify
#### Identify

The Identify service is now published in its own package.

Expand Down Expand Up @@ -108,7 +144,7 @@ const node = await createLibp2p({
})
```

## DCUtR
#### DCUtR

The DCUtR service is now published in its own package.

Expand Down Expand Up @@ -138,7 +174,7 @@ const node = await createLibp2p({
})
```

## Fetch
#### Fetch

The Fetch service is now published in its own package.

Expand Down Expand Up @@ -168,36 +204,8 @@ const node = await createLibp2p({
})
```

## KeyChain

The KeyChain object is no longer included on Libp2p and must be instantiated explicitly if desired.

**Before**

```ts
import type { KeyChain } from '@libp2p/interface/keychain'

const libp2p = await createLibp2p(...)

const keychain: KeyChain = libp2p.keychain
```

**After**

```ts
import { keychain, type Keychain } from '@libp2p/keychain'

const libp2p = await createLibp2p({
...
services: {
keychain: keychain()
}
})

const keychain: Keychain = libp2p.services.keychain
```

## UPnPNat
#### UPnPNat

The UPnPNat service module is now published in its own package.

Expand Down Expand Up @@ -227,7 +235,7 @@ const node = await createLibp2p({
})
```

## Perf
#### Perf

The Perf service module exports have been renamed in line with the other changes
here.
Expand Down Expand Up @@ -258,7 +266,9 @@ const node = await createLibp2p({
})
```

## Plaintext
### Connection encryption

#### Plaintext

The Plaintext connection encrypter module is now published in its own package.

Expand Down Expand Up @@ -290,20 +300,69 @@ const node = await createLibp2p({
})
```

## Pnet

### Misc

#### KeyChain

The KeyChain object is no longer included on Libp2p and must be instantiated
explicitly if desired.

**Before**

```ts
import type { KeyChain } from '@libp2p/interface/keychain'

const libp2p = await createLibp2p(...)

const keychain: KeyChain = libp2p.keychain
```

**After**

```ts
import { keychain, type Keychain } from '@libp2p/keychain'

const libp2p = await createLibp2p({
...
services: {
keychain: keychain()
}
})

const keychain: Keychain = libp2p.services.keychain
```

### Pnet

The pnet module is now published in its own package.

**Before**

```ts
import { createLibp2p } from 'libp2p'
import { preSharedKey, generateKey } from 'libp2p/pnet'

const node = await createLibp2p({
// ...other options
connectionProtector: preSharedKey({
psk: generateKey(new Uint8Array(95))
})
})
```

**After**

```ts
import { createLibp2p } from 'libp2p'
import { preSharedKey, generateKey } from '@libp2p/pnet'

const node = await createLibp2p({
// ...other options
connectionProtector: preSharedKey({
psk: generateKey(new Uint8Array(95))
})
})
```

## Metrics
Expand Down
10 changes: 5 additions & 5 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
"dependencies": {
"@chainsafe/libp2p-yamux": "^5.0.0",
"@libp2p/interface": "^0.1.0",
"@libp2p/mplex": "^9.0.0",
"@libp2p/prometheus-metrics": "^2.0.0",
"@libp2p/tcp": "^8.0.0",
"@libp2p/interface": "^1.0.0",
"@libp2p/mplex": "^10.0.0",
"@libp2p/prometheus-metrics": "^3.0.0",
"@libp2p/tcp": "^9.0.0",
"aegir": "^41.0.2",
"libp2p": "^0.46.0",
"libp2p": "^1.0.0",
"prom-client": "^15.0.0"
},
"private": true
Expand Down
32 changes: 31 additions & 1 deletion interop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [2.0.0](https://www.github.com/libp2p/js-libp2p/compare/multidim-interop-v1.0.14...multidim-interop-v2.0.0) (2023-11-28)


### ⚠ BREAKING CHANGES

* imports from `libp2p/circuit-relay` should be updated to `@libp2p/circuit-relay-v2`
* imports from `libp2p/identify` need to change to `@libp2p/identify`
* imports from `libp2p/ping` must be updated to `@libp2p/ping`

### Code Refactoring

* extract circuit relay v2 to separate module ([#2222](https://www.github.com/libp2p/js-libp2p/issues/2222)) ([24afba3](https://www.github.com/libp2p/js-libp2p/commit/24afba30004fb7f24af1f0180229bb164340f00b))
* extract identify service into separate module ([#2219](https://www.github.com/libp2p/js-libp2p/issues/2219)) ([72c2f77](https://www.github.com/libp2p/js-libp2p/commit/72c2f775bd85bd4928048dda0fd14740d6fb6a69))
* extract ping service into separate module ([#2218](https://www.github.com/libp2p/js-libp2p/issues/2218)) ([556282a](https://www.github.com/libp2p/js-libp2p/commit/556282afdc9b328fd58df1045dc7c792199be932))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @libp2p/circuit-relay-v2 bumped from ^0.0.0 to ^1.0.0
* @libp2p/identify bumped from ^0.0.0 to ^1.0.0
* @libp2p/mplex bumped from ^9.0.12 to ^10.0.0
* @libp2p/ping bumped from ^0.0.0 to ^1.0.0
* @libp2p/tcp bumped from ^8.0.13 to ^9.0.0
* @libp2p/webrtc bumped from ^3.2.11 to ^4.0.0
* @libp2p/websockets bumped from ^7.0.13 to ^8.0.0
* @libp2p/webtransport bumped from ^3.1.10 to ^4.0.0
* libp2p bumped from ^0.46.21 to ^1.0.0

### [1.0.14](https://www.github.com/libp2p/js-libp2p/compare/multidim-interop-v1.0.13...multidim-interop-v1.0.14) (2023-11-10)


Expand Down Expand Up @@ -172,4 +202,4 @@
* @libp2p/webrtc bumped from ^3.0.0 to ^3.1.10
* @libp2p/websockets bumped from ^7.0.0 to ^7.0.6
* @libp2p/webtransport bumped from ^3.0.0 to ^3.0.10
* libp2p bumped from ^0.46.0 to ^0.46.10
* libp2p bumped from ^0.46.0 to ^0.46.10
20 changes: 10 additions & 10 deletions interop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libp2p/multidim-interop",
"version": "1.0.14",
"version": "2.0.0",
"description": "Multidimensional interop tests",
"author": "Glen De Cauwsemaecker <glen@littlebearlabs.io> / @marcopolo",
"license": "Apache-2.0 OR MIT",
Expand Down Expand Up @@ -53,18 +53,18 @@
"dependencies": {
"@chainsafe/libp2p-noise": "^13.0.0",
"@chainsafe/libp2p-yamux": "^5.0.0",
"@libp2p/circuit-relay-v2": "^0.0.0",
"@libp2p/identify": "^0.0.0",
"@libp2p/mplex": "^9.0.12",
"@libp2p/ping": "^0.0.0",
"@libp2p/tcp": "^8.0.13",
"@libp2p/webrtc": "^3.2.11",
"@libp2p/websockets": "^7.0.13",
"@libp2p/webtransport": "^3.1.10",
"@libp2p/circuit-relay-v2": "^1.0.0",
"@libp2p/identify": "^1.0.0",
"@libp2p/mplex": "^10.0.0",
"@libp2p/ping": "^1.0.0",
"@libp2p/tcp": "^9.0.0",
"@libp2p/webrtc": "^4.0.0",
"@libp2p/websockets": "^8.0.0",
"@libp2p/webtransport": "^4.0.0",
"@multiformats/mafmt": "^12.1.6",
"@multiformats/multiaddr": "^12.1.10",
"aegir": "^41.0.2",
"libp2p": "^0.46.21",
"libp2p": "^1.0.0",
"redis": "^4.5.1"
},
"browser": {
Expand Down
4 changes: 4 additions & 0 deletions interop/test/ping.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ describe('ping test', function () {
skipSecureChannel = true
skipMuxer = true
// Setup yamux and noise to connect to the relay node
// @ts-expect-error TODO: yamux needs to be upgraded
options.streamMuxers = [yamux()]
// @ts-expect-error TODO: noise needs to be upgraded
options.connectionEncryption = [noise()]
break
default:
Expand All @@ -132,6 +134,7 @@ describe('ping test', function () {
if (!skipSecureChannel) {
switch (SECURE_CHANNEL) {
case 'noise':
// @ts-expect-error TODO: noise needs to be upgraded
options.connectionEncryption = [noise()]
break
default:
Expand All @@ -145,6 +148,7 @@ describe('ping test', function () {
options.streamMuxers = [mplex()]
break
case 'yamux':
// @ts-expect-error TODO: yamux needs to be upgraded
options.streamMuxers = [yamux()]
break
default:
Expand Down
Loading

0 comments on commit 656b149

Please sign in to comment.