Commit Graph

6814 Commits

Author SHA1 Message Date
Ben Newman
c60bb394b6 Go back to writing .meteor-portable-2.json files asynchronously.
This reverts commit 4e4e204ab0.

This commit caused a strange regression in reliability of the Windows
dynamic-import self-test, which may be an indication of a deeper problem,
so it seems safest to revert this change for now.

In case empty .meteor-portable-2.json files are written, I've added an
additional check that the cached JSON value is a boolean.
2018-01-19 19:25:08 -05:00
Ben Newman
6ae14731a2 Avoid hiding errors due to missing dependencies of custom Babel plugins.
As illustrated by #9554, if a custom .babelrc plugin such as
@babel/plugin-proposal-optional-chaining imports a missing dependency such
as @babel/core, that failure causes inputFile.require to throw an
exception that looks a lot like @babel/plugin-proposal-optional-chaining
itself is missing, which can be confusing.

This change does not fix the underlying problem (the @babel/core package
still needs to be installed), but it does expose the exception so that the
developer can do something about it, rather than merely leaving the ?.
syntax uncompiled.

Here's the offending line of code:
47ce7e71c9/packages/babel-plugin-proposal-optional-chaining/src/index.js (L2)

Unfortunately, depending directly on @babel/core seems to be the policy
for Babel plugins, per this PR: https://github.com/babel/babel/pull/6778
2018-01-19 18:19:31 -05:00
Ben Newman
bf7821809b Increase exit timeout of dynamic-import test to fix AppVeyor CI. 2018-01-18 21:57:26 -05:00
Ben Newman
4e4e204ab0 Write .meteor-portable-2.json files synchronously.
Previously these files were written asynchronously in an attempt to
improve performance, since the success of the write is not critical.
While I stand by my claim that it's acceptable for these writes to fail, I
noticed recently that the async write was failing very often (resulting in
an empty .meteor-portable-2.json file). Switching to sync semantics
eliminated that problem with no noticeable loss of performance. In fact,
overall performance is likely better because of the future work saved by a
successful write.
2018-01-18 16:26:05 -05:00
Ben Newman
bcd0ac048b Improve node_modules portability scan.
In an attempt to fix #9552, recursively scan child directories of
directories that start with '@' characters, rather than treating the
parent directory as a potential npm package.

Also, ignore directories that start with a '.' character, such as the
common node_modules/.bin directory.
2018-01-18 16:22:40 -05:00
Ben Newman
66e2c5f894 Revert "Mark JS hot-code-push test "slow" so CircleCI will skip it."
This reverts commit 5ae7a0954d.
2018-01-16 20:24:53 -05:00
Ben Newman
e46a08daaf Fix meteor bundle-related self-tests. 2018-01-16 19:46:50 -05:00
Ben Newman
76ea47e4f7 Fix "constraint solver benchmark" self-test. 2018-01-16 18:56:04 -05:00
Ben Newman
bdfdd71c02 Fix ddp-heartbeat self-test. 2018-01-16 18:56:04 -05:00
Ben Newman
c7a9d61a68 Allow processFilesFor{Target,Bundle,Package} to return a Promise.
This paves the way for compiler plugins to use normal async/await rather
than using fibers and/or futures to wait for async compilation to finish.
2018-01-16 16:58:48 -05:00
Ben Newman
9e60539f11 Fall back to async for EPERM errors in files.rm_recursive.
Previously, the async fallback was only used in case of ENOTEMPTY errors,
but Windows appears to throw temporary EPERM errors as well. If the errors
are actually robust/non-temporary, the async version will fail, too.

Should help with #9540.
2018-01-16 11:05:40 -05:00
Ben Newman
322cbe8593 Cherry-pick crosswalk fix for cordova-android@6.4.0.
https://github.com/meteor/meteor/pull/9274#discussion_r161547508

cc @menelike
2018-01-15 14:53:22 -05:00
Ben Newman
d470dbf509 Update cordova-android to version 6.4.0 to fix missing android-versions. 2018-01-14 18:07:22 -05:00
Ben Newman
c84561dfda Fix #9477 by implementing @klaussner's suggestion.
https://github.com/meteor/meteor/issues/9477#issuecomment-353975219
2018-01-14 17:39:02 -05:00
Ben Newman
b7567232e4 Merge branch 'devel' into release-1.6.1 2018-01-14 16:13:40 -05:00
Ben Newman
697a918dc3 Fix tests for now-deprecated stylus package.
The last version of stylus published did not contain a version of the
caching-compiler package that these tests now depend on, so I've removed
the extra architecture matching for the stylus package (not for less).
2018-01-14 16:09:54 -05:00
Ben Newman
5d22e1d25f Fix/strengthen "compiler plugins caching" self-tests.
To fix #9528, we included more information (the target architecture) in
cache keys for files compiled by CachedCoffeeScriptCompiler. Although this
change was right and necessary, it altered the caching behavior tested by
this self-test. Specifically, .coffee files must now be recompiled for the
os.* architecture, whereas previously code compiled for web.browser could
be accidentally reused on the server.
2018-01-14 16:09:49 -05:00
Ben Newman
d9553a8243 Reenable cordova-builds self-test, which would have caught #9521.
Self-tests that are marked as "slow" are not run automatically for pull
requests, but they should be run before a release.

It was a mistake to publish the first Meteor 1.6.1 release candidate
without running these "slow" tests, as the cordova-builds test would have
caught the problem reported by @macrozone in #9521.

I've decided to remove the "slow" marker from this test, since it's
important for checking Cordova sanity, and clearly could fail.
2018-01-11 11:57:31 -05:00
Ben Newman
40a0e5b917 Merge branch 'devel' into release-1.6.1 2018-01-11 11:55:36 -05:00
Ben Newman
991fb5ea86 Rename Boilerplate#toHTML to toHTMLStream and deprecate toHTML.
PR #9343 changed the return type of Boilerplate#toHTML from String to
Stream, which is likely to break existing code that expects a string.

In order to make the change in return type more obvious, I have renamed
the method to toHTMLStream, and I have attempted to update all call sites
appropriately. However, because this change comes in the release candidate
phase of Meteor 1.6.1 testing, it seemed important to preserve the
string-returning behavior of toHTML, with a deprecation notice.

Unless third-party code is using the Boilerplate class directly, I don't
think the toHTML method will ever be called, and we can remove it in
Meteor 1.6.2.

Thanks to @macrozone for tracking this problem down.

Fixes #9521.
2018-01-09 12:12:11 -05:00
Simon Schick
b3470fd0ab Added back the possibility to use IstanbulJS as plugin (#9494)
These changes are needed to get the plugin meteor-coverage working. IstanbulJS (shipped with meteor-coverage), can only generate the coverage-report for the code loaded after it's initialization. This is why the code, the plugin meteor-coverage contains, must be executed before the code is loaded, which should be tracked in the code-coverage. A suitable check I found was when a debugger isn't used, which makes it impossible to use code-coverage and the debugger at the same time. It's the only feasible condition I could come up with.

The package meteor-coverage also registers a hook of IstanbulJS which overwrites `vm.runInThisContext()` in order to start the coverage. As of now, IstanbulJS does not support overwriting `vm.Script.runInThisContext()`.
2018-01-09 11:13:48 -05:00
Ben Newman
da02835f0a Merge branch 'devel' into release-1.6.1 2018-01-03 10:49:37 -05:00
Ben Newman
b35ce7d168 Update meteor-babel to version 7.0.0-beta.36. 2017-12-30 14:02:58 -05:00
Hugh Willson
bdf8091687 Update meteor create --full to use meteortesting:mocha (#9489)
This commit updates the `meteor create --full` app skeleton to use `meteortesting:mocha`
(and npm based `chai`), instead of the deprecated `practicalmeteor:mocha` package.
2017-12-20 18:45:03 -05:00
Ben Newman
8fe0c41091 Update various @babel/runtime version constraints to -beta.35. 2017-12-20 15:21:08 -05:00
Adam Zionts
cc47278564 Updates information about Meteor CLI usage (#9462) 2017-12-20 14:48:08 -05:00
Ben Newman
bd4ae26433 Merge branch 'devel' into release-1.6.1 2017-12-20 12:08:18 -05:00
skirunman
9380be5308 Fix cordova lib dependency (#9487)
`cordova-lib@7.1.0` should use `cordova-common@2.1.1`
2017-12-19 18:59:04 -05:00
Ben Newman
bf6d0dabc9 Merge branch 'devel' into release-1.6.1 2017-12-19 18:22:51 -05:00
Ben Newman
a7585da87c Bump MIN_NODE_VERSION to enforce Node >= 8 in production. (#9485)
Clearly we haven't remembered to bump this version for some time now,
which is too bad, because it could have provided a more helpful error for
developers using an older version of Node in their non-Galaxy deployment
environments: https://github.com/meteor/meteor/issues/9470
2017-12-19 13:10:54 -05:00
Jesse Rosenberger
9b056f5e91 Merge pull request #9341 from meteor/glasser/progress-status-only
Improved console behavior within the Emacs shell, and also general
Console refactoring to modernize ECMAScript use and remove Underscore.
2017-12-13 20:14:13 +02:00
Hugh Willson
7c48bb5a73 Prevent Tool crash when settings file contains BOM (#9459)
* Prevent Tool crash when settings file contains BOM

The use of a byte order mark in a `--settings` file
crashes the Meteor Tool, when it attempts to JSON parse
the loaded settings data. Since a BOM is not required
(or recommended) when using UTF-8, this commit removes
it from the loaded settings data, before it is parsed.

Fixes #5180.

* Add PR link to History.md

* Update History.md
2017-12-13 12:05:42 -05:00
Andrew Mao
25a7439769 Update URL for information about file watchers (#9460)
The documentation itself could benefit from an update to describe the new polling/watcher priority system, but that's a task for another PR.
2017-12-13 11:50:50 -05:00
Jesse Rosenberger
e8fad2af2d Define Sandbox clients when running versioning hot code push test.
Since this test utilizes the `testWithAllClients` technique, which runs
the tests in various clients/browsers, it's necessary for the tests
`Sandbox` to define `clients`, otherwise the function within
`testWithAllClients` will not be executed at all.  This was causing this
particular test to always return success (it was running without failure
on exactly zero clients).

Also the technique of setting `this.baseTimeout` appeared to cause
problems, likely because it overrides various other values instead of
using `waitSecs` (we don't use the `baseTimeout` technique in other
places within self-tests either).

Discovered during testing, as mentioned in
https://github.com/meteor/meteor/pull/9439#pullrequestreview-83139232.
2017-12-13 16:07:59 +02:00
Ben Newman
710869baca Merge branch 'devel' into release-1.6.1 2017-12-12 17:58:27 -05:00
Ben Newman
b16a61c98b Fix #9235 by bundling package.json stubs even if "main" absent. 2017-12-12 15:45:02 -05:00
Ben Newman
d4d3df1428 Inline Resolver#_resolvePkgJsonMain into sole calling method. 2017-12-12 15:45:01 -05:00
Jesse Rosenberger
ae3c05cb34 Merge pull request #9448 from skirunman/patch-3
Update to Cordova iOS v4.5.4
2017-12-12 22:06:17 +02:00
Ben Newman
b343ec8568 Fix #9305 by including default when mirroring module exports.
This functionality was added in reify@0.13.3:
10c90cd0a2

The changes to modules-test-plugin/plugin.js cause files like array.arson
to mirror array.arson.js, which exercises module.makeNsSetter(true) and
relies on default exports.
2017-12-12 13:31:28 -05:00
Ben Newman
c28440ab81 Fix warnings about missing @-scoped npm packages. 2017-12-12 13:30:59 -05:00
Jesse Rosenberger
f1ab4d7b37 Remove iPad sizes which aren't expected to be supported.
The current believe, per @skirunman (whose perspective on the matter I trust), is that these sizes won't be supported in this manner by Apple, but rather as storyboards.

Ref: https://github.com/meteor/meteor/pull/9448#issuecomment-351123720
2017-12-12 19:37:25 +02:00
Jesse Rosenberger
20307f8d72 Change top-level const-like variables to actual consts. 2017-12-12 17:19:55 +02:00
Jesse Rosenberger
b70d01c5b0 Remove Underscore from Meteor "console" module. 2017-12-12 17:19:50 +02:00
Jesse Rosenberger
6f01d18252 Change tool "cleanup" module to use ESM format and remove Underscore. 2017-12-12 17:19:42 +02:00
Jesse Rosenberger
d35b1e240e Use Object.create(null) rather than object literal notation.
To avoid any unintended inheritance of non-"own" properties.
2017-12-12 17:19:35 +02:00
Jesse Rosenberger
0f18f96a18 Switch to using import syntax in Meteor console module. 2017-12-12 17:19:27 +02:00
Jesse Rosenberger
7268fb8ca0 Improve Emacs shell support by auto-detecting Emacs.
This adds a memoized helper function for detecting Emacs throughout the
CLI tool and automatically resorts to "ProgressDisplayStatus" mode when
Emacs is enabled.

In my tests with both Emacs 22 and 27, this nearly doubled performance
when using Meteor from within the Emacs shell (i.e. `M-x shell`).
2017-12-12 17:19:16 +02:00
skirunman
8e83391b62 Update to Cordova iOS v4.5.4
Update to Cordova iOS v4.5.4 to fix iPhone X splash screen issue.
Fixes https://github.com/meteor/meteor/issues/9447
2017-12-07 13:46:07 -08:00
Ben Newman
7d379aecf0 Merge branch 'devel' into release-1.6.1 2017-12-05 11:00:18 -05:00
Ben Newman
162f458306 Merge pull request #9440 from meteor/babel-7-with-builtins
Update the babel-compiler package use to Babel 7, like the command-line tool.
2017-12-05 10:57:31 -05:00