Changelog
Updated
2 min read

Arcjet changelog 2024-06

Arcjet changelog of product updates for May & June 2024.

Arcjet changelog 2024-06

Arcjet helps developers protect their apps in just a few lines of code. Implement rate limiting, bot protection, email verification, & defense against common attacks.

This is the changelog of product updates for May & June 2024.

JS SDK

We released 5 new JS SDK versions in May & June: v1.0.0-alpha.13, v1.0.0-alpha.14, v1.0.0-alpha.15, v1.0.0-alpha.16, v1.0.0-alpha.17.

New runtime & framework support

The headline for these releases was support for new runtimes and frameworks so in addition to Next.js, Node.js, and Express.js, we now have official adapters for Bun & SvelteKit, plus support for Hono & NestJS.

Custom logger

Arcjet now allows you to specify a custom logger so you can get pretty logs in development and JSON (or other formats) in prod. We follow the Pino logger style so you can use it as a logging adapter.

See the SDK reference for Next.js, Node.js, and SvelteKit for more details.

import arcjet, { shield } from "@arcjet/node";
import pino, { type Logger } from "pino";

const logger: Logger =
  process.env.NODE_ENV === "production"
    ? // JSON in production, default to warn
      pino({ level: process.env.ARCJET_LOG_LEVEL || "warn" })
    : // Pretty print in development, default to debug
      pino({
        transport: {
          target: "pino-pretty",
          options: {
            colorize: true,
          },
        },
        level: process.env.ARCJET_LOG_LEVEL || "debug",
      });

const aj = arcjet({
  key: process.env.ARCJET_KEY,
  rules: [
    // Protect against common attacks with Arcjet Shield
    shield({
      mode: "LIVE", // will block requests. Use "DRY_RUN" to log only
    }),
  ],
  // Use the custom logger
  log: logger,
});

Arcjet custom logger using Pino to pretty print in development and log to JSON in prod.

Removed Node specific imports

We have now removed all Node-specific imports which allows us to support more runtimes (and was the foundation for the Bun support, for example).

Other SDK changes

We have been releasing new SDK versions regularly to resolve small bugs and feedback reported to us. We're rapidly approaching switching the JS SDK version from alpha to beta, where we will be aiming to stabilize the API and avoid breaking changes.

If you have any feedback then please open a GitHub issue or chat to us on Discord.

Vercel integration

Arcjet is now available on the Vercel marketplace and from within the team settings in the Arcjet dashboard. This allows you to link your Vercel projects to Arcjet.

The integration automatically sets the ARCJET_KEY environment variable on your Vercel project. This is the first step in using more of the Vercel infrastructure to enhance your experience of Arcjet - more to come here in the future!

Screenshot of the Arcjet Vercel integration.

Related articles

Subscribe by email

Get the full posts by email every week.