diff --git a/.changeset/config.json b/.changeset/config.json index e97cb6533..a7f07f3d2 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -14,5 +14,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["docs", "ember-app", "@nullvoxpopuli/estimate-bytes"] + "ignore": ["docs", "test-app", "@nullvoxpopuli/estimate-bytes"] } diff --git a/.changeset/red-badgers-doubt.md b/.changeset/red-badgers-doubt.md new file mode 100644 index 000000000..1dbc4b981 --- /dev/null +++ b/.changeset/red-badgers-doubt.md @@ -0,0 +1,6 @@ +--- +"ember-resources": major +--- + +The import path `ember-resources/util/function-resource` has been removed, +as all the relevent exports have been available from `ember-resources` since v5. diff --git a/ember-resources/package.json b/ember-resources/package.json index 73b88c2e3..cbcad26c2 100644 --- a/ember-resources/package.json +++ b/ember-resources/package.json @@ -20,7 +20,6 @@ "./util/remote-data": "./dist/util/remote-data.js", "./util/debounce": "./dist/util/debounce.js", "./util/function": "./dist/util/function.js", - "./util/function-resource": "./dist/util/function-resource.js", "./util/ember-concurrency": "./dist/util/ember-concurrency.js", "./addon-main.js": "./addon-main.cjs" }, @@ -44,9 +43,6 @@ "util/function": [ "dist/util/function.d.ts" ], - "util/function-resource": [ - "dist/util/function-resource.d.ts" - ], "util/map": [ "dist/util/map.d.ts" ], diff --git a/ember-resources/src/util/debounce.ts b/ember-resources/src/util/debounce.ts index 84a225593..3e49bc7d4 100644 --- a/ember-resources/src/util/debounce.ts +++ b/ember-resources/src/util/debounce.ts @@ -1,6 +1,6 @@ import { tracked } from '@glimmer/tracking'; -import { resource } from './function-resource'; +import { resource } from '../core'; class TrackedValue { @tracked value: T | undefined; diff --git a/ember-resources/src/util/function-resource.ts b/ember-resources/src/util/function-resource.ts deleted file mode 100644 index 1d4f2e1db..000000000 --- a/ember-resources/src/util/function-resource.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { resource } from '../core/function-based'; -export { use } from '../core/use'; diff --git a/test-app/tests/type-tests/util/function-resource.ts b/test-app/tests/type-tests/util/function-resource.ts deleted file mode 100644 index 38dd4fa8e..000000000 --- a/test-app/tests/type-tests/util/function-resource.ts +++ /dev/null @@ -1,7 +0,0 @@ -import * as fr from 'ember-resources/util/function-resource'; -import { expectType } from 'ts-expect'; - -import type { resource, use } from 'ember-resources'; - -expectType(fr.use); -expectType(fr.resource);