@hot-loader/react-dom
Advanced tools
Comparing version 16.7.0-alpha.2.2 to 16.7.0-alpha.2.3
37
index.js
@@ -0,5 +1,38 @@ | ||
'use strict'; | ||
function checkDCE() { | ||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ | ||
if ( | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' | ||
) { | ||
return; | ||
} | ||
if (process.env.NODE_ENV !== 'production') { | ||
// This branch is unreachable because this function is only called | ||
// in production, but the condition is true only in development. | ||
// Therefore if the branch is still here, dead code elimination wasn't | ||
// properly applied. | ||
// Don't change the message. React DevTools relies on it. Also make sure | ||
// this message doesn't occur elsewhere in this function, or it will cause | ||
// a false positive. | ||
throw new Error('^_^'); | ||
} | ||
try { | ||
// Verify that the code above has been dead code eliminated (DCE'd). | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); | ||
} catch (err) { | ||
// DevTools shouldn't crash React, no matter what. | ||
// We should still report in case we break this code. | ||
console.error(err); | ||
} | ||
} | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./dist/react-dom.hot.production.js'); | ||
// DCE check should happen before ReactDOM bundle executes so that | ||
// DevTools can report bad minification during injection. | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom.production.min.js'); | ||
} else { | ||
module.exports = require('./dist/react-dom.hot.development.js'); | ||
module.exports = require('./cjs/react-dom.development.js'); | ||
} |
{ | ||
"name": "@hot-loader/react-dom", | ||
"version": "16.7.0-alpha.2.2", | ||
"version": "16.7.0-alpha.2.3", | ||
"description": "The Hot version of React-DOM", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "node build.js" | ||
}, | ||
"repository": { | ||
@@ -18,3 +15,2 @@ "type": "git", | ||
], | ||
"author": "theKashey <thekashey@gmail.com>", | ||
"license": "MIT", | ||
@@ -25,5 +21,2 @@ "bugs": { | ||
"homepage": "https://github.com/hot-loader/react-dom#readme", | ||
"devDependencies": { | ||
"react-dom": "^16.7.0-alpha.2" | ||
}, | ||
"dependencies": { | ||
@@ -34,3 +27,34 @@ "loose-envify": "^1.1.0", | ||
"scheduler": "^0.12.0-alpha.2" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.0.0 || 16.7.0-alpha.2" | ||
}, | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"index.js", | ||
"profiling.js", | ||
"server.js", | ||
"server.browser.js", | ||
"server.node.js", | ||
"test-utils.js", | ||
"unstable-native-dependencies.js", | ||
"cjs/", | ||
"umd/" | ||
], | ||
"browser": { | ||
"./server.js": "./server.browser.js" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
}, | ||
"scripts": { | ||
"build": "node build.js" | ||
}, | ||
"author": "theKashey <thekashey@gmail.com>", | ||
"devDependencies": { | ||
"react-dom": "^16.7.0-alpha.2" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2585568
30
53234
5
12
20