@americanexpress/react-seo
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -14,15 +14,8 @@ "use strict"; | ||
/* | ||
* Copyright 2020 American Express Travel Related Services Company, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License | ||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express | ||
* or implied. See the License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var schemas = { | ||
@@ -32,6 +25,14 @@ player: _constants.TWITTER_PLAYER_CARD_SCHEMA, | ||
summary: _constants.TWITTER_SUMMARY_CARD_SCHEMA, | ||
summary_with_large_image: _constants.TWITTER_SUMMARY_CARD_SCHEMA | ||
summary_large_image: _constants.TWITTER_SUMMARY_CARD_SCHEMA | ||
}; | ||
var getTwitterCardTags = function getTwitterCardTags(tags) { | ||
if (tags.card === 'summary_with_large_image') { | ||
// eslint-disable-next-line no-console | ||
console.warn('summary_with_large_image is deprecated and will be removed in the next major release. Please use summary_large_image instead. See https://github.com/americanexpress/react-seo/issues/24 for more information'); | ||
return (0, _getTagsFromSchema.default)(schemas.summary_large_image, _objectSpread(_objectSpread({}, tags), {}, { | ||
card: 'summary_large_image' | ||
})); | ||
} | ||
if (schemas[tags.card]) { | ||
@@ -38,0 +39,0 @@ return (0, _getTagsFromSchema.default)(schemas[tags.card], tags); |
@@ -0,1 +1,8 @@ | ||
## [2.2.1](https://github.com/americanexpress/react-seo/compare/v2.2.0...v2.2.1) (2020-08-21) | ||
### Bug Fixes | ||
* **getTwitterCardTags:** summary_large_image twitter card type ([1cb41fc](https://github.com/americanexpress/react-seo/commit/1cb41fc6327b8daf3981e82965266b19a04d1caa)), closes [#24](https://github.com/americanexpress/react-seo/issues/24) | ||
# [2.2.0](https://github.com/americanexpress/react-seo/compare/v2.1.0...v2.2.0) (2020-08-13) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@americanexpress/react-seo", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Simple SEO tag manager for React", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
49645
574