From ba644f7b968216c10878d7bf30d18e4c73e3fcc0 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:29:55 -0400 Subject: [PATCH 1/5] Update to stable Glint --- files/package.json | 8 +++----- files/rollup.config.mjs | 4 +++- files/tsconfig.json | 2 +- files/tsconfig.publish.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/package.json b/files/package.json index abe0d6c..ab32b92 100644 --- a/files/package.json +++ b/files/package.json @@ -48,11 +48,9 @@ "@embroider/vite": "^1.1.5", "@eslint/js": "^9.17.0", "@glimmer/component": "^2.0.0",<% if (typescript) { %> - "@glint/core": "^2.0.0-alpha.2", - "@glint/environment-ember-loose": "^2.0.0-alpha.2", - "@glint/environment-ember-template-imports": "^2.0.0-alpha.2", - "@glint/template": "^1.6.0-alpha.1", - "@glint/tsserver-plugin": "^2.0.0-alpha.2",<% } %> + "@glint/ember-tsc": "^1.0.0", + "@glint/template": "^1.6.0", + "@glint/tsserver-plugin": "^2.0.0",<% } %> "@rollup/plugin-babel": "^6.0.4",<% if (typescript) { %> "@types/qunit": "^2.19.12",<% } %> "babel-plugin-ember-template-compilation": "^2.2.5", diff --git a/files/rollup.config.mjs b/files/rollup.config.mjs index 29576ce..7d9e2b5 100644 --- a/files/rollup.config.mjs +++ b/files/rollup.config.mjs @@ -63,7 +63,9 @@ export default { // Emit .d.ts declaration files addon.declarations( 'declarations', - `npx glint --declaration --project ${tsConfig}`, + <% if (pnpm) { %>`pnpm ember-tsc --declaration --project ${tsConfig}`, + <% } else if (npm) { %>`npm exec ember-tsc --declaration --project ${tsconfig}`, + <% } else { %>`npx @glint/ember-tsc --declaration --project ${tsconfig}`,<% } %> ),<% } %> // addons are allowed to contain imports of .css files, which we want rollup diff --git a/files/tsconfig.json b/files/tsconfig.json index 04f8ab7..3267197 100644 --- a/files/tsconfig.json +++ b/files/tsconfig.json @@ -11,6 +11,6 @@ "include": ["src/**/*", "tests/**/*", "unpublished-development-types/**/*"], "compilerOptions": { "rootDir": ".", - "types": ["ember-source/types", "vite/client", "@embroider/core/virtual"] + "types": ["ember-source/types", "vite/client", "@embroider/core/virtual", "@glint/ember-tsc/types"] } } diff --git a/files/tsconfig.publish.json b/files/tsconfig.publish.json index e100b77..13f82c8 100644 --- a/files/tsconfig.publish.json +++ b/files/tsconfig.publish.json @@ -25,6 +25,6 @@ */ "rootDir": "./src", - "types": ["ember-source/types"] + "types": ["ember-source/types", "@glint/ember-tsc/types"] } } From 276947894d415a444e01894a4a67e739cf1a7fb1 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:33:29 -0400 Subject: [PATCH 2/5] Pre-fix lint issues --- files/rollup.config.mjs | 6 +++--- files/tsconfig.json | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/files/rollup.config.mjs b/files/rollup.config.mjs index 7d9e2b5..26b9003 100644 --- a/files/rollup.config.mjs +++ b/files/rollup.config.mjs @@ -63,9 +63,9 @@ export default { // Emit .d.ts declaration files addon.declarations( 'declarations', - <% if (pnpm) { %>`pnpm ember-tsc --declaration --project ${tsConfig}`, - <% } else if (npm) { %>`npm exec ember-tsc --declaration --project ${tsconfig}`, - <% } else { %>`npx @glint/ember-tsc --declaration --project ${tsconfig}`,<% } %> + <% if (pnpm) { %>`pnpm ember-tsc --declaration --project ${tsConfig}`,<% } else if (npm) + { %>`npm exec ember-tsc --declaration --project ${tsconfig}`,<% } else + { %>`npx @glint/ember-tsc --declaration --project ${tsconfig}`,<% } %> ),<% } %> // addons are allowed to contain imports of .css files, which we want rollup diff --git a/files/tsconfig.json b/files/tsconfig.json index 3267197..4d895fb 100644 --- a/files/tsconfig.json +++ b/files/tsconfig.json @@ -11,6 +11,11 @@ "include": ["src/**/*", "tests/**/*", "unpublished-development-types/**/*"], "compilerOptions": { "rootDir": ".", - "types": ["ember-source/types", "vite/client", "@embroider/core/virtual", "@glint/ember-tsc/types"] + "types": [ + "ember-source/types", + "vite/client", + "@embroider/core/virtual", + "@glint/ember-tsc/types" + ] } } From 00049971fadc85ef31909e82ed6c0f92e4f4c78c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:34:01 -0400 Subject: [PATCH 3/5] Fix casing of tsconfig path in rolulp.config --- files/rollup.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/rollup.config.mjs b/files/rollup.config.mjs index 26b9003..ce14bcd 100644 --- a/files/rollup.config.mjs +++ b/files/rollup.config.mjs @@ -64,8 +64,8 @@ export default { addon.declarations( 'declarations', <% if (pnpm) { %>`pnpm ember-tsc --declaration --project ${tsConfig}`,<% } else if (npm) - { %>`npm exec ember-tsc --declaration --project ${tsconfig}`,<% } else - { %>`npx @glint/ember-tsc --declaration --project ${tsconfig}`,<% } %> + { %>`npm exec ember-tsc --declaration --project ${tsConfig}`,<% } else + { %>`npx @glint/ember-tsc --declaration --project ${tsConfig}`,<% } %> ),<% } %> // addons are allowed to contain imports of .css files, which we want rollup From 6a29b07d379f5964c6e6dab28b1f53c4d4295df0 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:41:41 -0400 Subject: [PATCH 4/5] glint -> ember-tsc --noEmit --- files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/package.json b/files/package.json index ab32b92..49f7c9b 100644 --- a/files/package.json +++ b/files/package.json @@ -23,7 +23,7 @@ "lint:js": "eslint . --cache", "lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern", "lint:js:fix": "eslint . --fix",<% if (typescript) { %> - "lint:types": "glint",<% } %> + "lint:types": "ember-tsc --noEmit",<% } %> "start": "vite dev", "test": "vite build --mode=development --out-dir dist-tests && testem --file testem.cjs ci --port 0", "prepack": "rollup --config" From 7b9e131a6396e30e21f5e3483e9e1292b3be64de Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 30 Sep 2025 13:46:53 -0400 Subject: [PATCH 5/5] Fix npm --- files/rollup.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/rollup.config.mjs b/files/rollup.config.mjs index ce14bcd..3ba54f9 100644 --- a/files/rollup.config.mjs +++ b/files/rollup.config.mjs @@ -64,8 +64,8 @@ export default { addon.declarations( 'declarations', <% if (pnpm) { %>`pnpm ember-tsc --declaration --project ${tsConfig}`,<% } else if (npm) - { %>`npm exec ember-tsc --declaration --project ${tsConfig}`,<% } else - { %>`npx @glint/ember-tsc --declaration --project ${tsConfig}`,<% } %> + { %>`npm exec ember-tsc -- --declaration --project ${tsConfig}`,<% } else + { %>`npx @glint/ember-tsc -- --declaration --project ${tsConfig}`,<% } %> ),<% } %> // addons are allowed to contain imports of .css files, which we want rollup