@garfish/bridge-react
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -24,2 +24,3 @@ var __defProp = Object.defineProperty; | ||
import * as ReactDOM from "react-dom"; | ||
import { warn } from "@garfish/utils"; | ||
var defaultOpts = { | ||
@@ -48,3 +49,3 @@ rootComponent: void 0, | ||
if (opts.rootComponent && opts.loadRootComponent) { | ||
console.warn("garfish-react-bridge: `RootComponent` will be ignored for the reason you have passed both `rootComponent` and `loadRootComponent`."); | ||
warn("garfish-react-bridge: `RootComponent` will be ignored for the reason you have passed both `rootComponent` and `loadRootComponent`."); | ||
} | ||
@@ -89,5 +90,5 @@ if (opts.errorBoundary && typeof opts.errorBoundary !== "function") { | ||
if (opts.rootComponent && !opts.rootComponent.prototype) { | ||
console.warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to reactBridge(opts).`); | ||
warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to reactBridge(opts).`); | ||
} else if (opts.rootComponent && !opts.rootComponent.prototype.componentDidCatch) { | ||
console.warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire garfish application.`); | ||
warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire garfish application.`); | ||
} | ||
@@ -94,0 +95,0 @@ } |
@@ -50,2 +50,3 @@ var __create = Object.create; | ||
var ReactDOM = __toModule(require("react-dom")); | ||
var import_utils = __toModule(require("@garfish/utils")); | ||
var defaultOpts = { | ||
@@ -74,3 +75,3 @@ rootComponent: void 0, | ||
if (opts.rootComponent && opts.loadRootComponent) { | ||
console.warn("garfish-react-bridge: `RootComponent` will be ignored for the reason you have passed both `rootComponent` and `loadRootComponent`."); | ||
(0, import_utils.warn)("garfish-react-bridge: `RootComponent` will be ignored for the reason you have passed both `rootComponent` and `loadRootComponent`."); | ||
} | ||
@@ -115,5 +116,5 @@ if (opts.errorBoundary && typeof opts.errorBoundary !== "function") { | ||
if (opts.rootComponent && !opts.rootComponent.prototype) { | ||
console.warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to reactBridge(opts).`); | ||
(0, import_utils.warn)(`garfish-react-bridge: ${appInfo.appName}'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to reactBridge(opts).`); | ||
} else if (opts.rootComponent && !opts.rootComponent.prototype.componentDidCatch) { | ||
console.warn(`garfish-react-bridge: ${appInfo.appName}'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire garfish application.`); | ||
(0, import_utils.warn)(`garfish-react-bridge: ${appInfo.appName}'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire garfish application.`); | ||
} | ||
@@ -120,0 +121,0 @@ } |
{ | ||
"name": "@garfish/bridge-react", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "garfish module.", | ||
@@ -32,2 +32,5 @@ "keywords": [ | ||
"types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@garfish/utils": "1.7.0" | ||
}, | ||
"devDependencies": { | ||
@@ -34,0 +37,0 @@ "react": "^17.0.2", |
19769
439
3
+ Added@garfish/utils@1.7.0
+ Added@garfish/utils@1.7.0(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedms@2.1.3(transitive)