Skip to content

Commit

Permalink
feat: drop support for classic component layout (#721)
Browse files Browse the repository at this point in the history
* feat: drop support for classic component layout

* Delete component with classicly resolved template

---------

Co-authored-by: NullVoxPopuli <[email protected]>
  • Loading branch information
aklkv and NullVoxPopuli authored Jul 9, 2024
1 parent e8d1c9a commit 9efe7b1
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export default function emberLooseEnvironment(
templatePath.replace(REGEXES.POD_TEMPLATE, '/controller.ts'),
templatePath.replace(REGEXES.POD_TEMPLATE, '/route.ts'),
);
} else if (templatePath.includes('/templates/components/')) {
// Classic component
candidates.push(colocatedTsScriptPath.replace('/templates/components/', '/components/'));
} else if (templatePath.includes('/templates/')) {
// Classic controller/route
candidates.push(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ describe('Environments: Ember Loose', () => {
'/route.js',
]);

// Classic component
expect(env?.getPossibleScriptPaths('/templates/components/hello.hbs')).toEqual([
'/templates/components/hello.ts',
'/templates/components/hello.js',
'/components/hello.ts',
'/components/hello.js',
]);

// Classic controller/route
expect(env?.getPossibleScriptPaths('/templates/hello.hbs')).toEqual([
'/templates/hello.ts',
Expand Down
2 changes: 0 additions & 2 deletions test-packages/ts-ember-app/app/components/foo.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

<Baz />

<Qux />

<this.MaybeComponent @arg="hi" />

{{! @glint-expect-error: missing required arg }}
Expand Down
12 changes: 0 additions & 12 deletions test-packages/ts-ember-app/app/components/qux.ts

This file was deleted.

4 changes: 0 additions & 4 deletions test-packages/ts-ember-app/app/templates/components/qux.hbs

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions test-packages/ts-ember-preview-types/app/components/foo.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

<Baz />

<Qux />

<this.MaybeComponent @arg="hi" />

{{! @glint-expect-error: missing required arg }}
Expand Down
11 changes: 0 additions & 11 deletions test-packages/ts-ember-preview-types/app/components/qux.ts

This file was deleted.

This file was deleted.

0 comments on commit 9efe7b1

Please sign in to comment.