Skip to content

Commit

Permalink
prepare 0.6.2 release (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander authored Sep 14, 2022
1 parent 8fca760 commit b6cddcd
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 18 deletions.
84 changes: 84 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,72 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.6.2 - 2022-09-14

[25 pull requests][0.6.2-prs] were merged this release cycle.

### Added
* [[#1081]]: Add `try_from` attribute for `FromRow` derive [[@zzhengzhuo]]
* Exemplifies "out of sight, out of mind." It's surprisingly easy to forget about PRs when they get pushed onto
the second page. We'll be sure to clean out the backlog for 0.7.0.
* [[#2014]]: Support additional SQLCipher options in SQLite driver. [[@szymek156]]
* [[#2052]]: Add issue templates [[@abonander]]
* [[#2053]]: Add documentation for `IpAddr` support in Postgres [[@rakshith-ravi]]
* [[#2062]]: Add extension support for SQLite [[@bradfier]]
* [[#2063]]: customizable db locking during migration [[@fuzzbuck]]

### Changed
* [[#2025]]: Bump sqlformat to 2.0 [[@NSMustache]]
* [[#2056]]: chore: Switch to sha1 crate [[@stoically]]
* [[#2071]]: Use cargo check consistently in `prepare` [[@cycraig]]

### Fixed
* [[#1991]]: Ensure migration progress is not lost for Postgres, MySQL and SQLite. [[@crepererum]]
* [[#2023]]: Fix expansion of `#[sqlx(flatten)]` for `FromRow` derive [[@RustyYato]]
* [[#2028]]: Use fully qualified path when forwarding to `#[test]` from `#[sqlx::test]` [[@alexander-jackson]]
* [[#2040]]: Fix typo in `FromRow` docs [[@zlidner]]
* [[#2046]]: added flag for PIPES_AS_CONCAT connection setting for MySQL to fix #2034 [[@marcustut]]
* [[#2055]]: Use unlock notify also on `sqlite3_exec` [[@madadam]]
* [[#2057]]: Make begin,commit,rollback cancel-safe in sqlite [[@madadam]]
* [[#2058]]: fix typo in documentation [[@lovasoa]]
* [[#2067]]: fix(docs): close code block in query_builder.rs [[@abonander]]
* [[#2069]]: Fix `prepare` race condition in workspaces [[@cycraig]]
* [[#2072]]: SqliteConnectOptions typo [[@fasterthanlime]]
* [[#2074]]: fix: mssql uses unsigned for tinyint instead of signed [[@he4d]]
* [[#2081]]: close unnamed portal after each executed extended query [[@DXist]]
* [[#2086]]: PgHasArrayType for transparent types fix. [[@Wopple]]
* NOTE: this is a breaking change and has been postponed to 0.7.0.
* [[#2089]]: fix: Remove default chrono dep on time for sqlx-cli [[@TravisWhitehead]]
* [[#2091]]: Sqlite explain plan log efficiency [[@tyrelr]]

[0.6.2-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Aclosed+merged%3A2022-08-04..2022-09-14+

[#1081]: https://github.com/launchbadge/sqlx/pull/1081
[#1991]: https://github.com/launchbadge/sqlx/pull/1991
[#2014]: https://github.com/launchbadge/sqlx/pull/2014
[#2023]: https://github.com/launchbadge/sqlx/pull/2023
[#2025]: https://github.com/launchbadge/sqlx/pull/2025
[#2028]: https://github.com/launchbadge/sqlx/pull/2028
[#2040]: https://github.com/launchbadge/sqlx/pull/2040
[#2046]: https://github.com/launchbadge/sqlx/pull/2046
[#2052]: https://github.com/launchbadge/sqlx/pull/2052
[#2053]: https://github.com/launchbadge/sqlx/pull/2053
[#2055]: https://github.com/launchbadge/sqlx/pull/2055
[#2056]: https://github.com/launchbadge/sqlx/pull/2056
[#2057]: https://github.com/launchbadge/sqlx/pull/2057
[#2058]: https://github.com/launchbadge/sqlx/pull/2058
[#2062]: https://github.com/launchbadge/sqlx/pull/2062
[#2063]: https://github.com/launchbadge/sqlx/pull/2063
[#2067]: https://github.com/launchbadge/sqlx/pull/2067
[#2069]: https://github.com/launchbadge/sqlx/pull/2069
[#2071]: https://github.com/launchbadge/sqlx/pull/2071
[#2072]: https://github.com/launchbadge/sqlx/pull/2072
[#2074]: https://github.com/launchbadge/sqlx/pull/2074
[#2081]: https://github.com/launchbadge/sqlx/pull/2081
[#2086]: https://github.com/launchbadge/sqlx/pull/2086
[#2089]: https://github.com/launchbadge/sqlx/pull/2089
[#2091]: https://github.com/launchbadge/sqlx/pull/2091

## 0.6.1 - 2022-08-02

[33 pull requests][0.6.1-prs] were merged this release cycle.
Expand Down Expand Up @@ -1510,3 +1576,21 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg
[@crepererum]: https://github.com/crepererum
[@UramnOIL]: https://github.com/UramnOIL
[@liningpan]: https://github.com/liningpan
[@zzhengzhuo]: https://github.com/zzhengzhuo
[@crepererum]: https://github.com/crepererum
[@szymek156]: https://github.com/szymek156
[@NSMustache]: https://github.com/NSMustache
[@RustyYato]: https://github.com/RustyYato
[@alexander-jackson]: https://github.com/alexander-jackson
[@zlidner]: https://github.com/zlidner
[@zlindner]: https://github.com/zlindner
[@marcustut]: https://github.com/marcustut
[@rakshith-ravi]: https://github.com/rakshith-ravi
[@bradfier]: https://github.com/bradfier
[@fuzzbuck]: https://github.com/fuzzbuck
[@cycraig]: https://github.com/cycraig
[@fasterthanlime]: https://github.com/fasterthanlime
[@he4d]: https://github.com/he4d
[@DXist]: https://github.com/DXist
[@Wopple]: https://github.com/Wopple
[@TravisWhitehead]: https://github.com/TravisWhitehead
10 changes: 5 additions & 5 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [

[package]
name = "sqlx"
version = "0.6.1"
version = "0.6.2"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/launchbadge/sqlx"
Expand Down Expand Up @@ -125,8 +125,8 @@ bstr = ["sqlx-core/bstr"]
git2 = ["sqlx-core/git2"]

[dependencies]
sqlx-core = { version = "0.6.1", path = "sqlx-core", default-features = false }
sqlx-macros = { version = "0.6.1", path = "sqlx-macros", default-features = false, optional = true }
sqlx-core = { version = "0.6.2", path = "sqlx-core", default-features = false }
sqlx-macros = { version = "0.6.2", path = "sqlx-macros", default-features = false, optional = true }

[dev-dependencies]
anyhow = "1.0.52"
Expand Down
2 changes: 1 addition & 1 deletion examples/postgres/axum-social-with-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
# Primary crates
axum = { version = "0.5.13", features = ["macros"] }
sqlx = { version = "0.6.1", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] }
sqlx = { version = "0.6.2", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] }
tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] }

# Important secondary crates
Expand Down
95 changes: 95 additions & 0 deletions gen-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Requires Github CLI and `jq`
# Usage: `./gen-changelog.sh YYYY-mm-dd`
# Generates changelog entries for all PRs merged on or after the given date.
set -e

PULLS='[]'
CURSOR='null'

VERSION=$1

MIN_MERGED_AT=$(date --date="$1" +%s)

while true
do
# Use the GraphQL API to paginate merged pull requests.
# The REST API doesn't allow filtering only merged pull requests.
# We scan all merged pull requests from the beginning because it's not unheard of to have a very old PR finally get
# merged; e.g. #1081, merged a year and a half after it was opened.
if [ "$CURSOR" != "null" ];
then
PAGE=$(gh api graphql -f after="$CURSOR" -f query='query($after: String) {
repository(owner: "launchbadge", name: "sqlx") {
pullRequests(first:100,orderBy: {field:CREATED_AT, direction:ASC},states:MERGED, after: $after) {
nodes {
number
author { login }
title
url
mergedAt
}
pageInfo {
hasNextPage
endCursor
}
}
}
}');
else
PAGE=$(gh api graphql -f query='query {
repository(owner: "launchbadge", name: "sqlx") {
pullRequests(first:100,orderBy: {field:CREATED_AT, direction:ASC},states:MERGED) {
nodes {
number
author { login }
title
url
mergedAt
}
pageInfo {
hasNextPage
endCursor
}
}
}
}');
fi

CURSOR=$(echo "$PAGE" | jq -r '.data.repository.pullRequests.pageInfo.endCursor');

HAS_NEXT_PAGE=$(echo "$PAGE" | jq '.data.repository.pullRequests.pageInfo.hasNextPage');

PULLS=$(echo "$PAGE" | jq "$PULLS + (.data.repository.pullRequests.nodes | map(select(.mergedAt | fromdate >= $MIN_MERGED_AT)))");

# can't use `"$CURSOR" == 'null'` because the last page still gives a valid cursor
if ! $HAS_NEXT_PAGE; then break; fi;
done

COUNT=$(echo "$PULLS" | jq "length");

echo "Found $COUNT pull requests merged on or after $1\n"

if [ -z $COUNT ]; then exit 0; fi;

echo "Entries:"
echo "$PULLS" | jq -r 'map("* [[#\(.number)]]: \(.title) [[@\(.author.login)]]") | join("\n")'

echo "\nLinks:"
echo "$PULLS" | jq -r 'map("[#\(.number)]: \(.url)") | join("\n")'

echo "\nNew Authors:"
DUPE_AUTHORS=''

# Generate link entries for new authors at the end of the changelog.
echo "$PULLS" | jq -r '.[].author.login' | while read author; do
author_url="https://github.com/$author"
author_entry="[@$author]: $author_url"

# Check if the entry already exists in the changelog or in our list of new authors.
if grep -qF "$author_entry" CHANGELOG.md || echo "$DUPE_AUTHORS" | grep -qF "$author_entry";
then continue;
fi;

DUPE_AUTHORS="$DUPE_AUTHORS$author_entry\n"
echo $author_entry
done
4 changes: 2 additions & 2 deletions sqlx-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-cli"
version = "0.6.1"
version = "0.6.2"
description = "Command-line utility for SQLx, the Rust SQL toolkit."
edition = "2021"
readme = "README.md"
Expand All @@ -27,7 +27,7 @@ path = "src/bin/cargo-sqlx.rs"
[dependencies]
dotenvy = "0.15.0"
tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] }
sqlx = { version = "0.6.1", path = "..", default-features = false, features = [
sqlx = { version = "0.6.2", path = "..", default-features = false, features = [
"migrate",
"any",
"offline",
Expand Down
6 changes: 3 additions & 3 deletions sqlx-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-core"
version = "0.6.1"
version = "0.6.2"
repository = "https://github.com/launchbadge/sqlx"
description = "Core of SQLx, the rust SQL toolkit. Not intended to be used directly."
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -106,7 +106,7 @@ offline = ["serde", "either/serde"]
paste = "1.0.6"
ahash = "0.7.6"
atoi = "1.0"
sqlx-rt = { path = "../sqlx-rt", version = "0.6.1" }
sqlx-rt = { path = "../sqlx-rt", version = "0.6.2" }
base64 = { version = "0.13.0", default-features = false, optional = true, features = ["std"] }
bigdecimal_ = { version = "0.3.0", optional = true, package = "bigdecimal" }
rust_decimal = { version = "1.19.0", optional = true }
Expand Down Expand Up @@ -178,5 +178,5 @@ event-listener = "2.5.2"
dotenvy = "0.15"

[dev-dependencies]
sqlx = { version = "0.6.1", path = "..", features = ["postgres", "sqlite", "mysql"] }
sqlx = { version = "0.6.2", path = "..", features = ["postgres", "sqlite", "mysql"] }
tokio = { version = "1", features = ["rt"] }
6 changes: 3 additions & 3 deletions sqlx-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-macros"
version = "0.6.1"
version = "0.6.2"
repository = "https://github.com/launchbadge/sqlx"
description = "Macros for SQLx, the rust SQL toolkit. Not intended to be used directly."
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -75,8 +75,8 @@ heck = { version = "0.4", features = ["unicode"] }
either = "1.6.1"
once_cell = "1.9.0"
proc-macro2 = { version = "1.0.36", default-features = false }
sqlx-core = { version = "0.6.1", default-features = false, features = ["any"], path = "../sqlx-core" }
sqlx-rt = { version = "0.6.1", default-features = false, path = "../sqlx-rt" }
sqlx-core = { version = "0.6.2", default-features = false, features = ["any"], path = "../sqlx-core" }
sqlx-rt = { version = "0.6.2", default-features = false, path = "../sqlx-rt" }
serde = { version = "1.0.132", features = ["derive"], optional = true }
serde_json = { version = "1.0.73", optional = true }
sha2 = { version = "0.10.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion sqlx-rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-rt"
version = "0.6.1"
version = "0.6.2"
repository = "https://github.com/launchbadge/sqlx"
license = "MIT OR Apache-2.0"
description = "Runtime abstraction used by SQLx, the Rust SQL toolkit. Not intended to be used directly."
Expand Down

0 comments on commit b6cddcd

Please sign in to comment.