prop-types
Advanced tools
Comparing version 15.6.2 to 15.7.0
@@ -0,3 +1,12 @@ | ||
## 15.7.0 | ||
* [New] Add `.elementType` ([#211](https://github.com/facebook/prop-types/pull/211)) | ||
* [New] add `PropTypes.resetWarningCache` ([#178](https://github.com/facebook/prop-types/pull/178)) | ||
* `oneOf`: improve warning when multiple arguments are supplied ([#244](https://github.com/facebook/prop-types/pull/244)) | ||
* Fix `oneOf` when used with Symbols ([#224](https://github.com/facebook/prop-types/pull/224)) | ||
* Avoid relying on `hasOwnProperty` being present on values' prototypes ([#112](https://github.com/facebook/prop-types/pull/112), [#187](https://github.com/facebook/prop-types/pull/187)) | ||
* Improve readme ([#248](https://github.com/facebook/prop-types/pull/248), [#233](https://github.com/facebook/prop-types/pull/233)) | ||
* Clean up mistaken runtime dep, swap envify for loose-envify ([#204](https://github.com/facebook/prop-types/pull/204)) | ||
## 15.6.2 | ||
* Remove the `fbjs` dependency by inlining some helpers from it ([#194](https://github.com/reactjs/prop-types/pull/194))) | ||
* Remove the `fbjs` dependency by inlining some helpers from it ([#194](https://github.com/facebook/prop-types/pull/194))) | ||
@@ -10,20 +19,20 @@ ## 15.6.1 | ||
* Switch from BSD + Patents to MIT license | ||
* Add PropTypes.exact, like PropTypes.shape but warns on extra object keys. ([@thejameskyle](https://github.com/thejameskyle) and [@aweary](https://github.com/aweary) in [#41](https://github.com/reactjs/prop-types/pull/41) and [#87](https://github.com/reactjs/prop-types/pull/87)) | ||
* Add PropTypes.exact, like PropTypes.shape but warns on extra object keys. ([@thejameskyle](https://github.com/thejameskyle) and [@aweary](https://github.com/aweary) in [#41](https://github.com/facebook/prop-types/pull/41) and [#87](https://github.com/facebook/prop-types/pull/87)) | ||
## 15.5.10 | ||
* Fix a false positive warning when using a production UMD build of a third-party library with a DEV version of React. ([@gaearon](https://github.com/gaearon) in [#50](https://github.com/reactjs/prop-types/pull/50)) | ||
* Fix a false positive warning when using a production UMD build of a third-party library with a DEV version of React. ([@gaearon](https://github.com/gaearon) in [#50](https://github.com/facebook/prop-types/pull/50)) | ||
## 15.5.9 | ||
* Add `loose-envify` Browserify transform for users who don't envify globally. ([@mridgway](https://github.com/mridgway) in [#45](https://github.com/reactjs/prop-types/pull/45)) | ||
* Add `loose-envify` Browserify transform for users who don't envify globally. ([@mridgway](https://github.com/mridgway) in [#45](https://github.com/facebook/prop-types/pull/45)) | ||
## 15.5.8 | ||
* Limit the manual PropTypes call warning count because it has false positives with React versions earlier than 15.2.0 in the 15.x branch and 0.14.9 in the 0.14.x branch. ([@gaearon](https://github.com/gaearon) in [#26](https://github.com/reactjs/prop-types/pull/26)) | ||
* Limit the manual PropTypes call warning count because it has false positives with React versions earlier than 15.2.0 in the 15.x branch and 0.14.9 in the 0.14.x branch. ([@gaearon](https://github.com/gaearon) in [#26](https://github.com/facebook/prop-types/pull/26)) | ||
## 15.5.7 | ||
* **Critical Bugfix:** Fix an accidental breaking change that caused errors in production when used through `React.PropTypes`. ([@gaearon](https://github.com/gaearon) in [#20](https://github.com/reactjs/prop-types/pull/20)) | ||
* Improve the size of production UMD build. ([@aweary](https://github.com/aweary) in [38ba18](https://github.com/reactjs/prop-types/commit/38ba18a4a8f705f4b2b33c88204573ddd604f2d6) and [7882a7](https://github.com/reactjs/prop-types/commit/7882a7285293db5f284bcf559b869fd2cd4c44d4)) | ||
* **Critical Bugfix:** Fix an accidental breaking change that caused errors in production when used through `React.PropTypes`. ([@gaearon](https://github.com/gaearon) in [#20](https://github.com/facebook/prop-types/pull/20)) | ||
* Improve the size of production UMD build. ([@aweary](https://github.com/aweary) in [38ba18](https://github.com/facebook/prop-types/commit/38ba18a4a8f705f4b2b33c88204573ddd604f2d6) and [7882a7](https://github.com/facebook/prop-types/commit/7882a7285293db5f284bcf559b869fd2cd4c44d4)) | ||
@@ -34,3 +43,3 @@ ## 15.5.6 | ||
* Fix a markdown issue in README. ([@bvaughn](https://github.com/bvaughn) in [174f77](https://github.com/reactjs/prop-types/commit/174f77a50484fa628593e84b871fb40eed78b69a)) | ||
* Fix a markdown issue in README. ([@bvaughn](https://github.com/bvaughn) in [174f77](https://github.com/facebook/prop-types/commit/174f77a50484fa628593e84b871fb40eed78b69a)) | ||
@@ -41,3 +50,3 @@ ## 15.5.5 | ||
* Add missing documentation and license files. ([@bvaughn](https://github.com/bvaughn) in [0a53d3](https://github.com/reactjs/prop-types/commit/0a53d3a34283ae1e2d3aa396632b6dc2a2061e6a)) | ||
* Add missing documentation and license files. ([@bvaughn](https://github.com/bvaughn) in [0a53d3](https://github.com/facebook/prop-types/commit/0a53d3a34283ae1e2d3aa396632b6dc2a2061e6a)) | ||
@@ -48,4 +57,4 @@ ## 15.5.4 | ||
* Reduce the size of the UMD Build. ([@acdlite](https://github.com/acdlite) in [31e9344](https://github.com/reactjs/prop-types/commit/31e9344ca3233159928da66295da17dad82db1a8)) | ||
* Remove bad package url. ([@ljharb](https://github.com/ljharb) in [158198f](https://github.com/reactjs/prop-types/commit/158198fd6c468a3f6f742e0e355e622b3914048a)) | ||
* Reduce the size of the UMD Build. ([@acdlite](https://github.com/acdlite) in [31e9344](https://github.com/facebook/prop-types/commit/31e9344ca3233159928da66295da17dad82db1a8)) | ||
* Remove bad package url. ([@ljharb](https://github.com/ljharb) in [158198f](https://github.com/facebook/prop-types/commit/158198fd6c468a3f6f742e0e355e622b3914048a)) | ||
* Remove the accidentally included typechecking code from the production build. | ||
@@ -57,3 +66,3 @@ | ||
* Remove the accidentally included React package code from the UMD bundle. ([@acdlite](https://github.com/acdlite) in [df318bb](https://github.com/reactjs/prop-types/commit/df318bba8a89bc5aadbb0292822cf4ed71d27ace)) | ||
* Remove the accidentally included React package code from the UMD bundle. ([@acdlite](https://github.com/acdlite) in [df318bb](https://github.com/facebook/prop-types/commit/df318bba8a89bc5aadbb0292822cf4ed71d27ace)) | ||
@@ -64,3 +73,3 @@ ## 15.5.2 | ||
* Remove dependency on React for CommonJS entry point. ([@acdlite](https://github.com/acdlite) in [cae72bb](https://github.com/reactjs/prop-types/commit/cae72bb281a3766c765e3624f6088c3713567e6d)) | ||
* Remove dependency on React for CommonJS entry point. ([@acdlite](https://github.com/acdlite) in [cae72bb](https://github.com/facebook/prop-types/commit/cae72bb281a3766c765e3624f6088c3713567e6d)) | ||
@@ -67,0 +76,0 @@ |
@@ -15,2 +15,3 @@ /** | ||
var loggedTypeFailures = {}; | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
@@ -45,3 +46,3 @@ printWarning = function(text) { | ||
for (var typeSpecName in typeSpecs) { | ||
if (typeSpecs.hasOwnProperty(typeSpecName)) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
var error; | ||
@@ -74,4 +75,3 @@ // Prop type validation may throw. In case they do, we don't want to | ||
'shape all require an argument).' | ||
) | ||
); | ||
} | ||
@@ -94,2 +94,13 @@ if (error instanceof Error && !(error.message in loggedTypeFailures)) { | ||
/** | ||
* Resets warning cache when testing. | ||
* | ||
* @private | ||
*/ | ||
checkPropTypes.resetWarningCache = function() { | ||
if (process.env.NODE_ENV !== 'production') { | ||
loggedTypeFailures = {}; | ||
} | ||
} | ||
module.exports = checkPropTypes; |
@@ -13,2 +13,4 @@ /** | ||
function emptyFunction() {} | ||
function emptyFunctionWithReset() {} | ||
emptyFunctionWithReset.resetWarningCache = emptyFunction; | ||
@@ -47,2 +49,3 @@ module.exports = function() { | ||
element: shim, | ||
elementType: shim, | ||
instanceOf: getShim, | ||
@@ -54,6 +57,8 @@ node: shim, | ||
shape: getShim, | ||
exact: getShim | ||
exact: getShim, | ||
checkPropTypes: emptyFunctionWithReset, | ||
resetWarningCache: emptyFunction | ||
}; | ||
ReactPropTypes.checkPropTypes = emptyFunction; | ||
ReactPropTypes.PropTypes = ReactPropTypes; | ||
@@ -60,0 +65,0 @@ |
@@ -10,2 +10,3 @@ /** | ||
var ReactIs = require('react-is'); | ||
var assign = require('object-assign'); | ||
@@ -16,2 +17,3 @@ | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning = function() {}; | ||
@@ -127,2 +129,3 @@ | ||
element: createElementTypeChecker(), | ||
elementType: createElementTypeTypeChecker(), | ||
instanceOf: createInstanceTypeChecker, | ||
@@ -281,2 +284,14 @@ node: createNodeChecker(), | ||
function createElementTypeTypeChecker() { | ||
function validate(props, propName, componentName, location, propFullName) { | ||
var propValue = props[propName]; | ||
if (!ReactIs.isValidElementType(propValue)) { | ||
var propType = getPropType(propValue); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); | ||
} | ||
return null; | ||
} | ||
return createChainableTypeChecker(validate); | ||
} | ||
function createInstanceTypeChecker(expectedClass) { | ||
@@ -296,3 +311,12 @@ function validate(props, propName, componentName, location, propFullName) { | ||
if (!Array.isArray(expectedValues)) { | ||
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (arguments.length > 1) { | ||
printWarning( | ||
`Invalid arguments supplied to oneOf, expected an array, got ${arguments.length} arguments. ` + | ||
`A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).` | ||
); | ||
} else { | ||
printWarning('Invalid argument supplied to oneOf, expected an array.'); | ||
} | ||
} | ||
return emptyFunctionThatReturnsNull; | ||
@@ -309,4 +333,9 @@ } | ||
var valuesString = JSON.stringify(expectedValues); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | ||
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | ||
if (getPropType(value) === 'symbol') { | ||
return String(value); | ||
} | ||
return value; | ||
}); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | ||
} | ||
@@ -327,3 +356,3 @@ return createChainableTypeChecker(validate); | ||
for (var key in propValue) { | ||
if (propValue.hasOwnProperty(key)) { | ||
if (has(propValue, key)) { | ||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | ||
@@ -559,2 +588,3 @@ if (error instanceof Error) { | ||
ReactPropTypes.checkPropTypes = checkPropTypes; | ||
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | ||
ReactPropTypes.PropTypes = ReactPropTypes; | ||
@@ -561,0 +591,0 @@ |
13
index.js
@@ -9,17 +9,8 @@ /** | ||
if (process.env.NODE_ENV !== 'production') { | ||
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && | ||
Symbol.for && | ||
Symbol.for('react.element')) || | ||
0xeac7; | ||
var ReactIs = require('react-is'); | ||
var isValidElement = function(object) { | ||
return typeof object === 'object' && | ||
object !== null && | ||
object.$$typeof === REACT_ELEMENT_TYPE; | ||
}; | ||
// By explicitly using `prop-types` you are opting into new development behavior. | ||
// http://fb.me/prop-types-in-prod | ||
var throwOnDirectAccess = true; | ||
module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); | ||
module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess); | ||
} else { | ||
@@ -26,0 +17,0 @@ // By explicitly using `prop-types` you are opting into new production behavior. |
{ | ||
"name": "prop-types", | ||
"version": "15.6.2", | ||
"version": "15.7.0", | ||
"description": "Runtime type checking for React props and similar objects.", | ||
@@ -28,9 +28,9 @@ "main": "index.js", | ||
"dependencies": { | ||
"loose-envify": "^1.3.1", | ||
"object-assign": "^4.1.1" | ||
"object-assign": "^4.1.1", | ||
"react-is": "^16.8.1" | ||
}, | ||
"scripts": { | ||
"test": "jest", | ||
"umd": "NODE_ENV=development browserify index.js -t envify --standalone PropTypes -o prop-types.js", | ||
"umd-min": "NODE_ENV=production browserify index.js -t envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js", | ||
"umd": "NODE_ENV=development browserify index.js -t loose-envify --standalone PropTypes -o prop-types.js", | ||
"umd-min": "NODE_ENV=production browserify index.js -t loose-envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js", | ||
"build": "yarn umd && yarn umd-min", | ||
@@ -44,4 +44,4 @@ "prepublish": "yarn build" | ||
"bundle-collapser": "^1.2.1", | ||
"envify": "^4.0.0", | ||
"jest": "^19.0.2", | ||
"loose-envify": "^1.4.0", | ||
"react": "^15.5.1", | ||
@@ -48,0 +48,0 @@ "uglifyify": "^3.0.4", |
@@ -16,2 +16,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PropTypes = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var loggedTypeFailures = {}; | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
@@ -46,3 +47,3 @@ printWarning = function(text) { | ||
for (var typeSpecName in typeSpecs) { | ||
if (typeSpecs.hasOwnProperty(typeSpecName)) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
var error; | ||
@@ -75,4 +76,3 @@ // Prop type validation may throw. In case they do, we don't want to | ||
'shape all require an argument).' | ||
) | ||
); | ||
} | ||
@@ -95,2 +95,13 @@ if (error instanceof Error && !(error.message in loggedTypeFailures)) { | ||
/** | ||
* Resets warning cache when testing. | ||
* | ||
* @private | ||
*/ | ||
checkPropTypes.resetWarningCache = function() { | ||
if ("development" !== 'production') { | ||
loggedTypeFailures = {}; | ||
} | ||
} | ||
module.exports = checkPropTypes; | ||
@@ -111,2 +122,4 @@ | ||
function emptyFunction() {} | ||
function emptyFunctionWithReset() {} | ||
emptyFunctionWithReset.resetWarningCache = emptyFunction; | ||
@@ -145,2 +158,3 @@ module.exports = function() { | ||
element: shim, | ||
elementType: shim, | ||
instanceOf: getShim, | ||
@@ -152,6 +166,8 @@ node: shim, | ||
shape: getShim, | ||
exact: getShim | ||
exact: getShim, | ||
checkPropTypes: emptyFunctionWithReset, | ||
resetWarningCache: emptyFunction | ||
}; | ||
ReactPropTypes.checkPropTypes = emptyFunction; | ||
ReactPropTypes.PropTypes = ReactPropTypes; | ||
@@ -172,2 +188,3 @@ | ||
var ReactIs = require('react-is'); | ||
var assign = require('object-assign'); | ||
@@ -178,2 +195,3 @@ | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning = function() {}; | ||
@@ -289,2 +307,3 @@ | ||
element: createElementTypeChecker(), | ||
elementType: createElementTypeTypeChecker(), | ||
instanceOf: createInstanceTypeChecker, | ||
@@ -443,2 +462,14 @@ node: createNodeChecker(), | ||
function createElementTypeTypeChecker() { | ||
function validate(props, propName, componentName, location, propFullName) { | ||
var propValue = props[propName]; | ||
if (!ReactIs.isValidElementType(propValue)) { | ||
var propType = getPropType(propValue); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); | ||
} | ||
return null; | ||
} | ||
return createChainableTypeChecker(validate); | ||
} | ||
function createInstanceTypeChecker(expectedClass) { | ||
@@ -458,3 +489,12 @@ function validate(props, propName, componentName, location, propFullName) { | ||
if (!Array.isArray(expectedValues)) { | ||
"development" !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0; | ||
if ("development" !== 'production') { | ||
if (arguments.length > 1) { | ||
printWarning( | ||
`Invalid arguments supplied to oneOf, expected an array, got ${arguments.length} arguments. ` + | ||
`A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).` | ||
); | ||
} else { | ||
printWarning('Invalid argument supplied to oneOf, expected an array.'); | ||
} | ||
} | ||
return emptyFunctionThatReturnsNull; | ||
@@ -471,4 +511,9 @@ } | ||
var valuesString = JSON.stringify(expectedValues); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | ||
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | ||
if (getPropType(value) === 'symbol') { | ||
return String(value); | ||
} | ||
return value; | ||
}); | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | ||
} | ||
@@ -489,3 +534,3 @@ return createChainableTypeChecker(validate); | ||
for (var key in propValue) { | ||
if (propValue.hasOwnProperty(key)) { | ||
if (has(propValue, key)) { | ||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | ||
@@ -721,2 +766,3 @@ if (error instanceof Error) { | ||
ReactPropTypes.checkPropTypes = checkPropTypes; | ||
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | ||
ReactPropTypes.PropTypes = ReactPropTypes; | ||
@@ -727,3 +773,3 @@ | ||
},{"./checkPropTypes":1,"./lib/ReactPropTypesSecret":5,"object-assign":6}],4:[function(require,module,exports){ | ||
},{"./checkPropTypes":1,"./lib/ReactPropTypesSecret":5,"object-assign":6,"react-is":10}],4:[function(require,module,exports){ | ||
/** | ||
@@ -737,17 +783,8 @@ * Copyright (c) 2013-present, Facebook, Inc. | ||
if ("development" !== 'production') { | ||
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && | ||
Symbol.for && | ||
Symbol.for('react.element')) || | ||
0xeac7; | ||
var ReactIs = require('react-is'); | ||
var isValidElement = function(object) { | ||
return typeof object === 'object' && | ||
object !== null && | ||
object.$$typeof === REACT_ELEMENT_TYPE; | ||
}; | ||
// By explicitly using `prop-types` you are opting into new development behavior. | ||
// http://fb.me/prop-types-in-prod | ||
var throwOnDirectAccess = true; | ||
module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); | ||
module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess); | ||
} else { | ||
@@ -759,3 +796,3 @@ // By explicitly using `prop-types` you are opting into new production behavior. | ||
},{"./factoryWithThrowingShims":2,"./factoryWithTypeCheckers":3}],5:[function(require,module,exports){ | ||
},{"./factoryWithThrowingShims":2,"./factoryWithTypeCheckers":3,"react-is":10}],5:[function(require,module,exports){ | ||
/** | ||
@@ -866,3 +903,448 @@ * Copyright (c) 2013-present, Facebook, Inc. | ||
},{}]},{},[4])(4) | ||
},{}],7:[function(require,module,exports){ | ||
// shim for using process in browser | ||
var process = module.exports = {}; | ||
// cached from whatever global is present so that test runners that stub it | ||
// don't break things. But we need to wrap it in a try catch in case it is | ||
// wrapped in strict mode code which doesn't define any globals. It's inside a | ||
// function because try/catches deoptimize in certain engines. | ||
var cachedSetTimeout; | ||
var cachedClearTimeout; | ||
function defaultSetTimout() { | ||
throw new Error('setTimeout has not been defined'); | ||
} | ||
function defaultClearTimeout () { | ||
throw new Error('clearTimeout has not been defined'); | ||
} | ||
(function () { | ||
try { | ||
if (typeof setTimeout === 'function') { | ||
cachedSetTimeout = setTimeout; | ||
} else { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
} catch (e) { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
try { | ||
if (typeof clearTimeout === 'function') { | ||
cachedClearTimeout = clearTimeout; | ||
} else { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
} catch (e) { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
} ()) | ||
function runTimeout(fun) { | ||
if (cachedSetTimeout === setTimeout) { | ||
//normal enviroments in sane situations | ||
return setTimeout(fun, 0); | ||
} | ||
// if setTimeout wasn't available but was latter defined | ||
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { | ||
cachedSetTimeout = setTimeout; | ||
return setTimeout(fun, 0); | ||
} | ||
try { | ||
// when when somebody has screwed with setTimeout but no I.E. maddness | ||
return cachedSetTimeout(fun, 0); | ||
} catch(e){ | ||
try { | ||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally | ||
return cachedSetTimeout.call(null, fun, 0); | ||
} catch(e){ | ||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error | ||
return cachedSetTimeout.call(this, fun, 0); | ||
} | ||
} | ||
} | ||
function runClearTimeout(marker) { | ||
if (cachedClearTimeout === clearTimeout) { | ||
//normal enviroments in sane situations | ||
return clearTimeout(marker); | ||
} | ||
// if clearTimeout wasn't available but was latter defined | ||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { | ||
cachedClearTimeout = clearTimeout; | ||
return clearTimeout(marker); | ||
} | ||
try { | ||
// when when somebody has screwed with setTimeout but no I.E. maddness | ||
return cachedClearTimeout(marker); | ||
} catch (e){ | ||
try { | ||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally | ||
return cachedClearTimeout.call(null, marker); | ||
} catch (e){ | ||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. | ||
// Some versions of I.E. have different rules for clearTimeout vs setTimeout | ||
return cachedClearTimeout.call(this, marker); | ||
} | ||
} | ||
} | ||
var queue = []; | ||
var draining = false; | ||
var currentQueue; | ||
var queueIndex = -1; | ||
function cleanUpNextTick() { | ||
if (!draining || !currentQueue) { | ||
return; | ||
} | ||
draining = false; | ||
if (currentQueue.length) { | ||
queue = currentQueue.concat(queue); | ||
} else { | ||
queueIndex = -1; | ||
} | ||
if (queue.length) { | ||
drainQueue(); | ||
} | ||
} | ||
function drainQueue() { | ||
if (draining) { | ||
return; | ||
} | ||
var timeout = runTimeout(cleanUpNextTick); | ||
draining = true; | ||
var len = queue.length; | ||
while(len) { | ||
currentQueue = queue; | ||
queue = []; | ||
while (++queueIndex < len) { | ||
if (currentQueue) { | ||
currentQueue[queueIndex].run(); | ||
} | ||
} | ||
queueIndex = -1; | ||
len = queue.length; | ||
} | ||
currentQueue = null; | ||
draining = false; | ||
runClearTimeout(timeout); | ||
} | ||
process.nextTick = function (fun) { | ||
var args = new Array(arguments.length - 1); | ||
if (arguments.length > 1) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
args[i - 1] = arguments[i]; | ||
} | ||
} | ||
queue.push(new Item(fun, args)); | ||
if (queue.length === 1 && !draining) { | ||
runTimeout(drainQueue); | ||
} | ||
}; | ||
// v8 likes predictible objects | ||
function Item(fun, array) { | ||
this.fun = fun; | ||
this.array = array; | ||
} | ||
Item.prototype.run = function () { | ||
this.fun.apply(null, this.array); | ||
}; | ||
process.title = 'browser'; | ||
process.browser = true; | ||
process.env = {}; | ||
process.argv = []; | ||
process.version = ''; // empty string to avoid regexp issues | ||
process.versions = {}; | ||
function noop() {} | ||
process.on = noop; | ||
process.addListener = noop; | ||
process.once = noop; | ||
process.off = noop; | ||
process.removeListener = noop; | ||
process.removeAllListeners = noop; | ||
process.emit = noop; | ||
process.prependListener = noop; | ||
process.prependOnceListener = noop; | ||
process.listeners = function (name) { return [] } | ||
process.binding = function (name) { | ||
throw new Error('process.binding is not supported'); | ||
}; | ||
process.cwd = function () { return '/' }; | ||
process.chdir = function (dir) { | ||
throw new Error('process.chdir is not supported'); | ||
}; | ||
process.umask = function() { return 0; }; | ||
},{}],8:[function(require,module,exports){ | ||
(function (process){ | ||
/** @license React v16.8.1 | ||
* react-is.development.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
'use strict'; | ||
if (process.env.NODE_ENV !== "production") { | ||
(function() { | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | ||
// nor polyfill, then a plain number is used for performance. | ||
var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | ||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | ||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | ||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | ||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | ||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | ||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; | ||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | ||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | ||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | ||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
function isValidElementType(type) { | ||
return typeof type === 'string' || typeof type === 'function' || | ||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); | ||
} | ||
/** | ||
* Forked from fbjs/warning: | ||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js | ||
* | ||
* Only change is we use console.warn instead of console.error, | ||
* and do nothing when 'console' is not supported. | ||
* This really simplifies the code. | ||
* --- | ||
* Similar to invariant but only logs a warning if the condition is not met. | ||
* This can be used to log issues in development environments in critical | ||
* paths. Removing the logging code for production environments will keep the | ||
* same logic and follow the same code paths. | ||
*/ | ||
var lowPriorityWarning = function () {}; | ||
{ | ||
var printWarning = function (format) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.warn(message); | ||
} | ||
try { | ||
// --- Welcome to debugging React --- | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
}; | ||
lowPriorityWarning = function (condition, format) { | ||
if (format === undefined) { | ||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { | ||
args[_key2 - 2] = arguments[_key2]; | ||
} | ||
printWarning.apply(undefined, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
var lowPriorityWarning$1 = lowPriorityWarning; | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
switch ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
switch (type) { | ||
case REACT_ASYNC_MODE_TYPE: | ||
case REACT_CONCURRENT_MODE_TYPE: | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
return type; | ||
default: | ||
var $$typeofType = type && type.$$typeof; | ||
switch ($$typeofType) { | ||
case REACT_CONTEXT_TYPE: | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_PROVIDER_TYPE: | ||
return $$typeofType; | ||
default: | ||
return $$typeof; | ||
} | ||
} | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
case REACT_PORTAL_TYPE: | ||
return $$typeof; | ||
} | ||
} | ||
return undefined; | ||
} | ||
// AsyncMode is deprecated along with isAsyncMode | ||
var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
var ContextConsumer = REACT_CONTEXT_TYPE; | ||
var ContextProvider = REACT_PROVIDER_TYPE; | ||
var Element = REACT_ELEMENT_TYPE; | ||
var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
var Fragment = REACT_FRAGMENT_TYPE; | ||
var Lazy = REACT_LAZY_TYPE; | ||
var Memo = REACT_MEMO_TYPE; | ||
var Portal = REACT_PORTAL_TYPE; | ||
var Profiler = REACT_PROFILER_TYPE; | ||
var StrictMode = REACT_STRICT_MODE_TYPE; | ||
var Suspense = REACT_SUSPENSE_TYPE; | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; | ||
// AsyncMode should be deprecated | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; | ||
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); | ||
} | ||
} | ||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
} | ||
function isConcurrentMode(object) { | ||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
} | ||
function isContextConsumer(object) { | ||
return typeOf(object) === REACT_CONTEXT_TYPE; | ||
} | ||
function isContextProvider(object) { | ||
return typeOf(object) === REACT_PROVIDER_TYPE; | ||
} | ||
function isElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
function isForwardRef(object) { | ||
return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
} | ||
function isFragment(object) { | ||
return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
} | ||
function isLazy(object) { | ||
return typeOf(object) === REACT_LAZY_TYPE; | ||
} | ||
function isMemo(object) { | ||
return typeOf(object) === REACT_MEMO_TYPE; | ||
} | ||
function isPortal(object) { | ||
return typeOf(object) === REACT_PORTAL_TYPE; | ||
} | ||
function isProfiler(object) { | ||
return typeOf(object) === REACT_PROFILER_TYPE; | ||
} | ||
function isStrictMode(object) { | ||
return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
} | ||
function isSuspense(object) { | ||
return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
} | ||
exports.typeOf = typeOf; | ||
exports.AsyncMode = AsyncMode; | ||
exports.ConcurrentMode = ConcurrentMode; | ||
exports.ContextConsumer = ContextConsumer; | ||
exports.ContextProvider = ContextProvider; | ||
exports.Element = Element; | ||
exports.ForwardRef = ForwardRef; | ||
exports.Fragment = Fragment; | ||
exports.Lazy = Lazy; | ||
exports.Memo = Memo; | ||
exports.Portal = Portal; | ||
exports.Profiler = Profiler; | ||
exports.StrictMode = StrictMode; | ||
exports.Suspense = Suspense; | ||
exports.isValidElementType = isValidElementType; | ||
exports.isAsyncMode = isAsyncMode; | ||
exports.isConcurrentMode = isConcurrentMode; | ||
exports.isContextConsumer = isContextConsumer; | ||
exports.isContextProvider = isContextProvider; | ||
exports.isElement = isElement; | ||
exports.isForwardRef = isForwardRef; | ||
exports.isFragment = isFragment; | ||
exports.isLazy = isLazy; | ||
exports.isMemo = isMemo; | ||
exports.isPortal = isPortal; | ||
exports.isProfiler = isProfiler; | ||
exports.isStrictMode = isStrictMode; | ||
exports.isSuspense = isSuspense; | ||
})(); | ||
} | ||
}).call(this,require('_process')) | ||
},{"_process":7}],9:[function(require,module,exports){ | ||
/** @license React v16.8.1 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
'use strict';Object.defineProperty(exports,"__esModule",{value:!0}); | ||
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"): | ||
60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n; | ||
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k}; | ||
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f}; | ||
exports.isSuspense=function(a){return t(a)===p}; | ||
},{}],10:[function(require,module,exports){ | ||
(function (process){ | ||
'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-is.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-is.development.js'); | ||
} | ||
}).call(this,require('_process')) | ||
},{"./cjs/react-is.development.js":8,"./cjs/react-is.production.min.js":9,"_process":7}]},{},[4])(4) | ||
}); |
@@ -1,1 +0,1 @@ | ||
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.PropTypes=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module){"use strict";function emptyFunction(){}var ReactPropTypesSecret=require(3);module.exports=function(){function e(e,r,t,o,n,p){if(p!==ReactPropTypesSecret){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return t.checkPropTypes=emptyFunction,t.PropTypes=t,t}},{3:3}],2:[function(require,module){module.exports=require(1)()},{1:1}],3:[function(require,module){"use strict";var ReactPropTypesSecret="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";module.exports=ReactPropTypesSecret},{}]},{},[2])(2)}); | ||
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.PropTypes=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function emptyFunction(){}function emptyFunctionWithReset(){}var ReactPropTypesSecret=require(3);emptyFunctionWithReset.resetWarningCache=emptyFunction,module.exports=function(){function e(e,t,n,r,o,p){if(p!==ReactPropTypesSecret){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n,n}},{3:3}],2:[function(require,module,exports){module.exports=require(1)()},{1:1}],3:[function(require,module,exports){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[2])(2)}); |
@@ -1,2 +0,2 @@ | ||
# prop-types | ||
# prop-types [![Build Status](https://travis-ci.com/facebook/prop-types.svg?branch=master)](https://travis-ci.org/facebook/prop-types) | ||
@@ -81,5 +81,8 @@ Runtime type checking for React props and similar objects. | ||
// A React element. | ||
// A React element (ie. <MyComponent />). | ||
optionalElement: PropTypes.element, | ||
// A React element type (ie. MyComponent). | ||
optionalElementType: PropTypes.elementType, | ||
// You can also declare that a prop is an instance of a class. This uses | ||
@@ -196,3 +199,3 @@ // JS's instanceof operator. | ||
This package is compatible with **React 0.14.9**. Compared to 0.14.8 (which was released a year ago), there are no other changes in 0.14.9, so it should be a painless upgrade. | ||
This package is compatible with **React 0.14.9**. Compared to 0.14.8 (which was released in March of 2016), there are no other changes in 0.14.9, so it should be a painless upgrade. | ||
@@ -283,3 +286,3 @@ ```shell | ||
// Works with standalone PropTypes | ||
PropTypes.checkPropTypes(myPropTypes, props, 'prop', 'MyComponent'); | ||
PropTypes.checkPropTypes(myPropTypes, props, 'age', 'MyComponent'); | ||
// This will warn as follows: | ||
@@ -289,1 +292,9 @@ // Warning: Failed prop type: Invalid prop `age` of type `string` supplied to | ||
``` | ||
## PropTypes.resetWarningCache() | ||
`PropTypes.checkPropTypes(...)` only `console.error.log(...)`s a given message once. To reset the cache while testing call `PropTypes.resetWarningCache()` | ||
### License | ||
prop-types is [MIT licensed](./LICENSE). |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
96907
1926
297
1
21
1
+ Addedreact-is@^16.8.1
+ Addedreact-is@16.13.1(transitive)
- Removedloose-envify@^1.3.1
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)