Skip to content

fix(cli): depend on @pleaseai/ast-grep-config with a caret range - #52

Merged
amondnet merged 1 commit into
mainfrom
fix/cli-ast-grep-config-caret-range
Oct 14, 2026
Merged

amondnet merged 1 commit into
mainfrom
fix/cli-ast-grep-config-caret-range

Conversation

@amondnet

@amondnet amondnet commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

@pleaseai/code-style@0.1.0 on npm cannot be installed: it depends on @pleaseai/ast-grep-config@0.0.1, which was never published. workspace:* packs as the exact version bun.lock records, and bun.lock still had 0.0.1 when 0.1.0 was released. #51 now syncs bun.lock on the release PR, and a pack from main already writes 0.1.0.

This PR:

  • Switches the CLI's dependency to workspace:^, so a pack writes ^0.1.0 (checked with bun pm pack). Later ast-grep-config patch releases reach CLI users without a new CLI release.
  • Updates the matching spec in bun.lock, and the two comments that named workspace:*.
  • Is a fix(cli) commit, so release-please opens the @pleaseai/code-style 0.1.1 release PR after it merges.

Related issue

Follow-up to #51.

Checklist

  • PR title follows Conventional Commits
  • Packages build (bun run build)
  • Lint/format pass (bun run lint)
  • Documentation updated if behavior changed
  • No breaking change, or a BREAKING CHANGE: note is included

Summary by cubic

Switches the CLI's @pleaseai/ast-grep-config dependency from workspace:* to workspace:^ so published packages no longer depend on an unpublished version.

workspace:* packs as the exact version bun.lock records, so @pleaseai/code-style@0.1.0 shipped depending on @pleaseai/ast-grep-config@0.0.1, which was never published and cannot be installed. With workspace:^, a pack writes ^0.1.0, and future ast-grep-config patch releases reach CLI users without a new CLI release. Also updates the matching entry in bun.lock and the comments that named workspace:*.

Written for commit 7105ff5. Summary will update on new commits.

Turn on auto-fix

`workspace:*` packs as the exact version bun.lock records, so 0.1.0 shipped
depending on `@pleaseai/ast-grep-config@0.0.1`, which was never published, and
cannot be installed. bun.lock is now synced on the release PR (#51);
`workspace:^` also lets ast-grep-config patch releases reach the CLI without a
new CLI release. A pack now writes `^0.1.0`.
@sonarqubecloud

Copy link
Copy Markdown

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying code-style with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7105ff5
Status: ✅  Deploy successful!
Preview URL: https://ba9f98fe.code-style.pages.dev
Branch Preview URL: https://fix-cli-ast-grep-config-care.code-style.pages.dev

View logs

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the workspace dependency protocol for @pleaseai/ast-grep-config from workspace:* to workspace:^ in bun.lock and packages/cli/package.json, and updates a related comment in scripts/sync-bun-lock.ts. There are no review comments, and I have no feedback to provide.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@amondnet
amondnet marked this pull request as ready for review October 14, 2026 08:11

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant Repo as Monorepo (git)
    participant Bun as Bun CLI
    participant NPM as npm Registry
    participant User as CLI User

    Note over Dev,User: Current-state package release & install flow

    Dev->>Bun: bun pm pack (packages/cli)
    Bun->>Bun: Read package.json deps
    Note over Bun: CHANGED: @pleaseai/ast-grep-config - "workspace:^"
    Bun->>Bun: Resolve workspace version from bun.lock
    Bun->>Bun: Emit ^0.1.0 to tarball/package.json
    Bun-->>Dev: CLI tarball (deps: "^0.1.0")

    Dev->>Bun: bun publish (via CI release job)
    Bun-->>NPM: Upload tarball
    NPM-->>Dev: Published @pleaseai/code-style

    User->>Bun: bun add @pleaseai/code-style
    Bun->>NPM: Request package metadata
    NPM-->>Bun: code-style@0.1.0 (deps: ast-grep-config ^0.1.0)
    Bun->>NPM: Resolve ast-grep-config
    alt ast-grep-config >= 0.1.0 exists on registry
        NPM-->>Bun: ast-grep-config@0.1.x (latest compatible)
        Bun-->>User: Installs both packages successfully
    else ast-grep-config 0.1.0 missing (old failure)
        NPM-->>Bun: 404 Not Found
        Bun-->>User: CHANGED: No longer occurs (caret range resolved)
    end
Loading

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] This PR appears safe to merge.

Summary

Changes the CLI’s @pleaseai/ast-grep-config dependency to workspace:^, allowing the published package to use a caret range.

  • The CLI can use compatible releases of its config package.

Reviews (1) · Last reviewed commit: "fix(cli): depend on @pleaseai/ast-grep-c..." · Reviewed by Greptile

@amondnet
amondnet merged commit 8d24651 into main Oct 14, 2026
13 checks passed
@amondnet
amondnet deleted the fix/cli-ast-grep-config-caret-range branch October 14, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant