Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
async-container
Advanced tools
A utility component to react to promise state changes in the DOM.
This addon enables a declarative way to react to actions which return a promise. When dealing with actions, it's common to represent the UI state while an async action is resolving. For example, a save button that needs to be disabled while a save request is in flight.
{{!-- templates/example.hbs --}}
{{#action-container (action 'save') as |async|}}
<button {{action async.invoke}} disabled={{async.inFlight}}>
{{#if async.inFlight}}
Saving
{{else}}
Save
{{/if}}
</button>
{{/action-container}}
The result of the last successful promise result is available on async.result
{{!-- templates/example.hbs --}}
{{#action-container (action 'save') as |async|}}
{{#if async.result}}
Thank you {{async.result.username}}
{{else}}
<button {{action async.invoke}} disabled={{async.inFlight}}>
{{#if async.inFlight}}
Saving
{{else}}
Save
{{/if}}
</button>
{{/if}}
{{/action-container}}
// controllers/example.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
save() {
return this.get('model').save();
}
}
});
ember install async-container
ember server
npm test
(Runs ember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.
FAQs
A utility component to react to promise state changes in the DOM.
The npm package async-container receives a total of 6 weekly downloads. As such, async-container popularity was classified as not popular.
We found that async-container 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.