@commercetools-uikit/utils
Advanced tools
Comparing version 10.47.0 to 10.47.3
# @commercetools-uikit/utils | ||
## 10.47.3 | ||
### Patch Changes | ||
- [`88653838`](https://github.com/commercetools/ui-kit/commit/8865383861492f22a2bfd2def4a5133e3ccf0af1) [#1787](https://github.com/commercetools/ui-kit/pull/1787) Thanks [@adnasa](https://github.com/adnasa)! - rename `invariant` to `warning` | ||
## 10.47.0 | ||
@@ -4,0 +10,0 @@ |
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat'); | ||
var warning = require('warning'); | ||
var warning$1 = require('warning'); | ||
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim'); | ||
@@ -23,3 +23,3 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each'); | ||
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty); | ||
var warning__default = /*#__PURE__*/_interopDefault(warning); | ||
var warning__default = /*#__PURE__*/_interopDefault(warning$1); | ||
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty); | ||
@@ -199,15 +199,14 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty); | ||
var prefix = 'Invariant failed'; // Throw an error if the condition fails | ||
var prefix = 'Warning'; // Throw an error if the condition fails | ||
// Strip out error messages for production | ||
// > Not providing an inline default argument for message as the result is smaller | ||
var invariant = function invariant(condition, message) { | ||
var warning = function warning(condition, message) { | ||
var _context; | ||
if (condition) { | ||
if (isProduction) { | ||
return; | ||
} // GIVEN product, suppress the message. | ||
} | ||
if (isProduction) { | ||
if (condition) { | ||
return; | ||
@@ -223,3 +222,3 @@ } // Condition not passed | ||
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file. | ||
var version = '10.47.0'; | ||
var version = '10.47.3'; | ||
@@ -233,3 +232,2 @@ exports.SafeHTMLElement = SafeHTMLElement; | ||
exports.getFieldId = getFieldId; | ||
exports.invariant = invariant; | ||
exports.isNumberish = isNumberish; | ||
@@ -240,1 +238,2 @@ exports.parseTime = parseTime; | ||
exports.warnDeprecatedProp = warnDeprecatedProp; | ||
exports.warning = warning; |
@@ -193,16 +193,11 @@ 'use strict'; | ||
var invariant = function invariant(condition, message) { | ||
var warning = function warning(condition, message) { | ||
if (condition) { | ||
return; | ||
} // GIVEN product, suppress the message. | ||
{ | ||
return; | ||
} // Condition not passed | ||
} | ||
}; | ||
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file. | ||
var version = '10.47.0'; | ||
var version = '10.47.3'; | ||
@@ -216,3 +211,2 @@ exports.SafeHTMLElement = SafeHTMLElement; | ||
exports.getFieldId = getFieldId; | ||
exports.invariant = invariant; | ||
exports.isNumberish = isNumberish; | ||
@@ -223,1 +217,2 @@ exports.parseTime = parseTime; | ||
exports.warnDeprecatedProp = warnDeprecatedProp; | ||
exports.warning = warning; |
@@ -7,3 +7,3 @@ import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray'; | ||
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat'; | ||
import warning from 'warning'; | ||
import warning$1 from 'warning'; | ||
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim'; | ||
@@ -60,3 +60,3 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each'; | ||
process.env.NODE_ENV !== "production" ? warning(false, message) : void 0; | ||
process.env.NODE_ENV !== "production" ? warning$1(false, message) : void 0; | ||
} | ||
@@ -71,3 +71,3 @@ | ||
process.env.NODE_ENV !== "production" ? warning(false, message) : void 0; | ||
process.env.NODE_ENV !== "production" ? warning$1(false, message) : void 0; | ||
} | ||
@@ -185,15 +185,14 @@ | ||
var prefix = 'Invariant failed'; // Throw an error if the condition fails | ||
var prefix = 'Warning'; // Throw an error if the condition fails | ||
// Strip out error messages for production | ||
// > Not providing an inline default argument for message as the result is smaller | ||
var invariant = function invariant(condition, message) { | ||
var warning = function warning(condition, message) { | ||
var _context; | ||
if (condition) { | ||
if (isProduction) { | ||
return; | ||
} // GIVEN product, suppress the message. | ||
} | ||
if (isProduction) { | ||
if (condition) { | ||
return; | ||
@@ -209,4 +208,4 @@ } // Condition not passed | ||
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file. | ||
var version = '10.47.0'; | ||
var version = '10.47.3'; | ||
export { SafeHTMLElement, addStaticFields, createSequentialId, filterAriaAttributes, filterDataAttributes, filterInvalidAttributes, getFieldId, invariant, isNumberish, parseTime, version, warnDeprecatedComponent, warnDeprecatedProp }; | ||
export { SafeHTMLElement, addStaticFields, createSequentialId, filterAriaAttributes, filterDataAttributes, filterInvalidAttributes, getFieldId, isNumberish, parseTime, version, warnDeprecatedComponent, warnDeprecatedProp, warning }; |
@@ -12,3 +12,3 @@ export { default as filterDataAttributes } from './filter-data-attributes'; | ||
export { default as addStaticFields } from './add-static-fields'; | ||
export { default as invariant } from './invariant'; | ||
export { default as warning } from './warning'; | ||
export { default as version } from './version'; |
@@ -1,2 +0,2 @@ | ||
declare const _default: "10.47.0"; | ||
declare const _default: "10.47.3"; | ||
export default _default; |
{ | ||
"name": "@commercetools-uikit/utils", | ||
"description": "A collection of utilities shared across the other packages.", | ||
"version": "10.47.0", | ||
"version": "10.47.3", | ||
"bugs": "https://github.com/commercetools/ui-kit/issues", | ||
@@ -6,0 +6,0 @@ "repository": { |
34628
573