Skip to content

Commit 3c41e03

Browse files
Merge pull request #1986 from NullVoxPopuli/nvp/glint-inspector
Fix issue where `@format` was accidentally required for the `<REPL>` component
2 parents c838cb6 + 6ea15ad commit 3c41e03

File tree

20 files changed

+406
-421
lines changed

20 files changed

+406
-421
lines changed

apps/repl/app/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'ember-statechart-component';
22
import './icons.ts';
33

4+
import setupInspector from '@embroider/legacy-inspector-support/ember-source-4.12';
45
import { isDevelopingApp, macroCondition } from '@embroider/macros';
56

67
import PageTitleService from 'ember-page-title/services/page-title';
@@ -23,6 +24,7 @@ Object.assign(window, {
2324
});
2425

2526
export default class App extends Application {
27+
inspector = setupInspector(this);
2628
modules = {
2729
'./router': Router,
2830
...import.meta.glob('./routes/{edit,index,application,error-404}.ts', { eager: true }),

apps/repl/app/templates/docs/support/api.gts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const allowed = new Set([
4949
'editorLoad',
5050
'format',
5151
'title',
52-
'forceEditor',
5352
'shadowdom',
5453
'nohighlight',
5554
]);
@@ -88,10 +87,6 @@ export class Example extends Component<{
8887
return 'lines' in this.config;
8988
}
9089

91-
get isForceEditor() {
92-
return 'forceEditor' in this.config;
93-
}
94-
9590
get isEditorLoad() {
9691
return 'editorLoad' in this.config;
9792
}
@@ -174,19 +169,6 @@ export class Example extends Component<{
174169
</label>
175170
{{/if}}
176171

177-
{{#if this.isForceEditor}}
178-
<label>
179-
<span><code>@forceEditor</code></span>
180-
<input
181-
type="checkbox"
182-
name="forceEditor"
183-
required
184-
checked={{@forceEditor}}
185-
{{on "input" (fn this.update "forceEditor")}}
186-
/>
187-
</label>
188-
{{/if}}
189-
190172
{{#if this.isEditor}}
191173
<label>
192174
<span><code>@editor</code></span>
@@ -214,7 +196,6 @@ export class Example extends Component<{
214196
@editorLoad={{this.config.editorLoad}}
215197
@format={{this.config.format}}
216198
@title={{this.config.title}}
217-
@forceEditor={{this.config.forceEditor}}
218199
@shadowdom={{this.config.shadowdom}}
219200
@nohighlight={{this.config.nohighlight}}
220201
@clickToLoad={{this.config.clickToLoad}}

apps/repl/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"build:test": "NODE_ENV=development vite build --mode test",
2121
"build:prod": "NODE_ENV=development vite build --mode development",
22-
"lint:types": "glint",
22+
"lint:types": "ember-tsc --noEmit",
2323
"lint:fix": "pnpm -w exec lint fix",
2424
"start": "vite --port 4201",
2525
"start:build": "NODE_ENV=development vite build --mode=development --watch",
@@ -45,15 +45,16 @@
4545
"@ember/string": "^4.0.1",
4646
"@ember/test-helpers": "^5.1.0",
4747
"@embroider/core": "^4.1.3",
48+
"@embroider/legacy-inspector-support": "^0.1.3",
4849
"@embroider/vite": "^1.2.0",
4950
"@fortawesome/ember-fontawesome": "^3.0.0",
5051
"@fortawesome/fontawesome-svg-core": "^6.7.2",
5152
"@fortawesome/free-brands-svg-icons": "^6.7.2",
5253
"@fortawesome/free-regular-svg-icons": "^6.7.2",
5354
"@fortawesome/free-solid-svg-icons": "^6.7.2",
54-
"@glint/core": "2.0.0-alpha.7",
55-
"@glint/template": "1.6.0-alpha.3",
56-
"@glint/tsserver-plugin": "2.0.0-alpha.7",
55+
"@glint/ember-tsc": "^1.0.3",
56+
"@glint/template": "^1.6.1",
57+
"@glint/tsserver-plugin": "^2.0.3",
5758
"@iconify-json/devicon": "^1.2.29",
5859
"@iconify-json/mdi": "^1.2.3",
5960
"@iconify-json/pajamas": "^1.2.15",
@@ -145,6 +146,7 @@
145146
"@glimmer/component": "^2.0.0",
146147
"@lezer/highlight": "^1.2.1",
147148
"@nullvoxpopuli/horizon-theme": "workspace:*",
149+
"@nullvoxpopuli/limber-shared": "workspace:*",
148150
"@nullvoxpopuli/limber-styles": "workspace:*",
149151
"@shikijs/rehype": "^3.7.0",
150152
"@xstate/inspect": "^0.8.0",
@@ -165,7 +167,6 @@
165167
"highlightjs-glimmer": "^2.2.2",
166168
"html-to-image": "^1.11.13",
167169
"kolay": "^3.9.1",
168-
"@nullvoxpopuli/limber-shared": "workspace:*",
169170
"limber-ui": "workspace:*",
170171
"lz-string": "^1.5.0",
171172
"nvp.ui": "^0.4.0",

apps/repl/tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "@tsconfig/ember",
3-
"glint": {
4-
"environment": ["ember-loose", "ember-template-imports"]
5-
},
63
"compilerOptions": {
74
"allowImportingTsExtensions": true,
85
// Stylistic
@@ -29,7 +26,7 @@
2926
"limber/*": ["app/*"],
3027
"*": ["types/*"]
3128
},
32-
"types": ["vite/client","@embroider/core/virtual", "@glint/core/types"
29+
"types": ["vite/client","@embroider/core/virtual", "@glint/ember-tsc/types"
3330
]
3431
},
3532
"include": ["app/**/*", "tests/**/*", "types/**/*"]

apps/tutorial/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"build:test": "NODE_ENV=development vite build --mode test",
2121
"build:prod": "vite build",
2222
"lint": "pnpm -w exec lint",
23-
"lint:types": "glint",
23+
"lint:types": "ember-tsc --noEmit",
2424
"lint:fix": "pnpm -w exec lint fix",
2525
"cf": "cd dist && npx wrangler pages dev --port 42000 ./",
2626
"start": "vite --port 4200",
@@ -71,9 +71,9 @@
7171
"@fortawesome/free-brands-svg-icons": "^6.7.2",
7272
"@fortawesome/free-regular-svg-icons": "^6.7.2",
7373
"@fortawesome/free-solid-svg-icons": "^6.7.2",
74-
"@glint/core": "2.0.0-alpha.7",
75-
"@glint/template": "1.6.0-alpha.3",
76-
"@glint/tsserver-plugin": "2.0.0-alpha.7",
74+
"@glint/ember-tsc": "^1.0.3",
75+
"@glint/template": "^1.6.1",
76+
"@glint/tsserver-plugin": "^2.0.3",
7777
"@nullvoxpopuli/eslint-configs": "^5.3.4",
7878
"@nullvoxpopuli/limber-styles": "workspace:^",
7979
"@rollup/plugin-babel": "^6.0.4",

apps/tutorial/tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
3-
"glint": {
4-
"environment": ["ember-loose", "ember-template-imports"]
5-
},
63
"compilerOptions": {
74
"lib": ["DOM", "ES2023"],
85
"declaration": false,
@@ -14,7 +11,7 @@
1411
"tutorial/*": ["./app/*"],
1512
"*": ["./types/*"]
1613
},
17-
"types": ["vite/client", "ember-source/types", "@embroider/core/virtual", "@glint/core/types"]
14+
"types": ["vite/client", "ember-source/types", "@embroider/core/virtual", "@glint/ember-tsc/types"]
1815
},
1916
"include": ["app/**/*", "tests/**/*", "types/**/*"]
2017
}

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
},
2020
"devDependencies": {
2121
"@babel/core": "^7.28.3",
22-
"@glint/core": "2.0.0-alpha.9",
23-
"@glint/tsserver-plugin": "2.0.0-alpha.9",
22+
"@glint/ember-tsc": "^1.0.3",
23+
"@glint/tsserver-plugin": "^2.0.3",
2424
"@nullvoxpopuli/eslint-configs": "^5.3.4",
2525
"concurrently": "^9.2.1",
2626
"dev-tools": "workspace:*",
@@ -45,9 +45,7 @@
4545
"overrides": {
4646
"babel-plugin-ember-template-compilation@<3": "^2.4.1",
4747
"@glimmer/component": "^2.0.0",
48-
"@glint/core": "alpha",
49-
"@glint/environment-ember-loose": "alpha",
50-
"@glint/environment-ember-template-imports": "alpha",
48+
"@glint/ember-tsc": "^1.0.3",
5149
"@ember/test-waiters": "^4.1.0",
5250
"ember-element-helper": "^0.8.7",
5351
"ember-source": "6.8.0-alpha.7",

packages/app-support/shared/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"scripts": {
2121
"build": "rollup --config",
22-
"lint:types": "glint",
22+
"lint:types": "ember-tsc --noEmit",
2323
"lint:fix": "pnpm -w exec lint fix",
2424
"start": "rollup --config --watch",
2525
"lint": "pnpm -w exec lint",
@@ -63,10 +63,9 @@
6363
"@ember/test-waiters": "^4.1.0",
6464
"@embroider/addon-dev": "^7.0.0",
6565
"@glimmer/component": "^2.0.0",
66-
"@glint/core": "alpha",
67-
"@glint/environment-ember-loose": "alpha",
68-
"@glint/environment-ember-template-imports": "alpha",
69-
"@glint/template": "alpha",
66+
"@glint/ember-tsc": "^1.0.3",
67+
"@glint/template": "^1.6.1",
68+
"@glint/tsserver-plugin": "^2.0.3",
7069
"@nullvoxpopuli/eslint-configs": "^5.3.4",
7170
"@rollup/plugin-babel": "^6.0.4",
7271
"@tsconfig/ember": "^3.0.9",

packages/app-support/shared/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default defineConfig({
3232
* Generate the types (these include /// <reference types="ember-source/types"
3333
* but our consumers may not be using those, or have a new enough ember-source that provides them.
3434
*/
35-
await execaCommand(`pnpm glint --declaration`, { stdio: "inherit" });
35+
await execaCommand(`pnpm ember-tsc --declaration`, { stdio: "inherit" });
3636

3737
await fixBadDeclarationOutput("declarations/**/*.d.ts", ["TypeScript#56571", "Glint#628"]);
3838

packages/app-support/shared/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"unpublished-development-types/**/*"
66
],
77
"exclude": ["declarations", "dist"],
8-
"glint": {
9-
"environment": ["ember-loose", "ember-template-imports"]
10-
},
118
"compilerOptions": {
129
"allowJs": true,
1310
"declarationDir": "declarations",

0 commit comments

Comments
 (0)