From 24b540e191848c720401ce0da6d547bfe3d35b37 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:12:19 -0400 Subject: [PATCH 1/2] ember-async-data@v1 is out, so we can bump --- .changeset/chilly-keys-kick.md | 5 +++ ember-resources/package.json | 4 +- ember-resources/src/util/function.ts | 6 +-- pnpm-lock.yaml | 56 ++++++++++------------------ test-app/package.json | 2 +- 5 files changed, 30 insertions(+), 43 deletions(-) create mode 100644 .changeset/chilly-keys-kick.md diff --git a/.changeset/chilly-keys-kick.md b/.changeset/chilly-keys-kick.md new file mode 100644 index 000000000..e2a766f7d --- /dev/null +++ b/.changeset/chilly-keys-kick.md @@ -0,0 +1,5 @@ +--- +"ember-resources": patch +--- + +ember-async-data@v1 is out, so since we're _just now_ using it, that can be the minimum version diff --git a/ember-resources/package.json b/ember-resources/package.json index 6471eb947..99e51c12d 100644 --- a/ember-resources/package.json +++ b/ember-resources/package.json @@ -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" }, @@ -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", diff --git a/ember-resources/src/util/function.ts b/ember-resources/src/util/function.ts index 535718318..7dcd4bb1a 100644 --- a/ember-resources/src/util/function.ts +++ b/ember-resources/src/util/function.ts @@ -135,12 +135,12 @@ export class State { /** * 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 @@ -198,7 +198,7 @@ export class State { 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; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d0d26e62..2f3a10ebd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -101,7 +101,7 @@ importers: '@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 @@ -144,7 +144,7 @@ importers: '@typescript-eslint/eslint-plugin': 5.54.0_6mj2wypvdnknez7kws2nfdgupi '@typescript-eslint/parser': 5.54.0_ycpbpc6yetojsgtrx3mwntkhsu concurrently: 7.6.0 - ember-async-data: 0.7.0 + ember-async-data: 1.0.1_ember-source@4.11.0 ember-source: 4.11.0_wdt64mjlww5fpvzagecura56i4 ember-template-lint: 5.6.0 eslint: 8.35.0 @@ -209,7 +209,7 @@ importers: '@typescript-eslint/parser': ^5.54.0 broccoli-asset-rev: ^3.0.0 concurrently: ^7.6.0 - ember-async-data: ^0.6.0 + ember-async-data: ^1.0.0 ember-auto-import: 2.6.1 ember-cli: ~4.11.0 ember-cli-app-version: ^5.0.0 @@ -257,11 +257,11 @@ importers: '@embroider/macros': 1.10.0 '@glimmer/component': 1.1.2_@babel+core@7.21.0 '@glimmer/tracking': 1.1.2 - ember-async-data: 0.6.0_@babel+core@7.21.0 + ember-async-data: 1.0.1_ember-source@4.0.1 ember-concurrency: 2.3.7_@babel+core@7.21.0 ember-concurrency-ts: 0.3.1_ember-concurrency@2.3.7 ember-functions-as-helper-polyfill: 2.1.1_ember-source@4.0.1 - ember-resources: file:ember-resources_e6ubeypuqkcgl5vhxbwwj5tbtm + ember-resources: file:ember-resources_jmjqfwtogclr6tbbnopsbpohse tracked-built-ins: 3.1.1 devDependencies: '@babel/core': 7.21.0 @@ -7394,26 +7394,26 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: true - /ember-async-data/0.6.0_@babel+core@7.21.0: - resolution: {integrity: sha512-zgE5N4DVHr9b6Hlnev6Z8zMyD7mII/ewE/6t+7eHTrshe9vwSTA6eiT5fCKmHeSob5ThU51J+Alwl2QACtsL/A==} - engines: {node: 12.* || >= 14} + /ember-async-data/1.0.1_ember-source@4.0.1: + resolution: {integrity: sha512-R9nBxCZ9WDPMJpuGBODs8wV1PHXUbkSbrzVmL34R4aOWbx237yLBllJghQOwfJs1+D72wdzgxg/+J3DY43xz3g==} + peerDependencies: + ember-source: ^4.8.4 dependencies: '@ember/test-waiters': 3.0.2 - ember-cli-babel: 7.26.11 - ember-cli-htmlbars: 5.7.2 - ember-cli-typescript: 4.2.1 - ember-destroyable-polyfill: 2.0.3_@babel+core@7.21.0 + '@embroider/addon-shim': 1.8.4 + ember-source: 4.0.1_qoaxtqicpzj5p3ubthw53xafqm transitivePeerDependencies: - - '@babel/core' - supports-color dev: false - /ember-async-data/0.7.0: - resolution: {integrity: sha512-hiHSSMXYGd4eBM+w1EYCHiIkfnTpup/mxEUeEGVMmaAAzVMjb+ACieEPx2xoZ5Wi5baswYMKIIyoKDWT69645Q==} - engines: {node: 14.* || 16.* || >= 18} + /ember-async-data/1.0.1_ember-source@4.11.0: + resolution: {integrity: sha512-R9nBxCZ9WDPMJpuGBODs8wV1PHXUbkSbrzVmL34R4aOWbx237yLBllJghQOwfJs1+D72wdzgxg/+J3DY43xz3g==} + peerDependencies: + ember-source: ^4.8.4 dependencies: '@ember/test-waiters': 3.0.2 '@embroider/addon-shim': 1.8.4 + ember-source: 4.11.0_wdt64mjlww5fpvzagecura56i4 transitivePeerDependencies: - supports-color dev: true @@ -7801,24 +7801,6 @@ packages: - supports-color dev: true - /ember-cli-typescript/4.2.1: - resolution: {integrity: sha512-0iKTZ+/wH6UB/VTWKvGuXlmwiE8HSIGcxHamwNhEC5x1mN3z8RfvsFZdQWYUzIWFN2Tek0gmepGRPTwWdBYl/A==} - engines: {node: 10.* || >= 12.*} - dependencies: - ansi-to-html: 0.6.15 - broccoli-stew: 3.0.0 - debug: 4.3.4 - execa: 4.1.0 - fs-extra: 9.1.0 - resolve: 1.22.1 - rsvp: 4.8.5 - semver: 7.3.8 - stagehand: 1.0.1 - walk-sync: 2.2.0 - transitivePeerDependencies: - - supports-color - dev: false - /ember-cli-typescript/5.2.1: resolution: {integrity: sha512-qqp5TAIuPHxHiGXJKL+78Euyhy0zSKQMovPh8sJpN/ZBYx0H90pONufHR3anaMcp1snVfx4B+mb9+7ijOik8ZA==} engines: {node: '>= 12.*'} @@ -16003,7 +15985,7 @@ packages: engines: {node: '>=12.20'} dev: true - file:ember-resources_e6ubeypuqkcgl5vhxbwwj5tbtm: + file:ember-resources_jmjqfwtogclr6tbbnopsbpohse: resolution: {directory: ember-resources, type: directory} id: file:ember-resources name: ember-resources @@ -16013,7 +15995,7 @@ packages: '@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 peerDependenciesMeta: @@ -16033,7 +16015,7 @@ packages: '@glimmer/component': 1.1.2_@babel+core@7.21.0 '@glimmer/tracking': 1.1.2 '@glint/template': 1.0.0-beta.3 - ember-async-data: 0.6.0_@babel+core@7.21.0 + ember-async-data: 1.0.1_ember-source@4.0.1 ember-concurrency: 2.3.7_@babel+core@7.21.0 ember-source: 4.0.1_qoaxtqicpzj5p3ubthw53xafqm transitivePeerDependencies: diff --git a/test-app/package.json b/test-app/package.json index 58faa605e..e44edf5a5 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -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", From f8701df3d23830ef0d9dfd50e08b1c3951b8a980 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:54:34 -0400 Subject: [PATCH 2/2] Update chilly-keys-kick.md --- .changeset/chilly-keys-kick.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/chilly-keys-kick.md b/.changeset/chilly-keys-kick.md index e2a766f7d..d072b9155 100644 --- a/.changeset/chilly-keys-kick.md +++ b/.changeset/chilly-keys-kick.md @@ -2,4 +2,5 @@ "ember-resources": patch --- -ember-async-data@v1 is out, so since we're _just now_ using it, that can be the minimum version +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.