Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix resolution of files with .hbs extensions #1463

Merged
merged 3 commits into from Jun 13, 2023
Merged

fix resolution of files with .hbs extensions #1463

merged 3 commits into from Jun 13, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jun 6, 2023

As discussed with @mansona, we have a bug here and need to make the app JS searching do a search for .js, .hbs, and .hbs.js resolvable extensions.

@@ -306,7 +306,7 @@ export class Resolver {

let pkg = this.owningPackage(match.filename);
if (pkg) {
let rel = withoutJSExt(explicitRelative(pkg.root, match.filename));
let rel = explicitRelative(pkg.root, match.filename);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To drop withoutJSExt here you must replace it with the search over all resolvable extensions. That's what's causing the failure in the engine-relative resolving > file exists in both app-js and fastboot-js test.

I would suggest taking your implementation in searchAppTree and making it a utility method that you can use here too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, I completely missed that there was something else checking the mergemap 👍

@mansona mansona changed the title failing test for hbs in app tree fix resolution of files with .hbs extensions Jun 13, 2023
@mansona mansona added the bug Something isn't working label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants