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

Fix: The configureFastify codemod now handles missing config case #6383

Conversation

dthyresson
Copy link
Contributor

@dac09 reported that if one was upgraded an older version of Redwood proper to api-server's introduction of the Fastify config (server.config.js), the v3 codemode to configure-fastify would fail ungracefully.

The PR updates to coded to check

  • Does the server.config.js exist? If so, then transform and upgrade it.
  • If not, then fetch the latest server.config.js and save it to the project's api directory.

I tested by removing my server.config.js from a project (that is in path/to/my/rw/project and then ran

RWJS_CWD=/path/to/my/rw/project node "./packages/codemods/dist/codemods.js" configure-fastify

And a new server.config.js now exists in my project.

@dthyresson dthyresson added the release:fix This PR is a fix label Sep 13, 2022
@dthyresson dthyresson requested a review from dac09 September 13, 2022 19:20
@dac09 dac09 enabled auto-merge (squash) September 14, 2022 12:40
@dac09 dac09 merged commit fdae7cf into redwoodjs:main Sep 14, 2022
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Sep 14, 2022
@jtoar jtoar modified the milestones: next-release, v3.0.0 Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants