Skip to content

Commit 52f2290

Browse files
committed
Require Node.js 14
1 parent 882cb84 commit 52f2290

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface Options {
1+
export type Options = {
22
/**
33
@default 'http:'
44
@@ -280,7 +280,7 @@ export interface Options {
280280
```
281281
*/
282282
readonly sortQueryParameters?: boolean;
283-
}
283+
};
284284

285285
/**
286286
[Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL.

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
"url": "https://sindresorhus.com"
1212
},
1313
"type": "module",
14-
"exports": "./index.js",
14+
"exports": {
15+
"types": "./index.d.ts",
16+
"default": "./index.js"
17+
},
1518
"engines": {
16-
"node": ">=12.20"
19+
"node": ">=14.16"
1720
},
1821
"scripts": {
1922
"test": "xo && c8 ava && tsd"
@@ -38,10 +41,10 @@
3841
"canonical"
3942
],
4043
"devDependencies": {
41-
"ava": "^4.0.1",
42-
"c8": "^7.11.0",
43-
"tsd": "^0.19.1",
44-
"xo": "^0.47.0"
44+
"ava": "^5.0.1",
45+
"c8": "^7.12.0",
46+
"tsd": "^0.24.1",
47+
"xo": "^0.52.4"
4548
},
4649
"c8": {
4750
"reporter": [

test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,4 +406,5 @@ test('ignore custom schemes', t => {
406406
t.is(normalizeUrl('tel:004346382763'), 'tel:004346382763');
407407
t.is(normalizeUrl('mailto:[email protected]'), 'mailto:[email protected]');
408408
t.is(normalizeUrl('sindre://www.sindresorhus.com'), 'sindre://www.sindresorhus.com');
409+
t.is(normalizeUrl('foo:bar'), 'foo:bar');
409410
});

0 commit comments

Comments
 (0)