Commit Graph

19684 Commits

Author SHA1 Message Date
Ben Newman
7d9ee28efc Bump package versions for 1.5.4.1-beta.0 release. release/METEOR@1.5.4.1-beta.0 2017-12-07 20:16:44 -05:00
Ben Newman
6c7531de46 Update expected dev bundle tarball count from 4 to 5. 2017-12-07 20:16:41 -05:00
Ben Newman
cfd4cc4d9c Bump $BUNDLE_VERSION to 4.8.45 before rebuilding dev bundle.
This dev bundle version bump is just to make sure nothing significant has
changed about transitive node_modules dependencies since last time, before
we bump the Node version for the 1.5.4.1 release.
2017-12-07 19:52:43 -05:00
Ben Newman
58bdfe024d Shallow-clone inserted documents more reliably.
In a previous commit, I changed

  doc = _.extend({}, doc);

to avoid using underscore, thus:

  doc = { ...doc };

While this may seem harmless, it broke a few Mongo.Collection tests
because _.extend copies *all* properties, both own and inherited, whereas
object ...spread only copies own properties.

However, the correct way to fix this problem is *not* to revert to the old
behavior, since flattening the inherited properties of a document was
never actually what we wanted. The old behavior was subtly broken, too.

Instead, we need to create a new object with the same prototoype as the
provided document, then shallow-copy the own properties. Any properties or
methods inherited from the original prototype will then be available on
the new object, even though they didn't get copied over.

I've intentionally left some trivial formatting changes in this commit to
remind myself which broken tests were fixed by this change.
2017-12-07 19:20:22 -05:00
Jesse Rosenberger
31f230e854 Only run AppVeyor tests for Windows 64-bit, and not also 32-.
AppVeyor does provide us quite a bit of value at no cost since we're
open-source software, but with only a single container at our disposal
under that plan, our build queue is often maxed-out for hours.

Since most Meteor developers are using 64-bit platforms, the 64-bit
tests provide the most value.  Meteor doesn't have much (if any?) in the
way of 32-bit/64-bit exceptions so any functionality difference would be
at the OS level.  Some day, we might bring this back.
2017-11-09 00:46:39 +02:00
Jesse Rosenberger
6d61b65679 Merge pull request #9320 from meteor/release-1.5.4
Release 1.5.4
2017-11-09 00:39:18 +02:00
Jesse Rosenberger
66e1a780a6 Bump package versions for 1.5.4 release. release/METEOR@1.5.4 2017-11-08 22:22:39 +02:00
Jesse Rosenberger
77b13e9941 Update History.md with changes in Meteor 1.5.4. 2017-11-08 22:18:14 +02:00
Jesse Rosenberger
6faa67be8f Bump package versions for 1.5.4-rc.0 release. release/METEOR@1.5.4-rc.0 2017-11-07 21:35:37 +02:00
Jesse Rosenberger
10a5184871 Bump $BUNDLE_VERSION to 4.8.44 before rebuilding dev bundle. 2017-11-07 20:17:51 +02:00
Jesse Rosenberger
ca31a84dbf Only try to download $NODE_BUILD_NUMBER when defined.
Alternatively, this was just failing when trying to download a file that
was 404-ing.  This just short-circuits before that inevitable failure.
2017-11-07 20:17:51 +02:00
Jesse Rosenberger
f2009e2fa6 Switch to official Node.js 4.8.6 and stop using a custom Meteor build.
This puts Meteor back on the official release track of Node.js 4, rather
than using its own custom build (from https://github.com/meteor/node/),
which had previously been necessary to add the garbage collection fixes
gained with
751f1ac08e
and
71f9cdf241,
both of which are now officially included in Node.js 4.x as of 4.8.6.
🎉
2017-11-07 20:04:48 +02:00
Jesse Rosenberger
0191e86beb Merge pull request #9266 from meteor/release-1.5.3
Release 1.5.3
2017-11-05 14:58:50 +02:00
Jesse Rosenberger
12f45e9ad6 Tweaks to History.md for 1.5.3.
[ci skip] (Hopefully.)
2017-11-04 20:36:34 +02:00
Jesse Rosenberger
c2157bb4bb Update History.md with miscellaneous changes in Meteor 1.5.3. 2017-11-04 13:56:29 +02:00
Jesse Rosenberger
5d8e5013fa Bump package versions for the official 1.5.3 release. 2017-11-04 10:13:20 +02:00
Jesse Rosenberger
b0f624ae57 Throw an error when any external command fails during test preparation.
Even with $ErrorActionPreference, PowerShell won't automatically fail
when an external command fails with an error code.  This explicitly
checks those exit codes and throws an error when that occurs.

Hopefully prevents false successes like that shown in this AppVeyor
test run: https://goo.gl/xxRsF9.
2017-11-02 08:49:25 -07:00
Jesse Rosenberger
790871796c Remove problematic Windows test, until it can be researched further.
Though it was thought to be reliable when running through 'self-test' on
Windows, it's yet to be seen how reliable.

The worst thing that could come of adding Windows testing would be that
we have test failures again after such a string of green checkmarks and
confidence.

Also, reordered.
2017-11-02 08:49:16 -07:00
Jesse Rosenberger
975e12828c Use YAML config for Appveyor settings, rather than their UI.
These take precedence over the UI, and I'm not sure the UI is taking
effect at the moment.

We don't need to build branches which start with 'dev-bundle-' since
those dev bundles won't be built yet when the tests are kicked off.
2017-11-02 08:48:28 -07:00
Jesse Rosenberger
dff4325341 Basic Appveyor testing for Windows.
This implements a first generation of Windows CI testing.  Presently,
this only runs valuable, hand-picked tests which have been known to work
in the past, and whose failure would indicate a critical problem.

A test which isn't passing doesn't mean that the feature being tested is
not working. For example, the 'create' test fails ostentatiously,
though the 'meteor create' command certainly works in practice. This
points to problems some compatibility problems with the 'self-test'
harness itself, some of which I'm aware of.  Though, it likely will
highlight some legitimate problems which Windows users experience too.

There are a number of additional tests which should be enabled which
likely pass already, and many more which are failing and we should fix.

Additional tests can be added to the scripts/windows/appveyor/test.ps1
file as they've been deemed working.

Altogether, this will take extensive work to achieve the same level of
coverage our Unix test suite enjoy, but we've got to start somewhere!

cc @benjamn
2017-11-02 08:48:20 -07:00
Jesse Rosenberger
9efe9e8b80 Bump package versions for 1.5.3-rc.1 release. release/METEOR@1.5.3-rc.1 2017-10-31 11:21:02 -07:00
Ben Newman
f9a9e9f2f9 Another small improvement to temp directory removal logic. 2017-10-31 14:00:46 -04:00
Ben Newman
c257183a55 Use files.rm_recursive_async to implement files.freeTempDir. 2017-10-31 14:00:33 -04:00
Ben Newman
afd556f931 Allow Builder#copyDirectory to re-create symlinks again.
Commit 86ec7eb5db broke tests because we
rely on symlinks even when the symlink option is false.
2017-10-31 14:00:12 -04:00
Ben Newman
fe5479400e Avoid calling files.stat(source) in symlinkWithOverwrite.
This was dangerous because source is often a path relative to the old
target file, whereas files.stat was interpreting source as a path relative
to process.cwd().

Fixes #9203.
2017-10-31 14:00:05 -04:00
Ben Newman
b7695d2e8b Avoid creating symlinks in Builder#copyDirectory when forbidden. 2017-10-31 13:59:59 -04:00
Ben Newman
b2db70a727 Allow files.rm_recursive to yield whenever possible.
A while back, for performance reasons, we disabled yielding for all
files.* operations unless METEOR_DISABLE_FS_FIBERS was set to false.

This was safe for almost all files.* operations, because most of them have
a synchronous fs.*Sync version available.

For a more complicated operation like files.rm_recursive, however, there
is no synchronous or asynchronous counterpart in the fs.* namespace, so
the safety of disabling fibers is not guaranteed.

Lately, files.rm_recursive has become a major source of uncaught ENOTEMPTY
errors on Windows, because rimraf.sync fails with that error, and we don't
give files.rm_recursive_async a chance to delete the directory in a more
persistent, forgiving manner.

The only reason we haven't been falling back to files.rm_recursive_async
is that YIELD_ALLOWED is false by default, so canYield() returns false.

This commit distinguishes between canYield() and mayYield(), and uses
canYield() in files.rm_recursive to determine whether it is technically
safe to yield, regardless of YIELD_ALLOWED.

Anyone who ever asked "Can I go to the bathroom?" in elementary school,
only to be mercilessly rebuked with "I don't know, CAN YOU?" should
understand the difference between these two functions.
2017-10-31 13:59:37 -04:00
Ben Newman
f73c7207e2 Use files.rm_recursive_async to implement meteor reset.
This should hopefully prevent ENOTEMPTY errors on Windows.
2017-10-31 13:59:10 -04:00
Ben Newman
b567fa0a39 Allow asynchronous meteor command implementations. 2017-10-31 13:59:03 -04:00
Ben Newman
ddc490c66d Use module.watch live bindings to solve #9176.
Further explanation / discussion:
https://github.com/meteor/meteor/issues/9176#issuecomment-335913296

Another (complementary) solution to the same problem: #9190
2017-10-31 13:58:31 -04:00
Ben Newman
699768f39d Stop using file.imported to mark fake files in the ImportScanner.
Using a Symbol ensures compiler plugins can't mark files fake accidentally
(or maliciously) when calling inputFile.addJavaScript(options).
2017-10-31 13:58:30 -04:00
Ben Newman
f2b800c927 Remove target directory in files.rename to avoid Windows EPERM errors.
These errors are especially harmful because they cause files.rename to
fall back to copying rather than atomically renaming, which is both much
slower and not even remotely atomic.
2017-10-31 13:58:30 -04:00
Ben Newman
55a6d1b50b Revert "Rename installPath property to absModuleId, and make absolute."
This reverts commit b9f0a54b39.

Though probably a good idea for the future, this change was not really
necessary for Meteor 1.6, and probably too risky for a release candidate.
2017-10-31 10:06:25 -07:00
Jesse Rosenberger
1995c8d445 Bump $BUNDLE_VERSION to 4.8.43 before rebuilding dev bundle. release/METEOR@1.5.3-rc.0 2017-10-27 15:15:56 -07:00
Jesse Rosenberger
d6fc953ba6 Bump $NODE_BUILD_NUMBER to 120 before rebuilding dev bundle. 2017-10-27 15:15:55 -07:00
Jesse Rosenberger
9c62a55137 Bump $NODE_BUILD_NUMBER to 116 before rebuilding dev bundle. 2017-10-27 14:47:06 -07:00
Jesse Rosenberger
e5211e4876 Bump package versions for 1.5.3-rc.0 release. 2017-10-27 11:39:02 -07:00
Ben Newman
8dc1fc3512 Fix typo in ImportScanner#_scanFile.
Introduced by 3faee05eed.

cc @cpury @JanMP
2017-10-26 12:47:19 -07:00
Ben Newman
6323a34d6a Adjust npm update notifier opt-out environment variable.
https://github.com/zkat/npx/issues/98#issuecomment-316936135
https://www.npmjs.com/package/update-notifier#user-settings
2017-10-26 12:37:35 -07:00
Ben Newman
c03a46f70f Regression test for #9185 (fixed by #9187). 2017-10-26 12:37:23 -07:00
Ben Newman
3b7943f631 Add more comments to recently-modified ImportScanner logic. 2017-10-26 12:23:49 -07:00
Ben Newman
202e913faa Call _scanFile far fewer times in ImportScanner#scanMissingModules. 2017-10-26 12:23:49 -07:00
Ben Newman
1470bc841f Remember whether parent module of failed import was dynamic.
Fixes #9182.
2017-10-26 12:23:49 -07:00
Ben Newman
4e778b6e17 Rename installPath property to absModuleId, and make absolute.
The `installPath` property was always essentially an absolute module
identifier that was simply missing the leading '/' character, so this
commit acknowledges that role by renaming the property to `absModuleId`
and adding the leading slash.
2017-10-26 12:23:48 -07:00
Ben Newman
9ac6d60ba2 Track all failed imports separately.
Previously, if more than one module in a package tried and failed to
import the same identifier, we would record information about only the
last failed import.

This was good enough for later attempting to resolve the failed import in
other packges or the application's `node_modules` directory (a concept
known as "peer dependencies"), but it sometimes discarded information
about whether the failed imports were dynamic. In particular, if the last
recorded failed import was a dynamic import, it could accidentally render
the entire peer dependency tree dynamic.

Although it's a bit more complicated than what we did before, I believe
the simplest solution is for the ImportScanner to maintain a mapping from
failed identifiers to lists of import information objects, rather than a
single object, so that no information is lost.
2017-10-26 12:23:48 -07:00
Ben Newman
6cee042b54 Simplify checking/setting file.imported in ImportScanner#_scanFile.
By checking and setting this property earlier, we can avoid scanning files
more than once.
2017-10-26 12:23:33 -07:00
Jesse Rosenberger
16a4bbab04 Bump $NODE_VERSION to 4.8.5 before rebuilding dev bundle.
While the actual version included for Unix developers will be our own
build at NODE_VERSION, this is important for the Windows version, since
it is not being rebuilt by our Jenkins at the moment.
2017-10-24 16:03:07 -07:00
Jesse Rosenberger
cc2608f4a0 Bump $BUNDLE_VERSION to 4.8.42 before rebuilding dev bundle. 2017-10-24 16:00:55 -07:00
Jesse Rosenberger
8841080c9e Bump $NODE_BUILD_NUMBER to 113 before rebuilding dev bundle. 2017-10-24 16:00:54 -07:00
Ben Newman
cb85625520 Remove dev_bundle/.npm (-30MB due to .npm/_cacache). 2017-10-24 16:00:54 -07:00