metascraper-amazon 5.31.1 → 5.31.3

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 (2) hide show
  1. package/index.js +3 -4
  2. package/package.json +3 -4
package/index.js CHANGED
@@ -3,15 +3,14 @@
3
3
  const {
4
4
  $filter,
5
5
  author,
6
- toRule,
7
6
  lang,
8
7
  memoizeOne,
8
+ parseUrl,
9
9
  title,
10
+ toRule,
10
11
  url
11
12
  } = require('@metascraper/helpers')
12
13
 
13
- const { getPublicSuffix } = require('tldts')
14
-
15
14
  const REGEX_AMAZON_URL = /https?:\/\/(.*amazon\..*\/.*|.*amzn\..*\/.*|.*a\.co\/.*)/i
16
15
 
17
16
  const test = memoizeOne(url => REGEX_AMAZON_URL.test(url))
@@ -30,7 +29,7 @@ const SUFFIX_LANGUAGES = {
30
29
  it: 'it'
31
30
  }
32
31
 
33
- const getDomainLanguage = url => SUFFIX_LANGUAGES[getPublicSuffix(url)]
32
+ const getDomainLanguage = url => SUFFIX_LANGUAGES[parseUrl(url).publicSuffix]
34
33
 
35
34
  const toUrl = toRule(url)
36
35
  const toAuthor = toRule(author)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-amazon",
3
3
  "description": "Metascraper integration with Amazon",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-amazon",
5
- "version": "5.31.1",
5
+ "version": "5.31.3",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -22,8 +22,7 @@
22
22
  "metascraper"
23
23
  ],
24
24
  "dependencies": {
25
- "@metascraper/helpers": "^5.31.1",
26
- "tldts": "~5.7.92"
25
+ "@metascraper/helpers": "^5.31.3"
27
26
  },
28
27
  "devDependencies": {
29
28
  "ava": "latest"
@@ -38,5 +37,5 @@
38
37
  "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
39
38
  },
40
39
  "license": "MIT",
41
- "gitHead": "a89cf84a7f3b4a8a1de9773db322ab205c31c020"
40
+ "gitHead": "d783e6826b8b3b183fc39a4340721a903ec74c51"
42
41
  }