From 2c3640a2b871bff1d3b7c6f0bf6ecd51bae562dd Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sat, 30 May 2026 00:15:54 -0400 Subject: [PATCH 1/3] ci: stop injecting optional dependencies now that they're published, I think we can just bump them as part of the release, hopefully. --- .github/workflows/rust.yml | 8 -------- crates/xtask/src/update_version.rs | 6 ++++++ package.json | 7 +++++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 45a60e91..eceae172 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -237,14 +237,6 @@ jobs: cp artifacts/release-squawk-windows-x64.exe/squawk-windows-x64.exe npm/win32-x64/bin/squawk.exe chmod +x npm/darwin-x64/bin/squawk npm/darwin-arm64/bin/squawk npm/linux-x64/bin/squawk npm/linux-arm64/bin/squawk - - name: Inject optionalDependencies into root package.json - run: | - set -euo pipefail - VERSION=$(node -p 'require("./package.json").version') - for tgt in darwin-x64 darwin-arm64 linux-x64 linux-arm64 win32-x64; do - npm pkg set "optionalDependencies.@squawk-cli/${tgt}=${VERSION}" - done - - name: Publish packages run: | set -euo pipefail diff --git a/crates/xtask/src/update_version.rs b/crates/xtask/src/update_version.rs index 8aa5cfbc..964d9b57 100644 --- a/crates/xtask/src/update_version.rs +++ b/crates/xtask/src/update_version.rs @@ -99,6 +99,12 @@ fn update_versions(sh: &Shell, v: &str) -> Result<()> { let json_rep = format!(r#""version": "{v}""#); replace_in_file(sh, "package.json", r#""version": ".*""#, &json_rep)?; + replace_in_file( + sh, + "package.json", + r#"("@squawk-cli/[^"]+": ")[^"]+""#, + &format!(r#"${{1}}{v}""#), + )?; replace_in_file( sh, "squawk-vscode/package.json", diff --git a/package.json b/package.json index 4345b0c1..337d2d1b 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,13 @@ "oxfmt": "^0.44.0", "typescript": "^3.9.5" }, + "optionalDependencies": { + "@squawk-cli/darwin-arm64": "2.55.0", + "@squawk-cli/darwin-x64": "2.55.0", + "@squawk-cli/linux-arm64": "2.55.0", + "@squawk-cli/linux-x64": "2.55.0", + "@squawk-cli/win32-x64": "2.55.0" + }, "volta": { "node": "20.19.0", "pnpm": "9.15.4" From 2d97d829754cc1ffdc89ef2522f0ca85167e9d05 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sat, 30 May 2026 00:34:27 -0400 Subject: [PATCH 2/3] fix lockfile --- package.json | 11 ++++++++++- pnpm-lock.yaml | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 337d2d1b..e58ae1c2 100644 --- a/package.json +++ b/package.json @@ -39,5 +39,14 @@ "node": "20.19.0", "pnpm": "9.15.4" }, - "packageManager": "pnpm@9.15.4" + "packageManager": "pnpm@9.15.4", + "pnpm": { + "ignoredOptionalDependencies": [ + "@squawk-cli/darwin-arm64", + "@squawk-cli/darwin-x64", + "@squawk-cli/linux-arm64", + "@squawk-cli/linux-x64", + "@squawk-cli/win32-x64" + ] + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99fd9eaa..22e390b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1134,6 +1134,13 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} +ignoredOptionalDependencies: + - '@squawk-cli/darwin-arm64' + - '@squawk-cli/darwin-x64' + - '@squawk-cli/linux-arm64' + - '@squawk-cli/linux-x64' + - '@squawk-cli/win32-x64' + snapshots: '@babel/code-frame@7.12.11': From 64884860275ffdc0a7bb5900c8e1c68254c96bc7 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Sat, 30 May 2026 00:38:31 -0400 Subject: [PATCH 3/3] fix --- README.md | 2 +- crates/xtask/src/update_version.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dcaf779c..5d1f3a91 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ to your project's `.pre-commit-config.yaml`: ```yaml repos: - repo: https://github.com/sbdchd/squawk - rev: 2.55.0 + rev: v2.55.0 hooks: - id: squawk files: path/to/postgres/migrations/written/in/sql diff --git a/crates/xtask/src/update_version.rs b/crates/xtask/src/update_version.rs index 964d9b57..6e7d5585 100644 --- a/crates/xtask/src/update_version.rs +++ b/crates/xtask/src/update_version.rs @@ -138,7 +138,7 @@ fn update_versions(sh: &Shell, v: &str) -> Result<()> { r#"const SQUAWK_USER_AGENT: &str = "squawk/.*""#, &format!(r#"const SQUAWK_USER_AGENT: &str = "squawk/{v}""#), )?; - replace_in_file(sh, "README.md", "rev: .*", &format!("rev: {v}"))?; + replace_in_file(sh, "README.md", "rev: .*", &format!("rev: v{v}"))?; Ok(()) }