DEV Community

Ramu Narasinga
Ramu Narasinga

Posted on • Edited on • Originally published at thinkthroo.com

`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"]
  }
}
Enter fullscreen mode Exit fullscreen mode

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 — [email protected]

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

Top comments (0)