Repository navigation
fix(dev): reloading edge functions for child dependencies - #6276
Merged
Merged
Conversation
📊 Benchmark resultsComparing with a4b7449
|
Contributor
|
The rough problem seems to be that we were only checking one level-deep dependencies. I haven't fully grasped the change you're proposing here, but traversing the full module graph seems to be the right solution. As for adding a test, I'd add a case similar to cli/tests/integration/commands/dev/edge-functions.test.ts Lines 135 to 152 in 3379f40 Reloading function.
|
Skn0tt
marked this pull request as ready for review
January 8, 2024 17:34
Contributor
|
I've added a test, refactored the code to make it a bit more concise, and added a couple other small refactorings. @JGAntunes would love your review! |
JGAntunes
commented
Jan 10, 2024
JGAntunes
left a comment
Contributor
Author
There was a problem hiding this comment.
Can't approve because I kicked of the PR 😅 but LGTM
Skn0tt
approved these changes
Jan 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes COM-209 - https://linear.app/netlify/issue/COM-209/reloading-issues-with-edge-function-files-when-using-cli-netlify-dev. The way we currently process the dependency graph of edge function is limited to the direct dependencies of it. This PR changes it to perform a depth first search and build a full depedency list for a given function.
Keeping it as draft as I would love to add a test for it but unsure what would be the best way to go about it? 🤔 Any ideas? Maybe @Skn0tt?
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)