Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
bun-version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile
17 changes: 9 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
bun-version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
run: bunx playwright install --with-deps chromium

- name: E2E Tests
run: pnpm run e2e
run: bun test:e2e
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
bun-version: latest

- name: Audit dependencies
run: pnpm audit --audit-level high
run: bun audit --audit-level high

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Svelte Diagnostics
run: pnpm run check
run: bun check

- name: Linter
run: pnpm run lint
run: bun lint

- name: Unit Tests
run: pnpm run test
run: bun test:unit

- name: Build Console
run: pnpm run build
run: bun run build
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: npm install && npm run build
command: npm run dev
- init: bun install && bun run build
command: bun run dev
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ignore files for PNPM, NPM and YARN
# Ignore files for PNPM, NPM, BUN and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ If you are worried about or don't know where to start, check out the next sectio
git clone https://github.com/appwrite/console.git appwrite-console
```

### 2. Install dependencies with npm
### 2. Install dependencies with Bun

Navigate to the Appwrite Console repository and install dependencies.

```bash
cd appwrite-console && pnpm install
cd appwrite-console && bun install
```

### 3. Install and run Appwrite locally

When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally.

Follow the [install instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs.
Follow the [installation instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs.

### 4. Setup environment variables

Expand All @@ -68,7 +68,7 @@ Add a `.env` file by copying the `.env.example` file as a template in the projec
Finally, start a development server:

```bash
pnpm dev
bun dev
```

> **Note**
Expand All @@ -77,15 +77,15 @@ pnpm dev
### Build

```bash
pnpm build
bun run build
```

> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
> You can preview the built app with `bun run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.

### Tests

```bash
pnpm test
bun tests
```

This will run tests in the `tests/` directory.
Expand All @@ -95,13 +95,13 @@ This will run tests in the `tests/` directory.
Code should be consistently formatted everywhere. Before committing code, run the code-formatter.

```bash
pnpm run format
bun format
```

### Linter

```bash
pnpm run lint
bun run lint
```

### Diagnostics
Expand All @@ -113,7 +113,7 @@ Diagnostic tool that checks for the following:
- TypeScript compiler errors

```bash
pnpm run check
bun check
```

## Submit a Pull Request 🚀
Expand Down Expand Up @@ -176,11 +176,11 @@ $ git push origin [name_of_your_new_branch]
Before committing always make sure to run all available tools to improve the codebase:

- Formatter
- `pnpm run format`
- `bun format`
- Tests
- `pnpm test`
- `bun tests`
- Diagnostics
- `pnpm run check`
- `bun check`

### Performance

Expand Down
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
FROM --platform=$BUILDPLATFORM node:20-alpine AS build
FROM --platform=$BUILDPLATFORM oven/bun:alpine AS build

WORKDIR /app

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm i -g corepack@latest
RUN corepack enable
RUN corepack prepare [email protected] --activate

ADD ./package.json /app/package.json
ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
ADD ./bun.lock /app/bun.lock

RUN pnpm install --frozen-lockfile
RUN bun install --frozen-lockfile

ADD ./build.js /app/build.js
ADD ./tsconfig.json /app/tsconfig.json
Expand Down Expand Up @@ -43,7 +37,7 @@ ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ENV SENTRY_RELEASE=$SENTRY_RELEASE
ENV NODE_OPTIONS=--max_old_space_size=8192

RUN pnpm run build
RUN bun run build

FROM joseluisq/static-web-server:2

Expand Down
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import kleur from 'kleur';
import { fileURLToPath } from 'url';
import { build, loadEnv } from 'vite';
import kleur from 'kleur';

const { bold, yellow } = kleur;
const __dirname = fileURLToPath(new URL('.', import.meta.url));
Expand Down
Loading