Skip to content

fix(deps): upgrade backlog-js to 1.1.0 and use standalone functions - #181

Merged
lollipop-onl merged 3 commits into
nulab:mainfrom
katayama8000:chore/backlog-js-1.0.0
Nov 18, 2026
Merged

lollipop-onl merged 3 commits into
nulab:mainfrom
katayama8000:chore/backlog-js-1.0.0

Conversation

@katayama8000

@katayama8000 katayama8000 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump backlog-js in the workspace catalog from ^0.20.1 to ^1.1.0.
  • 1.1.0 encodes IDs and keys before putting them in API paths, so a value containing /, ?, # or .. can no longer reach another endpoint. bee passes raw values and never encodes them itself, so nothing is double-encoded. A . or .. segment now fails with a TypeError before any request is sent.
  • Commands and @repo/backlog-utils call backlog-js standalone functions instead of Backlog methods: client.getIssue(key) becomes getIssue(client, key). getClient and the auth commands build the client with createClient, and BacklogClient is now backlog-js's Client.
  • Five delete commands already have a local variable with the API function's name (const deleteIssue = new BeeCommand("delete")). Those files import the function under an alias (deleteIssue as deleteIssueApi).
  • Add @repo/test-utils/mock-backlog-js, which follows the mock-consola pattern. It forwards each backlog-js API function to the mock client's method of the same name, so existing mockClient.* stubs and assertions are unchanged. Each test file adds one line: vi.mock("backlog-js", () => import("@repo/test-utils/mock-backlog-js").then((m) => m.default)).
  • Update AGENTS.md to describe the new calling convention.

The OAuth 401 retry Proxy in getClient still applies: the standalone functions call client.get / client.post / … on the Proxy, and the Proxy wraps those calls. Error objects in 1.x still have _name / _status / _response, so the duck-typed auth and rate-limit checks are unchanged.

Test plan

  • vp check
  • vp test: 118 files, 792 tests pass
  • vp run --filter @nulab/bee build
  • Manually run a command against a real space (not done)

🤖 Generated with Claude Code

katayama8000 and others added 2 commits October 15, 2026 11:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hods

backlog-js 1.0.0 exports every API method as a function that takes a
client as its first argument. Commands now call those functions with the
client from getClient, which is built with createClient. Tests forward
the functions to the mock client's methods through
@repo/test-utils/mock-backlog-js, so existing stubs and assertions stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.1.0 encodes IDs and keys before putting them in API paths, so a value
containing `/`, `?`, `#` or `..` can no longer reach another endpoint.
bee passes raw values and never encodes them itself, so nothing is
double-encoded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@katayama8000 katayama8000 changed the title refactor: upgrade backlog-js to 1.0.0 and use standalone functions refactor: upgrade backlog-js to 1.1.0 and use standalone functions Nov 18, 2026
@lollipop-onl lollipop-onl changed the title refactor: upgrade backlog-js to 1.1.0 and use standalone functions fix(deps): upgrade backlog-js to 1.1.0 and use standalone functions Nov 18, 2026

@lollipop-onl lollipop-onl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@lollipop-onl
lollipop-onl merged commit d0d6bf1 into nulab:main Nov 18, 2026
10 checks passed
Eotel added a commit to Eotel/bee that referenced this pull request Nov 19, 2026
Upstream moved every command to backlog-js standalone functions (nulab#181), so
the fork's comment paging in `issue comment --list` and `issue view --comments`
now calls `getIssueComments(client, ...)` instead of the removed client method.
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.

2 participants