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

fix: support router.verb(method, path, controllerString) #12

Merged
merged 2 commits into from
Jun 16, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Jun 16, 2024

Summary by CodeRabbit

  • New Features

    • Added new test cases to ensure routing functionality using controller strings and regular expressions.
  • Bug Fixes

    • Updated routing logic to better handle different types of paths and middlewares.
  • Documentation

    • Added a contributors section with avatars and GitHub profile links to the README file.
  • Chores

    • Updated Node.js version in workflow and package requirements to 18.19.0 or newer.
    • Dropped support for Node.js versions older than 18.19.0 and removed support for generator functions.

Copy link

coderabbitai bot commented Jun 16, 2024

Walkthrough

The overall changes introduced in this update enhance the routing functionality in the Router class, add comprehensive tests for routing in an Egg.js application, update the minimum required Node.js version, and introduce a contributors section in the README. Key improvements include handling various path/middleware types in routing and ensuring compatibility with Node.js 18.19.0 and above.

Changes

File Path Change Summary
src/Router.ts Updated routing logic to handle different nameOrPath and pathOrMiddleware types.
test/EggRouter.test.ts Added test cases for routing using controller strings and regular expressions.
.github/workflows/nodejs.yml Updated Node.js version in workflow from 18.7.0 to 18.19.0.
CHANGELOG.md Documented the changes including dropping support for Node.js < 18.19.0.
README.md Added a new section listing various contributors with profiles and avatars.
package.json Updated minimum Node.js version from >= 18.7.0 to >= 18.19.0.

Poem

🐰 Amidst the code where routers flow,
Paths and regex now we know.
Controllers match, tests align,
Node's new version, future's sign.
Contributors listed in a row,
Together we make our project grow. 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.41%. Comparing base (83d3309) to head (197f365).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #12   +/-   ##
=======================================
  Coverage   99.40%   99.41%           
=======================================
  Files           4        4           
  Lines        1681     1699   +18     
  Branches      216      220    +4     
=======================================
+ Hits         1671     1689   +18     
  Misses         10       10           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 38eb803 and a84dbf0.

Files selected for processing (2)
  • src/Router.ts (1 hunks)
  • test/EggRouter.test.ts (1 hunks)
Additional context used
Biome
test/EggRouter.test.ts

[error] 20-20: This generator function doesn't contain yield. (lint/correctness/useYield)


[error] 225-225: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 226-226: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 227-227: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 264-264: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

src/Router.ts

[error] 316-319: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 334-337: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 305-305: Shouldn't redeclare 'allowedMethods'. Consider to delete it or rename it. (lint/suspicious/noRedeclare)

'allowedMethods' is defined here:

Additional comments not posted (3)
test/EggRouter.test.ts (2)

162-193: The implementation of app.verb(urlRegex, controllerString) correctly handles regular expressions and controller strings. However, ensure that the regular expressions are accurately capturing the intended URLs.


138-160: The test case for app.verb(url, controllerString) seems well-implemented, but ensure the controller strings ('foo' and 'hello.world') are resolved correctly within the application.

src/Router.ts (1)

604-622: The modifications to handle different input types for routing methods are well-implemented. However, ensure the naming conventions and middleware assignments are consistent and clear throughout the application.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range and nitpick comments (1)
README.md (1)

38-38: Add a brief description under the "Contributors" section.

Consider adding a brief description for the "Contributors" section to explain what visitors can expect from this part of the document, such as acknowledging those who have contributed significantly to the project.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a84dbf0 and 197f365.

Files selected for processing (4)
  • .github/workflows/nodejs.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/nodejs.yml
  • package.json
Additional context used
LanguageTool
CHANGELOG.md

[grammar] ~131-~131: Make sure that the singular noun after the number ‘5.4’ is correct. (CD_POINT_CD_NN)
Context: .../282) ## 7.1.0 - Backports: merge 5.4 work into the 7.x upstream. See 5.4.0 update...


[uncategorized] ~135-~135: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ....1 - Fix: allowedMethods should be ctx.method not this.method [#215](https://github.c...


[uncategorized] ~198-~198: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: ....3.2 - Do not send 405 if route matched but status is 404. Fixes #112, closes #114....

README.md

[duplication] ~27-~27: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... - router.use([path], middleware) ⇒ Router - [router.prefix(prefix) ⇒ Router](#routerprefixp...


[duplication] ~28-~28: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...outer) - router.prefix(prefix) ⇒ Router - [router.allowedMethods([options]) ⇒ function]...


[duplication] ~30-~30: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...direct(source, destination, [code]) ⇒ Router](#routerredirectsource-destination-code--router) - [router.route(name) ⇒ Layer | false](#routerrou...


[duplication] ~33-~33: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... - router.param(param, middleware) ⇒ Router - [Router.url(path, params [, options]) ⇒ Strin...


[uncategorized] ~79-~79: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ethods, where verb is one of the HTTP verbs such as router.get() or `router.post(...


[misspelling] ~391-~391: This word is normally spelled as one. (EN_COMPOUNDS_AUTO_LOADING)
Context: ... for named route parameters. Useful for auto-loading or validation. Kind: instance meth...


[uncategorized] ~474-~474: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’). (AUTO_HYPHEN)
Context: ...//github.com/xudafeng/git-contributor), auto updated at Sun Jun 16 2024 12:28:11 GMT+0800....

Markdownlint
CHANGELOG.md

59-59: Expected: atx; Actual: setext (MD003, heading-style)
Heading style


65-65: Expected: atx; Actual: setext (MD003, heading-style)
Heading style


71-71: Expected: atx; Actual: setext (MD003, heading-style)
Heading style


80-80: Expected: atx; Actual: setext (MD003, heading-style)
Heading style


95-95: Expected: atx; Actual: setext (MD003, heading-style)
Heading style


17-17: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


18-18: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


25-25: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


26-26: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


28-28: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


31-31: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


32-32: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


35-35: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


36-36: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


38-38: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


41-41: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


42-42: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


43-43: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


45-45: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


46-46: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


47-47: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


48-48: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


49-49: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


51-51: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


107-107: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


108-108: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


109-109: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


113-113: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


117-117: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


121-121: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


122-122: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


123-123: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


127-127: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


131-131: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


135-135: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


139-139: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


143-143: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


148-148: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


152-152: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


153-153: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


154-154: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


156-156: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


160-160: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


164-164: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


165-165: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


169-169: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


170-170: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


171-171: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


172-172: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


173-173: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


174-174: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


178-178: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


182-182: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


186-186: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


190-190: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


192-192: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


193-193: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


198-198: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


202-202: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


206-206: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


207-207: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


211-211: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


213-213: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


241-241: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


63-63: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


69-69: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


75-75: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


78-78: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


84-84: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


87-87: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


88-88: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


89-89: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


92-92: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


93-93: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


99-99: Expected: 0; Actual: 2 (MD007, ul-indent)
Unordered list indentation


5-5: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


12-12: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


59-59: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


65-65: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


71-71: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


80-80: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


95-95: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


103-103: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


63-63: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


69-69: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


75-75: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


78-78: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


84-84: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


87-87: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


92-92: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


99-99: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


62-62: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


68-68: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


74-74: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


77-77: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


83-83: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


86-86: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


91-91: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


98-98: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading

README.md

201-201: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


223-223: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


252-252: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


275-275: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


362-362: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


401-401: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


437-437: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe (MD055, table-pipe-style)
Table pipe style


472-472: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe (MD055, table-pipe-style)
Table pipe style


472-472: Expected: 6; Actual: 5; Too few cells, row will be missing data (MD056, table-column-count)
Table column count

Comment on lines +15 to +18
* drop Node.js < 18.19.0 support

- Drop generator function support
- Drop Node.js < 18.7.0 support
- Drop Node.js < 18.19.0 support
Copy link

Choose a reason for hiding this comment

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

Clarify the nature of the breaking changes for better understanding.

- * drop Node.js < 18.19.0 support
- - Drop generator function support
- - Drop Node.js < 18.19.0 support
+ * Dropped support for Node.js versions below 18.19.0
+ - Removed support for generator functions

This edit ensures that each breaking change is distinctly mentioned and avoids repetition. It also clarifies that support for generator functions has been removed, not just deprecated.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* drop Node.js < 18.19.0 support
- Drop generator function support
- Drop Node.js < 18.7.0 support
- Drop Node.js < 18.19.0 support
* Dropped support for Node.js versions below 18.19.0
- Removed support for generator functions
Tools
Markdownlint

17-17: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


18-18: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style

Comment on lines +462 to +472
## Contributors

|[<img src="https://avatars.githubusercontent.com/u/1112718?v=4" width="100px;"/><br/><sub><b>alexmingoia</b></sub>](https://github.com/alexmingoia)<br/>|[<img src="https://avatars.githubusercontent.com/u/1413330?v=4" width="100px;"/><br/><sub><b>jbielick</b></sub>](https://github.com/jbielick)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/1024246?v=4" width="100px;"/><br/><sub><b>wachunei</b></sub>](https://github.com/wachunei)<br/>|[<img src="https://avatars.githubusercontent.com/u/160197?v=4" width="100px;"/><br/><sub><b>dominicbarnes</b></sub>](https://github.com/dominicbarnes)<br/>|
| :---: | :---: | :---: | :---: | :---: | :---: |
|[<img src="https://avatars.githubusercontent.com/u/25254?v=4" width="100px;"/><br/><sub><b>tj</b></sub>](https://github.com/tj)<br/>|[<img src="https://avatars.githubusercontent.com/u/166834?v=4" width="100px;"/><br/><sub><b>aheckmann</b></sub>](https://github.com/aheckmann)<br/>|[<img src="https://avatars.githubusercontent.com/u/385716?v=4" width="100px;"/><br/><sub><b>kilianc</b></sub>](https://github.com/kilianc)<br/>|[<img src="https://avatars.githubusercontent.com/u/98955?v=4" width="100px;"/><br/><sub><b>secretfader</b></sub>](https://github.com/secretfader)<br/>|[<img src="https://avatars.githubusercontent.com/u/474587?v=4" width="100px;"/><br/><sub><b>ilkkao</b></sub>](https://github.com/ilkkao)<br/>|[<img src="https://avatars.githubusercontent.com/u/6873217?v=4" width="100px;"/><br/><sub><b>HeavenDuke</b></sub>](https://github.com/HeavenDuke)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/2842176?v=4" width="100px;"/><br/><sub><b>XadillaX</b></sub>](https://github.com/XadillaX)<br/>|[<img src="https://avatars.githubusercontent.com/u/200876?v=4" width="100px;"/><br/><sub><b>yiminghe</b></sub>](https://github.com/yiminghe)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/6794386?v=4" width="100px;"/><br/><sub><b>vkhv</b></sub>](https://github.com/vkhv)<br/>|[<img src="https://avatars.githubusercontent.com/u/7627362?v=4" width="100px;"/><br/><sub><b>vikramdurai</b></sub>](https://github.com/vikramdurai)<br/>|[<img src="https://avatars.githubusercontent.com/u/9271565?v=4" width="100px;"/><br/><sub><b>Tankenstein</b></sub>](https://github.com/Tankenstein)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/2822996?v=4" width="100px;"/><br/><sub><b>richardprior</b></sub>](https://github.com/richardprior)<br/>|[<img src="https://avatars.githubusercontent.com/u/1635441?v=4" width="100px;"/><br/><sub><b>joesonw</b></sub>](https://github.com/joesonw)<br/>|[<img src="https://avatars.githubusercontent.com/u/875091?v=4" width="100px;"/><br/><sub><b>ifroz</b></sub>](https://github.com/ifroz)<br/>|[<img src="https://avatars.githubusercontent.com/u/13130706?v=4" width="100px;"/><br/><sub><b>jeynish</b></sub>](https://github.com/jeynish)<br/>|[<img src="https://avatars.githubusercontent.com/u/72027?v=4" width="100px;"/><br/><sub><b>jergason</b></sub>](https://github.com/jergason)<br/>|[<img src="https://avatars.githubusercontent.com/u/227713?v=4" width="100px;"/><br/><sub><b>atian25</b></sub>](https://github.com/atian25)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/130963?v=4" width="100px;"/><br/><sub><b>lagden</b></sub>](https://github.com/lagden)<br/>|[<img src="https://avatars.githubusercontent.com/u/484559?v=4" width="100px;"/><br/><sub><b>fixe</b></sub>](https://github.com/fixe)<br/>|[<img src="https://avatars.githubusercontent.com/u/2671328?v=4" width="100px;"/><br/><sub><b>viliam-jobko</b></sub>](https://github.com/viliam-jobko)<br/>|[<img src="https://avatars.githubusercontent.com/u/2971112?v=4" width="100px;"/><br/><sub><b>mzyy94</b></sub>](https://github.com/mzyy94)<br/>|[<img src="https://avatars.githubusercontent.com/u/687842?v=4" width="100px;"/><br/><sub><b>jeromew</b></sub>](https://github.com/jeromew)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/8069753?v=4" width="100px;"/><br/><sub><b>RobertHerhold</b></sub>](https://github.com/RobertHerhold)<br/>|[<img src="https://avatars.githubusercontent.com/u/4619802?v=4" width="100px;"/><br/><sub><b>yudppp</b></sub>](https://github.com/yudppp)<br/>|[<img src="https://avatars.githubusercontent.com/u/3173170?v=4" width="100px;"/><br/><sub><b>thedark1337</b></sub>](https://github.com/thedark1337)<br/>|[<img src="https://avatars.githubusercontent.com/u/6903313?v=4" width="100px;"/><br/><sub><b>x-cold</b></sub>](https://github.com/x-cold)<br/>|[<img src="https://avatars.githubusercontent.com/u/6713367?v=4" width="100px;"/><br/><sub><b>zzuieliyaoli</b></sub>](https://github.com/zzuieliyaoli)<br/>|[<img src="https://avatars.githubusercontent.com/u/81891?v=4" width="100px;"/><br/><sub><b>ryankask</b></sub>](https://github.com/ryankask)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/4810916?v=4" width="100px;"/><br/><sub><b>pschwyter</b></sub>](https://github.com/pschwyter)<br/>|[<img src="https://avatars.githubusercontent.com/u/62940?v=4" width="100px;"/><br/><sub><b>mikefrey</b></sub>](https://github.com/mikefrey)<br/>|[<img src="https://avatars.githubusercontent.com/u/300104?v=4" width="100px;"/><br/><sub><b>dizlexik</b></sub>](https://github.com/dizlexik)<br/>|[<img src="https://avatars.githubusercontent.com/u/2505474?v=4" width="100px;"/><br/><sub><b>jeffijoe</b></sub>](https://github.com/jeffijoe)<br/>|[<img src="https://avatars.githubusercontent.com/u/349336?v=4" width="100px;"/><br/><sub><b>iliakan</b></sub>](https://github.com/iliakan)<br/>|[<img src="https://avatars.githubusercontent.com/u/615334?v=4" width="100px;"/><br/><sub><b>frederickfogerty</b></sub>](https://github.com/frederickfogerty)<br/>|
[<img src="https://avatars.githubusercontent.com/u/2552790?v=4" width="100px;"/><br/><sub><b>t3chnoboy</b></sub>](https://github.com/t3chnoboy)<br/>|[<img src="https://avatars.githubusercontent.com/u/1484279?v=4" width="100px;"/><br/><sub><b>bitinn</b></sub>](https://github.com/bitinn)<br/>|[<img src="https://avatars.githubusercontent.com/u/1441230?v=4" width="100px;"/><br/><sub><b>drGrove</b></sub>](https://github.com/drGrove)<br/>|[<img src="https://avatars.githubusercontent.com/u/12624092?v=4" width="100px;"/><br/><sub><b>CreativeCactus</b></sub>](https://github.com/CreativeCactus)<br/>|[<img src="https://avatars.githubusercontent.com/u/1773785?v=4" width="100px;"/><br/><sub><b>bguiz</b></sub>](https://github.com/bguiz)<br/>
Copy link

Choose a reason for hiding this comment

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

Add alternative text to images for better accessibility.

Please ensure to add alternative text to all contributor images to improve accessibility. For instance:

<img src="https://avatars.githubusercontent.com/u/1112718?v=4" width="100px;" alt="Profile image of alexmingoia"/><br/><sub><b>alexmingoia</b></sub>

This change helps visually impaired users understand the content better.

Tools
Markdownlint

464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


464-464: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


466-466: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


467-467: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


468-468: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


469-469: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


470-470: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


471-471: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: null (MD045, no-alt-text)
Images should have alternate text (alt text)


472-472: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe (MD055, table-pipe-style)
Table pipe style


472-472: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe (MD055, table-pipe-style)
Table pipe style


472-472: Expected: 6; Actual: 5; Too few cells, row will be missing data (MD056, table-column-count)
Table column count

README.md Show resolved Hide resolved
@fengmk2 fengmk2 merged commit 34cea74 into master Jun 16, 2024
9 checks passed
@fengmk2 fengmk2 deleted the fix-controller-string branch June 16, 2024 04:31
fengmk2 pushed a commit that referenced this pull request Jun 16, 2024
[skip ci]

## [3.0.2](v3.0.1...v3.0.2) (2024-06-16)

### Bug Fixes

* support router.verb(method, path, controllerString) ([#12](#12)) ([34cea74](34cea74))
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.

1 participant