Skip to content

Commit

Permalink
Update website (#3566)
Browse files Browse the repository at this point in the history
* Add clerk announcement

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Add blog

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* Tweaks
  • Loading branch information
colinhacks authored Jun 12, 2024
1 parent e83c7dd commit dd26625
Show file tree
Hide file tree
Showing 8 changed files with 7,016 additions and 223 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<a href="https://opensource.org/licenses/MIT" rel="nofollow"><img src="https://img.shields.io/github/license/colinhacks/zod" alt="License"></a>
<a href="https://www.npmjs.com/package/zod" rel="nofollow"><img src="https://img.shields.io/npm/dw/zod.svg" alt="npm"></a>
<a href="https://www.npmjs.com/package/zod" rel="nofollow"><img src="https://img.shields.io/github/stars/colinhacks/zod" alt="stars"></a>
<a href="https://discord.gg/KaSRdyX2vc" rel="nofollow"><img src="https://img.shields.io/discord/893487829802418277?label=Discord&logo=discord&logoColor=white" alt="discord server"></a>
</p>

<div align="center">
Expand All @@ -37,12 +36,14 @@
<br/>
<br/>

> Zod 3.23 is out! View the [release notes](https://github.com/colinhacks/zod/releases/tag/v3.23.0).
<h4><strong>Announcement ✨</strong><br/>Zod has recieved the <a href="https://clerk.com">Clerk</a> OSS Fellowship!<br/>Read the announcement post 👉 <a href="https://zod.dev/blog/clerk-fellowship">zod.dev/blog/clerk-fellowship</a></h4>

> These docs have been translated into [Chinese](./README_ZH.md).
<br/>

## Table of contents

> These docs have been translated into [Chinese](./README_ZH.md).
<!-- The full documentation is available both on the [official documentation site](https://zod.js.org/) (recommended) and in `README.md`.
#### Go to [zod.js.org](https://zod.js.org) >> -->
Expand Down Expand Up @@ -202,7 +203,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer

<h3 align="center">Platinum</h3>

<table align="center">
<table align="center" style="justify-content: center;align-items: center;display: flex;">
<tr>
<td align="center">
<img src="https://avatars.githubusercontent.com/u/91446104?s=200&v=4" height="100px;" alt="Speakeasy API" />
Expand All @@ -221,7 +222,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer

<h3 align="center">Gold</h3>

<table align="center">
<table align="center" style="justify-content: center;align-items: center;display: flex;">
<tr>
<td align="center">
<img src="https://avatars.githubusercontent.com/u/89474619?s=200&v=4" height="50px;" alt="PropelAuth" />
Expand Down Expand Up @@ -291,7 +292,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer

<h3 align="center">Silver</h3>

<table align="center">
<table align="center" style="justify-content: center;align-items: center;display: flex;">
<tr>
<td align="center">
<a href="https://encore.dev">
Expand Down Expand Up @@ -340,7 +341,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer

<h3 align="center">Bronze</h3>

<table align="center">
<table align="center" style="justify-content: center;align-items: center;display: flex;">
<tr>
<td>Brandon Bayer</td>
<td>Jiří Brabec</td>
Expand Down
1 change: 1 addition & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/blog/* /blog/index.html 200
/* / 200
63 changes: 63 additions & 0 deletions blog/clerk-fellowship.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<h1 style="border-bottom:1px solid #dddddd;">Joining Clerk as an OSS Fellow to work on Zod 4</h1>

<p>
<a href="https://twitter.com/colinhacks" style="font-weight:500;text-decoration:none;">Colin McDonnell</a>
<br/>
June 11, 2024
</p>

I'm thrilled to announce that I'm the inaugural recipient of [Clerk's](https://clerk.com/) OSS Fellowship! This fellowship is kind of like a "summer internship"—Clerk is paying me a full-time wage (think entry-level software engineer) to work on Zod full-time throughout summer 2024.

In the context of both my own career path and Zod's development, this is a perfect arrangement, and I'm beyond grateful that Clerk was willing to experiment with some alternative funding arrangements for OSS.

Let's look at some of the context here.

## On deck: Zod 4

The current major version of Zod (v3) was released in 2021. In terms of structure and implementation, I got a lot of things right with Zod 3. The codebase has been versatile enough to supporting 23(!) minor releases, each with new features and enhancements, with no breaking changes to the public API.

But there are a couple structural issues that need to be addressed and will require breaking changes. (It's worth noting upfront that most Zod users will not be affected, but a lot of the libraries in Zod's ecosystem rely on internal APIs and will need to be updated.)

- To simplify the codebase and enable easier code generation tooling, some subclasses of `ZodType` will be split or consolidated.
- To improve performance, the signature of the (quasi-)internal `_parse` method will be changed. Any user-defined subclasses of `ZodType` will need to be updated accordingly.
- To clean up autocompletion, some internal methods and properties will be made `protected`. Some current APIs will be deprecated; some deprecated APIs will be removed.
- To improve error reporting, I'll be simplifying Zod's error map system. The new system will also be more amenable to internationalization (RFC forthcoming).
- To enable `exactOptionalPropertyTypes` semantics, the logic used to determine key optionality in `ZodObject` will change. Depending on the value of `exactOptionalPropertyTypes` in your `tsconfig.json`, some inferred types may change (RFC forthcoming).
- To improve TypeScript server performance, some generic class signatures (e.g. `ZodUnion`) will be changed or simplified. Other type utilities will be re-implemented for efficiency, but may result in marginally different behavior in some contexts.

All told, Zod 4 will be a ground-up rewrite of the library with few breaking changes for typical users, dramatic speed improvements, a simpler internal structure, and a big slate of new features.

## Zod's current funding story

Zod's has [many generous donors](https://github.com/sponsors/colinhacks) and is likely one of the most well-sponsored TypeScript utility libraries of its kind. Right now, that works out to just over $2600/mo. I'm greatful for this level of support, and it far exceed my expectations from when I first set up my GitHub Sponsors profile.

But with much love and appreciation to all the people and companies that support Zod, that's far from replacing a full-time salary in the US.

I left Bun early this year and spent a couple months recovering from burnout and learning new things. Starting in April, I spent about 6 weeks merging PRs and fixing issues, culminating in the release of Zod 3.23 (the final 3.x version). I've spent the last month or so spec'ing out Zod 4.

In my estimation it will take about three more months of full-time work to complete the rewrite and roll out the new release responsibly to Zod's now-massive base of users and third-party ecosystem libraries. I'm beyond excited to do all this work, but that's a long time to be without an income.

So I reached out to a few companies with an experimental proposal: an "OSS incubator" where the company would sponsor the development of Zod for 12 weeks (my timeline for the release of Zod 4). During this pre-determined window, I'd get paid some reasonable wage, and the company would be Zod's primary patron. The cost to the company is known upfront, since everything is term-limited; it's like an incubator or an internship.

## The Clerk fellowship

Much to my delight, [Colin](https://twitter.com/tweetsbycolin) from Clerk (AKA "other Colin") was enthusiastically on board. I've admired Clerk for a long time for their product, eye for developer experience, and commitment to open source. In fact, I covered them on my podcast the day they launched on HN in February 2021. They've already been sponsoring [Auth.js](https://authjs.dev) (formerly NextAuth) for some time and were immediately open to discussing the terms of a potential "fellowship".

In exchange for the support, Clerk is getting a super-charged version of the perks that Zod's other sponsors already get:

1. Diamond-tier placement in the README and the docs 💎 Big logo. Big. Huge.
2. Updating my Twitter bio for the duration of the fellowship to reflect my new position as a Clerk OSS Fellow 💅
3. Mentions in the forthcoming Zod 4 RFCs (Requests for Comment). Historically Zod's RFCs have attracted a lot of attention and feedback from the TypeScript community (or at least TypeScript Twitter). This is a perfect place to shout out the company that is (effectively) paying me to implement these new features.
4. A small ad at the bottom of the sidebar of Zod's new docs site (under construction now). You can see what this might look like in the [Auth.js](https://authjs.dev/getting-started) docs.
5. For continuity after the release of Zod 4, Clerk gets "first dibs" (right of first refusal) on a new ongoing "diamond tier" sponsor slot for 6 months. The idea is that this is an exclusive "slot"—only one company can hold it at a time.The perks of this tier include the big README logo and the sidebar ad placement.
6. This announcement post! Yes, you've been reading marketing material this whole time. Gotcha.

## OSS, funding models, and trying new things

This model represents an interesting middle ground between the traditional sponsorship model and the "maintainer-in-residence" approach that companies like Vercel have taken with Rich Harris/Svelte. Zod doesn't need a full-time maintainer in perpetuity (actually, I wouldn't mind that... 🙄) but it does need full-time attention to get this major version out the door.

This fellowship is a way to bridge that gap. All-in-all, I'm beyond excited to have found a partner in Clerk that is interested in trying something like this.

> I encourage other companies to try similar things! There is no shortage of invaluable libraries with full-time (or nearly full-time) maintainers who are forgoing a regular income to build free tools. ArkType, Valibot, and tRPC come to mind.
So if you're building an app sometime soon, be smart—validate your `Request` bodies (or, uh, Server Action arguments?) and don't roll your own auth.
Loading

0 comments on commit dd26625

Please sign in to comment.