Skip to content

Latest commit

 

History

History
233 lines (162 loc) · 12.9 KB

CHANGELOG.md

File metadata and controls

233 lines (162 loc) · 12.9 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.3 (2023-10-01)

🐛 Bug Fix

  • #704 Fix triple-slash reference in complied output, breaking TS consumers (@NullVoxPopuli)

📝 Documentation

🏠 Internal

Committers: 2

v1.0.2 (2023-08-02)

🚀 Enhancement

📝 Documentation

🏠 Internal

Committers: 2

v1.0.1 (2023-03-15)

Note: This is a significant bug fix which does (very mildly) break the public API, but necessarily so for the sake of fixing a bug.

🐛 Bug Fix

  • #578 Bugfix: drop context and stop caching TrackedAsyncData (@chriskrycho)

    Previously, TrackedAsyncData and the load function accepted a context parameter as their second argument, to use with Ember's destroyables API. However, that was (a) unnecessary and (b) could actually cause memory leaks, literally the opposite of what it was designed to do. To account for this change, simply remove that call from all call sites.

    Additionally, note that this means that you will no longer get a single instance of TrackedAsyncData for the same promise. In most cases, this is irrelevant, and it is likely that removing our cache which attempted to be helpful that way will improve your performance.

Committers: 1

v1.0.0 (2023-03-15)

💥 Breaking Change

🚀 Enhancement

📝 Documentation

🏠 Internal

Committers: 5

v0.7.0 (2022-11-10)

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

📝 Documentation

🏠 Internal

Committers: 3

v0.6.0 (2021-09-04)

💥 Breaking Change

Committers: 1

v0.5.1 (2021-09-04)

🏠 Internal

Committers: 2

v0.5.0 (2021-06-01)

Added ⭐

  • 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)

v0.4.0 (2021-05-13)

Fixed 🛠️

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

v0.3.0 (2021-04-12)

Added ⭐

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 🛠️

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

v0.2.0 (2021-03-27)

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

Added ⭐

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.)

v0.1.0 (2021-03-18)

Initial release, with TrackedAsyncData and a load helper!