Commit Graph

21356 Commits

Author SHA1 Message Date
Ben Newman
52eb3590b7 Bump package versions for 1.7.1-beta.16 release. release/METEOR@1.7.1-beta.16 2018-07-11 16:31:19 -04:00
Ben Newman
92f6835d2d Bump $BUNDLE_VERSION to 8.11.3.5 before rebuilding dev bundle. 2018-07-11 16:10:33 -04:00
Ben Newman
75443b6995 Merge branch 'devel' into release-1.7.1 2018-07-11 16:10:06 -04:00
Ben Newman
1818150ad6 Bump dev_bundle/lib/node_modules/@babel/runtime to v7.0.0-beta.53. 2018-07-11 16:09:12 -04:00
Ben Newman
60e29707d4 Bump $BUNDLE_VERSION to 8.11.3.4 before rebuilding dev bundle. 2018-07-11 16:07:11 -04:00
Ben Newman
05e7aebef7 Merge branch 'devel' into release-1.7.1 2018-07-11 15:52:05 -04:00
Ben Newman
4b905ed51e Update reify npm package to version 0.16.4. 2018-07-11 15:46:51 -04:00
Ben Newman
098ce3f5db Update reify npm package to version 0.16.3.
This already landed on release-1.7.1, but I've cherry-picked it back onto
devel to avoid confusion.
2018-07-11 15:44:29 -04:00
Ben Newman
2765238a29 Update meteor-babel to version 7.0.0-beta.53. 2018-07-11 15:29:45 -04:00
Ben Newman
c82141cbaa Merge pull request #10055 from meteor/wip-delay-building-legacy-bundle
Delay building web.browser.legacy bundle until after development server restarts.
2018-07-11 14:34:04 -04:00
Ben Newman
05ffaa504b Force older autoupdate clients to reload. 2018-07-11 13:08:33 -04:00
Ben Newman
41e2615424 Fix tests by awaiting newly-async WebApp.staticFilesMiddleware. 2018-07-11 10:32:29 -04:00
Ben Newman
cacace3bcb Avoid nested Profile.run calls in watch.sha{1,512} functions. 2018-07-11 10:08:57 -04:00
Ben Newman
1387473cf5 Pause requests for the legacy bundle while rewriting it.
This is the solution I came up with for the problems I described here:
https://github.com/meteor/meteor/pull/10055#issuecomment-403219805
2018-07-10 21:17:14 -04:00
Ben Newman
4b17a0b760 Allow sending IPC messages from build process to server process.
Instead of having every message consumer listen to every message and act
on the ones that seem relevant to its interests, we now have a single
process.on("message", callback) hook that can dispatch messages to
different Meteor packages running in the server process.

Receiving packages should export an onMessage function. The onMessage
function may be async, and its result will be delivered back to the build
process as the result of the sendMessage Promise.
2018-07-10 21:17:14 -04:00
Ben Newman
2c567091c8 Explicitly add uuid package to dev_bundle/lib/node_modules.
This package is already importable because it's a dependency of request,
npm, and http-signature, but it's a good idea to depend on it explicitly
just in case those packages stop depending on it in the future.
2018-07-10 21:17:14 -04:00
Ben Newman
213d4389c2 Implement Package._on(name, callback) to intercept Package._define. 2018-07-10 21:17:14 -04:00
Ben Newman
99b79dc00f Include hash of minimum modern versions in autoupdate versions. 2018-07-10 17:43:28 -04:00
Ben Newman
6335d68c0a Use api.mainModule in autoupdate package. 2018-07-09 18:05:14 -04:00
Ben Newman
ff3dbf2f1b Send another client refresh message after legacy build completes.
Also removed the AppRunner#_refreshing boolean hack, since reporting
errors during IPC communication seems desirable.
2018-07-06 20:07:45 -04:00
Ben Newman
fe9e4035f9 Rewrite autoupdate to distinguish versions by client architecture.
Now that we're postponing the legacy build until after the first client
refresh message is sent, there's a risk that changes to the legacy build
will not be picked up until after the next rebuild.

If we attempted to fix that problem by sending the refresh message after
the legacy bundle is rebuilt, then we would lose most of the benefit of
delaying the legacy build, because the client would not refresh until
after the legacy build completed.

The right way to fix the problem is by sending a second client refresh
message after the legacy build finishes, but doing so with the current
autoupdate implementation would very likely cause modern clients to reload
a second time.

The solution implemented by this commit is simple in theory: the
autoupdate package should keep track of distinct versions for each client
architecture, so that modern clients will refresh only when the modern
versions change, and legacy clients will refresh only when the legacy
versions change, which allows us to send two refresh messages without
causing any clients to refresh more than once.

In reality, this was a fairly major rewrite, since the ClientVersions
collection has a totally different schema now. I've tested it as well as I
can, though I'm not entirely sure what will happen if clients using the
previous version of the autoupdate package begin receiving DDP messages
from this version of the autoupdate server code.
2018-07-06 19:58:57 -04:00
Ben Newman
e3082a43f6 Precompute WebApp.* client hashes in generateClientProgram.
This means the autoupdate package is no longer responsible for recomputing
client hashes, and we can recompute the hashes whenever there's a new (or
updated) client program, which enables delayed builds of architectures
like web.browser.legacy (#10055).
2018-07-06 13:32:49 -04:00
Ben Newman
ae2ebda6af Start webapp server after WebAppInternals.* fully populated. 2018-07-06 13:32:48 -04:00
Ben Newman
265d9e30d4 Reload legacy bundle using a syncQueue.runTask callback. 2018-07-05 11:20:50 -04:00
Ben Newman
b8074a809d Update packages/non-core/blaze submodule to latest master revision. 2018-07-04 14:05:45 -04:00
Ben Newman
f8c47a775f Merge pull request #10051 from jamesmillerburgess/oauth-underscore-usage
Use underscore on both client and server in github-oauth and meetup-oauth
2018-07-04 14:04:39 -04:00
Ben Newman
b9a05d85f6 Permit delayed bundling only if !Console.isHeadless(). 2018-07-04 13:44:12 -04:00
Ben Newman
7f88d26a60 Pass { childProcess, runLog } into post-startup callback function. 2018-07-04 13:44:12 -04:00
Ben Newman
3c5566f532 Avoid nested Profile.run calls in watch.sha{1,512} functions. 2018-07-04 13:44:11 -04:00
Ben Newman
aade180d46 Build web.browser.legacy bundle after startup on rebuilds. 2018-07-04 12:26:23 -04:00
Ben Newman
3d1db19e79 Remove unused NODE_PATH logic from bundler.js and run-app.js. 2018-07-04 10:51:06 -04:00
Ben Newman
5be6c45e77 Clean up previousBuilders caching in bundler.bundle.
Most importantly, we no longer return a copy of previousBuilders from
bundler.bundle, but simply modify the input object over time. The copying
approach was nice in theory, but incompatible with delaying the bundling
of certain architectures (e.g. web.browser.legacy) until some time after
bundler.bundle returns.
2018-07-04 10:25:53 -04:00
Ben Newman
c914df087e Extract generateClientProgram from WebAppInternals.reloadClientPrograms. 2018-07-04 10:15:28 -04:00
Ben Newman
8310870c44 Tolerate clientJson.clientArchs in dynamic-import boot.js setup. 2018-07-04 10:15:26 -04:00
Ben Newman
159fcb3818 Replace clientPaths with clientArchs in config.json. 2018-07-04 10:15:24 -04:00
Ben Newman
ecddfcd08d Use binding behavior of buildmessage.markBoundary in more places.
This functionality was introduced in 7b6fd0ee10.
2018-07-04 10:12:52 -04:00
Ben Newman
10c7428398 Update packages/non-core/blaze submodule to latest master revision. 2018-07-04 10:08:29 -04:00
James Miller Burgess
653265122d Use underscore on server in meetup-oauth
`_` is being used in meetup_server.js, but not specified in the package
2018-07-03 23:04:19 +04:00
James Miller Burgess
c5fd2290ef Use underscore on client in github-oauth
`_` is being used in github_client.js, but not specified in the package
2018-07-03 23:03:55 +04:00
Ben Newman
a7267df7af Bump package versions for 1.7.1-beta.15 release. release/METEOR@1.7.1-beta.15 2018-07-03 14:12:40 -04:00
Ben Newman
90026ea8fc Merge branch 'devel' into release-1.7.1 2018-07-03 14:10:44 -04:00
Ben Newman
03e9a1f524 Bump minor versions of webapp and boilerplate-generator packages.
Since recent changes in these packages (#9933) depend on changes to the
build tool, it seems wise to tie these updates to Meteor 1.7.1.
2018-07-03 14:08:19 -04:00
Ben Newman
f3edf1f477 Bump mongo package patch version to 1.5.1. 2018-07-03 14:04:00 -04:00
Ben Newman
cad8151151 Improve File hashing logic in bundler.js. (#10050)
Follow-up to https://github.com/meteor/meteor/pull/9933.

As recommended by @abernix, the sha1 hash of every file is now computed
from the file's sha512 hash, so we don't have to hash the entire contents
of the file twice with two different algorithms.

Other changes/improvements:

* Invalidate the hashes when/if `File#setContents` is called.

* Ignore `options.hash` and just compute hashes from actual file contents.
  Disagreement here would be worse than any performance benefits from
  precomputing the hash.
2018-07-03 14:02:08 -04:00
Timo Horstschaefer
ef3af685ab Enable Sub-Resource Integrity hashes for JS and CSS files (#9933) 2018-07-03 12:30:22 -04:00
Lucas Hansen
879b7a27fb Avoid no-op minimongo updates (#10047) 2018-07-03 12:07:06 -04:00
Lucas Hansen
86dba2ba2c Add environment variables for configuring polling observe driver (#10048) 2018-07-03 12:04:51 -04:00
Ben Newman
4f10dbcbfa Bulk-update History.md for changes introduced in Meteor 1.7.1. 2018-07-03 11:49:29 -04:00
Ben Newman
183d5ff950 Bump package versions for 1.7.1-beta.14 release. release/METEOR@1.7.1-beta.14 2018-07-02 21:35:42 -04:00
Ben Newman
6cea010800 Use Reify Visitor to reimplement findImportedModuleIdentifiers.
Now possible because of https://github.com/benjamn/reify/pull/202.

Similar in spirit to a62a2adf77.
2018-07-02 20:09:12 -04:00