Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/cargo/js-sys-0.3.66
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 28, 2023
2 parents 6f92a42 + 3fc1d18 commit 04cb06a
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 32 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,32 @@ jobs:
with:
tool: tomlq

- name: Extract version from manifest
run: |
CRATE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
echo "CRATE_VERSION=$CRATE_VERSION" >> $GITHUB_ENV
- name: Enforce version in `workspace.dependencies` matches latest version
if: env.CRATE != 'libp2p'
run: |
PACKAGE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
SPECIFIED_VERSION=$(tomlq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml)
echo "Package version: $PACKAGE_VERSION";
echo "Package version: $CRATE_VERSION";
echo "Specified version: $SPECIFIED_VERSION";
test "$PACKAGE_VERSION" = "$SPECIFIED_VERSION" || test "=$PACKAGE_VERSION" = "$SPECIFIED_VERSION"
test "$CRATE_VERSION" = "$SPECIFIED_VERSION" || test "=$CRATE_VERSION" = "$SPECIFIED_VERSION"
- name: Enforce version in CHANGELOG.md matches version in manifest
run: |
MANIFEST_PATH=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .manifest_path')
DIR_TO_CRATE=$(dirname "$MANIFEST_PATH")
VERSION_IN_CHANGELOG=$(awk -F' ' '/^## [0-9]+\.[0-9]+\.[0-9]+/{print $2; exit}' "$DIR_TO_CRATE/CHANGELOG.md")
echo "Package version: $CRATE_VERSION";
echo "Changelog version: $VERSION_IN_CHANGELOG";
test "$CRATE_VERSION" = "$VERSION_IN_CHANGELOG"
- name: Ensure manifest and CHANGELOG are properly updated
if: >
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/autonat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ release = false

[dependencies]
tokio = { version = "1.34", features = ["full"] }
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
futures = "0.3.29"
libp2p = { path = "../../libp2p", features = ["tokio", "tcp", "noise", "yamux", "autonat", "identify", "macros"] }
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-webrtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mime_guess = "2.0.4"
js-sys = "0.3.66"
libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "wasm-bindgen"] }
libp2p-webrtc-websys = { workspace = true }
wasm-bindgen = "0.2.88"
wasm-bindgen = "0.2.89"
wasm-bindgen-futures = "0.4.38"
wasm-logger = { version = "0.2.0" }
web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] }
Expand Down
2 changes: 1 addition & 1 deletion examples/dcutr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
release = false

[dependencies]
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
futures = "0.3.29"
futures-timer = "3.0"
libp2p = { path = "../../libp2p", features = [ "dns", "dcutr", "identify", "macros", "noise", "ping", "quic", "relay", "rendezvous", "tcp", "tokio", "yamux"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/file-sharing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ release = false
[dependencies]
serde = { version = "1.0", features = ["derive"] }
async-std = { version = "1.12", features = ["attributes"] }
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
either = "1.9"
futures = "0.3.29"
libp2p = { path = "../../libp2p", features = [ "async-std", "cbor", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/ipfs-kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ release = false
[dependencies]
tokio = { version = "1.34", features = ["rt-multi-thread", "macros"] }
async-trait = "0.1"
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
env_logger = "0.10"
futures = "0.3.29"
anyhow = "1.0.75"
Expand Down
2 changes: 1 addition & 1 deletion examples/relay-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
release = false

[dependencies]
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
async-std = { version = "1.12", features = ["attributes"] }
async-trait = "0.1"
futures = "0.3.2"
Expand Down
2 changes: 1 addition & 1 deletion misc/keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ publish = false
release = false

[dependencies]
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
zeroize = "1"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
Expand Down
2 changes: 1 addition & 1 deletion misc/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = "MIT"

[dependencies]
base64 = "0.21"
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
futures = "0.3"
futures-timer = "3"
hyper = { version = "0.14", features = ["server", "tcp", "http1"] }
Expand Down
2 changes: 1 addition & 1 deletion protocols/dcutr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ futures-bounded = { workspace = true }

[dev-dependencies]
async-std = { version = "1.12.0", features = ["attributes"] }
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
libp2p-dns = { workspace = true, features = ["async-std"] }
libp2p-identify = { workspace = true }
libp2p-noise = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion protocols/perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]

[dependencies]
anyhow = "1"
clap = { version = "4.4.8", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
futures = "0.3.29"
futures-bounded = { workspace = true }
futures-timer = "3.0"
Expand Down
13 changes: 2 additions & 11 deletions scripts/ensure-version-bump-and-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ MERGE_BASE=$(git merge-base "$HEAD_SHA" "$PR_BASE") # Find the merge base. This
SRC_DIFF_TO_BASE=$(git diff "$HEAD_SHA".."$MERGE_BASE" --name-status -- "$DIR_TO_CRATE/src" "$DIR_TO_CRATE/Cargo.toml")
CHANGELOG_DIFF=$(git diff "$HEAD_SHA".."$MERGE_BASE" --name-only -- "$DIR_TO_CRATE/CHANGELOG.md")

VERSION_IN_CHANGELOG=$(awk -F' ' '/^## [0-9]+\.[0-9]+\.[0-9]+/{print $2; exit}' "$DIR_TO_CRATE/CHANGELOG.md")
VERSION_IN_MANIFEST=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')

# First, ensure version in Cargo.toml and CHANGELOG are in sync. This should always hold, regardless of whether the code in the crate was modified.
if [[ "$VERSION_IN_CHANGELOG" != "$VERSION_IN_MANIFEST" ]]; then
echo "Version in Cargo.toml ($VERSION_IN_MANIFEST) does not match version in CHANGELOG ($VERSION_IN_CHANGELOG)"
exit 1
fi

# If the source files of this crate weren't touched in this PR, exit early.
if [ -z "$SRC_DIFF_TO_BASE" ]; then
exit 0;
Expand All @@ -31,7 +22,7 @@ if [ -z "$CHANGELOG_DIFF" ]; then
fi

# Code was touched, ensure the version used in the manifest hasn't been released yet.
if git tag | grep -q "^$CRATE-v${VERSION_IN_MANIFEST}$"; then
echo "v$VERSION_IN_MANIFEST of '$CRATE' has already been released, please bump the version."
if git tag | grep -q "^$CRATE-v${CRATE_VERSION}$"; then
echo "v$CRATE_VERSION of '$CRATE' has already been released, please bump the version."
exit 1
fi
2 changes: 1 addition & 1 deletion transports/webrtc-websys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ send_wrapper = { version = "0.6.0", features = ["futures"] }
serde = { version = "1.0", features = ["derive"] }
thiserror = "1"
tracing = "0.1.37"
wasm-bindgen = { version = "0.2.88" }
wasm-bindgen = { version = "0.2.89" }
wasm-bindgen-futures = { version = "0.4.38" }
web-sys = { version = "0.3.65", features = ["Document", "Location", "MessageEvent", "Navigator", "RtcCertificate", "RtcConfiguration", "RtcDataChannel", "RtcDataChannelEvent", "RtcDataChannelInit", "RtcDataChannelState", "RtcDataChannelType", "RtcPeerConnection", "RtcSdpType", "RtcSessionDescription", "RtcSessionDescriptionInit", "Window"] }

Expand Down
2 changes: 1 addition & 1 deletion transports/websocket-websys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tracing = "0.1.37"
parking_lot = "0.12.1"
send_wrapper = "0.6.0"
thiserror = "1.0.50"
wasm-bindgen = "0.2.88"
wasm-bindgen = "0.2.89"
web-sys = { version = "0.3.65", features = ["BinaryType", "CloseEvent", "MessageEvent", "WebSocket", "Window", "WorkerGlobalScope"] }

# Passing arguments to the docsrs builder in order to properly document cfg's.
Expand Down
2 changes: 1 addition & 1 deletion transports/webtransport-websys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ multihash = { workspace = true }
send_wrapper = { version = "0.6.0", features = ["futures"] }
thiserror = "1.0.50"
tracing = "0.1.37"
wasm-bindgen = "0.2.88"
wasm-bindgen = "0.2.89"
wasm-bindgen-futures = "0.4.38"
web-sys = { version = "0.3.65", features = [
"ReadableStreamDefaultReader",
Expand Down
2 changes: 1 addition & 1 deletion wasm-tests/webtransport-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libp2p-noise = { workspace = true }
libp2p-webtransport-websys = { workspace = true }
multiaddr = { workspace = true }
multihash = { workspace = true }
wasm-bindgen = "0.2.88"
wasm-bindgen = "0.2.89"
wasm-bindgen-futures = "0.4.38"
wasm-bindgen-test = "0.3.38"
web-sys = { version = "0.3.65", features = ["Response", "Window"] }
Expand Down

0 comments on commit 04cb06a

Please sign in to comment.