Appending module identifier extensions should not match directories.

This logic needed to change not only in meteor/tools/isobuild/resolver.js
but also in the runtime module system:
cfcc422725

Fixes #8539.
This commit is contained in:
Ben Newman
2017-03-29 18:45:32 -04:00
parent 4c26a51bd8
commit fcbd398ab7
3 changed files with 6 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
{
"dependencies": {
"install": {
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/install/-/install-0.8.7.tgz",
"from": "install@0.8.7"
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/install/-/install-0.8.8.tgz",
"from": "install@0.8.8"
}
}
}

View File

@@ -1,13 +1,13 @@
Package.describe({
name: "modules-runtime",
version: "0.7.9",
version: "0.7.10",
summary: "CommonJS module system",
git: "https://github.com/benjamn/install",
documentation: "README.md"
});
Npm.depends({
install: "0.8.7"
install: "0.8.8"
});
Package.onUse(function(api) {

View File

@@ -176,7 +176,7 @@ export default class Resolver {
this.extensions.some(ext => {
const pathWithExt = path + ext;
const stat = this.statOrNull(pathWithExt);
if (stat) {
if (stat && ! stat.isDirectory()) {
return result = { path: pathWithExt, stat };
}
});