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

modify parseDefaultExportName so it does not grab an HOC, but the fir… #4359

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

bezalel6
Copy link
Contributor

@bezalel6 bezalel6 commented Jul 14, 2024

…st Argument it takes. presumably the actual component

Closes: #4358

What are the changes and their implications?

  • Updated parseDefaultExportName to improve parsing of default exports.
  • The function now handles cases where the default export is a higher-order component (HOC).
  • If a declaration like export default function ... exists, it returns the function name as before.
  • If no declaration is found but a valid function name inside parentheses exists (e.g., export default functionName1(functionName2)), it returns functionName2 instead, treating functionName1 as a HOC.

Bug Checklist

  • Changeset added (run pnpm changeset in the root directory)
  • Integration test added (see test docs if needed)

Feature Checklist

…st Argument it takes. presumably the actual component
Copy link

changeset-bot bot commented Jul 14, 2024

🦋 Changeset detected

Latest commit: 379feaf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
blitz Patch
next-blitz-auth Patch
@blitzjs/auth Patch
@blitzjs/next Patch
@blitzjs/rpc Patch
@blitzjs/codemod Patch
@blitzjs/config Patch
@blitzjs/generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@siddhsuresh siddhsuresh self-requested a review July 16, 2024 03:02
Copy link
Member

@siddhsuresh siddhsuresh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM

@siddhsuresh siddhsuresh merged commit d53da39 into blitz-js:main Jul 30, 2024
4 of 29 checks passed
@blitzjs-bot
Copy link
Contributor

Added @bezalel6 contributions for doc and code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

when generating the Route manifest, a route using a HOC wrapper will not be generated correctly
3 participants