Repository: parcel-bundler/parcel
Pull request #5092 (2020-09-02 20:37:30)

Flow 0.133
JSDoc!

<img width="794" alt="Bildschirmfoto 2020-09-02 um 22 35 00" src="https://user-images.githubusercontent.com/4586894/92033963-d68c6f00-ed6c-11ea-9022-97ad61295619.png">


height[bot]: > Link [Height](https://parcel.height.app) tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.
>
> 💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.
<!-- Sent by Height -->
parcel-benchmark: ## Benchmark Results
<details><summary>Kitchen Sink ✅</summary><p>

#### Timings

| Description | Time | Difference |
| --- | --- | --- |
| Cold | 6.11s | -45.00ms |
| Cached | 2.12s | -29.00ms |

#### Cold Bundles

| Bundle | Size | Difference | Time | Difference |
| --- | --- | --- | --- | --- |
| dist/legacy/index.html | 701.00b | +0.00b | 687.00ms | +55.00ms ⚠️ |
| dist/modern/index.html | 701.00b | +0.00b | 685.00ms | +55.00ms ⚠️ |
| dist/legacy/index.b3acc8eb.css | 77.00b | +0.00b | 1.44s | -233.00ms 🚀 |

#### Cached Bundles

| Bundle | Size | Difference | Time | Difference |
| --- | --- | --- | --- | --- |
| dist/legacy/parcel.d5807e82.webp | 102.94kb | +0.00b | 147.00ms | -80.00ms 🚀 |
| dist/modern/parcel.d5807e82.webp | 102.94kb | +0.00b | 146.00ms | -81.00ms 🚀 |
| dist/legacy/index.45cccf70.js | 1.10kb | +0.00b | 352.00ms | -29.00ms 🚀 |
| dist/modern/index.1964d1f6.js | 1.10kb | +0.00b | 352.00ms | -28.00ms 🚀 |
| dist/legacy/index.html | 701.00b | +0.00b | 354.00ms | -29.00ms 🚀 |
| dist/modern/index.html | 701.00b | +0.00b | 352.00ms | -28.00ms 🚀 |
| dist/legacy/index.b3acc8eb.css | 77.00b | +0.00b | 352.00ms | -29.00ms 🚀 |
| dist/modern/index.7bc22a8b.css | 77.00b | +0.00b | 352.00ms | -28.00ms 🚀 |

</p></details>

<details><summary>React HackerNews ✅</summary><p>

#### Timings

| Description | Time | Difference |
| --- | --- | --- |
| Cold | 28.17s | -129.00ms |
| Cached | 2.40s | +53.00ms |

#### Cold Bundles

| Bundle | Size | Difference | Time | Difference |
| --- | --- | --- | --- | --- |
| dist/PermalinkedComment.9c5ad065.js | 4.22kb | +0.00b | 11.14s | +5.69s ⚠️ |
| dist/UserProfile.c1927888.js | 1.62kb | +0.00b | 11.14s | +5.69s ⚠️ |
| dist/NotFound.f8a0616d.js | 387.00b | +0.00b | 11.14s | +5.69s ⚠️ |
| dist/logo.24c8bf9e.png | 274.00b | +0.00b | 152.00ms | -21.00ms 🚀 |

#### Cached Bundles

| Bundle | Size | Difference | Time | Difference |
| --- | --- | --- | --- | --- |
| dist/index.js | 478.68kb | +0.00b | 368.00ms | -30.00ms 🚀 |

</p></details>

<details><summary>AtlasKit Editor ✅</summary><p>

#### Timings

| Description | Time | Difference |
| --- | --- | --- |
| Cold | 3.02m | +11.53s ⚠️ |
| Cached | 4.91s | +56.00ms |

#### Cold Bundles

| Bundle | Size | Difference | Time | Difference |
| --- | --- | --- | --- | --- |
| dist/index.2180c879.js | 2.72mb | +0.00b | 1.58m | +6.58s ⚠️ |
| dist/pdfRenderer.15a6a023.js | 1.11mb | -3.00b 🚀 | 54.70s | +1.48s |
| dist/popup.6c453e3c.js | 169.96kb | +0.00b | 54.71s | +23.59s ⚠️ |
| dist/EmojiPickerComponent.ae601247.js | 75.29kb | +0.00b | 10.54s | +875.00ms ⚠️ |
| dist/media-viewer.bcba38b3.js | 71.96kb | +0.00b | 16.12s | +1.32s ⚠️ |
| dist/card.645a5c17.js | 55.01kb | +0.00b | 13.12s | +990.00ms ⚠️ |
| dist/card.0313bac8.js | 52.78kb | +0.00b | 1.58m | +39.45s ⚠️ |
| dist/DatePicker.0df05dac.js | 21.21kb | +0.00b | 10.54s | +873.00ms ⚠️ |
| dist/EmojiPickerComponent.7dc0ebd0.js | 18.23kb | +0.00b | 10.54s | +875.00ms ⚠️ |
| dist/smartMediaEditor.9623570c.js | 16.87kb | +0.00b | 56.25s | -32.25s 🚀 |
| dist/ui.fee77548.js | 13.97kb | +0.00b | 13.12s | +990.00ms ⚠️ |
| dist/workerHasher.1e706e77.js | 11.75kb | +0.00b | 11.31s | +831.00ms ⚠️ |
| dist/EmojiTypeAheadComponent.1990d771.js | 8.67kb | +0.00b | 11.29s | +872.00ms ⚠️ |
| dist/card.383bd9bd.js | 5.61kb | +0.00b | 13.12s | +990.00ms ⚠️ |
| dist/media-viewer.59c17dad.js | 3.92kb | +0.00b | 16.10s | +1.31s ⚠️ |
| dist/EmojiPickerComponent.627aca6b.js | 3.58kb | +0.00b | 51.99s | +42.33s ⚠️ |
| dist/Modal.0304b9ed.js | 3.08kb | +0.00b | 4.48s | -492.00ms 🚀 |
| dist/EmojiUploadComponent.d54a1fc6.js | 2.18kb | +0.00b | 11.29s | +872.00ms ⚠️ |
| dist/card.eea6ad8c.js | 2.03kb | +0.00b | 16.10s | +1.31s ⚠️ |
| dist/ResourcedEmojiComponent.abe8596c.js | 2.00kb | +0.00b | 4.44s | -457.00ms 🚀 |
| dist/feedback.d5590b34.js | 1.64kb | +0.00b | 10.54s | -39.62s 🚀 |
| dist/workerHasher.6d5b22d7.js | 1.54kb | +0.00b | 11.29s | +867.00ms ⚠️ |
| dist/workerHasher.fa198233.js | 1.54kb | +0.00b | 1.58m | +6.58s ⚠️ |
| dist/heading6.fdbbdf4d.js | 1.30kb | +0.00b | 7.26s | -42.90s 🚀 |
| dist/heading3.2113b7a1.js | 1.29kb | +0.00b | 7.26s | +445.00ms ⚠️ |
| dist/heading5.e195aab1.js | 1.17kb | +0.00b | 7.26s | -42.90s 🚀 |
| dist/expand.450f3aea.js | 1.16kb | +0.00b | 10.54s | +876.00ms ⚠️ |
| dist/16.9ba230ea.js | 1.13kb | +0.00b | 7.57s | +857.00ms ⚠️ |
| dist/heading2.a2a1be3f.js | 1.11kb | +0.00b | 7.26s | +445.00ms ⚠️ |
| dist/16.3920766f.js | 1.10kb | +0.00b | 4.44s | -456.00ms 🚀 |
| dist/component.6600f83e.js | 1.07kb | +0.00b | 4.44s | -456.00ms 🚀 |
| dist/heading4.ec980e93.js | 1.06kb | +0.00b | 7.26s | -42.90s 🚀 |
| dist/quote.aa25b83c.js | 1.02kb | +0.00b | 7.06s | +388.00ms ⚠️ |
| dist/panel-warning.97a0e3b3.js | 1008.00b | +0.00b | 51.98s | +45.31s ⚠️ |
| dist/panel.a28c56ee.js | 897.00b | +0.00b | 7.06s | +389.00ms ⚠️ |
| dist/panel-success.9b923e58.js | 845.00b | +0.00b | 51.98s | +45.31s ⚠️ |
| dist/panel-note.97a4d541.js | 841.00b | +0.00b | 51.98s | +45.31s ⚠️ |
| dist/media-card-analytics-error-boundary.663369b9.js | 835.00b | +0.00b | 13.12s | +990.00ms ⚠️ |
| dist/media-card-analytics-error-boundary.73ba4074.js | 835.00b | +0.00b | 1.58m | +6.58s ⚠️ |
| dist/media-viewer-analytics-error-boundary.0afa7031.js | 755.00b | +0.00b | 16.10s | +1.31s ⚠️ |
| dist/EmojiPickerComponent.2e54b9c6.js | 535.00b | +0.00b | 11.29s | +872.00ms ⚠️ |
| dist/simpleHasher.16c8bf41.js | 528.00b | +0.00b | 13.12s | +990.00ms ⚠️ |
| dist/simpleHasher.a29b2a8e.js | 528.00b | +0.00b | 1.58m | +6.58s ⚠️ |
| dist/index.html | 119.00b | +0.00b | 2.40s | +1.63s ⚠️ |

#### Cached Bundles

*No bundle changes detected.*

</p></details>

<details><summary>Three.js x4 🚨</summary><p>

#### Timings

| Description | Time | Difference |
| --- | --- | --- |
| Cold | **FAILED** | -0.00ms |
| Cached | **FAILED** | -0.00ms |

#### Cold Bundles

*No bundles found, this is probably a failed build...*
#### Cached Bundles

*No bundles found, this is probably a failed build...*
</p></details>

**[Click here to view a detailed benchmark overview.](https://benchmark.parceljs.org/benchmark/275589670130156044)**

Patch:
diff --git a/.flowconfig b/.flowconfig
index 798dd752c..7a3de054a 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -42,4 +42,4 @@ untyped-import
 untyped-type-import
 
 [version]
-0.131.0
+0.133.0
diff --git a/package.json b/package.json
index 4eab929bd..dbc11c1ad 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
     "cross-env": "^7.0.0",
     "doctoc": "^1.4.0",
     "eslint": "^6.0.0",
-    "flow-bin": "0.131.0",
+    "flow-bin": "0.133.0",
     "gulp": "^4.0.2",
     "gulp-babel": "^8.0.0",
     "husky": "^4.2.5",
diff --git a/packages/core/core/src/dumpGraphToGraphViz.js b/packages/core/core/src/dumpGraphToGraphViz.js
index 41fe2add6..f3e944c5c 100644
--- a/packages/core/core/src/dumpGraphToGraphViz.js
+++ b/packages/core/core/src/dumpGraphToGraphViz.js
@@ -59,18 +59,22 @@ export default async function dumpGraphToGraphViz(
       label += path.basename(node.value.filePath) + '#' + node.value.type;
     } else if (node.type === 'asset_group') {
       if (node.deferred) label += '(deferred)';
+      // $FlowFixMe
     } else if (node.type === 'file') {
       label += path.basename(node.value.filePath);
+      // $FlowFixMe
     } else if (node.type === 'transformer_request') {
       label +=
         path.basename(node.value.filePath) +
         ` (${getEnvDescription(node.value.env)})`;
+      // $FlowFixMe
     } else if (node.type === 'bundle') {
       let parts = [];
       if (node.value.isEntry) parts.push('entry');
       if (node.value.isInline) parts.push('inline');
       if (parts.length) label += ' (' + parts.join(', ') + ')';
       if (node.value.env) label += ` (${getEnvDescription(node.value.env)})`;
+      // $FlowFixMe
     } else if (node.type === 'request') {
       label = node.value.type + ':' + node.id;
     }
diff --git a/packages/reporters/dev-server/src/HMRServer.js b/packages/reporters/dev-server/src/HMRServer.js
index 538c4c46f..fd455810f 100644
--- a/packages/reporters/dev-server/src/HMRServer.js
+++ b/packages/reporters/dev-server/src/HMRServer.js
@@ -30,7 +30,7 @@ type HMRMessage =
     |};
 
 export default class HMRServer {
-  wss: WebSocket.Server;
+  wss: typeof WebSocket.Server;
   unresolvedError: HMRMessage | null = null;
   options: HMRServerOptions;
 
diff --git a/packages/reporters/dev-server/src/ServerReporter.js b/packages/reporters/dev-server/src/ServerReporter.js
index e1c48f4a7..a5022a2d2 100644
--- a/packages/reporters/dev-server/src/ServerReporter.js
+++ b/packages/reporters/dev-server/src/ServerReporter.js
@@ -39,7 +39,7 @@ export default (new Reporter({
           servers.set(serve.port, server);
           const devServer = await server.start();
 
-          if (hmr && (hmr.port === serve.port || hmr === true)) {
+          if (hmr && hmr.port === serve.port) {
             let hmrServerOptions = {
               port: serve.port,
               devServer,
diff --git a/packages/utils/node-resolver-core/src/NodeResolver.js b/packages/utils/node-resolver-core/src/NodeResolver.js
index 28a1edf16..72c3d041a 100644
--- a/packages/utils/node-resolver-core/src/NodeResolver.js
+++ b/packages/utils/node-resolver-core/src/NodeResolver.js
@@ -799,8 +799,6 @@ export default class NodeResolver {
           } else {
             alias = alias[1];
           }
-        } else if (alias === false) {
-          alias = f;
         }
         if (alias !== f) {
           res = res.concat(
diff --git a/yarn.lock b/yarn.lock
index e207a6160..40a635ed8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6294,10 +6294,10 @@ flatten@^1.0.2:
   resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b"
   integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==
 
-flow-bin@0.131.0:
-  version "0.131.0"
-  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.131.0.tgz#d4228b6070afdf3b2a76acdee77a7f3f8e8f5133"
-  integrity sha512-fZmoIBcDrtLhy/NNMxwJysSYzMr1ksRcAOMi3AHSoYXfcuQqTvhGJx+wqjlIOqIwz8RRYm8J4V4JrSJbIKP+Xg==
+flow-bin@0.133.0:
+  version "0.133.0"
+  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.133.0.tgz#2ee44e3f5d0c0256cfe8e99d9a85e9801c281c50"
+  integrity sha512-01T5g8GdhtJEn+lhAwuv5zkrMStrmkuHrY3Nn9/aS9y6waNmNgimMKlzRpFH66S0F6Ez9EqU9psz5QaRveSJIA==
 
 flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
   version "1.1.1"


Test patch:
diff --git a/packages/core/integration-tests/test/hmr.js b/packages/core/integration-tests/test/hmr.js
index fdaeeb909..4992f8f9d 100644
--- a/packages/core/integration-tests/test/hmr.js
+++ b/packages/core/integration-tests/test/hmr.js
@@ -20,7 +20,7 @@ const config = {
   reporters: ['@parcel/reporter-dev-server'],
 };
 
-async function closeSocket(ws: WebSocket) {
+async function closeSocket(ws: typeof WebSocket) {
   ws.close();
   await new Promise(resolve => (ws.onclose = resolve));
 }
@@ -36,7 +36,7 @@ async function openSocket(uri: string, opts: any) {
   return ws;
 }
 
-async function nextWSMessage(ws: WebSocket) {
+async function nextWSMessage(ws: typeof WebSocket) {
   return json5.parse(await new Promise(resolve => ws.once('message', resolve)));
 }