Skip to content

feat: rolldown#1933

Merged
TorstenDittmann merged 48 commits intomainfrom
test-rolldown
Oct 27, 2025
Merged

feat: rolldown#1933
TorstenDittmann merged 48 commits intomainfrom
test-rolldown

Conversation

@TorstenDittmann
Copy link
Contributor

@TorstenDittmann TorstenDittmann commented Apr 22, 2025

  • use rolldown
image

Summary by CodeRabbit

  • New Features
    • Added a context-aware list component for policy and changelog pages.
  • Bug Fixes
    • Fixed hero selector typo; removed an obsolete redirect entry.
  • Refactor
    • Image optimizer caching enabled and experimental native plugin enabled.
  • Chores
    • Moved developer tooling and CI to Bun; container runtime updated; large dependency upgrades; removed bundled contributor data and related generation script.
  • Tests
    • Minor test description tweak; test retries increased.
  • Documentation
    • README and CONTRIBUTING updated for Bun-based setup.

Switch from `@dittmann/adapter-node-rolldown` to `@dittmann/adapter-node` in package dependencies.
This commit performs a comprehensive update of project dependencies to their latest compatible versions, including:

- **Core dependencies**: @number-flow/svelte (0.3.3 → 0.3.7), h3 (1.14.0 → 1.15.3), posthog-js (1.210.2 → 1.248.1)
- **Development tools**: ESLint (9.21.0 → 9.27.0), TypeScript ESLint (8.21.0 → 8.33.0), Playwright (1.50.0 → 1.52.0)
- **Build system**: SvelteKit (2.20.2 → 2.21.1), Tailwind CSS (4.1.2 → 4.1.8), Vitest (3.1.1 → 3.1.4)
- **Runtime**: Svelte (5.25.6 → 5.33.10), Sass (1.83.4 → 1.89.0), PostCSS (8.5.1 → 8.5.4)
- **UI libraries**: bits-ui (1.3.19 → 1.8.0), embla-carousel (8.5.2 → 8.6.0), motion (12.7.3 → 12.15.0)

All updates maintain backward compatibility and include security patches and performance improvements.
Updates GitHub Actions workflows and Dockerfile to use Node.js 22.
Standardizes Node.js version format across configuration files.
Adds .nvmrc for project-level Node version management.
Remove $appwrite alias from svelte config and update import paths
in specs.ts to use relative node_modules paths. Fix CSS selector
typo `:frist-child` to `:first-child`. Update vite config with
withFilter wrapper and experimental native plugin flag.
@TorstenDittmann TorstenDittmann force-pushed the main branch 2 times, most recently from b19f981 to 6e3c6b4 Compare July 7, 2025 15:03
@TorstenDittmann TorstenDittmann force-pushed the test-rolldown branch 3 times, most recently from e559e9c to 9362c9c Compare July 7, 2025 15:18
@TorstenDittmann TorstenDittmann changed the title test: rolldown feat: rolldown Aug 13, 2025
coderabbitai[bot]

This comment was marked as resolved.

@appwrite appwrite deleted a comment from coolify-appwrite-org bot Aug 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
README.md (1)

18-26: Update README to fully reflect Bun as the package manager.

The setup section still mentions pnpm install and links to pnpm.io, but the dev command uses Bun. This creates ambiguity for new contributors. Since the PR fully migrates to Bun, update the documentation to be consistent.

-_If this is your first time setting up the repository, please run `pnpm install` inside the repo's directory and create a `.env` file based on `.env.example`._
+_If this is your first time setting up the repository, please run `bun install` inside the repo's directory and create a `.env` file based on `.env.example`._

 To get the repo up and running in your local environment, use the following command:

 ```bash
 bun run dev

-> If you don't have bun available on your system, you can install it from the official Bun website.

-> If you don't have pnpm available on your system, you can install it from the official pnpm Installation website


</blockquote></details>
<details>
<summary>CONTRIBUTING.md (1)</summary><blockquote>

`29-35`: **Update CONTRIBUTING.md to consistently use Bun for setup instructions.**

The setup section references pnpm, but the following dev/build commands use Bun. Update for consistency with the full Bun migration.



```diff
 ## Development

-The Appwrite website uses [PNPM](https://pnpm.io). Start by following their [installation](https://pnpm.io/installation) documentation.
+The Appwrite website uses [Bun](https://bun.sh). Start by following their [installation](https://bun.sh/docs/installation) documentation.

 Once you've cloned the Appwrite website repo, running the following command to install dependencies:

 ```sh
-pnpm i
+bun install

</blockquote></details>

</blockquote></details>
♻️ Duplicate comments (1)
package.json (1)

114-117: Pin rolldown-vite version in overrides; avoid "@latest" for experimental packages.

Using "@latest" for rolldown-vite (which is experimental) risks unexpected breaking changes and non-reproducible builds. The devDependency pins vite to ^7.1.19, but the override forces "latest", creating a mismatch.

Update to use a specific version constraint that aligns with the devDependency:

     "overrides": {
         "@sveltejs/adapter-node": "npm:@dittmann/adapter-node@latest",
-        "vite": "npm:rolldown-vite@latest"
+        "vite": "npm:rolldown-vite@^7.1.19"
     }

Also consider pinning @dittmann/adapter-node if this is a critical dependency.

🧹 Nitpick comments (1)
Dockerfile (1)

54-55: Remove obsolete PNPM environment variables.

These lines are remnants from the previous pnpm-based setup and no longer serve any purpose with Bun as the package manager.

-ENV PNPM_HOME="/pnpm"
-ENV PATH="$PNPM_HOME:$PATH"
-
 WORKDIR /app
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e83385d and 182a716.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • .github/workflows/tests.yml (3 hunks)
  • .gitpod.yml (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • Dockerfile (2 hunks)
  • README.md (1 hunks)
  • package.json (1 hunks)
  • src/lib/utils/specs.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/utils/specs.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
.github/workflows/tests.yml (1)

14-20: LGTM! Bun setup is clean and consistent.

Replaced pnpm with Bun across all jobs; pinned Bun version (1.3.0) for reproducibility. Commands align with the overall Bun migration.

.gitpod.yml (1)

8-9: LGTM! Gitpod configuration correctly updated to Bun.

Init and dev command align with the Bun migration across the repository.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
package.json (1)

107-107: Version mismatch: devDependency specifies ^7.1.19 but override uses "latest".

The vite devDependency is pinned to ^7.1.19, but the overrides section forces npm:rolldown-vite@latest. This creates non-reproducible builds and potential plugin compatibility issues when the override resolves to a different version than the devDependency.

Apply this diff to ensure consistent versioning:

     "overrides": {
         "@sveltejs/adapter-node": "npm:@dittmann/adapter-node@latest",
-        "vite": "npm:rolldown-vite@latest"
+        "vite": "npm:rolldown-vite@^7.1.19"
     }

Also applies to: 114-117

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 182a716 and a5c2f89.

📒 Files selected for processing (8)
  • .dockerignore (1 hunks)
  • .gitignore (0 hunks)
  • .prettierignore (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • Dockerfile (2 hunks)
  • README.md (1 hunks)
  • package.json (2 hunks)
  • playwright.config.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • CONTRIBUTING.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: tests
  • GitHub Check: build
🔇 Additional comments (8)
.dockerignore (1)

5-5: LGTM!

Adding Dockerfile to .dockerignore is a standard best practice to prevent the Dockerfile from being copied into the Docker build context.

.prettierignore (1)

12-12: LGTM!

Correctly updates the ignore list to include bun.lock instead of pnpm/npm/yarn lock files, aligning with the Bun migration.

playwright.config.ts (1)

5-5: LGTM!

The web server command has been correctly updated to use Bun, consistent with the repository-wide tooling migration.

README.md (1)

18-24: LGTM!

The development setup instructions have been correctly updated to use Bun commands instead of pnpm.

Dockerfile (3)

1-1: LGTM!

The base image has been correctly updated to use the official Bun image, aligning with the tooling migration.


56-62: LGTM!

The build stage has been correctly updated to use Bun for dependency installation and building. The use of --frozen-lockfile ensures reproducible builds.


75-77: LGTM!

The final stage correctly uses Bun for production dependency installation and execution. The --prod flag appropriately excludes devDependencies from the production image.

package.json (1)

10-10: LGTM!

The clean script has been correctly updated to use Bun instead of pnpm.

Update documentation and configuration files to reflect the migration
from pnpm to Bun as the primary package manager. Also remove unused
styles and fix relative paths for example files.
Remove self-referential /docs/ redirect and move dataset links from
headings to inline text for better markdown formatting.
Add `bunx playwright install --with-deps` step to GitHub Actions
workflow and simplify playwright.config.ts to use defineConfig. Remove
unused PLAYWRIGHT_TESTS environment variable.
Limit browser testing to Chromium only to reduce CI runtime and
dependencies.
@sveltejs/vite-plugin-svelte to 6.2.1
Updated multiple packages to latest versions including sharp (0.33.5 →
0.34.4), eslint (9.38.0 → 9.36.0), eslint-plugin-svelte (2.46.1 →
3.12.4), and other dev dependencies. Migrated ESLint config to use
defineConfig and removed deprecated rule overrides.
Relocate `specs.ts` from `src/lib/utils/` to
`src/routes/docs/references/[version]/[platform]/[service]/` to
co-locate it with the service route that depends on it. Update import
paths accordingly.
Add specs.ts to parse OpenAPI schemas and generate SDK method
documentation. Includes utilities for handling Appwrite-specific
extensions, parameter extraction, and example code retrieval across
multiple SDK platforms and API versions.

Also ignore generated sitemaps in server directory.
Remove `eager: true` from glob imports and update call sites to invoke
the imported modules as functions.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/routes/docs/references/[version]/[platform]/[service]/specs.ts (1)

558-573: Fix type annotation to support property assignment.

The function signature improvement from any to object is good for type safety, but line 564's const transformed: object = {} will cause TypeScript errors when assigning properties at line 567 (transformed[newKey] = ...).

The object type in TypeScript represents non-primitive values but doesn't support index signatures.

Apply this diff to fix the type annotation:

-function transformForGraphQL(obj: object): object {
+function transformForGraphQL(obj: object): Record<string, unknown> {
     if (Array.isArray(obj)) {
         return obj.map(transformForGraphQL);
     }
 
     if (obj !== null && typeof obj === 'object') {
-        const transformed: object = {};
+        const transformed: Record<string, unknown> = {};
         for (const [key, value] of Object.entries(obj)) {
             const newKey = key.replace('$', '_');
             transformed[newKey] = transformForGraphQL(value);
         }
         return transformed;
     }
 
     return obj;
 }

Alternatively, use any for the return type if you need more flexibility:

-function transformForGraphQL(obj: object): object {
+function transformForGraphQL(obj: object): any {
🧹 Nitpick comments (1)
src/routes/docs/references/[version]/[platform]/[service]/specs.ts (1)

369-372: Consider the bundle size impact of eager loading all specs.

The change from dynamic imports to eager loading (eager: true) means all OpenAPI spec files will be included in the JavaScript bundle at build time. While this eliminates async loading overhead, it may significantly increase the bundle size since multiple version/platform spec combinations are being loaded.

Consider profiling the bundle size before and after this change. If the increase is significant, you might want to:

  1. Keep lazy loading for less frequently accessed specs
  2. Use code splitting to separate specs by version/platform
  3. Evaluate if exhaustive: true is necessary for your use case

To check the current bundle size impact:

#!/bin/bash
# Check OpenAPI spec file sizes

echo "=== Checking size of spec files ==="
if [ -d node_modules/@appwrite.io/repo/app/config/specs ]; then
    fd --type f 'open-api3.*\.json$' node_modules/@appwrite.io/repo/app/config/specs/ --exec ls -lh {} \; | awk '{print $5, $9}'
    
    echo -e "\n=== Total size of all specs ==="
    fd --type f 'open-api3.*\.json$' node_modules/@appwrite.io/repo/app/config/specs/ --exec cat {} \; | wc -c | awk '{print $1/1024/1024 " MB"}'
else
    echo "Specs directory not found"
fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42bafd9 and 9380b89.

📒 Files selected for processing (4)
  • server/.gitignore (1 hunks)
  • src/routes/docs/references/[version]/[platform]/[service]/+page.server.ts (1 hunks)
  • src/routes/docs/references/[version]/[platform]/[service]/specs.ts (5 hunks)
  • src/routes/docs/references/[version]/models/[model]/+page.server.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • server/.gitignore
🔇 Additional comments (7)
src/routes/docs/references/[version]/[platform]/[service]/specs.ts (5)

3-3: LGTM: Import update looks correct.

The type import addition for ServiceValue improves type safety.


374-382: LGTM: Correctly accesses preloaded specs map.

The change from dynamic import to direct map access is consistent with the eager loading strategy introduced at lines 369-372. The implementation correctly returns the appropriate spec based on version and platform.


384-388: LGTM: Descriptions eager loading is appropriate.

The use of relative paths (./descriptions/*.md) and eager loading for service descriptions is sensible since:

  • Descriptions are co-located with the specs logic
  • They're small text files unlikely to significantly impact bundle size
  • Eager loading provides immediate access without async overhead

390-398: LGTM: Description access correctly updated.

The function correctly:

  • Uses relative path resolution for the target
  • Accesses the preloaded descriptions map directly
  • Maintains proper error handling for missing descriptions

94-147: All verification checks passed. No issues found.

The @appwrite.io/repo package is correctly specified in dependencies as a GitHub reference, the example directories exist for all versions (0.15.x through 1.8.x) in the appwrite repository, and the import paths will resolve correctly at build time.

src/routes/docs/references/[version]/[platform]/[service]/+page.server.ts (1)

2-2: LGTM: Co-location improves modularity.

The change from a library utility import to a relative import makes sense now that specs.ts is co-located with this route file. This improves code organization and makes the dependency relationship clearer.

src/routes/docs/references/[version]/models/[model]/+page.server.ts (1)

8-8: LGTM: Relative import path is correct.

The import path ../../[platform]/[service]/specs.ts correctly navigates from /models/[model]/ to /[platform]/[service]/ directory, maintaining access to all required exports (getApi, getSchema, getExample, Property, ModelType).

Casting through `unknown` is safer and more explicit when the
intermediate type is uncertain.
@TorstenDittmann TorstenDittmann merged commit b8b40df into main Oct 27, 2025
4 checks passed
@TorstenDittmann TorstenDittmann deleted the test-rolldown branch October 27, 2025 12:47
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.

3 participants