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

Cloudflare Workers Vitest integration Broken by this package #141

Closed
andrew-pyle opened this issue Apr 8, 2024 · 2 comments
Closed

Cloudflare Workers Vitest integration Broken by this package #141

andrew-pyle opened this issue Apr 8, 2024 · 2 comments

Comments

@andrew-pyle
Copy link

andrew-pyle commented Apr 8, 2024

The Cloudflare Workers recommended testing strategy, the Vitest Integration, is not compatible with this package. It's due to a dependency, @asteasolutions/zod-to-openapi. This package depends on v5 of @asteasolutions/zod-to-openapi, which was not published in ESM format. Vitest only works with ESM code.

The dependency has already been fixed in v7. Can this package be updated to use the v7 of @asteasolutions/zod-to-openapi?

References

@andrew-pyle
Copy link
Author

I've overriden @asteasolutions/zod-to-openapi in my app's package.json to use v7 with no ill effects so far.

In package.json:

{
  "dependencies": {
    "@cloudflare/itty-router-openapi": "^1.1.0",
    "zod": "^3.22.4"
  },
  "overrides": {
    "@cloudflare/itty-router-openapi": {
      "@asteasolutions/zod-to-openapi": "^7.0.0"
    }
  }
}

@andrew-pyle
Copy link
Author

Duplicate of #144. Resolved in v1.1.1.

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

No branches or pull requests

1 participant