diff --git a/History.md b/History.md index 59a86bcf22..09664f6c17 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,12 @@ ## v.NEXT +## v1.7.0.3, 2018-06-13 + +* Fixed [Issue #9991](https://github.com/meteor/meteor/issues/9991), + introduced in + [Meteor 1.7.0.2](https://github.com/meteor/meteor/pull/9990) + by [PR #9977](https://github.com/meteor/meteor/pull/9977). + ## v1.7.0.2, 2018-06-13 * Node has been updated to version diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 0c3f6c7a78..5cce8e2483 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.7.0_2' + version: '1.7.0_3' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index da3dc5e1ee..873da558e9 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.7.0.2-rc.0", + "version": "1.7.0.3-rc.0", "recommended": false, "official": false, "description": "Meteor" diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index 35eb8d9854..2716086cd7 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,11 +1,12 @@ { "track": "METEOR", - "version": "1.7.0.2", + "version": "1.7.0.3", "recommended": false, "official": true, "patchFrom": [ "1.7", - "1.7.0.1" + "1.7.0.1", + "1.7.0.2" ], "description": "The Official Meteor Distribution" } diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 18a39c3322..4912e71993 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -889,6 +889,7 @@ _.extend(PackageSource.prototype, { sourceArch: this, ignoreFiles, isApp: true, + testModule, }; // If this architecture has a mainModule defined in @@ -1025,8 +1026,9 @@ _.extend(PackageSource.prototype, { return fileOptions; } - // Files in `imports/` should be lazily loaded *apart* from tests - if (dir === "imports" && ! isTestFile) { + // Files in `imports/` and `tests/` directories should be lazily + // loaded *apart* from tests. + if ((dir === "imports" || dir === "tests") && ! isTestFile) { fileOptions.lazy = true; } @@ -1080,6 +1082,7 @@ _.extend(PackageSource.prototype, { watchSet, isApp, sourceArch, + testModule, loopChecker = new SymlinkLoopChecker(this.sourceRoot), ignoreFiles = [] }) { @@ -1102,10 +1105,10 @@ _.extend(PackageSource.prototype, { // Unless we're running tests, ignore all test filenames and if we are, ignore the // type of file we *aren't* running if (!global.testCommandMetadata || global.testCommandMetadata.isTest) { - Array.prototype.push.apply(sourceReadOptions.exclude, APP_TEST_FILENAME_REGEXPS); + sourceReadOptions.exclude.push(...APP_TEST_FILENAME_REGEXPS); } if (!global.testCommandMetadata || global.testCommandMetadata.isAppTest) { - Array.prototype.push.apply(sourceReadOptions.exclude, TEST_FILENAME_REGEXPS); + sourceReadOptions.exclude.push(...TEST_FILENAME_REGEXPS); } // Read top-level source files, excluding control files that were not @@ -1116,13 +1119,21 @@ _.extend(PackageSource.prototype, { controlFiles.push('package.js'); } - const anyLevelExcludes = [ - /^tests\/$/, + const anyLevelExcludes = []; + + // If we have a meteor.testModule from package.json, then we don't + // need to exclude tests/ directories from the search, because we + // trust meteor.testModule to identify a single test entry point. + if (! testModule) { + anyLevelExcludes.push(/^tests\/$/); + } + + anyLevelExcludes.push( archinfo.matches(arch, "os") ? /^client\/$/ : /^server\/$/, ...sourceReadOptions.exclude, - ]; + ); const topLevelExcludes = isApp ? [ ...anyLevelExcludes,