Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM mcr.microsoft.com/devcontainers/base:bookworm

ARG MISE_VERSION=2026.5.12

# Download mise binary from GitHub release and verify checksum
RUN set -eux; \
case "$(uname -m)" in \
x86_64) FILE="mise-v${MISE_VERSION}-linux-x64"; SHA256="a238972a3162d710b85b28c324372e96ca4e4b486c81fe78695000d9fbc77c48" ;; \
aarch64) FILE="mise-v${MISE_VERSION}-linux-arm64"; SHA256="fd2d5227a8ad0b1e359c70527a8345a9ada72077f8dcbb559371653c3d95464f" ;; \
*) echo "Unsupported arch: $(uname -m)" && exit 1 ;; \
esac; \
wget -O /usr/local/bin/mise \
"https://github.com/jdx/mise/releases/download/v${MISE_VERSION}/${FILE}"; \
echo "${SHA256} /usr/local/bin/mise" | sha256sum -c; \
chmod +x /usr/local/bin/mise

# Store tools in a shared location accessible to all users, and put shims on PATH
# so installed tools work in non-interactive shells (CI, devcontainer postCreateCommand, etc.)
ENV MISE_DATA_DIR=/usr/local/share/mise \
MISE_TRUSTED_CONFIG_PATHS=/workspaces \
PATH=/usr/local/share/mise/shims:$PATH

# Pre-install all runtimes pinned in the lockfile (build context is repo root).
# The config is installed to /etc/mise/ as a system-wide default so shims work
# in any shell, even outside the workspace directory.
COPY mise.toml mise.lock /etc/mise/
RUN chmod a+r /etc/mise/mise.toml /etc/mise/mise.lock \
&& mise trust /etc/mise/mise.toml \
&& cd /etc/mise && mise install

Comment thread
qw-in marked this conversation as resolved.
# Activate mise for interactive shells
RUN echo 'eval "$(mise activate bash)"' >> /home/vscode/.bashrc
Comment thread
qw-in marked this conversation as resolved.
6 changes: 0 additions & 6 deletions .devcontainer/deno-2/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions .devcontainer/deno-2/devcontainer.json

This file was deleted.

31 changes: 8 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "node-24 (recommended)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:24",
// Use 'runArgs' to specify additional docker run arguments.
"runArgs": ["--name", "arcjet-examples-node-24"],

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash -i -c 'nvm install 24 --latest-npm'",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"astro-build.astro-vscode",
"denoland.vscode-deno",
"svelte.svelte-vscode",
"tamasfe.even-better-toml",
"Vue.volar"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
},
"name": "arcjet-examples",
"runArgs": ["--name", "arcjet-examples"]
}
31 changes: 0 additions & 31 deletions .devcontainer/node-20/devcontainer.json

This file was deleted.

31 changes: 0 additions & 31 deletions .devcontainer/node-22/devcontainer.json

This file was deleted.

11 changes: 0 additions & 11 deletions .devcontainer/python-3/devcontainer.json

This file was deleted.

9 changes: 0 additions & 9 deletions .trunk/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions .trunk/configs/.markdownlint.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .trunk/configs/.yamllint.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .trunk/configs/svgo.config.mjs

This file was deleted.

65 changes: 0 additions & 65 deletions .trunk/trunk.yaml

This file was deleted.

26 changes: 7 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,14 @@ When using [OrbStack](https://orbstack.dev/), each example will be reachable at:

## Static analysis (formatting & linting)

We use [Trunk](https://docs.trunk.io/) to manage formatting and linting.

If you’re **not** using the devcontainer, first [install Trunk locally](https://docs.trunk.io/references/cli/install).

Once installed:
Run Biome and Prettier directly from the example directory:

```sh
# Format all changed files
trunk fmt
# Lint (Biome)
npx biome lint .

# Lint all changed files
trunk check
# Format (Prettier)
npx prettier --write .
```

> [!TIP]
Expand Down Expand Up @@ -198,7 +194,7 @@ We use [`npm-check-updates`](https://www.npmjs.com/package/npm-check-updates#coo

### Deno

Deno dependencies are currently managed manually. Open the `deno-2` devcontainer and run:
Deno dependencies are currently managed manually. Run:

```sh
cd examples/deno
Expand All @@ -207,9 +203,7 @@ deno update --interactive --latest

### uv (Python)

Python dependencies are currently managed extra manually. From the `python-3` devcontainer:


Python dependencies are currently managed extra manually. Run:

```sh
# Run from an example folder, e.g. examples/fastapi
Expand Down Expand Up @@ -240,9 +234,3 @@ _Typically if this passes without error, everything is working relatively well._
```sh
docker compose build --no-cache
```

VSCode switch devcontainer:

```txt
[COMMAND]+[P] > Dev Containers: Switch Container
```
Loading
Loading