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

Next #3144

Merged
merged 33 commits into from
Jul 16, 2024
Merged

Next #3144

merged 33 commits into from
Jul 16, 2024

Conversation

yusukebe
Copy link
Member

For v4.5.0.

usualoma and others added 29 commits June 12, 2024 11:56
… with `react-dom/server` (#2930)

* feat(jsx/server): introduce `jsx/dom/server` module for compatibility with `react-dom/server`

* refactor: tweaks signature of onError callback in renderToReadableStream for compatibility

* Add jsx/dom/server to jsr.json

* fix: relative import path error in `deno publish`
…Mode) (#2944)

* fix(jsx/hooks): fix useCallback type

Fixed problem where callbacks that take arguments could not be specified

Like React's useCallback
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/8c57769f1fb6a5982e2ba2c83219131a023e67e8/types/react/index.d.ts#L2055

* feat(jsx): export StrictMode as an alias of Fragment
* Pass options to getCookie/getSignedCookie

Adds support for getSignedCookie while also allowing for all options to getCookie/getSignedCookie to be set.

* Need to await getSignedCookie

* Add test

* style(jwt): lint and format code

* build(jwt): build jwt middleware for deno

* fix(jwt): get cookie in jwt middleware with/without prefixOptions

* feat(jwt): Use Signed Cookie in JWT Middleware

* test: add tests for JWT middleware with undercoverage

* fix: apply code formatting and linting fixes

---------

Co-authored-by: Christian Sirolli <34974905+HeyITGuyFixIt@users.noreply.github.com>
…(document metadata, "form" element and related hooks, and new behavior of hooks) (#2960)

* feat(jsx/dom): Introduce document metadata integration for compatibility with React 19

* test(jsx/dom): add test for "ref as a prop"

* refactor: tweaks element selector

* feat(jsx/dom): implement " Cleanup functions for refs" for compatibility with React 19

* feat(jsx/dom): implement `useDeferredValue()`

* refactor(jsx): insert metadata into head synchronously

* feat(jsx/dom): introduce form and related hooks

* feat(jsx): sort by precedence in documentMetadataTag

* feat(jsx): enable to specify action attribute as function

* fixup! feat(jsx): enable to specify action attribute as function

* refactor: refactor file layout

* feat(jsx): de-dupe tags

* feat(jsx): accept crossOrigin as crossorigin

* feat(jsx/dom): inprement blocking and precedence feature for jsx/dom

* feat(jsx): export new hooks

* fix(jsx/dom): fix some bugs in jsx/dom/hooks

* fix(jsx/dom): fix useOptimistic hook

* fix(jsx/dom): fix signature of useActionState

* fix(jsx): fix type declaration for HtmlEscapedCallback

* refactor(jsx): improve importing of intrinsic element components

* feat(jsx): support permalink for useActionState

* fix(jsx): fix composeRef cleanup in intrinsic element components

* fix(jsx): remove blocking attribute from DOM node

* fix(jsx/dom): preserve HTMLElement for meta data if it will be unmounted

* fix(jsx/dom): fix de-dupe logic in `documentMetadataTag`

* fix(jsx/dom): fix precedence logic in `documentMetadataTag`

* feat(jsx): add React 19 compatibility attributes

* fix(jsx): Handle NodeListOf<HTMLElement> as an iterable

* test: tweaks test data

* fix(jsx/dom): fix precedence logic in `documentMetadataTag`

* fix(jsx/dom): fix meta data tag insertion behavior

* fix(jsx/dom): set next node recursively for all previous nodes

* refactor(jsx/dom): use better variable names and types in form component

* fix(jsx/dom): fix meta data tag insertion behavior

* fix(jsx): improve document meta tag behavior in jsx

* test(jsx/dom): add tests for intrinsic-element/components

* fix(jsx/dom): fix `use()` hook wrong behavior

* test(jsx/dom): add tests for hooks

* test(jsx): add tests new hooks for form

* fix(jsx): update current state synchronously if no actions are provided

* test(jsx): add tests for new hooks for form handling

* docs(jsx): add documentation for hooks

* test(jsx): Update test

* refactor(jsx/hooks): remove unused constant

* feat(jsx): improve compatibility with React 19 (precedence / special behavior)

* feat(jsx/dom): improve compatibility with title element mount/unmount behavior

* feat(jsx): support async function for useTransition

* fix(jsx/dom): method is always 'post' when data is present

* feat(jsx): support formAction for input and button elements

* feat(jsx/dom): support suspense with child counter

* feat(jsx/dom): enable to handle async error in useTransition
* fix(typo): Fix typo in request.test.ts

* fix: remove 'unknown' string from AddressType

* fix: return undefined when addressType is invalid string

* fix: change addressType in getConnInfo function to undefined

* fix: change addressType in getConnInfo function to undefined

* fix: remove unused "unknown" string
* feat(jsx/dom): skip build children if props are the same

* test: fix format

* fix: re-calculate form element if state is updated
* Add Cloudflare Pages middleware handler

* fix: handle HTTPException

* fix: handle context.error

* fix: remove HonoRequest from conninfo test
* feat: Introduce IP Limit Middleware

* chore(jsr): add return types

* chore: format code

* fix: eslint

* feat: if allow is empty, set allow at * by default (#3)

* feat: if allow is empty, set allow at * by default

* fix

* feat: remove wildcard

* chore: fix spelling

* chore: format

* chore: sort imports

* fix: test

* chore: sort imports

* feat: renamed `ipLimit` to `ipRestriction`

* feat: accept `(c: Context) => string)`

* chore: format code

* feat: allow/deny -> allowList/denyList

* feat: suport function rule

* chore: format code

* fix: test code

* feat: suport custom errors

* fix: test code

* fix: name in test code

* feat: allow function to named function

* perf(ip-restriction): optimize ip-restriction middleware by prepare matcher function in advance

* feat: don't use random ip in test

* chore: ipVn to ipvn

* fix: test code

* fix: fix type error in ip-restriction middleware test

* chore: rename `IPRestrictRule` to `IPRestrictionRule`

* docs(ip-restriction): add a comment to explain the normalization of IPv6 address

* docs(ip-restriction): fix typo in comment

* refactor(ip-restriction): rename convertIPv6ToString to convertIPv6BinaryToString

* feat: support to receive `Context` in `onError`

* fix: #2813 (comment)

* fix: format code

* feat: use `Forbidden`

* tracking the `next`

* remove importing `HonoRequest`

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
* add conninfo helper for lambda@edge

* export getConnInfo
* feat: Intoroduce service worker adapter

* test: add test

* chore: format code

* refactor: handler.ts

* chore: remove unused import

* fix: add webworker to jsr.json

* fix: triple slash directives to tsconfig.json

* feat: add types.ts to define worker types
* feat(middleware): introduce Request ID middleware

* fix not to accept empty string in header

* rename requestID to requestId

* pass the context to the generator option

* add typesVersions

* fix typo

Co-Authored-By: Taku Amano <taku@taaas.jp>

* change to generate id if validation fails

Co-Authored-By: Taku Amano <taku@taaas.jp>

* fix limit length test

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
* feat(middleware/predicate): Introduce predicate middleware

* fix: apply `bun run format:fix`

* refactor: rename middleware predicate -> combine
* feat(types): allow passing `interface`s as Bindings / Variables

* test(context): add test for c.var

* fix lint warning

* test(types): add test for Bindings types
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 97.83968% with 38 lines in your changes missing coverage. Please review.

Project coverage is 96.18%. Comparing base (2d01359) to head (c632511).

Files Patch % Lines
src/jsx/dom/intrinsic-element/components.ts 97.38% 10 Missing ⚠️
src/middleware/ip-restriction/index.ts 94.94% 9 Missing ⚠️
src/jsx/intrinsic-element/components.ts 96.00% 7 Missing ⚠️
src/adapter/service-worker/index.ts 0.00% 5 Missing ⚠️
src/adapter/cloudflare-pages/index.ts 0.00% 1 Missing ⚠️
src/adapter/lambda-edge/index.ts 0.00% 1 Missing ⚠️
src/adapter/vercel/index.ts 0.00% 1 Missing ⚠️
src/helper/html/index.ts 87.50% 1 Missing ⚠️
src/jsx/context.ts 96.00% 1 Missing ⚠️
src/jsx/dom/render.ts 99.24% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3144      +/-   ##
==========================================
+ Coverage   95.87%   96.18%   +0.31%     
==========================================
  Files         137      151      +14     
  Lines       13514    15056    +1542     
  Branches     2300     2612     +312     
==========================================
+ Hits        12956    14482    +1526     
- Misses        558      574      +16     

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

@yusukebe yusukebe merged commit 2f4bb3e into main Jul 16, 2024
26 checks passed
@yusukebe yusukebe deleted the next branch July 16, 2024 13:57
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.

9 participants