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

v2 #106

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

v2 #106

wants to merge 27 commits into from

Conversation

sdairs
Copy link
Collaborator

@sdairs sdairs commented Dec 15, 2024

What changed?

package

Base line on Node 22
Replace tsup with Vite
Exports a server and client entry point for Node and Browser respectively
Schemas separated into their own files
Upgrade deps
Remove as much custom extendedFaker as possible, rely on faker.js natives

cli

Use upgraded mockingbird package, server entry point

web

Use upgraded mockingbird package, client entry point
Base line on Node 22
Upgrade to React 19 & Nextjs 15.1
Upgrade all deps

docs

☠️ Removed docs site in favour of the README.

Breaking changes

The biggest breaking change is that most of the mockingbird faker functions are gone. They could mostly be achieved by existing faker functions, including faker helpers, which hadn't been included. For example, pick and pickWeighted can be replaced with helpers.arrayElement and helpers.weightedArrayElement.

Along with this, the way to pass parameters has been simplified - instead of params being an array of an object with a values key that is an array....params is now any and can take the exact form that would be passed as a param to the faker function. e.g. params: 2, params: [1,2,3], params: {"obj":"yay"} and so on.

Issues left to do

  • No parameter validation on schema
  • Params to functions that dont take params causes crash
  • when running the dev server, the web workers is created twice, but doesnt happen in production on vercel

Notes

Turbopack does not support web workers, so its disabled

Copy link

vercel bot commented Dec 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mockingbird-docs ❌ Failed (Inspect) Dec 22, 2024 1:24pm
mockingbird-web ❌ Failed (Inspect) Dec 22, 2024 1:24pm

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.

1 participant