From 8a6470017bcfe6aeb9ddbcd7691a2144cfc21868 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 7 Nov 2022 14:41:18 -0600 Subject: [PATCH] Release VERSION --- CHANGELOG.md | 58 +++++++++++++++++++++++++------------------- index.es.js | 68 +++++++--------------------------------------------- index.js | 68 +++++++--------------------------------------------- package.json | 5 ++-- 4 files changed, 55 insertions(+), 144 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f1b0d33..27cf88a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Change Log + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). @@ -10,61 +11,70 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p --- +## [2.0.0](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.0) - 2022-11-07 + +### Changed +- README.md updated with spelling correction, linter fixes, and new contributor +- App.vue updated icon example to use `fixed-width` rather than `full-width` +- Added some tests for Sharp icons + +--- + ## [2.0.8](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.8) - 2022-06-17 ### Changed -* README.md Documentation now points to https://fontawesome.com/docs/web/use-with/vue/ +- README.md Documentation now points to https://fontawesome.com/docs/web/use-with/vue/ --- ## [2.0.7](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.7) - 2022-06-07 ### Fixed -* Animations for bounce, shake, beat and beat-fade -* Flip animation when used by itself +- Animations for bounce, shake, beat and beat-fade +- Flip animation when used by itself --- ## [2.0.6](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.6) - 2021-10-18 ### Fixed -* Include 1.3.0-beta versions in peer dependencies +- Include 1.3.0-beta versions in peer dependencies --- ## [2.0.5](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.5) - 2021-10-15 ### Added -* New sizes for `size` prop: 2xs, xl, 2xl -* New animation booleans: `beat`, `fade`, `flash`, `spin-pulse`, & `spin-reverse` +- New sizes for `size` prop: 2xs, xl, 2xl +- New animation booleans: `beat`, `fade`, `flash`, `spin-pulse`, & `spin-reverse` --- ## [2.0.4](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.4) - 2021-10-15 ### Fixed -* Relax the peer dependency for @fortawesome/fontawesome-svg-core +- Relax the peer dependency for @fortawesome/fontawesome-svg-core --- ## [2.0.3](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.3) - 2021-10-15 ### Fixed -* Skip parse.icon if the icon is imported directly from an icon package +- Skip parse.icon if the icon is imported directly from an icon package --- ## [2.0.2](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.2) - 2020-12-17 ### Fixed -* Bumping version to fix a failed release for 2.0.1 +- Bumping version to fix a failed release for 2.0.1 --- ## [2.0.1](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.1) - 2020-12-17 ### Added -* Support for the new parse.icon function from the Font Awesome version 6 @fortawesome/fontawesome-svg-core +- Support for the new parse.icon function from the Font Awesome version 6 @fortawesome/fontawesome-svg-core --- @@ -94,89 +104,89 @@ release. The 0.1 release line will not be getting any further updates. ## [0.1.10](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.10) - 2020-06-15 ### Fixed -* Add TSX support to Typescript definition +- Add TSX support to Typescript definition --- ## [0.1.9](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.9) - 2019-12-13 ### Added -* Counters support for the FontAwesomeLayersText component #174 -* FontAwesomeIcon now supports the "inverse" property #174 +- Counters support for the FontAwesomeLayersText component #174 +- FontAwesomeIcon now supports the "inverse" property #174 --- ## [0.1.8](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.8) - 2019-11-03 ### Fixed -* Removed declare namespace in the TypeScript definition file #177 +- Removed declare namespace in the TypeScript definition file #177 --- ## [0.1.7](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.7) - 2019-08-31 ### Added -* Duotone icon support +- Duotone icon support --- ## [0.1.6](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.6) - 2019-03-18 ### Changed -* Allow the rotation property to be either string or number #171 +- Allow the rotation property to be either string or number #171 --- ## [0.1.5](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.5) - 2019-01-13 ### Added -* Title prop #164 +- Title prop #164 --- ## [0.1.4](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.4) - 2018-12-24 ### Fixed -* Fixing TypeScript definition file #165 +- Fixing TypeScript definition file #165 --- ## [0.1.3](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.3) - 2018-12-04 ### Added -* Adding TypeScript definition file #159 +- Adding TypeScript definition file #159 --- ## [0.1.2](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.2) - 2018-10-29 ### Added -* Adding ES module to package +- Adding ES module to package --- ## [0.1.1](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.1) - 2018-07-16 ### Fixed -* LayersText can use a number as it's value #115 +- LayersText can use a number as it's value #115 --- ## [0.1.0](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.0) - 2018-06-20 ### Changed -* Upgraded to the newer Font Awesome 5.1 packages +- Upgraded to the newer Font Awesome 5.1 packages --- ## [0.0.23](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.0.23) - 2018-06-04 ### Changed -* Update Vue dependency version to support > 2.4 +- Update Vue dependency version to support > 2.4 --- ## [0.0.22](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.0.22) - 2017-12-19 ### Changed -* Support for @fortawesome/fontawesome 1.1.0 +- Support for @fortawesome/fontawesome 1.1.0 diff --git a/index.es.js b/index.es.js index b288a178..a7592874 100644 --- a/index.es.js +++ b/index.es.js @@ -2,17 +2,14 @@ import { parse, icon, config, text } from '@fortawesome/fontawesome-svg-core'; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } - return keys; } - function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; @@ -22,10 +19,8 @@ function _objectSpread2(target) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } - return target; } - function _typeof(obj) { "@babel/helpers - typeof"; @@ -35,7 +30,6 @@ function _typeof(obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -47,35 +41,26 @@ function _defineProperty(obj, key, value) { } else { obj[key] = value; } - return obj; } - function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; - for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } - return target; } - function _objectWithoutProperties(source, excluded) { if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; - if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; @@ -83,22 +68,17 @@ function _objectWithoutProperties(source, excluded) { target[key] = source[key]; } } - return target; } - function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); @@ -107,15 +87,11 @@ function _unsupportedIterableToArray(o, minLen) { if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; } - function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -259,7 +235,6 @@ var humps$1 = {exports: {}}; var humps = humps$1.exports; var _excluded = ["class", "style", "attrs"]; - function styleToObject(style) { return style.split(';').map(function (s) { return s.trim(); @@ -273,65 +248,54 @@ function styleToObject(style) { return acc; }, {}); } - function classToObject(cls) { return cls.split(/\s+/).reduce(function (acc, c) { acc[c] = true; return acc; }, {}); } - function combineClassObjects() { for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) { objs[_key] = arguments[_key]; } - return objs.reduce(function (acc, obj) { if (Array.isArray(obj)) { acc = acc.concat(obj); } else { acc.push(obj); } - return acc; }, []); } - function convert(h, element) { var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var children = (element.children || []).map(convert.bind(null, h)); var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) { var val = element.attributes[key]; - switch (key) { case 'class': acc['class'] = classToObject(val); break; - case 'style': acc['style'] = styleToObject(val); break; - default: acc.attrs[key] = val; } - return acc; }, { 'class': {}, style: {}, attrs: {} }); - var _data$class = data.class, - dClass = _data$class === void 0 ? {} : _data$class, - _data$style = data.style, - dStyle = _data$style === void 0 ? {} : _data$style, - _data$attrs = data.attrs, - dAttrs = _data$attrs === void 0 ? {} : _data$attrs, - remainingData = _objectWithoutProperties(data, _excluded); - + dClass = _data$class === void 0 ? {} : _data$class, + _data$style = data.style, + dStyle = _data$style === void 0 ? {} : _data$style, + _data$attrs = data.attrs, + dAttrs = _data$attrs === void 0 ? {} : _data$attrs, + remainingData = _objectWithoutProperties(data, _excluded); if (typeof element === 'string') { return element; } else { @@ -346,15 +310,12 @@ function convert(h, element) { } var PRODUCTION = false; - try { PRODUCTION = process.env.NODE_ENV === 'production'; } catch (e) {} - function log () { if (!PRODUCTION && console && typeof console.error === 'function') { var _console; - (_console = console).error.apply(_console, arguments); } } @@ -364,7 +325,6 @@ function objectWithKey(key, value) { } function classList(props) { var _classes; - var classes = (_classes = { 'fa-spin': props.spin, 'fa-spin-pulse': props.spinPulse, @@ -398,26 +358,21 @@ function normalizeIconArgs(icon) { if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) { return icon; } - if (parse.icon) { return parse.icon(icon); } - if (icon === null) { return null; } - if (_typeof(icon) === 'object' && icon.prefix && icon.iconName) { return icon; } - if (Array.isArray(icon) && icon.length === 2) { return { prefix: icon[0], iconName: icon[1] }; } - if (typeof icon === 'string') { return { prefix: 'fas', @@ -425,7 +380,6 @@ function normalizeIconArgs(icon) { }; } } - var FontAwesomeIcon = { name: 'FontAwesomeIcon', functional: true, @@ -542,9 +496,9 @@ var FontAwesomeIcon = { render: function render(createElement, context) { var props = context.props; var iconArgs = props.icon, - maskArgs = props.mask, - symbol = props.symbol, - title = props.title; + maskArgs = props.mask, + symbol = props.symbol, + title = props.title; var icon$1 = normalizeIconArgs(iconArgs); var classes = objectWithKey('classes', classList(props)); var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform); @@ -553,11 +507,9 @@ var FontAwesomeIcon = { symbol: symbol, title: title })); - if (!renderedIcon) { return log('Could not find one or more icon(s)', icon$1, mask); } - var abstract = renderedIcon.abstract; var convertCurry = convert.bind(null, createElement); return convertCurry(abstract[0], {}, context.data); @@ -614,11 +566,9 @@ var FontAwesomeLayersText = { var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform); var renderedText = text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform), classes)); var abstract = renderedText.abstract; - if (props.counter) { abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', ''); } - var convertCurry = convert.bind(null, createElement); return convertCurry(abstract[0], {}, context.data); } diff --git a/index.js b/index.js index d9e8c09b..9d85e04e 100644 --- a/index.js +++ b/index.js @@ -6,17 +6,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } - return keys; } - function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; @@ -26,10 +23,8 @@ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } - return target; } - function _typeof(obj) { "@babel/helpers - typeof"; @@ -39,7 +34,6 @@ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -51,35 +45,26 @@ } else { obj[key] = value; } - return obj; } - function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; - for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } - return target; } - function _objectWithoutProperties(source, excluded) { if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; - if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; @@ -87,22 +72,17 @@ target[key] = source[key]; } } - return target; } - function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); @@ -111,15 +91,11 @@ if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; } - function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -263,7 +239,6 @@ var humps = humps$1.exports; var _excluded = ["class", "style", "attrs"]; - function styleToObject(style) { return style.split(';').map(function (s) { return s.trim(); @@ -277,65 +252,54 @@ return acc; }, {}); } - function classToObject(cls) { return cls.split(/\s+/).reduce(function (acc, c) { acc[c] = true; return acc; }, {}); } - function combineClassObjects() { for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) { objs[_key] = arguments[_key]; } - return objs.reduce(function (acc, obj) { if (Array.isArray(obj)) { acc = acc.concat(obj); } else { acc.push(obj); } - return acc; }, []); } - function convert(h, element) { var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var children = (element.children || []).map(convert.bind(null, h)); var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) { var val = element.attributes[key]; - switch (key) { case 'class': acc['class'] = classToObject(val); break; - case 'style': acc['style'] = styleToObject(val); break; - default: acc.attrs[key] = val; } - return acc; }, { 'class': {}, style: {}, attrs: {} }); - var _data$class = data.class, - dClass = _data$class === void 0 ? {} : _data$class, - _data$style = data.style, - dStyle = _data$style === void 0 ? {} : _data$style, - _data$attrs = data.attrs, - dAttrs = _data$attrs === void 0 ? {} : _data$attrs, - remainingData = _objectWithoutProperties(data, _excluded); - + dClass = _data$class === void 0 ? {} : _data$class, + _data$style = data.style, + dStyle = _data$style === void 0 ? {} : _data$style, + _data$attrs = data.attrs, + dAttrs = _data$attrs === void 0 ? {} : _data$attrs, + remainingData = _objectWithoutProperties(data, _excluded); if (typeof element === 'string') { return element; } else { @@ -350,15 +314,12 @@ } var PRODUCTION = false; - try { PRODUCTION = process.env.NODE_ENV === 'production'; } catch (e) {} - function log () { if (!PRODUCTION && console && typeof console.error === 'function') { var _console; - (_console = console).error.apply(_console, arguments); } } @@ -368,7 +329,6 @@ } function classList(props) { var _classes; - var classes = (_classes = { 'fa-spin': props.spin, 'fa-spin-pulse': props.spinPulse, @@ -402,26 +362,21 @@ if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) { return icon; } - if (fontawesomeSvgCore.parse.icon) { return fontawesomeSvgCore.parse.icon(icon); } - if (icon === null) { return null; } - if (_typeof(icon) === 'object' && icon.prefix && icon.iconName) { return icon; } - if (Array.isArray(icon) && icon.length === 2) { return { prefix: icon[0], iconName: icon[1] }; } - if (typeof icon === 'string') { return { prefix: 'fas', @@ -429,7 +384,6 @@ }; } } - var FontAwesomeIcon = { name: 'FontAwesomeIcon', functional: true, @@ -546,9 +500,9 @@ render: function render(createElement, context) { var props = context.props; var iconArgs = props.icon, - maskArgs = props.mask, - symbol = props.symbol, - title = props.title; + maskArgs = props.mask, + symbol = props.symbol, + title = props.title; var icon = normalizeIconArgs(iconArgs); var classes = objectWithKey('classes', classList(props)); var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform); @@ -557,11 +511,9 @@ symbol: symbol, title: title })); - if (!renderedIcon) { return log('Could not find one or more icon(s)', icon, mask); } - var abstract = renderedIcon.abstract; var convertCurry = convert.bind(null, createElement); return convertCurry(abstract[0], {}, context.data); @@ -618,11 +570,9 @@ var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform); var renderedText = fontawesomeSvgCore.text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform), classes)); var abstract = renderedText.abstract; - if (props.counter) { abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', ''); } - var convertCurry = convert.bind(null, createElement); return convertCurry(abstract[0], {}, context.data); } diff --git a/package.json b/package.json index dcc690ee..7f8cb6f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@fortawesome/vue-fontawesome", "description": "Official Vue 2 component for Font Awesome", - "version": "2.0.8", + "version": "2.0.9", "main": "index.js", "files": [ "README.md", @@ -34,7 +34,8 @@ "Yannick Ihmels ", "btaens ", "David Driscoll ", - "Tyranteon " + "Tyranteon ", + "Aaron Parker " ], "license": "MIT", "scripts": {