Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loosen peer deps constraints, bump a few dev deps versions #3

Merged
merged 1 commit into from
Jan 3, 2021

Conversation

giogonzo
Copy link
Owner

@giogonzo giogonzo commented Jan 3, 2021

No description provided.

@giogonzo giogonzo merged commit ea27c05 into master Jan 3, 2021
@@ -48,7 +48,7 @@ export function getArbitrary<T extends HasArbitrary>(codec: T): fc.Arbitrary<t.T
const type: HasArbitrary = codec as any;
switch (type._tag) {
case 'UnknownType':
return fc.anything();
return fc.anything() as any;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use unknown here over any?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be, but I kept any here for consistency with other lines below. Anyway, it does not make much difference in this case IMO

"io-ts": "^2.0.1",
"fast-check": "^2.10.0",
"fp-ts": "^2.9.3",
"io-ts": "^2.2.13",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note also that io-ts has deviated from semantic versioning above 2.1.3 😕
everything above 2.1.3 and below 3 is called "experimental"".

Not sure that this will play nicely with users still on a "stable" version, but I'm not sure of what the best approach is here. O how I wish io-ts had used a dist-tag for the experimental work!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note also that io-ts has deviated from semantic versioning above 2.1.3

Not really, meaning that 2.1 and above introduce experimental features without breaking the old/stable API. The current stable API will eventually be dropped in favor of the experimental one in a breaking release (3 I assume)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My team have been experiencing compatibility issues between packages using different versions of io-ts across the 2.1.3 boundary. Our solution was to standardize on ~2.1.3 until 3.0.0 is released.

I believe the problem comes from providing a codec with a version of io-ts from one side of the boundary, and using that codec in another codec defined by io-ts on the other side of the boundary. Not sure if this library is at risk then 🤔 need to look at the internals more closely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants