Skip to content

Commit

Permalink
Revert "Ensure app/foo/index.js can be looked up with foo:main"
Browse files Browse the repository at this point in the history
This reverts commit 9fae5ba as it has
reported that it breaks some normal lookup patterns.

I'd still like to bring back this change, but we'll need to investigate
the reported issues and figure out how to mitigate.
  • Loading branch information
rwjblue committed Aug 8, 2020
1 parent 5c60106 commit d263106
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion addon/resolvers/classic/index.js
Expand Up @@ -19,7 +19,7 @@ export class ModuleRegistry {
return Object.keys(this._entries);
}
has(moduleName) {
return require.has(moduleName);
return moduleName in this._entries;
}
get(moduleName) {
return require(moduleName);
Expand Down
11 changes: 0 additions & 11 deletions tests/unit/resolvers/classic/basic-test.js
Expand Up @@ -386,17 +386,6 @@ test("store:main is looked up as prefix/store", function(assert) {
resolver.resolve('store:main');
});

test("store:main is looked up as prefix/store/index.js", function(assert) {
assert.expect(1);

define('appkit/store/index', [], function(){
assert.ok(true, 'store:main was looked up');
return 'whatever';
});

resolver.resolve('store:main');
});

test("store:posts as prefix/stores/post", function(assert) {
assert.expect(1);

Expand Down

0 comments on commit d263106

Please sign in to comment.