Invite-Only Early Access — Think Throo GitHub App is currently invite-only. Request access here.
2025June

`jsr.json` file in Zod codebase.

In this article, we will review jsr.json file in zod codebase. We will look at:

  1. What is JSR?

  2. Why JSR?

  3. jsr.json file in Zod codebase.

What is JSR?

jsr is the open source package registry for modern JavaScript and TypeScript.

Why JSR?

  1. Made for TypeScript & ESM

  2. Builds on npm

  3. Works with any runtime

Check out js.io for more information.

jsr.json file in Zod codebase

jsr packages need to contain a configuration file that specifies the name, version and exports of a package. This file should be name jsr.json or jsr.jsonc.

{
  "name": "@zod/zod",
  "version": "4.0.0-alpha.0",
  "exports": {
    ".": "./src/index.ts",
    "./package.json": "./package.json"
  },
  "publish": {
    "include": ["src", "LICENSE", "package.json", "README.md"],
    "exclude": ["tests", "dist"]
  }
}

This above code snippet is picked from zod/jsr.json file

learn more about jsr.json file in the documentation.

About me:

Hey, my name is Ramu Narasinga. Email: ramu.narasinga@gmail.com

Tired of AI-generated code that works but nobody understands?

I spent 3+ years studying OSS codebases and wrote 350+ articles on what makes them production-grade. I built an open source tool that reviews your PR against your existing codebase patterns.

Your codebase. Your patterns. Enforced.

Get started for free —thinkthroo.com

References

  1. https://jsr.io/docs/package-configuration

  2. https://github.com/colinhacks/zod/blob/main/packages/zod/jsr.json