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

feat: Show edit graph link on dev startup, send operations library edits to UI, and run prettier (if available) on code output #4183

Merged
merged 3 commits into from
Feb 5, 2022

Conversation

sgrove
Copy link
Contributor

@sgrove sgrove commented Feb 4, 2022

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #4180

Makes editing the Graph operations library file locally work while also sending updates to the ui to make the DX much smoother via file monitoring.

It also runs prettier (if available) on the output so the code conforms to the user's local expectations.

Shows a link when starting netlify dev --graph that takes the user to the graph editing UI (requested by @biilmann)


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Make sure the status checks below are successful ✅

@sgrove sgrove added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 4, 2022
@sgrove sgrove requested a review from anmonteiro February 4, 2022 23:28
@sgrove sgrove self-assigned this Feb 4, 2022
@sgrove sgrove added the automerge Add to Kodiak auto merge queue label Feb 5, 2022
@kodiakhq kodiakhq bot merged commit effffec into netlify:main Feb 5, 2022

const command = `prettier --write ${filePath}`
try {
const commandProcess = execa.command(command, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small note: if filePath has a space in its path (which is common on Windows, e.g. C:\Program Files), it will be interpreted as two different arguments by execa.command().
Instead, using execa('prettier', ['--write', filePath]) will prevent this problem.

@sgrove
Copy link
Contributor Author

sgrove commented Feb 5, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Run prettier automatically on generated code
3 participants