Skip to content

Commit dc4ef69

Browse files
committed
Meta tweaks
1 parent c42f53b commit dc4ef69

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm install
2222
- run: npm test
23-
- uses: codecov/codecov-action@v1
24-
if: matrix.node-version == 14
23+
- uses: codecov/codecov-action@v2
24+
if: matrix.node-version == 16
2525
with:
2626
fail_ci_if_error: true

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export default function normalizeUrl(urlString, options) {
192192

193193
// Remove query unwanted parameters
194194
if (Array.isArray(options.removeQueryParameters)) {
195+
// eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy.
195196
for (const key of [...urlObject.searchParams.keys()]) {
196197
if (testParameter(key, options.removeQueryParameters)) {
197198
urlObject.searchParams.delete(key);

index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ normalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});
1111
normalizeUrl('user:[email protected]', {stripAuthentication: false});
1212
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
1313
normalizeUrl('https://sindresorhus.com', {stripProtocol: true});
14-
normalizeUrl('http://www.sindresorhus.com', {stripWWW: false});
14+
normalizeUrl('http://www.sindresorhus.com', {stripWWW: false}); // eslint-disable-line @typescript-eslint/naming-convention
1515
normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
1616
removeQueryParameters: ['ref', /test/],
1717
});

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"node": ">=12.20"
1717
},
1818
"scripts": {
19-
"test": "xo && c8 ava && tsd"
19+
"test": "ava && tsd"
2020
},
2121
"files": [
2222
"index.js",
@@ -38,11 +38,10 @@
3838
"canonical"
3939
],
4040
"devDependencies": {
41-
"ava": "^3.15.0",
42-
"c8": "^7.7.3",
43-
"tsd": "^0.17.0",
44-
"typescript": "^4.3.5",
45-
"xo": "^0.41.0"
41+
"ava": "^4.0.1",
42+
"c8": "^7.11.0",
43+
"tsd": "^0.19.1",
44+
"xo": "^0.47.0"
4645
},
4746
"c8": {
4847
"reporter": [

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
88

99
## Install
1010

11-
```
12-
$ npm install normalize-url
11+
```sh
12+
npm install normalize-url
1313
```
1414

1515
*If you need to use this in the browser, use version 4: `npm i normalize-url@4`*

0 commit comments

Comments
 (0)