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: support 'pattern' in inline edge function config #5749

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jul 1, 2024

🎉 Thanks for submitting a pull request! 🎉

Summary

This allows setting pattern (and excludedPattern) in inline config for edge functions which might result in not needing to use separate manifest json file. Primary motivation is to simplify usage of Frameworks API (but not limited to it as this allows using pattern also in user defined function configs as well as good old .netlify/edge-functions)


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.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@pieh pieh force-pushed the feat/support-pattern-in-inline-edge-function-config branch 4 times, most recently from 741278a to 743405c Compare July 2, 2024 12:33
@pieh pieh force-pushed the feat/support-pattern-in-inline-edge-function-config branch from 743405c to 9177c35 Compare July 2, 2024 12:43
@pieh pieh marked this pull request as ready for review July 2, 2024 13:53
@pieh pieh requested review from a team as code owners July 2, 2024 13:53
Copy link
Contributor

@JGAntunes JGAntunes left a comment

Choose a reason for hiding this comment

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

Tiny comment on... a comment 😂 but other than that LGTM

@@ -92,25 +100,45 @@ const createDeclarationsFromFunctionConfigs = (
const declarations: Declaration[] = []

for (const name in functionConfigs) {
const { cache, excludedPath, path, method } = functionConfigs[name]
const functionConfig = functionConfigs[name]
const { cache, method } = functionConfigs[name]

// If we have a path specified, create a declaration for each path.
Copy link
Contributor

Choose a reason for hiding this comment

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

Tiny thing but seems like this comment should either move or is outdated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 903e6cc

@pieh pieh force-pushed the feat/support-pattern-in-inline-edge-function-config branch from 227d8c9 to 903e6cc Compare July 3, 2024 08:39
@pieh pieh merged commit c7a86d6 into main Jul 3, 2024
37 checks passed
@pieh pieh deleted the feat/support-pattern-in-inline-edge-function-config branch July 3, 2024 11:36
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.

3 participants