Skip to content

Remove _globalsMode and _prepareForGlobalsMode from Application#21198

Merged
kategengler merged 2 commits intomainfrom
copilot/remove-globals-mode-variables
Mar 6, 2026
Merged

Remove _globalsMode and _prepareForGlobalsMode from Application#21198
kategengler merged 2 commits intomainfrom
copilot/remove-globals-mode-variables

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

_globalsMode was always coerced to equal autoboot (this.autoboot = this._globalsMode = Boolean(this.autoboot)), making it a redundant alias. This removes both the property and its associated setup method.

Changes

  • Removed _globalsMode property declaration and JSDoc
  • Removed _prepareForGlobalsMode() method; its body (Router subclass creation + _buildDeprecatedInstance()) is inlined directly into the if (this.autoboot) block in init()
  • Simplified reset() assertion — dropped the redundant this._globalsMode && condition
  • Simplified didBecomeReady() — removed the dead else branch that built a new instance (was explicitly noted as unreachable since _globalsMode === autoboot was enforced)
  • Updated tests/docs/expected.js to remove both entries from the documented classitems list

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove _globalsMode and _prepareForGlobalsMode from codebase Remove _globalsMode and _prepareForGlobalsMode from Application Mar 6, 2026
@kategengler kategengler marked this pull request as ready for review March 6, 2026 17:51
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

📊 Package size report   -0.1%↓

File Before (Size / Brotli) After (Size / Brotli)
dist/ember.debug.js 2.1 MB / 321.9 kB -0.15%↓2.1 MB / -0.2%↓321.3 kB
dist/ember.debug.js.map 3.4 MB / 634.6 kB -0.09%↓3.4 MB / -0.13%↓633.8 kB
dist/ember.prod.js 1.9 MB / 292.6 kB -0.16%↓1.9 MB / -0.21%↓292 kB
dist/ember.prod.js.map 3.3 MB / 607.7 kB -0.1%↓3.3 MB / -0.1%↓607.1 kB
dist/packages/@ember/application/index.js 39.7 kB / 9.7 kB -6.31%↓37.2 kB / -6.12%↓9.2 kB
types/stable/@ember/application/index.d.ts 31.7 kB / 7.4 kB -7.06%↓29.5 kB / -6.67%↓6.9 kB
Total (Includes all files) 17.1 MB / 3.2 MB -0.1%↓17.1 MB / -0.12%↓3.2 MB
Tarball size 3.8 MB -0.12%↓3.8 MB

🤖 This report was automatically generated by pkg-size-action

as a global namespace. See the docs on the `_globalsMode` property
for details.

Most of these features are already deprecated in 1.x, so we can
Copy link
Contributor

Choose a reason for hiding this comment

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

lol

@kategengler kategengler merged commit 96427a6 into main Mar 6, 2026
36 of 38 checks passed
@kategengler kategengler deleted the copilot/remove-globals-mode-variables branch March 6, 2026 18:46
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