Repository navigation
fix(cli): depend on @pleaseai/ast-grep-config with a caret range - #52
Conversation
`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`.
|
Deploying code-style with
|
| 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 |
There was a problem hiding this comment.
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.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
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.
There was a problem hiding this comment.
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
|



Summary
@pleaseai/code-style@0.1.0on 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 frommainalready writes0.1.0.This PR:
workspace:^, so a pack writes^0.1.0(checked withbun pm pack). Later ast-grep-config patch releases reach CLI users without a new CLI release.workspace:*.fix(cli)commit, so release-please opens the@pleaseai/code-style0.1.1 release PR after it merges.Related issue
Follow-up to #51.
Checklist
bun run build)bun run lint)BREAKING CHANGE:note is includedSummary by cubic
Switches the CLI's
@pleaseai/ast-grep-configdependency fromworkspace:*toworkspace:^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.0shipped depending on@pleaseai/ast-grep-config@0.0.1, which was never published and cannot be installed. Withworkspace:^, 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 namedworkspace:*.Written for commit 7105ff5. Summary will update on new commits.