Closed p-kuen closed 1 year ago
@p-kuen Hi, thanks for the heads up. Will investigate.
@p-kuen Heya,
Have a patch for this that should be ready on TB 0.29.0
(so minor semver). Will look to publish this within the next 24 hours or so (as there is some other changes due to roll through on this revision). Will notify when TB has been published with the fix.
Thanks again for reporting!
@p-kuen Hi,
This patch should be applied on 0.29.0
. If you can just give things a quick test your side, can close up this issue. Again, thanks for reporting the issue so promptly (was actually good timing given the revision going out).
I still don't know if this was a bug in the compiler or intended functionality, however it was a breaking change in inference behavior on a semver PATCH revision (5.1.3 -> 5.1.6). Generally these issues lead to better / faster inference in TB, but sorta wish there was a system of being notified of potential breaking compiler changes prior to TS publishing on npm, I may do some looking into.
Thanks again S
Hi, thanks for the quick fixes. Unfortunately I am using typebox through the @fastify/type-provider-typebox package which is currently bound to 0.28.x versions. So I have to wait until an update from this package until I can test it in my environment. I will give an update after I checked it again.
Thanks again!
confirming 0.29.x fixes the issue
@knicola Hi, thanks for confirming!
@p-kuen May close off this issue for now as the issue appears resolved and the type provider may take some time to update. Note the Fastify organization manages this provider, so to help fast track things, just open and issue or submit a PR to bump the peerDependency
there. Can CC me on that repository if there's any issues with the update.
Thanks all!
Alright, thanks for the hint! I created a PR in fastify/fastify-type-provider-typebox#90.
sorta wish there was a system of being notified of potential breaking compiler changes prior to TS publishing on npm, I may do some looking into.
They publish nightlies, so one thing you could do is set up a cron job in this repo to at least run your tests. Might catch these before release?
@SimenB Hi! That's a great idea! :)
Have just setup a GH Action to run a build against TS latest
and next
once daily. Was also looking into typescript-error-deltas the other day where I think TS track regressions their side across a number of community packages. I may see if they'll accept a PR to include TB in their test suite. Could probably add quite a few type mapping libraries to their tests as these kinds of libraries do tend to push out the extents of the compiler.
Thanks again for the suggestion! All the best S
@sinclairzx81 Love it when my build fails and there's already a fixed version!
Similar as stated in #119 the same error occurs with Typescript version 5.1.6:
I tested it on Typescript version 5.1.5 and it works, so it's just the difference in these two patch versions. (see https://github.com/microsoft/TypeScript/compare/v5.1.5...release-5.1).
Maybe it's a bug in the TypeScript version but as the problem already occurred with this package some time ago, I thought I will report it here.