metascraper 5.46.0 → 5.46.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/package.json +3 -3
  2. package/src/index.d.ts +7 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper",
3
3
  "description": "A library to easily scrape metadata from an article on the web using Open Graph, JSON+LD, regular HTML metadata, and series of fallbacks.",
4
4
  "homepage": "https://metascraper.js.org",
5
- "version": "5.46.0",
5
+ "version": "5.46.3",
6
6
  "types": "src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "repository": {
@@ -58,7 +58,7 @@
58
58
  "website"
59
59
  ],
60
60
  "dependencies": {
61
- "@metascraper/helpers": "5.46.0",
61
+ "@metascraper/helpers": "5.46.1",
62
62
  "cheerio": "~1.0.0",
63
63
  "debug-logfmt": "~1.2.3",
64
64
  "lodash": "~4.17.21",
@@ -86,5 +86,5 @@
86
86
  "tsd": {
87
87
  "directory": "test/types"
88
88
  },
89
- "gitHead": "2c23249b6dd270afb6368aa756342a0514d90a19"
89
+ "gitHead": "b7e00b77ec5d4a00017e50628d947829cf11461a"
90
90
  }
package/src/index.d.ts CHANGED
@@ -98,7 +98,14 @@ declare namespace createMetascraper {
98
98
  export type Rules = {
99
99
  [C in keyof Metadata]?: Array<RulesOptions> | RulesOptions;
100
100
  } & {
101
+ /**
102
+ * The test function to be executed for skipping rules that doesn't return `true`.
103
+ */
101
104
  test?: (options: RulesTestOptions) => boolean;
105
+ /**
106
+ * The package name associated with the rule, used for debugging purposes.
107
+ */
108
+ pkgName?: string;
102
109
  };
103
110
 
104
111
  export type RulesOptions = (