Skip to content

Commit e585770

Browse files
authored
refactor: remove deprecated url.parse() (#1176)
1 parent d7d7916 commit e585770

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/path-filter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type * as http from 'node:http';
2-
import * as url from 'node:url';
32

43
import * as isGlob from 'is-glob';
54
import * as micromatch from 'micromatch';
@@ -88,7 +87,7 @@ function matchMultiPath(pathFilterList: string[], uri?: string) {
8887
* @return {String} RFC 3986 path
8988
*/
9089
function getUrlPathName(uri?: string) {
91-
return uri && url.parse(uri).pathname;
90+
return uri && new URL(uri, 'http://0.0.0.0').pathname;
9291
}
9392

9493
function isStringPath(pathFilter: string) {

0 commit comments

Comments
 (0)