Skip to content

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

Merged
titanism merged 5 commits intokoajs:masterfrom
harryby1149:up-path-to-regex-version
Sep 13, 2024
Merged

Chore: Update path-to-regex to v8.1.0#189
titanism merged 5 commits intokoajs:masterfrom
harryby1149:up-path-to-regex-version

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.

@3imed-jaberi 3imed-jaberi self-requested a review September 12, 2024 22:37
@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);

@harryby1149 harryby1149 force-pushed the up-path-to-regex-version branch from c37e557 to 1a2ff6c Compare September 13, 2024 12:36
@titanism titanism merged commit b5b08ba into koajs:master Sep 13, 2024
@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
3imed-jaberi pushed a commit that referenced this pull request Aug 2, 2025
* 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 Aug 2, 2025
* 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