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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃拕 Ensure all middleware use named functions #7434

Merged
merged 1 commit into from Sep 26, 2016

Conversation

ErisDS
Copy link
Member

@ErisDS ErisDS commented Sep 23, 2016

This is a quick little commit to name two middleware functions that were previously anonymous.

Super useful when inspecting and debugging the middleware stack, which I have been doing with a little stack printing tool I wrote: https://github.com/ErisDS/middleware-stack-printer

A full stack print for the home route in Ghost (with this change) can be found in this gist.
It's kinda huge 馃槼

no issue

  • anonymous functions are hard to debug in memory traces etc
  • having anonymous middleware functions makes it hard to inspect or debug the middleware stack (something I like to do)
  • these 2 are the only ones atm, including all 3rd party middleware

no issue

- anonymous functions are hard to debug in memory traces etc
- having anonymous middleware functions makes it hard to inspect or debug the middleware stack (something I like to do)
- these 2 are the only ones atm, including all 3rd party middleware
@kirrg001 kirrg001 added this to the 1.0.0-alpha.2 milestone Sep 26, 2016
Copy link
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

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

Good catch 馃憤 LGTM

@kirrg001 kirrg001 merged commit b0af496 into TryGhost:master Sep 26, 2016
mixonic pushed a commit to mixonic/Ghost that referenced this pull request Oct 28, 2016
no issue

- anonymous functions are hard to debug in memory traces etc
- having anonymous middleware functions makes it hard to inspect or debug the middleware stack (something I like to do)
- these 2 are the only ones atm, including all 3rd party middleware
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this pull request Nov 20, 2016
no issue

- anonymous functions are hard to debug in memory traces etc
- having anonymous middleware functions makes it hard to inspect or debug the middleware stack (something I like to do)
- these 2 are the only ones atm, including all 3rd party middleware
@ErisDS ErisDS deleted the no-anonymous-middleware branch March 1, 2017 12:51
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.

None yet

2 participants