Skip to content

Commit 0983158

Browse files
authored
refactor: replace 'path-is-absolute' dep with node:path isAbsolute method (#5830)
* refactor: replace 'path-is-absolute' dep with node:path isAbsolute method * docs: add path-is-absolute dep removal to History.md
1 parent 41c054c commit 0983158

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

History.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
unreleased
22
=========================
3+
* remove:
4+
- `path-is-absolute` dependency - use `path.isAbsolute` instead
35
* breaking:
46
* `res.status()` accepts only integers, and input must be greater than 99 and less than 1000
57
* will throw a `RangeError: Invalid status code: ${code}. Status code must be greater than 99 and less than 1000.` for inputs outside this range

lib/response.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var http = require('http');
2121
var onFinished = require('on-finished');
2222
var mime = require('mime-types')
2323
var path = require('path');
24-
var pathIsAbsolute = require('path-is-absolute');
24+
var pathIsAbsolute = require('path').isAbsolute;
2525
var statuses = require('statuses')
2626
var merge = require('utils-merge');
2727
var sign = require('cookie-signature').sign;

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"on-finished": "2.4.1",
4949
"once": "1.4.0",
5050
"parseurl": "~1.3.3",
51-
"path-is-absolute": "1.0.1",
5251
"proxy-addr": "~2.0.7",
5352
"qs": "6.11.0",
5453
"range-parser": "~1.2.1",

0 commit comments

Comments
 (0)