Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
ember-async-to-generator
Advanced tools
ember install ember-async-to-generator
tl;dr: Enable async-await syntax without including the whole babel polyfill.
Under the hood, this addon configures babel's async-to-generator plugin to use RSVP.Promise
.
The babel plugin defaults to use native Promise
which breaks in old browsers.
The transpiled async/await
code needs regenerator-runtime.
This addon will check target browsers, babel options to properly import the asset (~2.5kb after gzip).
The browsers list support generator and async-await from babel can be found at babel-preset-env/data/plugins.json.
Yes, adding ember-async-to-generator
to your addon's devDependencies
will not affect host apps.
Notice your addon's local development will also have async/await available. To avoid async/await code from addon, you can add lint rules to make sure async/await is test only.
ember-maybe-import-regenerator and ember-maybe-import-regenerator-for-testing only imports the regenerator assets, but your app will still be using native Promise.
ember-async-to-generator
will check existence of those two addons to avoid duplicate import.
If you wish to only import the asset in test, you can install ember-maybe-import-regenerator-for-testing
and eslint-plugin-disable-features
, see this blog post.
This project is licensed under the MIT License.
FAQs
Enable async-await for Ember
The npm package ember-async-to-generator receives a total of 0 weekly downloads. As such, ember-async-to-generator popularity was classified as not popular.
We found that ember-async-to-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.