Skip to content

Commit

Permalink
Fix prettier command
Browse files Browse the repository at this point in the history
  • Loading branch information
surma committed Sep 11, 2019
1 parent 18c7789 commit 08ad23c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ All detectors return a `Promise<bool>`.
| `tailCall()` | [Tail call](https://github.com/webassembly/tail-call) |
| `threads()` | [Threads](https://github.com/webassembly/threads) |

## Why are all the tests async?

The _technical_ reason is that some tests might have to be augmented to be asynchronous in the future. For example, Firefox is planning to [make a change][ff coop] that would require a `postMessage` call to detect SABs, which are required for threads.

The _other_ reason is that you _should_ be using `WebAssembly.compile`, `WebAssembly.instantiate`, or their streaming versions `WebAssembly.compileStreaming` and `WebAssembly.instantiateStreaming`, which are all asynchronous. You should already be prepared for asynchronous code when using WebAssembly!

[ff coop]: https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ

---

License Apache-2.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build:library": "rollup -c",
"build:readme": "node --experimental-modules ./render-readme.mjs",
"build": "npm run build:library && npm run build:readme",
"fmt": "prettier --write './{,src,rollup-plugins}/**/*.{mjs,js,md}'"
"fmt": "prettier --write './{,{src,rollup-plugins}/**/}*.{mjs,js,md}'"
},
"repository": "GoogleChromeLabs/wasm-feature-detect",
"keywords": [],
Expand Down

0 comments on commit 08ad23c

Please sign in to comment.