reachable-url 1.6.3 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -7
  2. package/index.js +1 -1
  3. package/package.json +15 -13
package/README.md CHANGED
@@ -4,13 +4,7 @@
4
4
  [![Coverage Status](https://img.shields.io/coveralls/Kikobeats/reachable-url.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/reachable-url)
5
5
  [![NPM Status](https://img.shields.io/npm/dm/reachable-url.svg?style=flat-square)](https://www.npmjs.org/package/reachable-url)
6
6
 
7
- > Given an url resolve it as fast as possible.
8
-
9
- Given an URL, it will be resolved fastest as possible.
10
-
11
- It will be performing different HTTP requests in parallel (GET, HEAD) and it will return the first response to respond.
12
-
13
- Don't use this module for consuming `body` since it isn't always be available.
7
+ > Given an URL, it resolves as fast as possible, performing a GET without downloading the body.
14
8
 
15
9
  ## Install
16
10
 
package/index.js CHANGED
@@ -27,7 +27,7 @@ const createFetcher = method => async (url, opts = {}) => {
27
27
 
28
28
  req.on('response', res => {
29
29
  response = res
30
- response.once('data', res.destroy)
30
+ response.once('data', () => req.cancel())
31
31
  })
32
32
 
33
33
  req.on('redirect', res => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "reachable-url",
3
3
  "description": "Given an url resolve it as fast as possible",
4
4
  "homepage": "https://nicedoc.io/Kikobeats/reachable-url",
5
- "version": "1.6.3",
5
+ "version": "1.6.6",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
@@ -33,17 +33,18 @@
33
33
  "@commitlint/cli": "latest",
34
34
  "@commitlint/config-conventional": "latest",
35
35
  "ava": "latest",
36
+ "c8": "latest",
36
37
  "ci-publish": "latest",
37
38
  "conventional-github-releaser": "latest",
38
39
  "finepack": "latest",
39
40
  "git-authors-cli": "latest",
40
- "git-dirty": "latest",
41
- "lint-staged": "latest",
41
+ "nano-staged": "latest",
42
42
  "npm-check-updates": "latest",
43
- "nyc": "latest",
44
43
  "prettier-standard": "latest",
45
44
  "simple-git-hooks": "latest",
46
- "standard": "latest"
45
+ "standard": "latest",
46
+ "standard-markdown": "latest",
47
+ "standard-version": "latest"
47
48
  },
48
49
  "engines": {
49
50
  "node": ">=8"
@@ -53,16 +54,17 @@
53
54
  ],
54
55
  "scripts": {
55
56
  "clean": "rm -rf node_modules",
57
+ "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
56
58
  "lint": "standard",
57
59
  "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
58
- "precommit": "lint-staged",
59
- "prerelease": "npm run update:check",
60
+ "precommit": "nano-staged",
61
+ "prerelease": "npm run update:check && npm run contributors",
60
62
  "pretest": "npm run lint",
61
63
  "preversion": "git-authors-cli && git add package.json",
62
64
  "release": "standard-version -a",
63
65
  "release:github": "conventional-github-releaser -p angular",
64
66
  "release:tags": "git push --follow-tags origin HEAD:master",
65
- "test": "nyc ava",
67
+ "test": "c8 ava --verbose --serial",
66
68
  "update": "ncu -u",
67
69
  "update:check": "ncu -- --error-level 2"
68
70
  },
@@ -72,16 +74,16 @@
72
74
  "@commitlint/config-conventional"
73
75
  ]
74
76
  },
75
- "lint-staged": {
76
- "package.json": [
77
- "finepack"
78
- ],
77
+ "nano-staged": {
79
78
  "*.js": [
80
79
  "prettier-standard"
80
+ ],
81
+ "package.json": [
82
+ "finepack"
81
83
  ]
82
84
  },
83
85
  "simple-git-hooks": {
84
86
  "commit-msg": "npx commitlint --edit",
85
- "pre-commit": "npx lint-staged"
87
+ "pre-commit": "npx nano-staged"
86
88
  }
87
89
  }