Skip to content

Rename default export GlimmerComponent to Component#21014

Merged
NullVoxPopuli merged 3 commits intoemberjs:mainfrom
evoactivity:rename-glimmer-component
Nov 29, 2025
Merged

Rename default export GlimmerComponent to Component#21014
NullVoxPopuli merged 3 commits intoemberjs:mainfrom
evoactivity:rename-glimmer-component

Conversation

@evoactivity
Copy link
Contributor

Because the export is named GlimmerComponent typescript is unable to offer it as a suggestion when using Component. By convention we have people write import Component from '@glimmer/component, as such they will never be suggested the correct import.

image

You have to write import Gli... to get the correct suggestion.

image

Should have no effect on consumers as this is a default export and as such can be named anything by the consumer.

One risk has been raised by @kategengler in that this might cause problems with the docs and a redirect might need to be added.

@evoactivity
Copy link
Contributor Author

An alternative would be to only rename GlimmerComponent, then both would be recommended by typescript.

@evoactivity
Copy link
Contributor Author

ember's Component export is used in a lot more places than my ide was aware of.

I think just renaming the GlimmerComponent should be enough.

@NullVoxPopuli
Copy link
Contributor

ember's Component export is used in a lot more places than my ide was aware of.

probs better as a separate pr anyway

@github-actions
Copy link
Contributor

Estimated Asset Sizes

Diff

Details

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

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.18 KB │ 146.56 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.71 KB  │ 24.96 KB  ║
║ application          │ 12.7 KB   │ 7.6 KB    ║
║ array                │ 12.63 KB  │ 7.3 KB    ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 1005 B    ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.36 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 599 B     ║
║ instrumentation      │ 2.43 KB   │ 1.77 KB   ║
║ modifier             │ 669 B     │ 586 B     ║
║ object               │ 33.74 KB  │ 20.66 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 353 B     ║
║ routing              │ 58.04 KB  │ 33.41 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 370 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.71 KB  │ 30.53 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           │ 178.73 KB │ 84.47 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.69 KB   │ 1.3 KB   ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.17 KB  │ 5.42 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.72 KB  │ 13.19 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.62 KB  ║
║ reference       │ 5.49 KB   │ 3.21 KB  ║
║ runtime         │ 94.98 KB  │ 42.28 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.63 KB  │ 6.83 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 416.91 KB │ 231.03 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.18 KB │ 146.56 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.71 KB  │ 24.96 KB  ║
║ application          │ 12.7 KB   │ 7.6 KB    ║
║ array                │ 12.63 KB  │ 7.3 KB    ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 1005 B    ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.36 KB  │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 599 B     ║
║ instrumentation      │ 2.43 KB   │ 1.77 KB   ║
║ modifier             │ 669 B     │ 586 B     ║
║ object               │ 33.74 KB  │ 20.66 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 353 B     ║
║ routing              │ 58.04 KB  │ 33.41 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 370 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.71 KB  │ 30.53 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           │ 178.73 KB │ 84.47 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.69 KB   │ 1.3 KB   ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.17 KB  │ 5.42 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.72 KB  │ 13.19 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.62 KB  ║
║ reference       │ 5.49 KB   │ 3.21 KB  ║
║ runtime         │ 94.98 KB  │ 42.28 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.63 KB  │ 6.83 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

@NullVoxPopuli NullVoxPopuli requested a review from ef4 November 28, 2025 16:47
@NullVoxPopuli NullVoxPopuli merged commit f6ad843 into emberjs:main Nov 29, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants