Skip to content

Commit

Permalink
Merge pull request #828 from NullVoxPopuli/upgrade-async-data
Browse files Browse the repository at this point in the history
ember-async-data@v1 is out, so we can bump
  • Loading branch information
NullVoxPopuli authored Mar 16, 2023
2 parents 9c244ff + f8701df commit fd28684
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .changeset/chilly-keys-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ember-resources": patch
---

ember-async-data@v1 is out, so since we're _just now_ using it, that can be the minimum version.
NOTE: `ember-async-data`'s minimum ember-source is 4.8, so while things *might* work with earlier ember-source's it's not guaranteed.
4 changes: 2 additions & 2 deletions ember-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/template": "^1.0.0-beta.3 || ^1.0.0",
"ember-async-data": "^0.6.0",
"ember-async-data": "^1.0.0",
"ember-concurrency": "^2.0.0",
"ember-source": "^3.28.0 || ^4.0.0 || ^5.0.0"
},
Expand Down Expand Up @@ -153,7 +153,7 @@
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"concurrently": "^7.6.0",
"ember-async-data": "^0.7.0",
"ember-async-data": "^1.0.0",
"ember-source": "4.11.0",
"ember-template-lint": "5.6.0",
"eslint": "^8.35.0",
Expand Down
6 changes: 3 additions & 3 deletions ember-resources/src/util/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ export class State<Value> {
/**
* this.data may not exist yet.
*
* Additionaly, prior iterations of TrackedAsyncData did
* Additionally, prior iterations of TrackedAsyncData did
* not allow the accessing of data before
* .state === 'RESOLVED' (isResolved).
*
* From a correctness standpoint, this is perfectly reasonable,
* as it forces folks to handle thet states involved with async functions.
* as it forces folks to handle the states involved with async functions.
*
* The original version of `trackedFunction` did not use TrackedAsyncData,
* and did not have these strictnesses upon property access, leaving folks
Expand Down Expand Up @@ -198,7 +198,7 @@ export class State<Value> {
if (isDestroyed(this) || isDestroying(this)) return;

// TrackedAsyncData manages the destroyable child association for us
this.data = new TrackedAsyncData(this.promise, this);
this.data = new TrackedAsyncData(this.promise);

return this.promise;
};
Expand Down
56 changes: 19 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@embroider/macros": "^1.6.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"ember-async-data": "^0.6.0",
"ember-async-data": "^1.0.0",
"ember-concurrency": "^2.0.0",
"ember-concurrency-ts": "^0.3.1",
"ember-functions-as-helper-polyfill": "^2.0.1",
Expand Down

0 comments on commit fd28684

Please sign in to comment.