Unverified Commit 42daf7f4 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Upgrade `source-map` package (#12355)

* Abort after 10s instead of 3s while testing

* skip tests to unlock CI

* re-enable tests

* fix

* Catch `performReactRefresh` errors
parent 23941cdc
......@@ -19,7 +19,7 @@
"@babel/code-frame": "7.8.3",
"anser": "1.4.9",
"classnames": "2.2.6",
"source-map": "0.7.3",
"source-map": "0.8.0-beta.0",
"stacktrace-parser": "0.1.9",
"strip-ansi": "6.0.0"
},
......
......@@ -74,6 +74,7 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
})
consumer.destroy()
} catch (err) {
console.log('Failed to parse source map:', err)
res.statusCode = 500
res.write('Internal Server Error')
return res.end()
......
......@@ -135,7 +135,15 @@ function scheduleUpdate() {
// Only trigger refresh if the webpack HMR state is idle
if (canApplyUpdate()) {
return RefreshRuntime.performReactRefresh()
try {
RefreshRuntime.performReactRefresh()
} catch (err) {
console.warn(
'Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
err
)
}
return
}
return scheduleUpdate()
......
......@@ -272,7 +272,7 @@ test('cyclic dependencies', async () => {
await cleanup()
})
test.skip('logbox: can recover from a event handler error', async () => {
test('logbox: can recover from a event handler error', async () => {
const [session, cleanup] = await sandbox()
await session.patch(
......@@ -350,7 +350,7 @@ test.skip('logbox: can recover from a event handler error', async () => {
await cleanup()
})
test.skip('logbox: can recover from a component error', async () => {
test('logbox: can recover from a component error', async () => {
const [session, cleanup] = await sandbox()
await session.write(
......
......@@ -15244,6 +15244,13 @@ source-map@0.7.3:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
source-map@0.8.0-beta.0:
version "0.8.0-beta.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11"
integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==
dependencies:
whatwg-url "^7.0.0"
source-map@^0.4.2:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment