From f5ab8a0f25b9c548ac39ef4409bf09747055388c Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sun, 19 Oct 2025 22:09:35 -0400 Subject: [PATCH 1/4] release: 2.29.0 --- CHANGELOG.md | 46 +++++++++++++++++++++++++++++++++ Cargo.lock | 20 +++++++------- Cargo.toml | 16 ++++++------ crates/squawk_github/src/app.rs | 2 +- flake.nix | 2 +- package.json | 2 +- squawk-vscode/package.json | 2 +- 7 files changed, 68 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ff99eff..72514f7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v2.29.0 - 2025-10-19 + +## Added + +- parser: improve error recovery for option lists in `reindex`, `prepare`, + `vacuum`, `copy`, `drop database`, `create type`, `create function`, + `create table`, `create index` (#684) + +- parser: improved error recovery for CTEs (#683) + + ```sql + with + a as ( + select 1 + ) -- <-- missing a comma + b as ( + select 3 + ) + select 2; + ``` + + squawk now identifies the missing comma correctly: + + ``` + error[syntax-error]: missing comma + ╭▸ stdin:4:6 + │ +4 │ ) -- <-- missing a comma + ╰╴ ━ + ``` + +- parser: improve error recovery of group by & distinct on (#695) + +- vscode: improved commenting behavior (#690) + + +## Fixed + +- linter: fixed false positive with `constraint-missing-not-valid` (#694) + +- lexer: lex empty dollar quoted strings (`$$$$`) correctly (#691) + +- linter: identify `table` statement as fast (#688) + +- lsp: server logs no longer contain ansi codes which vscode garbles (#681) + ## v2.28.1 - 2025-10-03 ## Added diff --git a/Cargo.lock b/Cargo.lock index 301f5b09..71d03dfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1831,7 +1831,7 @@ dependencies = [ [[package]] name = "squawk" -version = "2.28.1" +version = "2.29.0" dependencies = [ "annotate-snippets", "anyhow", @@ -1860,7 +1860,7 @@ dependencies = [ [[package]] name = "squawk-github" -version = "2.28.1" +version = "2.29.0" dependencies = [ "jsonwebtoken", "log", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "squawk-ide" -version = "2.28.1" +version = "2.29.0" dependencies = [ "annotate-snippets", "insta", @@ -1883,14 +1883,14 @@ dependencies = [ [[package]] name = "squawk-lexer" -version = "2.28.1" +version = "2.29.0" dependencies = [ "insta", ] [[package]] name = "squawk-linter" -version = "2.28.1" +version = "2.29.0" dependencies = [ "enum-iterator", "insta", @@ -1904,7 +1904,7 @@ dependencies = [ [[package]] name = "squawk-parser" -version = "2.28.1" +version = "2.29.0" dependencies = [ "camino", "dir-test", @@ -1917,7 +1917,7 @@ dependencies = [ [[package]] name = "squawk-server" -version = "2.28.1" +version = "2.29.0" dependencies = [ "anyhow", "insta", @@ -1937,7 +1937,7 @@ dependencies = [ [[package]] name = "squawk-syntax" -version = "2.28.1" +version = "2.29.0" dependencies = [ "camino", "dir-test", @@ -1949,7 +1949,7 @@ dependencies = [ [[package]] name = "squawk-wasm" -version = "2.28.1" +version = "2.29.0" dependencies = [ "console_error_panic_hook", "console_log", @@ -2766,7 +2766,7 @@ checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" [[package]] name = "xtask" -version = "2.28.1" +version = "2.29.0" dependencies = [ "anyhow", "camino", diff --git a/Cargo.toml b/Cargo.toml index eba28a94..bcc7b617 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "2.28.1" +version = "2.29.0" edition = "2024" rust-version = "1.90.0" authors = ["Squawk Team & Contributors"] @@ -59,13 +59,13 @@ snapbox = { version = "0.6.0", features = ["diff", "term-svg", "cmd"] } # local # we have to make the versions explicit otherwise `cargo publish` won't work -squawk-github = { path = "./crates/squawk_github", version = "2.28.1" } -squawk-ide = { path = "./crates/squawk_ide", version = "2.28.1" } -squawk-lexer = { path = "./crates/squawk_lexer", version = "2.28.1" } -squawk-parser = { path = "./crates/squawk_parser", version = "2.28.1" } -squawk-syntax = { path = "./crates/squawk_syntax", version = "2.28.1" } -squawk-linter = { path = "./crates/squawk_linter", version = "2.28.1" } -squawk-server = { path = "./crates/squawk_server", version = "2.28.1" } +squawk-github = { path = "./crates/squawk_github", version = "2.29.0" } +squawk-ide = { path = "./crates/squawk_ide", version = "2.29.0" } +squawk-lexer = { path = "./crates/squawk_lexer", version = "2.29.0" } +squawk-parser = { path = "./crates/squawk_parser", version = "2.29.0" } +squawk-syntax = { path = "./crates/squawk_syntax", version = "2.29.0" } +squawk-linter = { path = "./crates/squawk_linter", version = "2.29.0" } +squawk-server = { path = "./crates/squawk_server", version = "2.29.0" } [workspace.lints.clippy] collapsible_else_if = "allow" diff --git a/crates/squawk_github/src/app.rs b/crates/squawk_github/src/app.rs index 813ab0d3..cb801d41 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.28.1"; +pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.29.0"; #[derive(Debug, Serialize)] struct CommentBody { diff --git a/flake.nix b/flake.nix index 6dc2fe5d..19fcbbf2 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ { squawk = final.rustPlatform.buildRustPackage { pname = "squawk"; - version = "2.28.1"; + version = "2.29.0"; cargoLock = { lockFile = ./Cargo.lock; diff --git a/package.json b/package.json index 8c1584f3..02486f36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "squawk-cli", - "version": "2.28.1", + "version": "2.29.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 565da630..a1209ed9 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.28.1", + "version": "2.29.0", "engines": { "vscode": "^1.101.0" }, From 694d706fa7a19c66fe800040c9265abf378265b3 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sun, 19 Oct 2025 22:13:37 -0400 Subject: [PATCH 2/4] format --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72514f7f..25c79211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - vscode: improved commenting behavior (#690) - ## Fixed - linter: fixed false positive with `constraint-missing-not-valid` (#694) From 318c485902efabbfc4d7c3879452a9e8d813ae50 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sun, 19 Oct 2025 22:13:43 -0400 Subject: [PATCH 3/4] format --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c79211..a460cf76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - parser: improved error recovery for CTEs (#683) ```sql - with + with a as ( select 1 ) -- <-- missing a comma @@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 error[syntax-error]: missing comma ╭▸ stdin:4:6 │ -4 │ ) -- <-- missing a comma + 4 │ ) -- <-- missing a comma ╰╴ ━ ``` From 29a58f05c99a3a5f8b1fffa87a2754243637ce66 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sun, 19 Oct 2025 22:14:56 -0400 Subject: [PATCH 4/4] fix --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a460cf76..f4cffb42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 squawk now identifies the missing comma correctly: ``` - error[syntax-error]: missing comma - ╭▸ stdin:4:6 - │ + error[syntax-error]: missing comma + ╭▸ stdin:4:6 + │ 4 │ ) -- <-- missing a comma - ╰╴ ━ + ╰╴ ━ ``` - parser: improve error recovery of group by & distinct on (#695)