Skip to content

Commit

Permalink
Merge pull request #7 from markwylde/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
markwylde authored Sep 12, 2024
2 parents 6f437fd + 4e064bf commit ba9914b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface RoutemeupResult {
export function routemeup(
routes: RouteMap,
options: {
method: string;
url: string;
method?: string;
url?: string;
}
): RoutemeupResult | null;

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "routemeup",
"version": "4.0.0",
"version": "4.1.0",
"type": "module",
"description": "A simple url router that can work on a server or web client with minimal magic.",
"main": "index.js",
Expand All @@ -20,10 +20,10 @@
},
"license": "MIT",
"devDependencies": {
"basictap": "^4.3.2",
"c8": "^7.13.0"
"basictap": "^4.3.5",
"c8": "^10.1.2"
},
"dependencies": {
"path-to-regexp": "^6.2.1"
"path-to-regexp": "^8.1.0"
}
}
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ test('routemeup - found - special characters in route', t => {
t.plan(1);

const routes = {
'/test/:param([a-z]+)': {
'/test/:param': {
GET: (example, tokens) => `test/${example}/${tokens.param}:get`,
},
};

const route = routemeup(routes, { url: '/test/value', method: 'get' });
const route = routemeup(routes, { url: '/test/+({[', method: 'get' });

if (route) {
const result = route.controller('firstArg', route.tokens);
t.equal(result, 'test/firstArg/value:get');
t.equal(result, 'test/firstArg/+({[:get');
} else {
t.fail('Route not found');
}
Expand Down

0 comments on commit ba9914b

Please sign in to comment.