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

Chore: Update path-to-regex to v8.1.0 #189

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

harryby1149
Copy link
Contributor

@harryby1149 harryby1149 commented Sep 12, 2024

Checklist

  • I have ensured my pull request is not behind the main or master branch of the original repository.
  • I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
  • I have written a commit message that passes commitlint linting.
  • I have ensured that my code changes pass linting tests.
  • I have ensured that my code changes pass unit tests.
  • I have described my pull request and the reasons for code changes along with context if necessary.

Kudos to @iambumblehead #188 . This Pull Request ups the version of path-to-regex dependency to latest. Updates options logic to pass new parsing option down to the layer object.

@Ngorror
Copy link

Ngorror commented Sep 12, 2024

is it possible to release v13 also to npmjs with this PR?
now only v 12.0.1 is available.
I can install it via

{
    "dependencies": {
        "koa-router": "koajs/router"
    }
}

although I like more

{
    "dependencies": {
        "koa-router": "^13.0.0"
    }
}

:)

@iambumblehead
Copy link

@Ngorror #109 koa-router vs @koa/router

This module is forked from the original koa-router due to its lack of activity, and this repository is now the official version. Install with npm i @koa/router.

@iambumblehead
Copy link

String() is safer than .toString() because it does not error on primitive boolean and number values. Tests here have no runtime errors and perhaps string casting is un-needed

-      replace[key] = value.toString();
+      replace[key] = String(value);

@titanism titanism merged commit b5b08ba into koajs:master Sep 13, 2024
3 checks passed
@titanism
Copy link
Contributor

@harryby1149 can you submit another PR that adds docs where necessary for pathIsRegexp and trailing?

@titanism
Copy link
Contributor

3imed-jaberi pushed a commit that referenced this pull request Sep 17, 2024
* chore: upgrade path-to-regex to v8.1.0

* chore: upgrade path-to-regex to v8.1.0

* chore: clean up test syntax

* chore: clean up whitespace changes

* chore: use String constructor instead of .toString for type conversion
3imed-jaberi pushed a commit that referenced this pull request Sep 18, 2024
* chore: upgrade path-to-regex to v8.1.0

* chore: upgrade path-to-regex to v8.1.0

* chore: clean up test syntax

* chore: clean up whitespace changes

* chore: use String constructor instead of .toString for type conversion
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.

4 participants