Skip to content

Enable Glint by default for both JS and TS addons#141

Open
wagenet wants to merge 1 commit intoember-cli:mainfrom
wagenet:enable-glint-by-default
Open

Enable Glint by default for both JS and TS addons#141
wagenet wants to merge 1 commit intoember-cli:mainfrom
wagenet:enable-glint-by-default

Conversation

@wagenet
Copy link
Copy Markdown

@wagenet wagenet commented May 2, 2026

Summary

Implements RFC #976: Enable Glint by Default for the addon blueprint. Mirrors the app-blueprint change at ember-cli/ember-app-blueprint#273.

  • Move `@glint/ember-tsc`, `@glint/template`, `@glint/tsserver-plugin`, and `typescript` out of the `<% if (typescript) %>` blocks in `package.json` — installed unconditionally so JS addons get IDE tooling. `@ember/app-tsconfig` and `@ember/library-tsconfig` were already always-installed. `lint:types` stays TS-only (`ember-tsc --noEmit`).
  • Add `files/jsconfig.json` for the JS path; filter it out of TS addons in `index.js`.
  • Drop dead loose-mode artifacts (Glint v2 supports template-tag only):
    • `files/src/template-registry.ts`
    • The `'template-registry.js'` rollup public entrypoint
    • Matching test snapshot assertions in `tests/smoke-tests/--typescript.test.ts` and `tests/rollup-build-tests/explicit-imports.test.ts`
    • The v1-registry fixture files at `tests/fixtures/explicit-imports/`

Related

Test plan

  • Generate a JS addon — confirm `jsconfig.json` present, no `tsconfig.json`, Glint v2 packages installed, no `lint:types` script.
  • Generate a TS addon — confirm `tsconfig.json`, no `jsconfig.json`, only Glint v2 deps, `lint:types` runs `ember-tsc --noEmit`.
  • CI: existing rollup-build and smoke tests pass with the updated snapshots.

🤖 Generated with Claude Code

Implements RFC #976 (emberjs/rfcs#976):
install and configure Glint v2 in addon blueprint output regardless
of --typescript. JS addons get IDE tooling via jsconfig.json + the
TypeScript Server plugin; TS addons get the full template type-check
via the ember-tsc CLI.

- Move @glint/ember-tsc, @glint/template, @glint/tsserver-plugin,
  and typescript out of the <% if (typescript) %> blocks in
  package.json so they install for both paths. lint:types stays
  TS-only (ember-tsc --noEmit). @ember/{app,library}-tsconfig were
  already always-installed.
- Add files/jsconfig.json for the JS path (extends @ember/app-tsconfig,
  noEmit:true). Filter it out for TS addons in index.js.
- Drop the dead loose-mode artifacts: src/template-registry.ts,
  the rollup template-registry public entrypoint, the matching test
  assertions in smoke and explicit-imports tests, and the v1-registry
  fixture files. Glint v2 supports template-tag (.gts/.gjs) only;
  the registry pattern is gone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant