From 53454679cde52cd531905efdb860ada6571efabb Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 2 Oct 2025 23:02:46 -0400 Subject: [PATCH 1/2] release: 2.28.0 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++ Cargo.lock | 20 ++++++++-------- Cargo.toml | 2 +- crates/squawk_github/src/app.rs | 2 +- docs/docs/require-timeout-settings.md | 2 +- flake.nix | 2 +- package.json | 2 +- squawk-vscode/package.json | 2 +- 8 files changed, 49 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5954e9..856a4508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v2.28.0 - 2025-10-02 + +## Added + +- New rule: require-timeout-settings (#671) + + It's important to configure lock & statement timeouts to ensure safe migrations. + See [Safety Requirements](https://squawkhq.com/docs/safe_migrations#safety-requirements) + + So the following will error: + + ```sql + alter table t add column c boolean; + ``` + + but this is okay: + + ```sql + set lock_timeout = '1s'; + set statement_timeout = '5s'; + alter table t add column c boolean; + ``` + + If you've already configured timeouts for your migrations, you can safely + ignore this rule. + +## Fixed + +- parser: pg18 `like` clause in `create foreign table` now parses (#666) + +- cli: parsing rule alises i.e., prefer-timestamptz and prefer-timestamp-tz both work. (#668) + + ## v2.27.0 - 2025-09-23 ## Added diff --git a/Cargo.lock b/Cargo.lock index 67240f3d..b5d7be98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1831,7 +1831,7 @@ dependencies = [ [[package]] name = "squawk" -version = "2.27.0" +version = "2.28.0" dependencies = [ "annotate-snippets", "anyhow", @@ -1860,7 +1860,7 @@ dependencies = [ [[package]] name = "squawk-github" -version = "2.27.0" +version = "2.28.0" dependencies = [ "jsonwebtoken", "log", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "squawk-ide" -version = "2.27.0" +version = "2.28.0" dependencies = [ "annotate-snippets", "insta", @@ -1883,14 +1883,14 @@ dependencies = [ [[package]] name = "squawk-lexer" -version = "2.27.0" +version = "2.28.0" dependencies = [ "insta", ] [[package]] name = "squawk-linter" -version = "2.27.0" +version = "2.28.0" dependencies = [ "enum-iterator", "insta", @@ -1904,7 +1904,7 @@ dependencies = [ [[package]] name = "squawk-parser" -version = "2.27.0" +version = "2.28.0" dependencies = [ "camino", "dir-test", @@ -1917,7 +1917,7 @@ dependencies = [ [[package]] name = "squawk-server" -version = "2.27.0" +version = "2.28.0" dependencies = [ "anyhow", "insta", @@ -1935,7 +1935,7 @@ dependencies = [ [[package]] name = "squawk-syntax" -version = "2.27.0" +version = "2.28.0" dependencies = [ "camino", "dir-test", @@ -1947,7 +1947,7 @@ dependencies = [ [[package]] name = "squawk-wasm" -version = "2.27.0" +version = "2.28.0" dependencies = [ "console_error_panic_hook", "console_log", @@ -2764,7 +2764,7 @@ checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" [[package]] name = "xtask" -version = "2.27.0" +version = "2.28.0" dependencies = [ "anyhow", "camino", diff --git a/Cargo.toml b/Cargo.toml index 17470e65..7f37c320 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "2.27.0" +version = "2.28.0" edition = "2024" rust-version = "1.90.0" authors = ["Squawk Team & Contributors"] diff --git a/crates/squawk_github/src/app.rs b/crates/squawk_github/src/app.rs index c5a4a236..e78ff9ac 100644 --- a/crates/squawk_github/src/app.rs +++ b/crates/squawk_github/src/app.rs @@ -11,7 +11,7 @@ use serde_json::Value; use std::time::Duration; use std::time::{SystemTime, UNIX_EPOCH}; -pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.27.0"; +pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.28.0"; #[derive(Debug, Serialize)] struct CommentBody { diff --git a/docs/docs/require-timeout-settings.md b/docs/docs/require-timeout-settings.md index 4753c325..914acd27 100644 --- a/docs/docs/require-timeout-settings.md +++ b/docs/docs/require-timeout-settings.md @@ -5,7 +5,7 @@ title: require-timeout-settings ## problem -You must configure a `lock_timeout` to safely apply migrations. See (see ["Safety requirements"](./safe_migrations.md#safety-requirements)) +You must configure a `lock_timeout` to safely apply migrations. See ["Safety requirements"](./safe_migrations.md#safety-requirements) Additionally, a statement_timeout also helps prevent long migrations that consume too many database resources. diff --git a/flake.nix b/flake.nix index f8d8a518..b4d0fb8f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ { squawk = final.rustPlatform.buildRustPackage { pname = "squawk"; - version = "2.27.0"; + version = "2.28.0"; cargoLock = { lockFile = ./Cargo.lock; diff --git a/package.json b/package.json index b62015be..915d4ac7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "squawk-cli", - "version": "2.27.0", + "version": "2.28.0", "description": "linter for PostgreSQL, focused on migrations", "repository": "git@github.com:sbdchd/squawk.git", "author": "Squawk Team & Contributors", diff --git a/squawk-vscode/package.json b/squawk-vscode/package.json index 1a5efbe8..a320746c 100644 --- a/squawk-vscode/package.json +++ b/squawk-vscode/package.json @@ -9,7 +9,7 @@ "icon": "icon.png", "author": "Squawk Team & Contributors", "license": "(Apache-2.0 OR MIT)", - "version": "2.27.0", + "version": "2.28.0", "engines": { "vscode": "^1.101.0" }, From 55b4ca599d948796f3a1581e9f87c63dde742e2b Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 2 Oct 2025 23:05:48 -0400 Subject: [PATCH 2/2] fmt --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 856a4508..6e9cfaf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - cli: parsing rule alises i.e., prefer-timestamptz and prefer-timestamp-tz both work. (#668) - ## v2.27.0 - 2025-09-23 ## Added