metascraper-iframe 5.29.5 → 5.29.10

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/package.json +14 -17
  2. package/src/index.js +3 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-iframe",
3
3
  "description": "Embed a representation of an URL on third party sites",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-iframe",
5
- "version": "5.29.5",
5
+ "version": "5.29.10",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -24,16 +24,15 @@
24
24
  "oembed"
25
25
  ],
26
26
  "dependencies": {
27
- "@metascraper/helpers": "^5.29.5",
28
- "got": "~11.8.3",
27
+ "@metascraper/helpers": "^5.29.10",
28
+ "got": "~11.8.5",
29
29
  "lodash": "~4.17.21",
30
- "oembed-spec": "~1.3.25",
30
+ "oembed-spec": "~1.3.26",
31
31
  "p-reflect": "~2.1.0"
32
32
  },
33
33
  "devDependencies": {
34
- "cheerio": "latest",
35
- "mocha": "latest",
36
- "should": "latest"
34
+ "ava": "latest",
35
+ "cheerio": "latest"
37
36
  },
38
37
  "engines": {
39
38
  "node": ">= 12"
@@ -42,16 +41,14 @@
42
41
  "src"
43
42
  ],
44
43
  "scripts": {
45
- "test": "NODE_PATH=.. TZ=UTC NODE_ENV=test mocha test"
44
+ "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
46
45
  },
47
46
  "license": "MIT",
48
- "mocha": {
49
- "bail": true,
50
- "exit": true,
51
- "recursive": true,
52
- "reporter": "spec",
53
- "slow": 300,
54
- "timeout": "120000"
55
- },
56
- "gitHead": "71c16e166a7775641957126288741d9051925e33"
47
+ "ava": {
48
+ "files": [
49
+ "test/**/*.js",
50
+ "!test/helpers.js"
51
+ ]
52
+ },
53
+ "gitHead": "1caeb9ed3cb6255b7f730a66f558b06715be94df"
57
54
  }
package/src/index.js CHANGED
@@ -6,7 +6,7 @@ const fromProvider = require('./from-provider')
6
6
  const fromTwitter = require('./from-twitter')
7
7
  const fromHTML = require('./from-html')
8
8
 
9
- const isValidUrl = memoizeOne(
9
+ const test = memoizeOne(
10
10
  (url, $) =>
11
11
  fromHTML.test(url, $) ||
12
12
  fromProvider.test(url, $) ||
@@ -23,9 +23,9 @@ module.exports = ({ gotOpts } = {}) => {
23
23
  ]
24
24
  }
25
25
 
26
- rules.test = ({ url, htmlDom }) => isValidUrl(url, htmlDom)
26
+ rules.test = ({ url, htmlDom }) => test(url, htmlDom)
27
27
 
28
28
  return rules
29
29
  }
30
30
 
31
- module.exports.isValidUrl = isValidUrl
31
+ module.exports.test = test