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.
- #704 Fix triple-slash reference in complied output, breaking TS consumers (@NullVoxPopuli)
- #707 Update minimum supported Ember.js version in README.md (@SergeAstapov)
- #693 Update repository field in package.json (@SergeAstapov)
- #681 Replace publish-unstable workflow with push-dist (@SergeAstapov)
- Sergey Astapov (@SergeAstapov)
- @NullVoxPopuli
- #625 Add ember v5 to peerDependencies (@SergeAstapov)
- #666 Add brackets for test selector (@jrjohnson)
- #679 Sync with embroider-addon blueprint (@SergeAstapov)
- Jon Johnson (@jrjohnson)
- Sergey Astapov (@SergeAstapov)
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.
-
#578 Bugfix: drop
context
and stop cachingTrackedAsyncData
(@chriskrycho)Previously,
TrackedAsyncData
and theload
function accepted acontext
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.
- Chris Krycho (@chriskrycho)
- #527 Drop TypeScript support for <= 4.7 (@SergeAstapov)
- #575 Add hard error and deprecations for 1.0 (@chriskrycho)
- #473 Use the types published from Ember itself; require Ember.js v4.8.4 or above (@chriskrycho)
- #575 Add hard error and deprecations for 1.0 (@chriskrycho)
- #473 Use the types published from Ember itself (@chriskrycho)
- #546 Fix wrong Readme example (@simonihmig)
- #545 Fix reference to non-existing
TrackedPromise
in Readme (@simonihmig) - #528 Fix typo in docs (@SergeAstapov)
- #508 Replace /endif with /if (@kennstenicht)
- #456 Update links in README.md after migration to tracked-tools org (@SergeAstapov)
- #404 Add Glint usage docs (@SergeAstapov)
- #407 Add note about TypeScript 4.9 support (@SergeAstapov)
- #406 Minor tweaks in README.md (@SergeAstapov)
- #576 Use
16 || >= 18
in test app engines (@chriskrycho) - #572 [BREAKING] Drop support for non-active versions of Node (@nlfurniss)
- #547 Disable publish-unstable workflow (@SergeAstapov)
- #474 Skip publish-unstable for dependabot PRs (@SergeAstapov)
- #401 add publish-unstable workflow (@SergeAstapov)
- #397 update v2 addon setup (@SergeAstapov)
- #396 Remove eslint-plugin-qunit from addon .eslintrc.js (@SergeAstapov)
- Chris Krycho (@chriskrycho)
- Christoph Wiedenmann (@kennstenicht)
- Nathaniel Furniss (@nlfurniss)
- Sergey Astapov (@SergeAstapov)
- Simon Ihmig (@simonihmig)
- #384 convert addon to v2 format (@SergeAstapov)
- #300 Set minimum Ember version to 3.28 (@chriskrycho)
- #301 Require Node 14, support Node 16 and 18 (@chriskrycho)
- #298 Set minimum TS version to 4.5, use Ember v4 types (@chriskrycho)
- #301 Require Node 14, support Node 16 and 18 (@chriskrycho)
- #299 Add support for TS 4.6 and 4.7 (@chriskrycho)
- #213 Add support for TS 4.5 (@chriskrycho)
- #183 Fix
paths
location in type tests tsconfig.json (@chriskrycho)
- #359 update hbs import from ember-cli-htmlbars (@SergeAstapov)
- #213 Add support for TS 4.5 (@chriskrycho)
- #153 Docs: improve and fix issues in the README (@chriskrycho)
- #382 convert to monorepo (@SergeAstapov)
- #364 run
npx ember-cli-update --to=4.8.0
to align with the latest blueprint (@SergeAstapov) - #380 Update prettier setup per latest addon blueprint (@SergeAstapov)
- #243 Use
finally
forwaiter.endAsync
(@chriskrycho)
- Chris Krycho (@chriskrycho)
- Nathaniel Furniss (@nlfurniss)
- Sergey Astapov (@SergeAstapov)
- #152 Breaking: drop support for versions of Ember before 3.24 LTS (@chriskrycho)
- #149 Breaking: require destroyable context (@chriskrycho)
- Chris Krycho (@chriskrycho)
- #71 Configure release-it for future releases (@chriskrycho)
- Chris Krycho (@chriskrycho)
- Nathaniel Furniss (@nlfurniss)
v0.5.0 (2021-06-01)
- Add support for TypeScript 4.3 (#63)
- Add re-exports from the index (#70): you can now `import { TrackedAsyncData, load } from 'ember-async-data';
- Add a section on testing (#69)
v0.4.0 (2021-05-13)
@ember/test-waiters
is now a direct dependency as it's used by app code.
v0.3.0 (2021-04-12)
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;
}
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.
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!