Commit e13faa5
feat(ember)!: Update to v2 addon format (#23252)
Rebased continuation of #19229 (original author @aklkv) onto current
`develop`, with merge conflicts resolved and the failing tests fixed.
Migrates `@sentry/ember` from the legacy v1 addon format to the [Ember
v2 addon format](https://rfcs.emberjs.com/id/0507-embroider-addons), so
the package works with both classic Ember builds and Embroider-optimized
builds and no longer depends on `@embroider/macros` at runtime. See
#19229 for the full description of the migration.
## Why a new branch
The original PR was ~1900 commits behind `develop` and conflicting.
Rather than resolve the same conflicts twice across its two commits, I
squashed them into one and rebased against the final state once.
The subtle part: the migration renamed `packages/ember/addon/` → `src/`.
Git therefore saw develop's later behavioral changes to those files as
edits to *deleted* files and did **not** surface them as conflicts.
Several develop-side changes had to be ported into the new `src/` files
by hand:
- **Span ops** (#22669, #23086) — route hooks now emit `op: 'function'`
with a `code.function.name` attribute; the runloop uses `ui.task`; the
transition span uses `router`. `instrumentRoutePerformance.ts` still
carried the old `ui.ember.route.*` ops and had to be updated.
- **URL attributes** (#22095, #22415) — `url.path` / `url.full` /
`url.template` on router spans, reconciled onto the PR's restructured
`instrumentEmberAppInstanceForPerformance.ts`.
## Build/tooling reconciliation
- Re-added the nested `typescript: ~5.8.0` devDependency pin. `develop`
upgraded to TypeScript 7 (the native compiler, which drops
`typescript/lib/tsc`), and glint's declaration build needs the classic
JS compiler — the same stop-gap `develop` already applies to ember (see
#19435). Without the pin the declaration build fails with
`ERR_PACKAGE_PATH_NOT_EXPORTED`.
- Bumped `@sentry/browser` / `@sentry/core` from the PR's stale
`10.53.1` to `10.67.0` and added `@sentry/conventions` (now imported by
the ported instrumentation).
- Removed the PR's `import/no-unresolved` oxlint rule (doesn't exist in
this repo's oxlint 1.75) and wrapped `URL_FULL` in
`filterCollectedUrl()` for the `sdk/no-unfiltered-url-attributes` rule,
which now applies since the code lives under `src/**`.
## Test fixes
The originally-failing tests came down to three things:
- **Span-op port** above — fixed the `captures correct spans for
navigation` assertions.
- **Missing `traceLifecycle: 'static'`** in the two new e2e apps
(`ember-strict-resolver`, `ember-vite`). `develop` made span-streaming
the default and disables it in the ember test apps (#22588); the new
apps predated that, so their performance tests hung waiting for
transaction events that never arrived under streaming.
- **Stale assertions** in `ember-strict-resolver`'s
`sentry-performance.test.ts`, updated from the old `ui.ember.*` op
schema to the new `router` / `function` / `ui.task` ops.
All four ember e2e apps pass (`ember-classic` 6/6, `ember-embroider`
6/6, `ember-strict-resolver` 10/10, `ember-vite` 5/5), along with the
ember unit tests, lint, and build.
Supersedes #19229.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c56f617 commit e13faa5
167 files changed
Lines changed: 4651 additions & 6800 deletions
File tree
- dev-packages/e2e-tests/test-applications
- ember-classic
- app
- config
- instance-initializers
- config
- tests
- ember-embroider
- app
- config
- instance-initializers
- config
- tests
- ember-strict-resolver
- src
- components
- instance-initializers
- routes
- slow-loading-route
- with-error
- with-loading
- templates
- slow-loading-route
- with-error
- with-loading
- tests
- ember-vite
- app
- components
- config
- helpers
- instance-initializers
- routes
- slow-loading-route
- styles
- templates
- slow-loading-route
- config
- public
- tests
- packages/ember
- addon
- instance-initializers
- utils
- app/instance-initializers
- config
- src
- utils
- tests
- acceptance
- dummy
- app
- components
- config
- controllers
- slow-loading-route
- routes
- with-error
- with-loading
- styles
- templates
- components
- slow-loading-route
- with-error
- with-loading
- config
- public
- assets/images
- helpers
- unit
- types
- unpublished-development-types
- vendor
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
662 | 736 | | |
663 | 737 | | |
664 | 738 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 1 addition & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 22 | + | |
38 | 23 | | |
39 | 24 | | |
40 | 25 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments