npm package diff

Package: @forge/react

Versions: 10.7.1-next.1 - 10.7.1-next.2

Modified:package/out/reconciler.js

Index: package/out/reconciler.js
===================================================================
--- package/out/reconciler.js
+++ package/out/reconciler.js
@@ -32,8 +32,17 @@
         }
     }
     return props;
 };
+const handleReconcilerError = async (error) => {
+    try {
+        await self?.__bridge?.callBridge('onError', { error });
+    }
+    catch (e) {
+        // eslint-disable-next-line no-console
+        console.log('error calling bridge onError', e);
+    }
+};
 const callBridge = function (cmd, data) {
     // @ts-ignore
     // eslint-disable-next-line @typescript-eslint/no-floating-promises
     self?.__bridge?.callBridge(cmd, data);
@@ -213,9 +222,16 @@
         const container = reconciler.createContainer(rootElement, 0, null, false, null, 'root', (err) => {
             // eslint-disable-next-line no-console
             console.log(err);
         }, null);
-        reconciler.updateContainer(element, container, null, null);
+        try {
+            reconciler.updateContainer(element, container, null, null);
+        }
+        catch (e) {
+            // only report errors that are not recoverable
+            void handleReconcilerError(e);
+            throw e;
+        }
     },
     addConfig: (element) => {
         const macroConfigElement = (0, exports.createElement)({ type: 'MacroConfig', props: {}, forgeReactMajorVersion: 10 });
         const container = reconciler.createContainer(macroConfigElement, 0, null, false, null, 'macroConfig', (err) => {

Modified:package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/react",
-  "version": "10.7.1-next.1",
+  "version": "10.7.1-next.2",
   "description": "Forge React reconciler",
   "author": "Atlassian",
   "license": "UNLICENSED",
   "main": "out/index.js",

Modified:package/out/reconciler.d.ts.map

Index: package/out/reconciler.d.ts.map
===================================================================
--- package/out/reconciler.d.ts.map
+++ package/out/reconciler.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"reconciler.d.ts","sourceRoot":"","sources":["../src/reconciler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAmB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI1D,aAAK,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,MAAM,CAAA;CAAE,KAAK,QAAQ,CAAC;AAEtH,eAAO,MAAM,aAAa,EAAE,aAgB3B,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,QAAQ,SAAS,QAAQ,SAM5D,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,QAAQ,SAAS,QAAQ,eAAe,QAAQ,SAOpF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,aAAc,aAAa,YAAY,aAAa,YAerF,CAAC;AAEF,aAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,aAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACzC,aAAK,SAAS,GAAG,QAAQ,CAAC;AAC1B,aAAK,QAAQ,GAAG,QAAQ,CAAC;AACzB,aAAK,YAAY,GAAG,QAAQ,CAAC;AAC7B,aAAK,gBAAgB,GAAG,QAAQ,CAAC;AACjC,aAAK,kBAAkB,GAAG,QAAQ,CAAC;AACnC,aAAK,cAAc,GAAG,QAAQ,CAAC;AAE/B,aAAK,WAAW,GAAG,GAAG,CAAC;AAEvB,aAAK,aAAa,GAAG,GAAG,CAAC;AAEzB,aAAK,QAAQ,GAAG,GAAG,CAAC;AACpB,aAAK,aAAa,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AACnD,aAAK,SAAS,GAAG,CAAC,CAAC,CAAC;AAEpB,eAAO,MAAM,UAAU,EAAE,UAAU,CACjC,cAAc,EACd,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,aAAa,EACb,QAAQ,EACR,aAAa,EACb,SAAS,CA+IV,CAAC;AAIF,eAAO,MAAM,eAAe;sBACR,YAAY;yBAwBT,YAAY;CAiBlC,CAAC;AAEF,eAAe,eAAe,CAAC"}
\ No newline at end of file

Modified:package/CHANGELOG.md

Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
 # @forge/react
 
+## 10.7.1-next.2
+
+### Patch Changes
+
+- 366b7d0: Allow forge react reconciler to forward errors to integration for better handling
+
 ## 10.7.1-next.1
 
 ### Patch Changes

Modified:package/tsconfig.tsbuildinfo

too-big