Skip to content

Commit

Permalink
feat: change order of Edge Functions execution (#4555)
Browse files Browse the repository at this point in the history
* feat: warn about naming collisions in Edge Functions

* feat: run user functions before internal functions

* refactor: revert naming collision warning
  • Loading branch information
eduardoboucas committed Apr 20, 2022
1 parent d9bb192 commit 9998550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/edge-functions/registry.js
Expand Up @@ -158,7 +158,10 @@ class EdgeFunctionsRegistry {

getDeclarations(config) {
const { edge_functions: userFunctions = [] } = config
const declarations = [...this.internalFunctions, ...userFunctions]

// The order is important, since we want to run user-defined functions
// before internal functions.
const declarations = [...userFunctions, ...this.internalFunctions]

return declarations
}
Expand Down

1 comment on commit 9998550

@github-actions
Copy link

Choose a reason for hiding this comment

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

📊 Benchmark results

Package size: 273 MB

Please sign in to comment.