Skip to content

Implement RFC #334 - Deprecate Ember Utils - #20968

Closed
wagenet wants to merge 1 commit into
emberjs:mainfrom
wagenet:deprecate-ember-utils
Closed

wagenet wants to merge 1 commit into
emberjs:mainfrom
wagenet:deprecate-ember-utils

Conversation

@wagenet

@wagenet wagenet commented Sep 4, 2025 •

Copy link
Copy Markdown
Member

emberjs/rfcs#1056

I think we just need to settle on the deprecation id and exact versions. We may also want to add @deprecated to the JSDoc.

@github-actions

github-actions Bot commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor
Estimated Asset Sizes

Diff

--- main/out.txt	2025-09-04 03:19:38.000000000 +0000
+++ pr/./pr-17465067592/out.txt	2025-09-04 13:15:14.000000000 +0000
@@ -1,46 +1,46 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 418.65 KB │ 232.22 KB ║
+║ Total │ 417.27 KB │ 231.53 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
-╔══════════════════════╤══════════╤═══════════╗
-║ @ember/*             │ Min      │ Gzip      ║
-╟──────────────────────┼──────────┼───────────╢
-║ Total                │ 239.4 KB │ 147.23 KB ║
-╟──────────────────────┼──────────┼───────────╢
-║ -internals           │ 35.46 KB │ 25.49 KB  ║
-║ application          │ 12.83 KB │ 7.7 KB    ║
-║ array                │ 12.66 KB │ 7.32 KB   ║
-║ canary-features      │ 304 B    │ 419 B     ║
-║ component            │ 1.07 KB  │ 1005 B    ║
-║ controller           │ 1.8 KB   │ 1.36 KB   ║
-║ debug                │ 11.4 KB  │ 7.92 KB   ║
-║ deprecated-features  │ 31 B     │ 77 B      ║
-║ destroyable          │ 561 B    │ 383 B     ║
-║ enumerable           │ 259 B    │ 387 B     ║
-║ helper               │ 823 B    │ 605 B     ║
-║ instrumentation      │ 2.43 KB  │ 1.78 KB   ║
-║ modifier             │ 669 B    │ 581 B     ║
-║ object               │ 33.78 KB │ 20.79 KB  ║
-║ owner                │ 159 B    │ 178 B     ║
-║ renderer             │ 406 B    │ 350 B     ║
-║ routing              │ 58.08 KB │ 33.43 KB  ║
-║ runloop              │ 2.2 KB   │ 1.33 KB   ║
-║ service              │ 859 B    │ 741 B     ║
-║ template             │ 430 B    │ 364 B     ║
-║ template-compilation │ 429 B    │ 366 B     ║
-║ template-compiler    │ 57.91 KB │ 30.4 KB   ║
-║ template-factory     │ 94 B     │ 160 B     ║
-║ test                 │ 923 B    │ 627 B     ║
-║ utils                │ 3.93 KB  │ 3.5 KB    ║
-║ version              │ 55 B     │ 131 B     ║
-╚══════════════════════╧══════════╧═══════════╝
+╔══════════════════════╤═══════════╤═══════════╗
+║ @ember/*             │ Min       │ Gzip      ║
+╟──────────────────────┼───────────┼───────────╢
+║ Total                │ 238.02 KB │ 146.52 KB ║
+╟──────────────────────┼───────────┼───────────╢
+║ -internals           │ 35.52 KB  │ 25.53 KB  ║
+║ application          │ 12.83 KB  │ 7.63 KB   ║
+║ array                │ 12.68 KB  │ 7.23 KB   ║
+║ canary-features      │ 304 B     │ 419 B     ║
+║ component            │ 1.07 KB   │ 974 B     ║
+║ controller           │ 1.8 KB    │ 1.39 KB   ║
+║ debug                │ 10.73 KB  │ 7.65 KB   ║
+║ deprecated-features  │ 31 B      │ 77 B      ║
+║ destroyable          │ 561 B     │ 383 B     ║
+║ enumerable           │ 259 B     │ 387 B     ║
+║ helper               │ 823 B     │ 604 B     ║
+║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
+║ modifier             │ 669 B     │ 590 B     ║
+║ object               │ 33.74 KB  │ 20.79 KB  ║
+║ owner                │ 159 B     │ 178 B     ║
+║ renderer             │ 406 B     │ 333 B     ║
+║ routing              │ 57.65 KB  │ 33.25 KB  ║
+║ runloop              │ 2.2 KB    │ 1.31 KB   ║
+║ service              │ 859 B     │ 744 B     ║
+║ template             │ 430 B     │ 376 B     ║
+║ template-compilation │ 429 B     │ 366 B     ║
+║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
+║ template-factory     │ 94 B      │ 160 B     ║
+║ test                 │ 923 B     │ 627 B     ║
+║ utils                │ 3.6 KB    │ 3.38 KB   ║
+║ version              │ 55 B      │ 131 B     ║
+╚══════════════════════╧═══════════╧═══════════╝
 
 ╔═════════════════╤═══════════╤══════════╗
 ║ @glimmer/*      │ Min       │ Gzip     ║
 ╟─────────────────┼───────────┼──────────╢
-║ Total           │ 179.25 KB │ 84.99 KB ║
+║ Total           │ 179.25 KB │ 85 KB    ║
 ╟─────────────────┼───────────┼──────────╢
 ║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
 ║ encoder         │ 596 B     │ 653 B    ║
@@ -53,7 +53,7 @@
 ║ program         │ 7.1 KB    │ 3.63 KB  ║
 ║ reference       │ 5.51 KB   │ 3.18 KB  ║
 ║ runtime         │ 95.26 KB  │ 42.69 KB ║
-║ tracking        │ 989 B     │ 961 B    ║
+║ tracking        │ 989 B     │ 975 B    ║
 ║ util            │ 3.03 KB   │ 2.29 KB  ║
 ║ validator       │ 15.64 KB  │ 6.86 KB  ║
 ║ vm              │ 784 B     │ 798 B    ║

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.27 KB │ 231.53 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.02 KB │ 146.52 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 35.52 KB  │ 25.53 KB  ║
║ application          │ 12.83 KB  │ 7.63 KB   ║
║ array                │ 12.68 KB  │ 7.23 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 974 B     ║
║ controller           │ 1.8 KB    │ 1.39 KB   ║
║ debug                │ 10.73 KB  │ 7.65 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 604 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 590 B     ║
║ object               │ 33.74 KB  │ 20.79 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 333 B     ║
║ routing              │ 57.65 KB  │ 33.25 KB  ║
║ runloop              │ 2.2 KB    │ 1.31 KB   ║
║ service              │ 859 B     │ 744 B     ║
║ template             │ 430 B     │ 376 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.6 KB    │ 3.38 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 85 KB    ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 975 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 418.65 KB │ 232.22 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤══════════╤═══════════╗
║ @ember/*             │ Min      │ Gzip      ║
╟──────────────────────┼──────────┼───────────╢
║ Total                │ 239.4 KB │ 147.23 KB ║
╟──────────────────────┼──────────┼───────────╢
║ -internals           │ 35.46 KB │ 25.49 KB  ║
║ application          │ 12.83 KB │ 7.7 KB    ║
║ array                │ 12.66 KB │ 7.32 KB   ║
║ canary-features      │ 304 B    │ 419 B     ║
║ component            │ 1.07 KB  │ 1005 B    ║
║ controller           │ 1.8 KB   │ 1.36 KB   ║
║ debug                │ 11.4 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B     │ 77 B      ║
║ destroyable          │ 561 B    │ 383 B     ║
║ enumerable           │ 259 B    │ 387 B     ║
║ helper               │ 823 B    │ 605 B     ║
║ instrumentation      │ 2.43 KB  │ 1.78 KB   ║
║ modifier             │ 669 B    │ 581 B     ║
║ object               │ 33.78 KB │ 20.79 KB  ║
║ owner                │ 159 B    │ 178 B     ║
║ renderer             │ 406 B    │ 350 B     ║
║ routing              │ 58.08 KB │ 33.43 KB  ║
║ runloop              │ 2.2 KB   │ 1.33 KB   ║
║ service              │ 859 B    │ 741 B     ║
║ template             │ 430 B    │ 364 B     ║
║ template-compilation │ 429 B    │ 366 B     ║
║ template-compiler    │ 57.91 KB │ 30.4 KB   ║
║ template-factory     │ 94 B     │ 160 B     ║
║ test                 │ 923 B    │ 627 B     ║
║ utils                │ 3.93 KB  │ 3.5 KB    ║
║ version              │ 55 B     │ 131 B     ║
╚══════════════════════╧══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

@wagenet

wagenet commented Sep 4, 2025

Copy link
Copy Markdown
Member Author

And the deprecation guide: ember-learn/deprecation-app#1417

@NullVoxPopuli
NullVoxPopuli force-pushed the deprecate-ember-utils branch from 1e9c36d to 52269e6 Compare August 19, 2026 15:13
@NullVoxPopuli NullVoxPopuli changed the title [WIP] Deprecate Ember Utils Implement RFC #334 - Deprecate Ember Utils Aug 19, 2026
NullVoxPopuli added a commit that referenced this pull request Oct 1, 2026
Implements RFC 334 and finishes #20968.

One deprecation id, `deprecate-ember-utils`, covers all ten APIs:

- `compare`, `isBlank`, `isEmpty`, `isEqual`, `isNone`, `isPresent`
  and `typeOf` from `@ember/utils`
- `empty`, `notEmpty` and `none` from `@ember/object/computed`

The deprecation is available in 7.5.0 and has `until: 8.0.0`. It is not
enabled yet, because the RFC is not at Ready for Release
(emberjs/rfcs#1056).

`@ember/utils/index.ts` now holds the public functions, their API docs
and the deprecation. The `lib/` modules stay as plain implementations.
Ember's own code already imports them from `lib/` (`sortBy`, the `sort`
macro, query param serialization, `isArray` and the container debug
adapter), so framework code never reports the deprecation. A call to
`isPresent` reports one deprecation, not one for each helper that it
uses.

The implementation tests now import from `lib/`, so they stay after the
public API is removed. A new test checks the deprecation for each public
function. The macro tests expect the deprecation and are skipped once
the deprecation is removed.

Co-authored-by: Peter Wagenet <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

This work was merged in to #21632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants