create-react-class
Advanced tools
Comparing version 15.6.3 to 15.7.0
@@ -13,9 +13,85 @@ /** | ||
var emptyObject = require('fbjs/lib/emptyObject'); | ||
var _invariant = require('fbjs/lib/invariant'); | ||
// -- Inlined from fbjs -- | ||
var emptyObject = {}; | ||
if (process.env.NODE_ENV !== 'production') { | ||
var warning = require('fbjs/lib/warning'); | ||
Object.freeze(emptyObject); | ||
} | ||
var validateFormat = function validateFormat(format) {}; | ||
if (process.env.NODE_ENV !== 'production') { | ||
validateFormat = function validateFormat(format) { | ||
if (format === undefined) { | ||
throw new Error('invariant requires an error message argument'); | ||
} | ||
}; | ||
} | ||
function _invariant(condition, format, a, b, c, d, e, f) { | ||
validateFormat(format); | ||
if (!condition) { | ||
var error; | ||
if (format === undefined) { | ||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); | ||
} else { | ||
var args = [a, b, c, d, e, f]; | ||
var argIndex = 0; | ||
error = new Error(format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
})); | ||
error.name = 'Invariant Violation'; | ||
} | ||
error.framesToPop = 1; // we don't care about invariant's own frame | ||
throw error; | ||
} | ||
} | ||
var warning = function(){}; | ||
if (process.env.NODE_ENV !== 'production') { | ||
var printWarning = function printWarning(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.error(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) {} | ||
}; | ||
warning = function warning(condition, format) { | ||
if (format === undefined) { | ||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (format.indexOf('Failed Composite propType: ') === 0) { | ||
return; // Ignore CompositeComponent proptype check. | ||
} | ||
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)); | ||
} | ||
}; | ||
} | ||
// /-- Inlined from fbjs -- | ||
var MIXINS_KEY = 'mixins'; | ||
@@ -22,0 +98,0 @@ |
{ | ||
"name": "create-react-class", | ||
"version": "15.6.3", | ||
"description": "Legacy API for creating React components.", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"files": [ | ||
"LICENSE", | ||
"factory.js", | ||
"index.js", | ||
"create-react-class.js", | ||
"create-react-class.min.js" | ||
], | ||
"repository": "facebook/react", | ||
"keywords": [ | ||
"react" | ||
], | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/facebook/react/issues" | ||
}, | ||
"homepage": "https://facebook.github.io/react/", | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"fbjs": "^0.8.9", | ||
"loose-envify": "^1.3.1", | ||
"object-assign": "^4.1.1" | ||
}, | ||
"scripts": { | ||
"test": "TEST_ENTRY=./index.js jest", | ||
"build:dev": "NODE_ENV=development webpack && TEST_ENTRY=./create-react-class.js jest", | ||
"build:prod": "NODE_ENV=production webpack && NODE_ENV=production TEST_ENTRY=./create-react-class.min.js jest", | ||
"build": "npm run build:dev && npm run build:prod", | ||
"prepublish": "npm test && npm run build" | ||
}, | ||
"deprecated": false, | ||
"description": "Legacy API for creating React components.", | ||
"devDependencies": { | ||
@@ -41,7 +24,21 @@ "jest": "^19.0.2", | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
} | ||
"files": [ | ||
"LICENSE", | ||
"factory.js", | ||
"index.js", | ||
"create-react-class.js", | ||
"create-react-class.min.js" | ||
], | ||
"homepage": "https://facebook.github.io/react/", | ||
"keywords": [ | ||
"react" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"name": "create-react-class", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/facebook/react.git" | ||
}, | ||
"version": "15.7.0" | ||
} |
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
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
83316
2
2113
0
19
- Removedfbjs@^0.8.9
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)