Skip to content

Commit

Permalink
refactor: support Node.js v18+ and replace the debug module with nati…
Browse files Browse the repository at this point in the history
…ve Node.js one (#181)
  • Loading branch information
3imed-jaberi committed Aug 15, 2024
1 parent f7ffb93 commit 83d2b34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
os:
- ubuntu-latest
node_version:
- 18
- 20
- 22
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* @link https://github.com/alexmingoia/koa-router
*/
const http = require('node:http');
const util = require('node:util');

const debug = util.debuglog('koa-router');

const compose = require('koa-compose');
const HttpError = require('http-errors');
const debug = require('debug')('koa-router');
const { pathToRegexp } = require('path-to-regexp');

const Layer = require('./layer');
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
}
],
"dependencies": {
"debug": "^4.3.6",
"http-errors": "^2.0.0",
"koa-compose": "^4.1.0",
"path-to-regexp": "^6.2.2"
Expand All @@ -45,7 +44,7 @@
"xo": "0.53.1"
},
"engines": {
"node": ">= 20"
"node": ">= 18"
},
"files": [
"lib"
Expand Down

0 comments on commit 83d2b34

Please sign in to comment.