DEV: Update jsconfig, add glint config, add basic check in CI (#28667)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run

This switches us back to the 'unstable' version of Glint, which is 'Volar' under the covers. While it's still a work-in-progress, it already works much better for us than the 'stable' version of Glint.

The CI check makes sure that we don't re-introduce any ts/glint-incompatible changes in future (e.g. object literal property decorators).
This commit is contained in:
David Taylor
2024-10-29 16:55:31 +00:00
committed by GitHub
parent e5ac69fd65
commit 5cc531ed75
5 changed files with 395 additions and 900 deletions

View File

@ -10,7 +10,6 @@ CORE_NAMESPACES = {
"discourse/tests/*" => ["app/assets/javascripts/discourse/tests"],
"discourse-common/*" => ["app/assets/javascripts/discourse-common/addon"],
"admin/*" => ["app/assets/javascripts/admin/addon"],
"wizard/*" => ["app/assets/javascripts/wizard/addon"],
"pretty-text/*" => ["app/assets/javascripts/pretty-text/addon"],
"select-kit/*" => ["app/assets/javascripts/select-kit/addon"],
"float-kit/*" => ["app/assets/javascripts/float-kit/addon"],
@ -40,6 +39,14 @@ def write_config(package_dir, extras: {})
},
},
"include" => namespaces.flat_map { |ns, paths| paths.map { |p| relative(package_dir, p) } },
"exclude" => [
"**/*.hbs",
"app/assets/javascripts/discourse/tests/unit/utils/decorators-test.js", # Native class decorators - unsupported by ts/glint
"app/assets/javascripts/discourse/tests/integration/component-templates-test.gjs", # hbs`` tagged templates - https://github.com/typed-ember/glint/issues/705
],
"glint" => {
"environment" => %w[ember-loose ember-template-imports],
},
}
output = <<~JSON