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

Feature/v11 #237

Open
wants to merge 206 commits into
base: main
Choose a base branch
from
Open

Feature/v11 #237

wants to merge 206 commits into from

Conversation

ecyrbe
Copy link
Owner

@ecyrbe ecyrbe commented Nov 19, 2022

  • Any validation library support, native support for Zod / Io-Ts :
    • By using the TypeProvider pattern we can now make zodios validation agnostic.
    • Implement at least ZodTypeProvider and IoTsTypeProvider since they both support input and output type inferrence
    • openapi generation will only be compatible with zod though
    • Not a breaking change so no codemod needed
  • const in generics:
    • migrate to typescript 5.0
    • will allow to get rid of Narrow helper that is slow and may prevent zodios to really be agnostic to validation library
    • should improve perf
    • will maintain v10 for some more time to let users migrate
    • need to provide a big warning about ts dependency
  • Plugins:
    • implement new plugin system that allows to match endpoints with more advance rules
    • allow to match endpoint with regex
    • allow to match endpoint with custom function
    • allow to control the priority of the plugin (low, normal, high) => two plugins with same priority will be executed in the order of declaration
  • MonoRepo:
    • Zodios will become a really large project so maybe migrate to turbo repo + pnpm
    • not a breaking change
  • Transform:
    • By default, activate transforms on backend and disable on frontend (today it's the opposite), would make server transform code simpler since with this option we could make any transforms activated not just zod defaults.
    • Rationale being that transformation can be viewed as business code that should be kept on backend
    • breaking change => codemod to keep current defaults by setting them explicitly
  • Axios:
    • Move Axios client to it's own package @zodios/axios and keep @zodios/core with only common types and helpers
    • Move plugins to @zodios/axios-plugins
    • breaking change => easy to do a codemod for this
  • Fetch:
    • Create a new Fetch client with almost the same features as axios, but without axios dependency @zodios/fetch
    • Today we have fetch support with a plugin for axios instance (zodios maintains it's own axios network adapter for fetch). But since axios interceptors are not used by zodios plugins, we can make fetch implementation lighter than axios instance.
    • Create plugins package @zodios/fetch-plugins
    • Not sure it's doable without a lot of effort to keep it in sync/compatible with axios client
    • new feature, so no codemod needed
  • React/Solid:
    • make ZodiosHooks independant of Zodios client instance (axios, fetch)
    • not a breaking change, so no codemod needed
  • Client Request Config
    • uniform Query/Mutation with body sent on the config and not as a standalone object. This would allow to not do client.deleteUser(undefined, { params: { id: 1 } }) but simply client.deleteUser({ params: { id: 1 } })
    • breaking change, so a codemod would be needed, but might be difficult to implement
  • Mock/Tests:
    • if we implement an abstraction layer for client instance, relying on moxios to mock APIs response will likely not work for fetch implementation.
    • create a @zodios/testing package that work for both axios/fetch clients
    • new feature, so no breaking change (no codemod needed)

@ecyrbe ecyrbe force-pushed the feature/v11 branch 2 times, most recently from 497d534 to 4ac4921 Compare November 27, 2022 16:15
}
);
app.post("/text", express.text(), (req, res) => {
res.status(200).send(req.body);

Check warning

Code scanning / CodeQL

Reflected cross-site scripting Medium

Cross-site scripting vulnerability due to a
user-provided value
.
@stale
Copy link

stale bot commented Jan 11, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jan 11, 2023
@ecyrbe
Copy link
Owner Author

ecyrbe commented Jan 12, 2023

Ping

@stale stale bot closed this Jan 19, 2023
@ecyrbe ecyrbe reopened this Jan 19, 2023
@stale stale bot removed the wontfix This will not be worked on label Jan 19, 2023
@ecyrbe ecyrbe force-pushed the feature/v11 branch 3 times, most recently from 806ea83 to 48a20cc Compare January 29, 2023 18:47
@stale
Copy link

stale bot commented Mar 13, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 13, 2023
@ecyrbe ecyrbe added the pinned issues that should not be closed by bot label Mar 14, 2023
@stale stale bot removed the wontfix This will not be worked on label Mar 14, 2023
@toteto
Copy link

toteto commented Mar 18, 2024

@ecyrbe any change on getting the v11 out soon? Maybe new beta release? I am facing a issue with the beta19 method isErrorFromAlias, it is not comparing the error path to the enpoint path correctly. It is being fixed in the latest state of the branch and also it is OK on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned issues that should not be closed by bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants