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 @@ ...@@ -19,7 +19,7 @@
"@babel/code-frame": "7.8.3", "@babel/code-frame": "7.8.3",
"anser": "1.4.9", "anser": "1.4.9",
"classnames": "2.2.6", "classnames": "2.2.6",
"source-map": "0.7.3", "source-map": "0.8.0-beta.0",
"stacktrace-parser": "0.1.9", "stacktrace-parser": "0.1.9",
"strip-ansi": "6.0.0" "strip-ansi": "6.0.0"
}, },
......
...@@ -74,6 +74,7 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) { ...@@ -74,6 +74,7 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
}) })
consumer.destroy() consumer.destroy()
} catch (err) { } catch (err) {
console.log('Failed to parse source map:', err)
res.statusCode = 500 res.statusCode = 500
res.write('Internal Server Error') res.write('Internal Server Error')
return res.end() return res.end()
......
...@@ -135,7 +135,15 @@ function scheduleUpdate() { ...@@ -135,7 +135,15 @@ function scheduleUpdate() {
// Only trigger refresh if the webpack HMR state is idle // Only trigger refresh if the webpack HMR state is idle
if (canApplyUpdate()) { 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() return scheduleUpdate()
......
...@@ -272,7 +272,7 @@ test('cyclic dependencies', async () => { ...@@ -272,7 +272,7 @@ test('cyclic dependencies', async () => {
await cleanup() 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() const [session, cleanup] = await sandbox()
await session.patch( await session.patch(
...@@ -350,7 +350,7 @@ test.skip('logbox: can recover from a event handler error', async () => { ...@@ -350,7 +350,7 @@ test.skip('logbox: can recover from a event handler error', async () => {
await cleanup() 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() const [session, cleanup] = await sandbox()
await session.write( await session.write(
......
...@@ -15244,6 +15244,13 @@ source-map@0.7.3: ...@@ -15244,6 +15244,13 @@ source-map@0.7.3:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== 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: source-map@^0.4.2:
version "0.4.4" version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" 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