Skip to content

Deprecate Evented - #20970

Draft
wagenet wants to merge 10 commits into
emberjs:mainfrom
wagenet:deprecate-evented
Draft

wagenet wants to merge 10 commits into
emberjs:mainfrom
wagenet:deprecate-evented

Conversation

@wagenet

@wagenet wagenet commented Sep 4, 2025 •

Copy link
Copy Markdown
Member

We still need to figure out correct deprecation ids.

ember-learn/deprecation-app#1404

@wagenet

wagenet commented Sep 5, 2025 •

Copy link
Copy Markdown
Member Author

I just realized that the approach of two mixins may not work with detect. We might be able to do what we want with a Proxy.

EDIT: A Proxy won't easily work either because we look for whether it's in a Set and the Proxy-wrapped version is not identical to the original. As annoying as this is, the best approach is probably just to have a way to temporarily disable the deprecation when used in Ember internals.

EDIT 2: I've reworked this and it should work as expected now.

@wagenet
wagenet force-pushed the deprecate-evented branch 2 times, most recently from 4a66206 to 6a955a2 Compare September 5, 2025 04:52
@github-actions

github-actions Bot commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor
Estimated Asset Sizes

Diff

--- main/out.txt	2026-02-17 19:37:18.000000000 +0000
+++ pr/./pr-22161890309/out.txt	2026-02-18 23:29:44.000000000 +0000
@@ -1,46 +1,46 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 351.99 KB │ 203.84 KB ║
+║ Total │ 357.48 KB │ 206.31 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
 ╔══════════════════════╤═══════════╤═══════════╗
 ║ @ember/*             │ Min       │ Gzip      ║
 ╟──────────────────────┼───────────┼───────────╢
-║ Total                │ 313.39 KB │ 181.91 KB ║
+║ Total                │ 318.77 KB │ 184.35 KB ║
 ╟──────────────────────┼───────────┼───────────╢
-║ -internals           │ 36.65 KB  │ 26.22 KB  ║
-║ application          │ 13.23 KB  │ 8.05 KB   ║
-║ array                │ 13.01 KB  │ 7.46 KB   ║
+║ -internals           │ 38.42 KB  │ 27.26 KB  ║
+║ application          │ 13.35 KB  │ 8.09 KB   ║
+║ array                │ 13.1 KB   │ 7.55 KB   ║
 ║ canary-features      │ 304 B     │ 389 B     ║
-║ component            │ 2.05 KB   │ 1.64 KB   ║
-║ controller           │ 1.96 KB   │ 1.41 KB   ║
-║ debug                │ 11.69 KB  │ 8.12 KB   ║
+║ component            │ 2.05 KB   │ 1.59 KB   ║
+║ controller           │ 2.01 KB   │ 1.45 KB   ║
+║ debug                │ 11.77 KB  │ 8.16 KB   ║
 ║ deprecated-features  │ 31 B      │ 77 B      ║
 ║ destroyable          │ 561 B     │ 383 B     ║
 ║ enumerable           │ 259 B     │ 387 B     ║
-║ helper               │ 1.08 KB   │ 811 B     ║
+║ helper               │ 1.08 KB   │ 814 B     ║
 ║ instrumentation      │ 2.43 KB   │ 1.79 KB   ║
-║ modifier             │ 1.22 KB   │ 965 B     ║
-║ object               │ 35.94 KB  │ 22.16 KB  ║
+║ modifier             │ 1.22 KB   │ 964 B     ║
+║ object               │ 38.38 KB  │ 23.11 KB  ║
 ║ owner                │ 159 B     │ 178 B     ║
-║ renderer             │ 630 B     │ 487 B     ║
-║ routing              │ 59.3 KB   │ 34.12 KB  ║
-║ runloop              │ 2.36 KB   │ 1.5 KB    ║
-║ service              │ 1 KB      │ 845 B     ║
-║ template             │ 654 B     │ 541 B     ║
+║ renderer             │ 630 B     │ 478 B     ║
+║ routing              │ 60.03 KB  │ 34.36 KB  ║
+║ runloop              │ 2.41 KB   │ 1.52 KB   ║
+║ service              │ 1 KB      │ 832 B     ║
+║ template             │ 654 B     │ 523 B     ║
 ║ template-compilation │ 429 B     │ 366 B     ║
 ║ template-compiler    │ 123.08 KB │ 59.45 KB  ║
 ║ template-factory     │ 370 B     │ 374 B     ║
 ║ test                 │ 923 B     │ 627 B     ║
-║ utils                │ 4.11 KB   │ 3.6 KB    ║
+║ utils                │ 4.15 KB   │ 3.65 KB   ║
 ║ version              │ 55 B      │ 131 B     ║
 ╚══════════════════════╧═══════════╧═══════════╝
 
 ╔═════════════════╤══════════╤══════════╗
 ║ @glimmer/*      │ Min      │ Gzip     ║
 ╟─────────────────┼──────────┼──────────╢
-║ Total           │ 38.6 KB  │ 21.94 KB ║
+║ Total           │ 38.71 KB │ 21.96 KB ║
 ╟─────────────────┼──────────┼──────────╢
 ║ destroyable     │ 2.77 KB  │ 1.39 KB  ║
 ║ encoder         │ 81 B     │ 171 B    ║
@@ -53,7 +53,7 @@
 ║ program         │ 252 B    │ 301 B    ║
 ║ reference       │ 548 B    │ 531 B    ║
 ║ runtime         │ 10.32 KB │ 5.32 KB  ║
-║ tracking        │ 1.34 KB  │ 1.16 KB  ║
+║ tracking        │ 1.45 KB  │ 1.19 KB  ║
 ║ util            │ 1.94 KB  │ 1.68 KB  ║
 ║ validator       │ 15.75 KB │ 6.96 KB  ║
 ║ vm              │ 495 B    │ 569 B    ║

Details

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

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 318.77 KB │ 184.35 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 38.42 KB  │ 27.26 KB  ║
║ application          │ 13.35 KB  │ 8.09 KB   ║
║ array                │ 13.1 KB   │ 7.55 KB   ║
║ canary-features      │ 304 B     │ 389 B     ║
║ component            │ 2.05 KB   │ 1.59 KB   ║
║ controller           │ 2.01 KB   │ 1.45 KB   ║
║ debug                │ 11.77 KB  │ 8.16 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 1.08 KB   │ 814 B     ║
║ instrumentation      │ 2.43 KB   │ 1.79 KB   ║
║ modifier             │ 1.22 KB   │ 964 B     ║
║ object               │ 38.38 KB  │ 23.11 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 630 B     │ 478 B     ║
║ routing              │ 60.03 KB  │ 34.36 KB  ║
║ runloop              │ 2.41 KB   │ 1.52 KB   ║
║ service              │ 1 KB      │ 832 B     ║
║ template             │ 654 B     │ 523 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 123.08 KB │ 59.45 KB  ║
║ template-factory     │ 370 B     │ 374 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 4.15 KB   │ 3.65 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤══════════╤══════════╗
║ @glimmer/*      │ Min      │ Gzip     ║
╟─────────────────┼──────────┼──────────╢
║ Total           │ 38.71 KB │ 21.96 KB ║
╟─────────────────┼──────────┼──────────╢
║ destroyable     │ 2.77 KB  │ 1.39 KB  ║
║ encoder         │ 81 B     │ 171 B    ║
║ env             │ 38 B     │ 87 B     ║
║ global-context  │ 886 B    │ 545 B    ║
║ manager         │ 977 B    │ 608 B    ║
║ node            │ 175 B    │ 260 B    ║
║ opcode-compiler │ 1.11 KB  │ 894 B    ║
║ owner           │ 159 B    │ 202 B    ║
║ program         │ 252 B    │ 301 B    ║
║ reference       │ 548 B    │ 531 B    ║
║ runtime         │ 10.32 KB │ 5.32 KB  ║
║ tracking        │ 1.45 KB  │ 1.19 KB  ║
║ util            │ 1.94 KB  │ 1.68 KB  ║
║ validator       │ 15.75 KB │ 6.96 KB  ║
║ vm              │ 495 B    │ 569 B    ║
║ wire-format     │ 1.84 KB  │ 1.35 KB  ║
╚═════════════════╧══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 351.99 KB │ 203.84 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 313.39 KB │ 181.91 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 36.65 KB  │ 26.22 KB  ║
║ application          │ 13.23 KB  │ 8.05 KB   ║
║ array                │ 13.01 KB  │ 7.46 KB   ║
║ canary-features      │ 304 B     │ 389 B     ║
║ component            │ 2.05 KB   │ 1.64 KB   ║
║ controller           │ 1.96 KB   │ 1.41 KB   ║
║ debug                │ 11.69 KB  │ 8.12 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 1.08 KB   │ 811 B     ║
║ instrumentation      │ 2.43 KB   │ 1.79 KB   ║
║ modifier             │ 1.22 KB   │ 965 B     ║
║ object               │ 35.94 KB  │ 22.16 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 630 B     │ 487 B     ║
║ routing              │ 59.3 KB   │ 34.12 KB  ║
║ runloop              │ 2.36 KB   │ 1.5 KB    ║
║ service              │ 1 KB      │ 845 B     ║
║ template             │ 654 B     │ 541 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 123.08 KB │ 59.45 KB  ║
║ template-factory     │ 370 B     │ 374 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 4.11 KB   │ 3.6 KB    ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤══════════╤══════════╗
║ @glimmer/*      │ Min      │ Gzip     ║
╟─────────────────┼──────────┼──────────╢
║ Total           │ 38.6 KB  │ 21.94 KB ║
╟─────────────────┼──────────┼──────────╢
║ destroyable     │ 2.77 KB  │ 1.39 KB  ║
║ encoder         │ 81 B     │ 171 B    ║
║ env             │ 38 B     │ 87 B     ║
║ global-context  │ 886 B    │ 545 B    ║
║ manager         │ 977 B    │ 608 B    ║
║ node            │ 175 B    │ 260 B    ║
║ opcode-compiler │ 1.11 KB  │ 894 B    ║
║ owner           │ 159 B    │ 202 B    ║
║ program         │ 252 B    │ 301 B    ║
║ reference       │ 548 B    │ 531 B    ║
║ runtime         │ 10.32 KB │ 5.32 KB  ║
║ tracking        │ 1.34 KB  │ 1.16 KB  ║
║ util            │ 1.94 KB  │ 1.68 KB  ║
║ validator       │ 15.75 KB │ 6.96 KB  ║
║ vm              │ 495 B    │ 569 B    ║
║ wire-format     │ 1.84 KB  │ 1.35 KB  ║
╚═════════════════╧══════════╧══════════╝

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes from RFC discussion: this file might have been unintentionally included.

wagenet and others added 4 commits February 16, 2026 21:38
- Add DEPRECATE_EVENTED to centralized deprecations registry
- Consolidate all deprecation IDs to single 'ember-evented' ID
- Switch all deprecate() calls to deprecateUntil() pattern
- Update mixin deprecation infrastructure for DeprecationObject
- Fix deprecation messages for consistency
- Remove internal Evented copy from runtime package
- Update all test files to use DEPRECATIONS.DEPRECATE_EVENTED.isEnabled
- Revert unrelated barrel.ts onerror doc change

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
wagenet and others added 6 commits February 16, 2026 22:31
- Fix regex mismatch in each-test.js (/`on` is/ -> /`on()` event decorator/)
- Add missing DEPRECATIONS.DEPRECATE_EVENTED.isEnabled argument
- Fix 'actaully' typo in router-service.ts (3 instances)
- Fix triple-asterisk JSDoc comment in mixin.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove unused expectDeprecation import and fix eslint-disable directives for duplicate class members. Apply prettier formatting to test files.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Export mixin-deprecation utilities from @ember/-internals/utils
- Update imports to use package exports instead of deep imports
- Add type assertions for observer and listener methods
- Restore function overloads for addListener/removeListener exports
- Add specific on() overload for route events to properly type transition callbacks
- Change trigger() return type from any to boolean (matches sendEvent behavior)
- Format observer.ts with prettier

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…DE_DEPRECATION_VERSION variants

- Wrap EmberObject.extend(Evented).create() calls in expectDeprecation in events_test.js,
  since the mixin-level deprecation fires at class creation time
- Add testUnless(DEPRECATIONS.DEPRECATE_EVENTED.isRemoved) guards to tests that use on(),
  Evented methods, or the on() event decorator, so they skip when the API is removed
- Guard the 'each with array proxies' moduleFor with if (!isRemoved) since createList()
  uses on() and can't run at all when the API is removed at OVERRIDE_DEPRECATION_VERSION=15.0.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wagenet wagenet changed the title [WIP] Deprecate Evented Deprecate Evented Feb 18, 2026
DEPRECATE_EVENTED: deprecation({
id: 'ember-evented',
for: 'ember-source',
since: { available: '6.12.0' },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
since: { available: '6.12.0' },
since: { available: '7.1.0' },

Comment thread packages/ember/barrel.ts
If you really need the original behavior:

`import { getOnerror, setOnerror } from '@ember/-internals/error-handling';`
A function may be assigned to `Ember.onerror` to be called when Ember

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reverts some docs changes

Comment thread .gitignore
# couple of the files. Once it is, we can switch this over to just ignoring
# `types/stable` entirely.
types/stable
.puppeteer-cache/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed intentionally -- we no longer use puppeteer

@kategengler

Copy link
Copy Markdown
Member

Do you think you could split this into a few PRs?

  • Replacing the API on router
  • Replacing internal usages
  • Deprecating evented

NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli-ai-agent/ember.js that referenced this pull request Aug 3, 2026
Squashed from PR emberjs#20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>
NullVoxPopuli pushed a commit that referenced this pull request Aug 3, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.
NullVoxPopuli pushed a commit that referenced this pull request Aug 3, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.

Cleanup
NullVoxPopuli pushed a commit that referenced this pull request Aug 13, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.

Cleanup

Skip the Evented test that just checks constructor stuff
NullVoxPopuli pushed a commit that referenced this pull request Aug 13, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.

Cleanup

Skip the Evented test that just checks constructor stuff

ope
NullVoxPopuli pushed a commit that referenced this pull request Aug 13, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.
NullVoxPopuli pushed a commit that referenced this pull request Aug 13, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.
NullVoxPopuli pushed a commit that referenced this pull request Aug 13, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.
NullVoxPopuli pushed a commit that referenced this pull request Aug 14, 2026
Squashed from PR #20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>

Finish RFC 1111 implementation: id/versions, deep imports, main compatibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel

Teach the side-effect probe that setDeprecation is metadata association

setDeprecation(mixin, value) only writes onto its first argument, so when
the mixin is file-local (as in @ember/object/evented) the association is
unobservable unless the module's bindings are imported — same category as
setClassicDecorator and friends.

Restore Function-based signatures in internal event plumbing

The Function -> ((...args: any[]) => void) narrowing in metal/meta only
served the internal signatures and forced casts at every call site. Keep
the this-aware overloads on the public deprecated surface
(@ember/object/events, RouterService) and leave the internal plumbing
typed as it was on main, so the diff only carries the deprecation work.

Inline Evented methods on framework classes instead of applying the mixin

CoreView, Route, and EmberRouter now define on/one/off/trigger/has as
native class methods delegating to shared standalone implementations
(metal/lib/evented-methods), the same shape RouterService already uses.
The framework no longer applies the deprecated Evented mixin anywhere,
which removes the machinery that existed only to silence internal
applications:

- utils/lib/mixin-deprecation.ts (setDeprecation/findDeprecation/
  disableDeprecations) and the Mixin#reopen DEBUG hook are gone;
  the deprecation is communicated by the methods themselves.
- CoreView's init-time trigger/has swap hack is unnecessary now that
  the overrides are ordinary class methods.
- @ember/object/evented no longer has a top-level setDeprecation call,
  so the module is side-effect free again and the tree-shakability
  probe no longer needs to know about setDeprecation.

Tests that expected the definition-time "Evented is deprecated" warning
now create their objects without a wrapper; method-call deprecations are
unchanged.

Keep Evented.detect true for framework classes

CoreView, Route, and EmberRouter no longer apply the Evented mixin, but
their instances still provide its methods. Record Evented in each
prototype's meta from a class static block so Mixin#detect keeps
answering true for instances and subclasses, exactly as it did when the
mixin was applied.

This branch has not been deployed

No deployments
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.

3 participants