Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,166 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## v2.54.0 - 2026-05-24

### Added

- lexer: add parsing and erroring for num trailing suffix (#1159)

```
error[syntax-error]: trailing junk after numeric literal
╭▸ stdin:1:11
1 │ SELECT 0x0y;
╰╴ ━
```

- parser: warn about empty / invalid params & empty quoted idents (#1164)

```
error[syntax-error]: empty delimited identifier
╭▸ stdin:1:8
1 │ select "", $, $2147483648
╰╴ ━━
error[syntax-error]: missing parameter number
╭▸ stdin:1:12
1 │ select "", $, $2147483648
╰╴ ━
error[syntax-error]: parameter number too large
╭▸ stdin:1:15
1 │ select "", $, $2147483648
╰╴ ━━━━━━━━━━━
```

- parser: warn about invalid octal/hex/binary digits (#1163)

```
error[syntax-error]: invalid digit for a base 2 literal
╭▸ stdin:1:12
1 │ select 0b104, 0o7719, 0xg
╰╴ ━
error[syntax-error]: invalid digit for a base 8 literal
╭▸ stdin:1:20
1 │ select 0b104, 0o7719, 0xg
╰╴ ━
error[syntax-error]: trailing junk after numeric literal
╭▸ stdin:1:25
1 │ select 0b104, 0o7719, 0xg
╰╴ ━
```

- parser: improve error reporting for malformed literals (#1162)

```
error[syntax-error]: trailing junk after positional parameter
╭▸ stdin:1:10
1 │ SELECT $1a;
╰╴ ━
```

instead of

```
error[syntax-error]: trailing junk after positional parameter
╭▸ stdin:1:10
1 │ SELECT $1a;
╰╴ ━━━
```

- parser: improve lexing numbers (#1161)

```sql
select .4;
```

now produces:

```
NUMERIC_NUMBER@7..9 ".4"
```

instead of:

```
INT_NUMBER@7..9 ".4"
```

- ide: goto def for `t.c%type` (#1161)

```sql
create table t(a int, b text);
-- ^ dest
create function f(x t.a%type) returns s.t.b%type
-- ^ source
as $$ select 'hello'::text $$ language sql;
```

- ide: find refs for types like `bit` (#1153)

```sql
create type pg_catalog.bit;
-- ^^^ source

create function pg_catalog.bit(bigint, integer) returns bit
-- ^^^ ref
language internal;
```

- ide: add hover for string literals (#1155)

Now we decode the escape sequences for string literals on hover and show the
value up to the first new line.

- ide: improve numeric literal type inference (#1156)

```sql
select 2147483647; -- type: integer
select 2147483648; -- type: bigint
select 100000000000000000000000; -- type: numeric
```

- fmt: literals & binary operators (#1169)

Format binary operators and literals.

```sql
-- before
select TRUE and FALSE;
select X'AF';

-- after
select true and false;
select
x'AF';
```

- fmt: unquote column aliases when possible (#1168)

```sql
-- before
select 1 as "foo";

-- after
select 1 as foo;
```

### Changed

- harden github action workflows (#1165). Thanks @chdsbd!

### Fixed

- lexer: fix unicode escape string issue (#1158)
- vscode: update TextMate grammar to support other numeric literal kinds (#1157)

## v2.53.0 - 2026-05-17

### Added
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

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

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "2.53.0"
version = "2.54.0"
edition = "2024"
rust-version = "1.94"
authors = ["Squawk Team & Contributors"]
Expand Down Expand Up @@ -79,14 +79,14 @@ rustc-hash = "2.1.1"

# local
# we have to make the versions explicit otherwise `cargo publish` won't work
squawk-github = { path = "./crates/squawk_github", version = "2.53.0" }
squawk-ide = { path = "./crates/squawk_ide", version = "2.53.0" }
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.53.0" }
squawk-parser = { path = "./crates/squawk_parser", version = "2.53.0" }
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.53.0" }
squawk-linter = { path = "./crates/squawk_linter", version = "2.53.0" }
squawk-server = { path = "./crates/squawk_server", version = "2.53.0" }
squawk-thread = { path = "./crates/squawk_thread", version = "2.53.0" }
squawk-github = { path = "./crates/squawk_github", version = "2.54.0" }
squawk-ide = { path = "./crates/squawk_ide", version = "2.54.0" }
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.54.0" }
squawk-parser = { path = "./crates/squawk_parser", version = "2.54.0" }
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.54.0" }
squawk-linter = { path = "./crates/squawk_linter", version = "2.54.0" }
squawk-server = { path = "./crates/squawk_server", version = "2.54.0" }
squawk-thread = { path = "./crates/squawk_thread", version = "2.54.0" }

[workspace.lints.clippy]
collapsible_else_if = "allow"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ to your project's `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/sbdchd/squawk
rev: 2.53.0
rev: 2.54.0
hooks:
- id: squawk
files: path/to/postgres/migrations/written/in/sql
Expand Down
2 changes: 1 addition & 1 deletion crates/squawk_github/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.53.0";
pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.54.0";

#[derive(Debug, Serialize)]
struct CommentBody {
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
squawk = final.rustPlatform.buildRustPackage {
pname = "squawk";
version = "2.53.0";
version = "2.54.0";

cargoLock = {
lockFile = ./Cargo.lock;
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squawk-cli/darwin-arm64",
"version": "2.53.0",
"version": "2.54.0",
"description": "squawk-cli binary for darwin-arm64",
"repository": "git@github.com:sbdchd/squawk.git",
"license": "(Apache-2.0 OR MIT)",
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squawk-cli/darwin-x64",
"version": "2.53.0",
"version": "2.54.0",
"description": "squawk-cli binary for darwin-x64",
"repository": "git@github.com:sbdchd/squawk.git",
"license": "(Apache-2.0 OR MIT)",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squawk-cli/linux-arm64",
"version": "2.53.0",
"version": "2.54.0",
"description": "squawk-cli binary for linux-arm64",
"repository": "git@github.com:sbdchd/squawk.git",
"license": "(Apache-2.0 OR MIT)",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squawk-cli/linux-x64",
"version": "2.53.0",
"version": "2.54.0",
"description": "squawk-cli binary for linux-x64",
"repository": "git@github.com:sbdchd/squawk.git",
"license": "(Apache-2.0 OR MIT)",
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@squawk-cli/win32-x64",
"version": "2.53.0",
"version": "2.54.0",
"description": "squawk-cli binary for win32-x64",
"repository": "git@github.com:sbdchd/squawk.git",
"license": "(Apache-2.0 OR MIT)",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "squawk-cli",
"version": "2.53.0",
"version": "2.54.0",
"description": "linter for PostgreSQL, focused on migrations",
"repository": "git@github.com:sbdchd/squawk.git",
"author": "Squawk Team & Contributors",
Expand Down
2 changes: 1 addition & 1 deletion squawk-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"icon": "icon.png",
"author": "Squawk Team & Contributors",
"license": "(Apache-2.0 OR MIT)",
"version": "2.53.0",
"version": "2.54.0",
"engines": {
"vscode": "^1.101.0"
},
Expand Down
Loading