`jsr.json` file in Zod codebase.

Ramu NarasingaRamu Narasinga
1 min read

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. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

Build Shadcn CLI from scratch.

Email — ramu@thinkthroo.com

My Github — https://github.com/ramu-narasinga

My website — https://ramunarasinga.com

My YouTube channel — https://www.youtube.com/@ramu-narasinga

Learning platform — https://thinkthroo.com

Codebase Architecture — https://app.thinkthroo.com/architecture

Best practices — https://app.thinkthroo.com/best-practices

Production-grade projects — https://app.thinkthroo.com/production-grade-projects

References

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

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

0
Subscribe to my newsletter

Read articles from Ramu Narasinga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ramu Narasinga
Ramu Narasinga

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.