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

Bump @api3/ois to 1.4.0 with necessary zod version bump to 3.20 #1597

Merged
merged 3 commits into from
Dec 19, 2022

Conversation

dcroote
Copy link
Contributor

@dcroote dcroote commented Dec 14, 2022

@Siegrift
Copy link
Contributor

Renovate bot should take care of this on Monday.

Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@dcroote
Copy link
Contributor Author

dcroote commented Dec 14, 2022

Unfortunately it looks like 3.20.0 was a bit of a "big" minor bump and broke a number of things in validator, which is why CI failed to build here: https://github.com/api3dao/airnode/actions/runs/3692777873/jobs/6252029697

@dcroote
Copy link
Contributor Author

dcroote commented Dec 14, 2022

Renovate bot should take care of this on Monday.

Also I think zod is excluded from Renovate:

airnode/renovate.json

Lines 7 to 8 in 524b47d

"matchPackageNames": ["chalk", "ora", "node", "@openzeppelin/contracts", "zod", "hardhat"],
"enabled": false

@Siegrift
Copy link
Contributor

Also I think zod is excluded from Renovate:

Good catch. I forgot we set this because it needed to be in sync with validator.

@dcroote dcroote marked this pull request as draft December 15, 2022 03:11
@dcroote
Copy link
Contributor Author

dcroote commented Dec 15, 2022

Unfortunately it looks like 3.20.0 was a bit of a "big" minor bump and broke a number of things in validator, which is why CI failed to build here: https://github.com/api3dao/airnode/actions/runs/3692777873/jobs/6252029697

@Siegrift - I fixed most of the issues originating from this "minor" bump, but it won't build until we release a new OIS version because of oisSchema and the zod version incompatibility issue we encountered before. Hence, I marked this PR as a draft for the moment.

I recommend publishing a new OIS minor after api3dao/ois#56, following which I'll update this PR an it can be merged. WDYT?

- recursive type definition
- exact flag for too_big and too_small:
colinhacks/zod#1620
- options property of ZodDiscriminatedUnion was renamed to optionsMap:
colinhacks/zod#1290 (comment)
@dcroote dcroote changed the title Bump zod from 3.19.1 to 3.20.0 Bump @api3/ois to 1.4.0 with necessary zod version bump to 3.20 Dec 17, 2022
@dcroote dcroote marked this pull request as ready for review December 17, 2022 06:02
@dcroote
Copy link
Contributor Author

dcroote commented Dec 17, 2022

Closes #1598. The commit message of the last commit describes the changes made to work with zod ^3.20.0.

@dcroote dcroote linked an issue Dec 17, 2022 that may be closed by this pull request
@dcroote dcroote self-assigned this Dec 19, 2022
Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM

export const gasPriceOracleSchema = z
.array(gasPriceOracleStrategySchema)
.nonempty()
.superRefine(validateGasPriceOracleStrategies);
.superRefine((strategies, ctx) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

any particular reason for inlining this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes- I inlined this in order to fix a recursive type definition error

@dcroote dcroote merged commit 8844aa9 into master Dec 19, 2022
@dcroote dcroote deleted the zod-3.20.0 branch December 19, 2022 15:10
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.

Bump @api3/ois to v1.4.0
2 participants