Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-async-data

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-async-data - npm Package Versions

123

0.5.0

Diff

Changelog

Source

[v0.5.0] (2021-06-01)

Added :star:

  • Add support for TypeScript 4.3 (#63)
  • Add re-exports from the index (#70): you can now `import { TrackedAsyncData, load } from 'ember-async-data';

Docs 📖

  • Add a section on testing (#69)
nlfurniss
published 0.4.0 •

Changelog

Source

[v0.4.0] (2021-05-13)

Fixed :hammer_and_wrench:

@ember/test-waiters is now a direct dependency as it's used by app code.

chriskrycho
published 0.3.0 •

Changelog

Source

[v0.3.0] (2021-04-12)

Added :star:

Following on from 0.2.0's support for narrowing with .isPending, .isResolved, and .isRejected, TrackedAsyncData instances cab now be "narrowed" by checking the .state property ([#6]):

import TrackedAsyncData from 'ember-async-data/tracked-async-data';

let data = new TrackedAsyncData(Promise.resolve('string'));
switch (data.state) {
  case 'PENDING';
    data.value; // null (and a warning for accessing in an invalid state!)
    data.error; // null (and a warning for accessing in an invalid state!)
    break;
  case 'RESOLVED':
    data.value; // string
    data.error; // null (and a warning for accessing in an invalid state!)
    break;
  case 'REJECTED':
    data.value; // null (and a warning for accessing in an invalid state!)
    data.error; // unknown
    break;
  default:
    break;
}

Fixed :hammer_and_wrench:

Decorated .state with @dependentKeyCompat so it can be used as a dependent key with classic computed properties.

chriskrycho
published 0.2.0 •

Changelog

Source

[v0.2.0] (2021-03-27)

This is a wholly backwards-compatible change, which just adds one new feature and improves some docs.

Added :star:

TrackedAsyncData now has the ability to use TypeScript’s type-narrowing functionality via the .isPending, .isResolved, and .isRejected ([#2]) checks:

import TrackedAsyncData from 'ember-async-data/tracked-async-data';

let data = new TrackedAsyncData(Promise.resolve('string'));
if (data.isPending) {
  data.value; // null (and a warning for accessing in an invalid state!)
  data.error; // null (and a warning for accessing in an invalid state!)
} else if (data.isResolved) {
  data.value; // string
  data.error; // null (and a warning for accessing in an invalid state!)
} else if (data.isRejected) {
  data.value; // null (and a warning for accessing in an invalid state!)
  data.error; // unknown
}

(Remember that the null fallbacks for .value and .error will be removed in a future version which drops support for Ember Classic computed properties.)

nlfurniss
published 0.1.0 •

Changelog

Source

[v0.1.0] (2021-03-18)

Initial release, with TrackedAsyncData and a load helper!

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc