zodex icon indicating copy to clipboard operation
zodex copied to clipboard

Support for Zod 3.24

Open igor9silva opened this issue 1 year ago • 4 comments

Hi,

The fix from #47 was not released. I'm not sure what happened but NPM returned 403.

igor9silva avatar Jan 14 '25 19:01 igor9silva

Hi thanks for filing and pardon the late response. Unfortunately I'm not using this actively and it's hard to make time for deeper investigations. I'd be grateful for tips if anyone has an idea of why publishing stopped working.

Gregoor avatar Jan 30 '25 16:01 Gregoor

Is it because pnpm is not allowable as per https://github.com/semantic-release/npm/issues/280 ?

Might https://www.npmjs.com/package/semantic-release-pnpm assist?

brettz9 avatar Jan 31 '25 08:01 brettz9

Isn't that just because the action is trying to publish with version no 0.0.0-dev?

heydoyouknowme0 avatar Feb 06 '25 07:02 heydoyouknowme0

Given that I had other components requiring updating to Zod 3.24 (and this package being the sole reason of staying behind), I created a patchfile to add the required types. You will need patch-package for it. You can get it here: https://gist.github.com/TimLinsenmayer/00c93a0f24fd5d83330fe3524863b548 The larger changed block within zerialize.js is caused by fixing indentation - the only real change is the added cidr block there.

It would be great if the updated version would end up on npm soon though.

TimLinsenmayer avatar Mar 06 '25 15:03 TimLinsenmayer

I think this issue can now be closed per https://github.com/commonbaseapp/zodex/issues/49#issuecomment-3160173363 .

brettz9 avatar Aug 28 '25 11:08 brettz9

Just tested and it seems to be working with:

"zod": "^3.25.76"
"zodex": "^3.0.0"

igor9silva avatar Aug 28 '25 16:08 igor9silva

I spoke too soon. Needed a "overrides": { "zod": "~3.25.76" } on package.json.

Not really sure why. AI says Zodex installs a different Zod version.

igor9silva avatar Aug 28 '25 16:08 igor9silva

I don't think there is a need for overrides if one runs npm upgrade. The 3.0.0 release has "zod": "^3.24.1" for dependencies (and "zod": "^3.x" for peerDependencies), so it should work fine with 3.25.76 as long as the lock file is up to date.

brettz9 avatar Aug 28 '25 16:08 brettz9

100% agree but I was getting those:

Error: Failed to resolve entry for package "zod". The package may have incorrect main/module/exports specified in its package.json.
    at packageEntryFailure (file:///Users/igor/Insync/[email protected]/Drive/Personal/Code/meseeks/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:16198:15)

igor9silva avatar Aug 28 '25 16:08 igor9silva

I guess the overrides should help your package's consumers ensure they have the right zod version (until the next zodex version may make the update explicit).

brettz9 avatar Aug 28 '25 16:08 brettz9