xml-urls 2.1.24 → 2.1.27

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.
package/README.md CHANGED
@@ -1,14 +1,10 @@
1
1
  # xml-urls
2
2
 
3
3
  ![Last version](https://img.shields.io/github/tag/Kikobeats/xml-urls.svg?style=flat-square)
4
- [![Build Status](https://img.shields.io/travis/Kikobeats/xml-urls/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/xml-urls)
5
4
  [![Coverage Status](https://img.shields.io/coveralls/Kikobeats/xml-urls.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/xml-urls)
6
- [![Dependency status](https://img.shields.io/david/Kikobeats/xml-urls.svg?style=flat-square)](https://david-dm.org/Kikobeats/xml-urls)
7
- [![Dev Dependencies Status](https://img.shields.io/david/dev/Kikobeats/xml-urls.svg?style=flat-square)](https://david-dm.org/Kikobeats/xml-urls#info=devDependencies)
8
5
  [![NPM Status](https://img.shields.io/npm/dm/xml-urls.svg?style=flat-square)](https://www.npmjs.org/package/xml-urls)
9
- [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/Kikobeats)
10
6
 
11
- > Get all urls from a Feed/Atom/RSS/Sitemap xml markup.
7
+ > Get all URLs detected inside a Feed/Atom/RSS/Sitemap xml markup.
12
8
 
13
9
  ## Install
14
10
 
package/index.js CHANGED
@@ -22,10 +22,7 @@ const getText = $ =>
22
22
 
23
23
  const isXmlUrl = url => REGEX_URL_XML.test(path.extname(url))
24
24
 
25
- const xmlUrls = async (
26
- url,
27
- { cheerioOpts = {}, whitelist = false, ...opts } = {}
28
- ) => {
25
+ const xmlUrls = async (url, { cheerioOpts = {}, whitelist = false, ...opts } = {}) => {
29
26
  const { origin: baseUrl } = new URL(url)
30
27
  const { html } = await getHTML(url, opts)
31
28
  const $ = cheerio.load(html, { xmlMode: true, ...cheerioOpts })
@@ -38,9 +35,7 @@ const xmlUrls = async (
38
35
  const iterator = async (set, url) => {
39
36
  const match = !isEmpty(whitelist) && matcher([url], concat(whitelist))
40
37
  if (!isEmpty(match)) return set
41
- const urls = isXmlUrl(url)
42
- ? await xmlUrls(url, opts)
43
- : [normalizeUrl(baseUrl, url)]
38
+ const urls = isXmlUrl(url) ? await xmlUrls(url, opts) : [normalizeUrl(baseUrl, url)]
44
39
  return new Set([...set, ...urls])
45
40
  }
46
41
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "xml-urls",
3
3
  "description": "Get all urls from a Feed/Atom/RSS/Sitemap xml markup.",
4
4
  "homepage": "https://nicedoc.io/Kikobeats/xml-urls",
5
- "version": "2.1.24",
5
+ "version": "2.1.27",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
@@ -24,29 +24,30 @@
24
24
  "xml"
25
25
  ],
26
26
  "dependencies": {
27
- "@metascraper/helpers": "~5.22.0",
27
+ "@metascraper/helpers": "~5.25.7",
28
28
  "aigle": "~1.14.1",
29
- "cheerio": "~1.0.0-rc.5",
30
- "html-get": "~2.8.20",
31
- "lodash": "~4.17.21"
29
+ "cheerio": "~1.0.0-rc.10",
30
+ "html-get": "~2.9.8",
31
+ "lodash": "~4.17.21",
32
+ "matcher": "~4.0.0"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@commitlint/cli": "latest",
35
36
  "@commitlint/config-conventional": "latest",
36
37
  "ava": "latest",
37
38
  "browserless": "latest",
39
+ "c8": "latest",
38
40
  "ci-publish": "latest",
39
41
  "conventional-github-releaser": "latest",
40
- "coveralls": "latest",
41
42
  "finepack": "latest",
42
43
  "git-authors-cli": "latest",
43
44
  "git-dirty": "latest",
44
- "husky": "latest",
45
- "lint-staged": "latest",
45
+ "nano-staged": "latest",
46
46
  "npm-check-updates": "latest",
47
- "nyc": "latest",
48
47
  "prettier-standard": "latest",
49
48
  "puppeteer": "latest",
49
+ "signal-exit": "latest",
50
+ "simple-git-hooks": "latest",
50
51
  "standard": "latest",
51
52
  "standard-markdown": "latest",
52
53
  "standard-version": "latest"
@@ -59,8 +60,7 @@
59
60
  ],
60
61
  "scripts": {
61
62
  "clean": "rm -rf node_modules",
62
- "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
63
- "coveralls": "nyc report --reporter=text-lcov | coveralls",
63
+ "contributors": "(git-authors-cli && finepack --sort-ignore-object-at ava && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
64
64
  "lint": "standard-markdown README.md && standard",
65
65
  "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
66
66
  "prerelease": "npm run update:check && npm run contributors",
@@ -69,28 +69,32 @@
69
69
  "release": "standard-version -a",
70
70
  "release:github": "conventional-github-releaser -p angular",
71
71
  "release:tags": "git push --follow-tags origin HEAD:master",
72
- "test": "nyc ava",
72
+ "test": "c8 ava",
73
73
  "update": "ncu -u",
74
74
  "update:check": "ncu -- --error-level 2"
75
75
  },
76
76
  "license": "MIT",
77
+ "ava": {
78
+ "files": [
79
+ "test/**/*",
80
+ "!test/util.js"
81
+ ]
82
+ },
77
83
  "commitlint": {
78
84
  "extends": [
79
85
  "@commitlint/config-conventional"
80
86
  ]
81
87
  },
82
- "husky": {
83
- "hooks": {
84
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
85
- "pre-commit": "lint-staged"
86
- }
87
- },
88
- "lint-staged": {
89
- "package.json": [
90
- "finepack"
91
- ],
88
+ "nano-staged": {
92
89
  "*.js": [
93
90
  "prettier-standard"
91
+ ],
92
+ "package.json": [
93
+ "finepack --sort-ignore-object-at ava"
94
94
  ]
95
+ },
96
+ "simple-git-hooks": {
97
+ "commit-msg": "npx commitlint --edit",
98
+ "pre-commit": "npx nano-staged"
95
99
  }
96
100
  }
package/CHANGELOG.md DELETED
@@ -1,281 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ### [2.1.24](https://github.com/Kikobeats/xml-urls/compare/v2.1.23...v2.1.24) (2021-06-01)
6
-
7
- ### [2.1.23](https://github.com/Kikobeats/xml-urls/compare/v2.1.22...v2.1.23) (2021-03-10)
8
-
9
- ### [2.1.22](https://github.com/Kikobeats/xml-urls/compare/v2.1.21...v2.1.22) (2021-02-08)
10
-
11
- ### [2.1.21](https://github.com/Kikobeats/xml-urls/compare/v2.1.20...v2.1.21) (2020-12-23)
12
-
13
- ### [2.1.20](https://github.com/Kikobeats/xml-urls/compare/v2.1.19...v2.1.20) (2020-12-17)
14
-
15
- ### [2.1.19](https://github.com/Kikobeats/xml-urls/compare/v2.1.18...v2.1.19) (2020-12-04)
16
-
17
- ### [2.1.18](https://github.com/Kikobeats/xml-urls/compare/v2.1.17...v2.1.18) (2020-08-24)
18
-
19
- ### [2.1.17](https://github.com/Kikobeats/xml-urls/compare/v2.1.16...v2.1.17) (2020-08-11)
20
-
21
- ### [2.1.16](https://github.com/Kikobeats/xml-urls/compare/v2.1.15...v2.1.16) (2020-07-29)
22
-
23
- ### [2.1.15](https://github.com/Kikobeats/xml-urls/compare/v2.1.14...v2.1.15) (2020-07-09)
24
-
25
- ### [2.1.14](https://github.com/Kikobeats/xml-urls/compare/v2.1.13...v2.1.14) (2020-06-04)
26
-
27
- ### [2.1.13](https://github.com/Kikobeats/xml-urls/compare/v2.1.11...v2.1.13) (2020-06-02)
28
-
29
- ### [2.1.12](https://github.com/Kikobeats/xml-urls/compare/v2.1.11...v2.1.12) (2020-06-01)
30
-
31
- ### [2.1.11](https://github.com/Kikobeats/xml-urls/compare/v2.1.10...v2.1.11) (2020-03-09)
32
-
33
- ### [2.1.10](https://github.com/Kikobeats/xml-urls/compare/v2.1.8...v2.1.10) (2020-02-14)
34
-
35
- ### [2.1.9](https://github.com/Kikobeats/xml-urls/compare/v2.1.8...v2.1.9) (2020-02-04)
36
-
37
- ### [2.1.8](https://github.com/Kikobeats/xml-urls/compare/v2.1.7...v2.1.8) (2019-09-24)
38
-
39
- ### [2.1.7](https://github.com/Kikobeats/xml-urls/compare/v2.1.6...v2.1.7) (2019-06-29)
40
-
41
-
42
- ### Bug Fixes
43
-
44
- * **package:** update @metascraper/helpers to version 5.3.0 ([9860aea](https://github.com/Kikobeats/xml-urls/commit/9860aea))
45
- * **package:** update @metascraper/helpers to version 5.4.0 ([90ef0e4](https://github.com/Kikobeats/xml-urls/commit/90ef0e4))
46
- * typo ([8983b24](https://github.com/Kikobeats/xml-urls/commit/8983b24))
47
- * **package:** update @metascraper/helpers to version 5.5.0 ([52a10f7](https://github.com/Kikobeats/xml-urls/commit/52a10f7))
48
- * **package:** update aigle to version 1.14.0 ([eca3851](https://github.com/Kikobeats/xml-urls/commit/eca3851))
49
- * **package:** update html-get to version 2.1.0 ([0dedd34](https://github.com/Kikobeats/xml-urls/commit/0dedd34))
50
- * **package:** update html-get to version 2.2.0 ([443ca6d](https://github.com/Kikobeats/xml-urls/commit/443ca6d))
51
-
52
-
53
- ### Build System
54
-
55
- * change git-authors-cli position ([892c874](https://github.com/Kikobeats/xml-urls/commit/892c874))
56
- * update dependencies ([ff6a56c](https://github.com/Kikobeats/xml-urls/commit/ff6a56c))
57
- * update dependencies ([6c683d5](https://github.com/Kikobeats/xml-urls/commit/6c683d5))
58
- * update travis ([f188711](https://github.com/Kikobeats/xml-urls/commit/f188711))
59
-
60
-
61
- ### Tests
62
-
63
- * unify fixtures ([0679244](https://github.com/Kikobeats/xml-urls/commit/0679244))
64
-
65
-
66
-
67
- ## [2.1.6](https://github.com/Kikobeats/xml-urls/compare/v2.1.5...v2.1.6) (2019-05-05)
68
-
69
-
70
- ### Bug Fixes
71
-
72
- * **package:** update @metascraper/helpers to version 5.2.0 ([33aea65](https://github.com/Kikobeats/xml-urls/commit/33aea65))
73
-
74
-
75
-
76
- <a name="2.1.5"></a>
77
- ## [2.1.5](https://github.com/Kikobeats/xml-urls/compare/v2.1.4...v2.1.5) (2019-04-03)
78
-
79
-
80
- ### Bug Fixes
81
-
82
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 5.1.0 ([1840ea2](https://github.com/Kikobeats/xml-urls/commit/1840ea2))
83
-
84
-
85
-
86
- <a name="2.1.4"></a>
87
- ## [2.1.4](https://github.com/Kikobeats/xml-urls/compare/v2.1.3...v2.1.4) (2019-03-17)
88
-
89
-
90
- ### Bug Fixes
91
-
92
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 5.0.0 ([86eb6ca](https://github.com/Kikobeats/xml-urls/commit/86eb6ca))
93
-
94
-
95
-
96
- <a name="2.1.3"></a>
97
- ## [2.1.3](https://github.com/Kikobeats/xml-urls/compare/v2.1.2...v2.1.3) (2019-03-08)
98
-
99
-
100
-
101
- <a name="2.1.2"></a>
102
- ## [2.1.2](https://github.com/Kikobeats/xml-urls/compare/v2.1.1...v2.1.2) (2019-01-10)
103
-
104
-
105
- ### Bug Fixes
106
-
107
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 4.9.0 ([83df264](https://github.com/Kikobeats/xml-urls/commit/83df264))
108
-
109
-
110
-
111
- <a name="2.1.1"></a>
112
- ## 2.1.1 (2019-01-02)
113
-
114
-
115
- ### Bug Fixes
116
-
117
- * **package:** update html-get to version 1.5.0 ([7e1182f](https://github.com/Kikobeats/xml-urls/commit/7e1182f))
118
- * **package:** update html-get to version 1.6.0 ([0ce9263](https://github.com/Kikobeats/xml-urls/commit/0ce9263))
119
- * **package:** update html-get to version 2.0.0 ([9166dea](https://github.com/Kikobeats/xml-urls/commit/9166dea))
120
-
121
-
122
-
123
- <a name="2.1.0"></a>
124
- # 2.1.0 (2018-11-17)
125
-
126
-
127
- ### Bug Fixes
128
-
129
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 4.5.5 ([acc7b9f](https://github.com/Kikobeats/xml-urls/commit/acc7b9f))
130
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 4.7.0 ([4af4210](https://github.com/Kikobeats/xml-urls/commit/4af4210))
131
- * **package:** update html-get to version 1.1.0 ([8c3d69d](https://github.com/Kikobeats/xml-urls/commit/8c3d69d))
132
- * **package:** update html-get to version 1.2.0 ([dd5ee25](https://github.com/Kikobeats/xml-urls/commit/dd5ee25))
133
- * **package:** update html-get to version 1.3.3 ([78bb6c2](https://github.com/Kikobeats/xml-urls/commit/78bb6c2))
134
- * **package:** update html-get to version 1.4.0 ([8bc407c](https://github.com/Kikobeats/xml-urls/commit/8bc407c))
135
-
136
-
137
-
138
- <a name="2.0.1"></a>
139
- ## 2.0.1 (2018-09-05)
140
-
141
-
142
- ### Bug Fixes
143
-
144
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 3.12.1 ([f8dc98f](https://github.com/Kikobeats/xml-urls/commit/f8dc98f))
145
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 4.0.0 ([9a51792](https://github.com/Kikobeats/xml-urls/commit/9a51792))
146
- * **package:** update [@metascraper](https://github.com/metascraper)/helpers to version 4.1.0 ([09492ad](https://github.com/Kikobeats/xml-urls/commit/09492ad))
147
-
148
-
149
-
150
- <a name="2.0.0"></a>
151
- # 2.0.0 (2018-07-20)
152
-
153
-
154
-
155
- <a name="1.0.5"></a>
156
- ## 1.0.5 (2018-07-09)
157
-
158
-
159
-
160
- <a name="1.0.4"></a>
161
- ## 1.0.4 (2018-07-09)
162
-
163
-
164
-
165
- <a name="1.0.3"></a>
166
- ## 1.0.3 (2018-07-04)
167
-
168
-
169
-
170
- <a name="1.0.2"></a>
171
- ## 1.0.2 (2018-05-30)
172
-
173
-
174
- ### Bug Fixes
175
-
176
- * **package:** update aigle to version 1.11.0 ([cc372ce](https://github.com/Kikobeats/xml-urls/commit/cc372ce))
177
- * **package:** update aigle to version 1.12.0 ([c93ae3e](https://github.com/Kikobeats/xml-urls/commit/c93ae3e))
178
- * **package:** update got to version 8.1.0 ([923e607](https://github.com/Kikobeats/xml-urls/commit/923e607))
179
- * **package:** update got to version 8.2.0 ([4537f57](https://github.com/Kikobeats/xml-urls/commit/4537f57))
180
- * **package:** update got to version 8.3.0 ([640fb20](https://github.com/Kikobeats/xml-urls/commit/640fb20))
181
-
182
-
183
-
184
- <a name="1.0.1"></a>
185
- ## 1.0.1 (2018-01-28)
186
-
187
-
188
-
189
- <a name="1.0.0"></a>
190
- # 1.0.0 (2018-01-28)
191
-
192
-
193
-
194
- <a name="2.1.0"></a>
195
- # 2.1.0 (2018-11-17)
196
-
197
- * Fix linter ([6d499d4](https://github.com/Kikobeats/xml-urls/commit/6d499d4))
198
- * Remove duplicates support ([c5b24b9](https://github.com/Kikobeats/xml-urls/commit/c5b24b9))
199
- * Rename isXml → isXmlUrl ([85d2ea1](https://github.com/Kikobeats/xml-urls/commit/85d2ea1))
200
- * Update package.json ([db1dd55](https://github.com/Kikobeats/xml-urls/commit/db1dd55))
201
- * fix(package): update @metascraper/helpers to version 4.5.5 ([acc7b9f](https://github.com/Kikobeats/xml-urls/commit/acc7b9f))
202
- * fix(package): update @metascraper/helpers to version 4.7.0 ([4af4210](https://github.com/Kikobeats/xml-urls/commit/4af4210))
203
- * fix(package): update html-get to version 1.1.0 ([8c3d69d](https://github.com/Kikobeats/xml-urls/commit/8c3d69d))
204
- * fix(package): update html-get to version 1.2.0 ([dd5ee25](https://github.com/Kikobeats/xml-urls/commit/dd5ee25))
205
- * fix(package): update html-get to version 1.3.3 ([78bb6c2](https://github.com/Kikobeats/xml-urls/commit/78bb6c2))
206
- * fix(package): update html-get to version 1.4.0 ([8bc407c](https://github.com/Kikobeats/xml-urls/commit/8bc407c))
207
-
208
-
209
-
210
- <a name="2.0.1"></a>
211
- ## 2.0.1 (2018-09-05)
212
-
213
- * Add whitelist support ([d6cd77c](https://github.com/Kikobeats/xml-urls/commit/d6cd77c))
214
- * Update API ([e8cd8a1](https://github.com/Kikobeats/xml-urls/commit/e8cd8a1))
215
- * Update package.json ([78f7759](https://github.com/Kikobeats/xml-urls/commit/78f7759))
216
- * fix(package): update @metascraper/helpers to version 3.12.1 ([f8dc98f](https://github.com/Kikobeats/xml-urls/commit/f8dc98f))
217
- * fix(package): update @metascraper/helpers to version 4.0.0 ([9a51792](https://github.com/Kikobeats/xml-urls/commit/9a51792))
218
- * fix(package): update @metascraper/helpers to version 4.1.0 ([09492ad](https://github.com/Kikobeats/xml-urls/commit/09492ad))
219
-
220
-
221
-
222
- <a name="2.0.0"></a>
223
- # 2.0.0 (2018-07-20)
224
-
225
- * Add prerender support ([5e97842](https://github.com/Kikobeats/xml-urls/commit/5e97842))
226
- * better .isXml detection ([9b3f708](https://github.com/Kikobeats/xml-urls/commit/9b3f708))
227
- * Refactor ([6471ad1](https://github.com/Kikobeats/xml-urls/commit/6471ad1))
228
- * Update index.js ([4425b34](https://github.com/Kikobeats/xml-urls/commit/4425b34))
229
-
230
-
231
-
232
- <a name="1.0.5"></a>
233
- ## 1.0.5 (2018-07-09)
234
-
235
- * Resolve a collection input ([e596c25](https://github.com/Kikobeats/xml-urls/commit/e596c25))
236
-
237
-
238
-
239
- <a name="1.0.4"></a>
240
- ## 1.0.4 (2018-07-09)
241
-
242
- * Fix typo ([01979a9](https://github.com/Kikobeats/xml-urls/commit/01979a9))
243
- * Refactor ([1b2039e](https://github.com/Kikobeats/xml-urls/commit/1b2039e))
244
- * Update README.md ([f236ecf](https://github.com/Kikobeats/xml-urls/commit/f236ecf))
245
-
246
-
247
-
248
- <a name="1.0.3"></a>
249
- ## 1.0.3 (2018-07-04)
250
-
251
- * Avoid mutate state ([9fb8656](https://github.com/Kikobeats/xml-urls/commit/9fb8656))
252
- * Remove unnecessary test ([bb509dd](https://github.com/Kikobeats/xml-urls/commit/bb509dd))
253
-
254
-
255
-
256
- <a name="1.0.2"></a>
257
- ## 1.0.2 (2018-05-30)
258
-
259
- * Resolve relative urls ([cbfa4c7](https://github.com/Kikobeats/xml-urls/commit/cbfa4c7))
260
- * Update deps ([615e31c](https://github.com/Kikobeats/xml-urls/commit/615e31c))
261
- * fix(package): update aigle to version 1.11.0 ([cc372ce](https://github.com/Kikobeats/xml-urls/commit/cc372ce))
262
- * fix(package): update aigle to version 1.12.0 ([c93ae3e](https://github.com/Kikobeats/xml-urls/commit/c93ae3e))
263
- * fix(package): update got to version 8.1.0 ([923e607](https://github.com/Kikobeats/xml-urls/commit/923e607))
264
- * fix(package): update got to version 8.2.0 ([4537f57](https://github.com/Kikobeats/xml-urls/commit/4537f57))
265
- * fix(package): update got to version 8.3.0 ([640fb20](https://github.com/Kikobeats/xml-urls/commit/640fb20))
266
-
267
-
268
-
269
- <a name="1.0.1"></a>
270
- ## 1.0.1 (2018-01-28)
271
-
272
- * Expose isXmlUrl helper ([ed8a182](https://github.com/Kikobeats/xml-urls/commit/ed8a182))
273
-
274
-
275
-
276
- <a name="1.0.0"></a>
277
- # 1.0.0 (2018-01-28)
278
-
279
- * First commit ([4b11e2d](https://github.com/Kikobeats/xml-urls/commit/4b11e2d))
280
- * Update README.md ([eebcaf9](https://github.com/Kikobeats/xml-urls/commit/eebcaf9))
281
- * docs(readme): add Greenkeeper badge ([c9a2f4e](https://github.com/Kikobeats/xml-urls/commit/c9a2f4e))