Skip to content

Switch app and addon blueprints to Glint v2 - #11015

Closed
wagenet wants to merge 3 commits into
ember-cli:masterfrom
wagenet:enable-glint-v2
Closed

wagenet wants to merge 3 commits into
ember-cli:masterfrom
wagenet:enable-glint-v2

Conversation

@wagenet

@wagenet wagenet commented May 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the upstream half of RFC #976: Enable Glint by Default. Glint v2 ships as a different package set than v1; this PR swaps the blueprints over.

  • @glint/core, @glint/environment-ember-loose, and @glint/environment-ember-template-imports → replaced with @glint/ember-tsc and @glint/tsserver-plugin. @glint/template stays.
  • lint:types script: tsc --noEmit → ember-tsc --noEmit (the v2 binary).
  • glint.environment removed from the generated tsconfig.json (Glint v2 has no environments). @glint/ember-tsc/types added to compilerOptions.types.
  • The types/global.d.ts template existed only to import the v1 environment-ember-loose package; with that gone, the file is removed.
  • TypeScript fixtures and snapshots updated to match.

Glint v2 supports template-tag (.gts / .gjs) authoring exclusively; the legacy .hbs registry pattern has been retired upstream. Existing .hbs users keep their templates working at runtime, but template type-checking is now .gts-only.

JS-path defaults are unchanged here. The companion changes in ember-cli/ember-app-blueprint and ember-cli/ember-addon-blueprint handle JS-path Glint enablement on top of these upstream changes.

Related

Test plan

  • CI: existing fixture-based blueprint tests pass with the v2 swap (snapshots updated in this PR).
  • Generate a fresh app with ember new my-app --typescript; confirm Glint v2 deps in package.json, no v1 leftovers.
  • Run pnpm lint:types (ember-tsc --noEmit) — exits 0 on a fresh app.
  • Same for ember addon my-addon --typescript.

🤖 Generated with Claude Code

Implements the upstream half of RFC ember-cli#976 (Enable Glint by Default).
Glint v2 ships as @glint/ember-tsc (CLI + LSP), @glint/tsserver-plugin
(TS Server plugin for editors), and @glint/template (type defs).

- Replace @glint/core, @glint/environment-ember-loose, and
  @glint/environment-ember-template-imports with @glint/ember-tsc and
  @glint/tsserver-plugin in the app and addon package.json templates.
  @glint/template stays.
- Update lint:types from `tsc --noEmit` to `ember-tsc --noEmit` (the
  v2 binary).
- Drop `glint.environment` from both tsconfig.json templates (v2 has
  no environments) and add @glint/ember-tsc/types ambient types.
- Remove the now-empty types/global.d.ts which only existed to import
  the v1 environment-ember-loose package.
- Update typescript fixtures and snapshots to match.

Glint v2 only supports template-tag (.gts/.gjs) authoring; the legacy
.hbs registry pattern has been removed. JS-path defaults are unchanged
in this PR; the @embroider/app-blueprint handles JS-path Glint enablement
on top of these upstream changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
wagenet and others added 2 commits May 4, 2026 15:51
The previous commit removed packages/app-blueprint/files/types/global.d.ts
(it only existed to import the v1 environment-ember-loose package, which
is gone in Glint v2). The acceptance tests at tests/acceptance/new-test.js
and tests/acceptance/addon-test.js still asserted that file existed for
TS apps and didn't exist for JS apps. Drop those stale assertions.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

since we figured out how to get glint in the ember extension pack and working on js projects, I don't think we need this 🎉 thanks for helping us explore this!

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