-
Notifications
You must be signed in to change notification settings - Fork 4
Bump appwrite sdk version #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request updates the appwrite dependency version in package.json from ^17.0.0 to ^21.2.1. This is a single-line change representing a major version upgrade across multiple minor versions. No other modifications are present in the diff. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes This change involves a straightforward version string replacement in a single file with no code logic modifications, structural changes, or heterogeneous edits. Review requires only verification that the version format is correct and the specified version is intentional. Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(1 hunks)
| "@angular/router": "^19.1.0", | ||
| "@tailwindcss/postcss": "^4.0.15", | ||
| "appwrite": "^17.0.0", | ||
| "appwrite": "^21.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify compatibility with Appwrite v21.2.1—this is a major version upgrade with potential breaking changes.
This change bumps Appwrite from v17.0.0 across 4 major versions (17→21), which likely introduces breaking changes in APIs, types, and configuration. The PR description lacks a test plan and doesn't document:
- What breaking changes exist in Appwrite v18, v19, v20, and v21
- Whether the codebase's Appwrite SDK usage is compatible with the new version
- What testing was performed to verify the upgrade
- Any code modifications needed to support the new APIs
Please verify the upgrade by:
- Reviewing the Appwrite SDK breaking changes documentation for versions 18–21
- Running the application and confirming it works end-to-end
- Checking for any TypeScript type errors related to Appwrite imports
- Updating the PR description with a test plan and a summary of any code changes required
I can help you search for Appwrite SDK usage in the codebase to identify what might need updating:
🏁 Script executed:
#!/bin/bash
# Description: Find all Appwrite imports and usages in the codebase
# to identify code that may need updating for v21.2.1 compatibility
# Find all imports of appwrite
rg -n "from\s+['\"]appwrite" --type=ts --type=js
# Find all require statements for appwrite
rg -n "require\(['\"]appwrite" --type=ts --type=js
# Find Client, Account, Databases, and other Appwrite class instantiations
rg -nP "new\s+(Client|Account|Databases|Users|Teams|Functions|Storage|Messaging)" --type=ts --type=jsLength of output: 120
I found Appwrite usage in the codebase. Let me examine the Client initialization and then search for breaking changes between these major versions.
🏁 Script executed:
#!/bin/bash
# Retrieve the full app.component.ts file to see Client initialization and usage
cat src/app/app.component.tsLength of output: 2466
🌐 Web query:
Appwrite SDK breaking changes v17 to v21 migration guide
💡 Result:
Do you mean the Appwrite SDK for a specific language (JavaScript, Dart/Flutter, PHP, Node, Java, Python, etc.), or the Appwrite server release versions? Which exact versions are you upgrading from/to (e.g., SDK v17 → v21, or Server 0.17 → 0.21)? I’ll fetch the precise breaking changes and a migration checklist once you confirm.
I need a more specific search for the JavaScript/TypeScript SDK. Let me refine that:
Also searching for the current API documentation:
🌐 Web query:
Appwrite JavaScript TypeScript SDK v21 breaking changes from v17
💡 Result:
Do you mean the Appwrite JavaScript/TypeScript Web SDK (sdk-for-web) and Node SDKs — and do you want a full list of breaking changes when upgrading from v17 → v21, or just the key API/migration highlights? (Also which runtime(s): browser/web, Node, or both?)
🌐 Web query:
Appwrite JavaScript Client API v21 setProject setEndpoint ping
💡 Result:
Use Client.setEndpoint() and Client.setProject() to configure the SDK, then use the Health service to call the server health endpoints (there is no single client.ping(); use Health methods such as getTime(), getDB(), getAntivirus(), etc.).
Example (Node / Web):
const sdk = require('node-appwrite'); // or import { Client, Health } from 'appwrite'
const client = new sdk.Client()
.setEndpoint('https://YOUR_HOST_OR_DOMAIN/v1') // include /v1
.setProject('YOUR_PROJECT_ID');
const health = new sdk.Health(client);
// example calls
const time = await health.getTime(); // GET /health/time
const db = await health.getDB(); // GET /health/db
const av = await health.getAntivirus(); // GET /health/anti-virus
References:
- Client initialization (setEndpoint / setProject) and examples. [1]
- Health service API (getTime, getDB, getAntivirus, queue checks, etc.). [2]
Sources:
[1] Appwrite SDK examples — Client init.
[2] Appwrite Health API reference (Health service methods).
Critical: Appwrite v21 removes client.ping() — code will break at runtime without migration.
The codebase calls client.ping() in the sendPing() method, but Appwrite v21 no longer has a client.ping() method; instead, use the Health service with methods such as getTime(), getDB(), getAntivirus().
Required changes in src/app/app.component.ts:
- Import the Health service:
import { Client, Health } from 'appwrite'; - Create a Health instance in the constructor:
this.health = new Health(this.client); - Replace
this.client.ping()withthis.health.getTime()(or another appropriate Health method) in thesendPing()method
This is a mandatory breaking change that must be fixed before or alongside the version bump.
🤖 Prompt for AI Agents
In package.json around line 22 (appwrite version bump) update
src/app/app.component.ts to remove the now-removed client.ping() usage: import
Client and Health from 'appwrite' (e.g., import { Client, Health } from
'appwrite'), instantiate a Health service on the existing client in the
constructor (this.health = new Health(this.client)), and replace any calls to
this.client.ping() inside sendPing() with a Health method such as
this.health.getTime() (and adapt await/then handling and error handling to the
returned promise/response shape).
What does this PR do?
bump appwrite sdk version
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit