open-graph-scraper
Advanced tools
Comparing version 5.0.4 to 5.0.5
# Change Log | ||
## 5.0.5 | ||
- Adding `twitterImageObject` and `twitterPlayerObject` types | ||
- Updating Dependencies | ||
## 5.0.4 | ||
@@ -4,0 +9,0 @@ |
@@ -10,2 +10,16 @@ export = run; | ||
/** | ||
* @typedef {object} twitterImageObject | ||
* @property {string | number} [height] | ||
* @property {string} [alt] | ||
* @property {string} url | ||
* @property {string | number} [width] | ||
*/ | ||
/** | ||
* @typedef {object} twitterPlayerObject | ||
* @property {string | number} [height] | ||
* @property {string} [stream] | ||
* @property {string} [url] | ||
* @property {string | number} [width] | ||
*/ | ||
/** | ||
* @typedef {object} successResult | ||
@@ -171,3 +185,3 @@ * @property {boolean} error | ||
* @property {string | undefined} [twitterDescription] | ||
* @property {string | undefined} [twitterImage] | ||
* @property {string | twitterImageObject | twitterImageObject[] | undefined} [twitterImage] | ||
* @property {string | undefined} [twitterImageAlt] | ||
@@ -177,3 +191,3 @@ * @property {string | undefined} [twitterImageHeight] | ||
* @property {string | undefined} [twitterImageWidth] | ||
* @property {string | undefined} [twitterPlayer] | ||
* @property {string | twitterPlayerObject | twitterPlayerObject[] | undefined} [twitterPlayer] | ||
* @property {string | undefined} [twitterPlayerHeight] | ||
@@ -440,3 +454,3 @@ * @property {string | undefined} [twitterPlayerStream] | ||
declare namespace run { | ||
export { imageObject, successResult, successResultObject, errorResult, errorResultObject, customMetaTags, validatorSettings }; | ||
export { imageObject, twitterImageObject, twitterPlayerObject, successResult, successResultObject, errorResult, errorResultObject, customMetaTags, validatorSettings }; | ||
} | ||
@@ -489,2 +503,14 @@ type customMetaTags = { | ||
}; | ||
type twitterImageObject = { | ||
height?: string | number; | ||
alt?: string; | ||
url: string; | ||
width?: string | number; | ||
}; | ||
type twitterPlayerObject = { | ||
height?: string | number; | ||
stream?: string; | ||
url?: string; | ||
width?: string | number; | ||
}; | ||
type successResultObject = { | ||
@@ -644,3 +670,3 @@ error?: undefined; | ||
twitterDescription?: string | undefined; | ||
twitterImage?: string | undefined; | ||
twitterImage?: string | twitterImageObject | twitterImageObject[] | undefined; | ||
twitterImageAlt?: string | undefined; | ||
@@ -650,3 +676,3 @@ twitterImageHeight?: string | undefined; | ||
twitterImageWidth?: string | undefined; | ||
twitterPlayer?: string | undefined; | ||
twitterPlayer?: string | twitterPlayerObject | twitterPlayerObject[] | undefined; | ||
twitterPlayerHeight?: string | undefined; | ||
@@ -653,0 +679,0 @@ twitterPlayerStream?: string | undefined; |
20
index.js
@@ -13,2 +13,18 @@ /* eslint-disable max-len */ | ||
/** | ||
* @typedef {object} twitterImageObject | ||
* @property {string | number} [height] | ||
* @property {string} [alt] | ||
* @property {string} url | ||
* @property {string | number} [width] | ||
*/ | ||
/** | ||
* @typedef {object} twitterPlayerObject | ||
* @property {string | number} [height] | ||
* @property {string} [stream] | ||
* @property {string} [url] | ||
* @property {string | number} [width] | ||
*/ | ||
/** | ||
* @typedef {object} successResult | ||
@@ -175,3 +191,3 @@ * @property {boolean} error | ||
* @property {string | undefined} [twitterDescription] | ||
* @property {string | undefined} [twitterImage] | ||
* @property {string | twitterImageObject | twitterImageObject[] | undefined} [twitterImage] | ||
* @property {string | undefined} [twitterImageAlt] | ||
@@ -181,3 +197,3 @@ * @property {string | undefined} [twitterImageHeight] | ||
* @property {string | undefined} [twitterImageWidth] | ||
* @property {string | undefined} [twitterPlayer] | ||
* @property {string | twitterPlayerObject | twitterPlayerObject[] | undefined} [twitterPlayer] | ||
* @property {string | undefined} [twitterPlayerHeight] | ||
@@ -184,0 +200,0 @@ * @property {string | undefined} [twitterPlayerStream] |
{ | ||
"name": "open-graph-scraper", | ||
"description": "Node.js scraper module for Open Graph and Twitter Card info", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "index.js", | ||
"iconv-lite": "^0.6.3", | ||
"validator": "^13.7.0" | ||
"validator": "^13.9.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "files": [ | ||
"@babel/eslint-parser": "^7.19.1", | ||
"@snyk/protect": "^1.1093.0", | ||
"@snyk/protect": "^1.1096.0", | ||
"chai": "^4.3.7", | ||
@@ -45,0 +45,0 @@ "eslint": "^8.33.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127614
2913
Updatedvalidator@^13.9.0