-
Notifications
You must be signed in to change notification settings - Fork 46
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
dynamicValues option does not work in browser #90
Comments
@JimmyPaolini do you have an idea of how we could fix this? |
Hmm I'll look into it. I also noticed when I turned on |
I see that It might not be too hard to replace |
Dammit, I started this library with faker but switch to casual because faker was not maintained. Now I see it's the opposite 😓 https://fakerjs.dev/about/announcements/2022-01-14.html Anyway it's a good idea to try switching to faker now that it's maintained properly I'm sorry I don't have much time to work on the project right now, but contributions are always welcome ! |
I am interested in trying on the challenge of switching to faker👀 because the issue I want to solve can also be solved if dynamicValues is available in the browser. ref: #89 |
Great thank you @JimmyPaolini |
@ardeois @JimmyPaolini Let me discuss it with you. I think of several options, and we can transition in stages.
I think that the number of users who use dynamicValues is still small, and it would not be good for the majority of users to be affected by the disruptive changes that affect them. Remaining tasks are managed here: #92 (comment) |
@ardeois @JimmyPaolini |
Your implementation looks awesome! Since faker generates different fake data than casual even with the same seed number, won't this still possibly break people's tests if they upgrade, making it a breaking change? In which case, why not just remove all of casual and go with option 1 as you defined above? |
@MH4GF Awesome, thank you for your contribution ! EDIT: I see you actually call faker for generated mocks as well. This would create a breaking change in the generated mock |
Fixed in #93 |
description
As the title says.
context
I use the generated functions mainly in storybook. When I activate dynamicValues and generate a function and start the storybook, I get the following error message.
casual is
fs
dependent and cannot run in your browser.solutions
This is very troubling because of the dependent library issue. The following issues have been created in casual, but it does not seem to be possible to solve this problem because the fs module cannot be run on the web. boo1ean/casual#20
Sorry I can't suggest a solution, but I created an issue to share with you all.
The text was updated successfully, but these errors were encountered: