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(factory): Allow HonoOptions<E> with factory #3786

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

miyaji255
Copy link
Contributor

When using factory, options such as strict: false cannot be specified. This Pull Request allows you to specify options when calling createFactory and createApp.

const factory = createFactory({ defaultOptions: { strict: false } });
const app = factory.createApp({ options: { strict: true } }); // Override defaultOptions

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.71%. Comparing base (1e62912) to head (24337a9).
Report is 30 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3786      +/-   ##
==========================================
- Coverage   91.71%   91.71%   -0.01%     
==========================================
  Files         160      160              
  Lines       10181    10198      +17     
  Branches     2896     2935      +39     
==========================================
+ Hits         9338     9353      +15     
- Misses        842      844       +2     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yusukebe
Copy link
Member

yusukebe commented Jan 1, 2025

Hi @miyaji255

Thank you for the PR. I think this is a good feature. I've left the comment.

Verified

This commit was signed with the committer’s verified signature.
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

Hi @miyaji255

Sorry for the delayed review. Looks good! I wonder if we should include this in a patch release or minor release, but I'll decide on and merge it later. Thanks!

@yusukebe yusukebe added the v4.7 label Jan 28, 2025
@yusukebe yusukebe changed the base branch from main to next February 6, 2025 13:04
@yusukebe yusukebe merged commit e4767af into honojs:next Feb 6, 2025
16 checks passed
@miyaji255 miyaji255 deleted the hono-factory-options branch February 7, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants