fix(deps): update dependency @doist/todoist-sdk to v14 - #477
Conversation
f979eb1 to
87ed3b9
Compare
doistbot
left a comment
There was a problem hiding this comment.
This is a straightforward Renovate dependency bump from @doist/todoist-sdk 13.0.2 to 14.0.0, but the breaking changes in v14 remove two fields the CLI still actively consumes.
Few things worth tightening:
src/commands/project/health.ts:40-44still readshealth.taskRecommendations, which v14 removes fromgetProjectHealth()— this will breaktype-checkandbuildin CI. Remove that block and update the correspondingproject healthtest mocks.src/commands/workspace/workspace.test.tsstill includesfolderIdin inline mock objects (lines 650, 681, 698) and assertsfolderId: nullin the--jsontest (line 746), but v14 dropsfolderIdfrom thegetWorkspaceInsightsresponse — these mocks and assertions need updating to avoid excess-property type errors and failing tests.
| "dependencies": { | ||
| "@doist/cli-core": "1.1.0", | ||
| "@doist/todoist-sdk": "13.0.2", | ||
| "@doist/todoist-sdk": "14.0.0", |
There was a problem hiding this comment.
v14.0.0 removes
taskRecommendations from getProjectHealth()'s return type (release notes: "drop ... health task recommendations"), but src/commands/project/health.ts:40-44 still reads health.taskRecommendations. npm run type-check and npm run build (both run in CI) will fail with TS2339. Remove the recommendations block from health.ts and update the project health tests that still mock taskRecommendations.
| "dependencies": { | ||
| "@doist/cli-core": "1.1.0", | ||
| "@doist/todoist-sdk": "13.0.2", | ||
| "@doist/todoist-sdk": "14.0.0", |
There was a problem hiding this comment.
v14's breaking change "drop workspace insight folder ID" removes
folderId from the getWorkspaceInsights response, but src/commands/workspace/workspace.test.ts:650,681,698 still include folderId in inline mockResolvedValue object literals (excess-property type error) and the --json test at line 746 still asserts folderId: null in the output, which the SDK no longer returns. Update these mocks/assertions.
87ed3b9 to
9f945e2
Compare
SDK 14 removes ProjectHealth.taskRecommendations, so the Recommendations section of `td project health` cannot be populated any more. Remove the block that printed it, and pin 14.0.1 rather than 14.0.0 to pick up the fix for addComment sending uidsToNotify as a comma-joined string.
|
Taken over to unblock this: pinned 14.0.1 instead of 14.0.0, and dropped the All four failing checks were the same three 14.0.1 rather than 14.0.0 because it carries Doist/todoist-sdk-typescript#664 — |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
`td filter view` printed tasks in whatever order the API returned. Todoist doesn't sort server-side: every client applies the sorting saved on the view, and falls back to a documented default hierarchy when the view has none, which is what "Manual (default)" means in the app. The CLI read neither piece, so a saved filter listed in an order no other Todoist client shows. Reads the saved options with `api.getViewOptions()` and orders the results with `sortTasks`, both from the SDK. What lives here is the part the SDK asks the caller to supply: the vocabulary `--sort` speaks, the mapping from a saved view to that vocabulary, the sidebar layout it wants as a lookup, and the guess at whether a filter query is date-driven, which picks between the priority-first and date-first hierarchies. Adds `--sort default|priority|date|deadline|date-added|name|project|assignee| workspace|none` and `--sort-order asc|desc`, resolved flag first, then saved view, then Todoist default. `--sort none` returns the raw API order. Each section of a comma-separated filter sorts on its own, and `--json` / `--ndjson` come back in the same order as the pretty output. BLOCKED: needs the SDK release carrying Doist/todoist-sdk-typescript#665 and #666, plus the v14 bump in #477. `package.json` still pins 13.0.2, so this branch does not build until both land and the pin moves. Closes #473 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings `td comment add` to parity with the MCP, which shipped this in Doist/todoist-mcp#580 for Doist/todoist-mcp#509. **Stacked on #477** — based on that branch for SDK 14.0.1, which carries the `uidsToNotify` serialisation fix. Retarget to `main` once #477 merges. ## The problem Comments posted with `td` notify nobody. `comment add` never sent `uidsToNotify`, so a teammate named in a comment found out only if they happened to open the task. That also breaks the *next* comment, which is the part people notice and can't reproduce. Todoist's clients pick the recipients themselves and send them with each comment; the API notifies exactly who it is handed and derives nobody on its own. On a first comment the clients notify the assignee, the assigner and the creator; on a reply they notify the previous comment's participants, so threads keep flowing without everyone being re-tagged. A comment posted with an empty list therefore silences the comment that follows it — including one a human later writes in the app. ## What this does `comment add` gains `--notify`, accepting names, emails, `id:xxx` or `"me"`, comma-separated in the same style as `--labels`. `--no-notify` posts in silence, matching the existing `--no-labels` negation. Omitting `--notify` mirrors the clients: assignee, assigner and creator on a task's first comment, or the previous comment's participants on a reply, always excluding the author. The rules live in `src/lib/comment-recipients.ts`, ported from the MCP's equivalent. Two things worth calling out in review: - **Naming yourself is honoured**, not filtered out. Self-exclusion is only right when the recipients were *inferred* rather than asked for. I had this filtering unconditionally at first and caught it in live testing — `--notify me` silently did nothing. - **The thread walk keeps only the newest comment** rather than using `paginate()`, which accumulates every result. Comments come back oldest-first with no reverse option, so reaching the last page is unavoidable; holding the whole history is not. Review flagged exactly this on the MCP version. `resolveNotifyIds` is pure over an already-fetched collaborator list, so the `--notify` path fetches collaborators once and reuses them to render the names back — my own tests caught a double fetch here. `@mentions` in the comment text are deliberately **not** parsed; the user names people with `--notify`. `SKILL_CONTENT` documents this so agents don't assume the text alone notifies. Notification on *edit* is out of scope — `UpdateCommentArgs` is `{ content }` only. ## Surfacing Who was notified is now visible in three places: the confirmation line after adding, a `Notified:` line in `comment view` (resolved only when there are recipients, so the common case costs no extra request), and `postedUid` / `uidsToNotify` in plain `--json` rather than only under `--full`. ## Verification `npm run type-check`, `npm run check`, `npm run build`, `npm run check:skill-sync` and all 1815 tests pass (suite run three times to rule out flakiness). Live against the real API on a throwaway task in a shared project, since deleted: | case | result | | --- | --- | | `--dry-run` with `--notify` | previews the raw string unresolved, no API call | | defaults, first comment on a solo task | no recipients | | `--notify "Ada Lovelace"` | `Notified: Ada L.` | | `--notify "me,ada@example.com"` | deduped to one | | `--notify Ghost,Phantom` | one `ASSIGNEE_NOT_FOUND` naming both | | reply, defaults | previous comment's participants, author excluded | | `--no-notify` | silent, no recipient field sent | | `comment view` / `--json` | recipients shown | The paths involving a **second person** — a reply inheriting someone else's participants, and a first comment on a task assigned to someone else — are covered by unit tests rather than live calls, since verifying them for real means sending test notifications to an actual colleague. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
`td filter view` printed tasks in whatever order the API returned. Todoist doesn't sort server-side: every client applies the sorting saved on the view, and falls back to a documented default hierarchy when the view has none, which is what "Manual (default)" means in the app. The CLI read neither piece, so a saved filter listed in an order no other Todoist client shows. Reads the saved options with `api.getViewOptions()` and orders the results with `sortTasks`, both from the SDK. What lives here is the part the SDK asks the caller to supply: the vocabulary `--sort` speaks, the mapping from a saved view to that vocabulary, the sidebar layout it wants as a lookup, and the guess at whether a filter query is date-driven, which picks between the priority-first and date-first hierarchies. Adds `--sort default|priority|date|deadline|date-added|name|project|assignee| workspace|none` and `--sort-order asc|desc`, resolved flag first, then saved view, then Todoist default. `--sort none` returns the raw API order. Each section of a comma-separated filter sorts on its own, and `--json` / `--ndjson` come back in the same order as the pretty output. BLOCKED: needs the SDK release carrying Doist/todoist-sdk-typescript#665 and #666, plus the v14 bump in #477. `package.json` still pins 13.0.2, so this branch does not build until both land and the pin moves. Closes #473 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This PR contains the following updates:
13.0.2→14.0.0Release Notes
Doist/todoist-sdk-typescript (@doist/todoist-sdk)
v14.0.0Compare Source
⚠ BREAKING CHANGES
Bug Fixes
Configuration
📅 Schedule: (UTC)
* * * * 1-5)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.