
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
ember-run-callback
Advanced tools
Provides callback(), which lets you easily write runloop and test aware async code:
Ember.Component.extend({
actions: {
addCreditCard(card) {
Stripe.addCard(card, callback(() => {
this.transitionTo('index');
}));
}
}
});
Now, in your tests, you can:
click('.add-credit-card');
andThen(function() {
assert(currentRouteName() === 'index');
});
The callback() method takes the function which you want to be able to run asynchronously, and returns a wrapped function you can use in it's place.
When you invoke callback(), it will notify Ember that some async activity is taking place (via registerWaiter) so your tests will wait for that activity to complete.
When the returned wrapper function is eventually called, it will call your original function (wrapped in an Ember.run()) call, and notify Ember that this particular async activity has finished.
NOTE: When you invoke callback() to get your wrapper function, Ember is immediately notified of an async activity. This means that if you never call the wrapper function that is returned, Ember will never be notified that the async activity ended, and your tests will hang.
If you need to abort the callback, you can use the supplied cancel() method and pass in the wrapper function you got from callback():
import callback, { cancel } from 'ember-run-callback';
let wrapper = callback(function() { /* ... */ }));
cancel(wrapper);
See the related RFC for details and the motivation.
FAQs
The default blueprint for ember-cli addons.
The npm package ember-run-callback receives a total of 1 weekly downloads. As such, ember-run-callback popularity was classified as not popular.
We found that ember-run-callback 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.