Commit Graph

131 Commits

Author SHA1 Message Date
James Burgess
4ebf089d88 Remove underscore from meteor-base (#9596)
This should shave down bundle sizes by 14.4 kb for many non-blaze projects.

The other core meteor packages have not depended on `underscore` since #9362. However, we are only able to remove this last dependency now due to the previous commit, which eliminated usages of `underscore` from apps that did not have the package listed in their `packages` files. This was causing CI test failures that now should be corrected.

Any meteor apps currently using `_` without `underscore` listed in their `packages` file will need to add the package explicitly.

Version number of `meteor-base` bumped from 1.3.0 to 1.4.0.

There are only a few uses of `underscore` in these apps, and two of them actually used `underscore` without having it explicitly listed in their `packages` file.

This is a problem, because the apps were relying on the dependency from `meteor-base`, which we want to remove to cut down bundle sizes.

For the `modules` test app, I've added `underscore` to the `packages` file, because it is using `_` in an assertion about the module system. For the other app and all other uses of `_`, rather than add `underscore` to the `packages` files, I took the modernization route and replaced the functions with their ES6 equivalents, and then removed `underscore` from all `packages` files.
2018-03-07 11:23:52 -05:00
Ben Newman
2c7616d221 Bump package versions for the official 1.6.1 release. 2018-01-20 15:50:01 -05:00
Ben Newman
ce276aec96 Bump package versions for 1.6.1-rc.10 release. 2018-01-19 19:29:47 -05:00
Ben Newman
8b3732e18b Bump package versions for 1.6.1-rc.9 release. 2018-01-18 17:22:17 -05:00
Ben Newman
c2845baff7 Bump package versions for 1.6.1-rc.8 release. 2018-01-17 18:09:01 -05:00
Ben Newman
4e345b860a Bump package versions for 1.6.1-rc.7 release. 2018-01-16 17:16:06 -05:00
Ben Newman
d78bed0d47 Bump package versions for 1.6.1-rc.6 release. 2018-01-15 18:27:17 -05:00
Ben Newman
8decd67daf Bump package versions for 1.6.1-rc.5 release. 2018-01-14 23:24:22 -05:00
Ben Newman
b07c5cc328 Bump package versions for 1.6.1-rc.4 release. 2018-01-14 17:48:52 -05:00
Ben Newman
365804218f Remove sockjs-shim package and always polyfill SockJS, again.
Although it was tempting to avoid including the SockJS library in the
bundle for modern browsers, Meteor 1.6.2 will have a much better way of
managing this kind of differential bundling for modern/legacy browsers
(see PR #9439), and removing SockJS seems to lead to a worse experience
when native WebSockets end up failing, as @jamesmillerburgess discovered:
https://github.com/meteor/meteor/pull/9274#issuecomment-356214405
2018-01-12 15:49:41 -05:00
Ben Newman
ebe51997d6 Bump package versions for 1.6.1-rc.3 release. 2018-01-12 12:20:49 -05:00
Ben Newman
c45e90d24f Bump package versions for 1.6.1-rc.2 release. 2018-01-09 19:33:30 -05:00
Ben Newman
5e38bd5758 Bump package versions for 1.6.1-rc.1 release. 2018-01-03 14:48:21 -05:00
Ben Newman
d8989653e5 Bump package versions for 1.6.1-rc.0 release. 2018-01-03 10:50:02 -05:00
Ben Newman
b19e8a6af0 Bump package versions for 1.6.1-beta.21 release. 2017-12-20 18:32:31 -05:00
Ben Newman
4268785ffe Bump package versions for 1.6.1-beta.20 release. 2017-12-20 12:12:07 -05:00
Ben Newman
3f2a79eaba Bump package versions for 1.6.1-beta.19 release. 2017-12-19 18:41:38 -05:00
Ben Newman
0b8757bed9 Bump package versions for 1.6.1-beta.18 release. 2017-12-12 18:04:56 -05:00
Ben Newman
d045663fcd Bump package versions for 1.6.1-beta.17 release.
The 1.6.1-beta.16 release was DOA and should be avoided (if it can even be
installed), due to an unfortunate interruption of my internet connection.
2017-12-08 19:02:55 -05:00
Ben Newman
d0b5fc5b7b Bump package versions for 1.6.1-beta.15 release. 2017-12-08 18:31:31 -05:00
Ben Newman
91d6f22076 Bump package versions for 1.6.1-beta.14 release. 2017-12-05 11:48:27 -05:00
Ben Newman
463d45afc7 Bump package versions for 1.6.1-beta.13 release. 2017-12-05 11:25:38 -05:00
Ben Newman
71da2d327c Bump package versions for 1.6.1-beta.12 release. 2017-12-05 09:43:01 -05:00
Ben Newman
2effb1a974 Bump package versions for 1.6.1-beta.11 release. 2017-11-25 11:26:42 -05:00
Ben Newman
02583444bd Bump package versions for 1.6.1-beta.10 release. 2017-11-24 11:38:42 -05:00
Ben Newman
86a2ad5679 Bump package versions for 1.6.1-beta.9 release. 2017-11-22 15:26:12 -05:00
Ben Newman
d690906f7f Bump package versions for 1.6.1-beta.8 release. 2017-11-17 14:47:17 -05:00
Ben Newman
5bdf684525 Merge branch 'devel' into release-1.6.1 2017-11-17 14:34:11 -05:00
Ben Newman
a80af7e064 Move dynamic-import dependency from meteor-base to ecmascript.
Now that dynamic-import no longer depends indirectly on ecmascript, the
ecmascript package can finally guarantee support for dynamic `import()`,
as it rightfully should.
2017-11-17 12:04:25 -05:00
Ben Newman
4911b1e7f6 Bump package versions for 1.6.1-beta.7 release. 2017-11-14 14:24:18 -05:00
Ben Newman
944b8a1ab2 Bump package versions for 1.6.1-beta.6 release. 2017-11-14 13:45:58 -05:00
Ben Newman
bac168b4ca Bulk-bump minor versions of recently changed packages. 2017-11-14 13:31:10 -05:00
Ben Newman
d230ad51cd Imply es5-shim from meteor-base.
Now that es5-shim has no impact on modern browsers (thanks to selectively
server-side rendering a <script> tag for older browsers), there's very
little reason not to use it.

If you really don't want to use it, you can always remove meteor-base and
install your preferred set of base packages.
2017-11-14 10:10:50 -05:00
Ben Newman
edb33611e1 Avoid loading SockJS in browsers known not to need it.
Supersedes #9316, in which @stubailo demonstrated that SockJS can be
straightforwardly eliminated if native WebSocket support is assumed.

Native WebSocket support is close to universal now (94% of all clients
according to https://caniuse.com/#feat=websockets), which means we can
remove ~30KB of legacy code from the client bundle that we send to most
web browsers.

To achieve this flexibility, the sockjs-0.3.4.js script is injected as a
standalone <script> tag in the <head> of the document, but only if the
user agent string of the HTTP request fails to convince the sockjs-shim
package that the browser has native WebSocket support. When Meteor is
running in production, a minified version of that script is used instead.

Not only is this loading strategy a bit faster for older browsers, because
the SockJS script begins loading earlier, and is independent from the
normal JS bundle, it also removes the cost of loading SockJS completely
for more recent browsers.

Though it's tempting to keep hacking the SockJS script to make it smaller,
we should avoid spending too much time on that, since it only benefits a
small portion of users whose devices are likely to have poor performance
for lots of other reasons. In other words, I think we should keep
[Amdahl's Law](https://en.wikipedia.org/wiki/Amdahl%27s_law) in mind.
2017-11-13 09:15:52 -05:00
Ben Newman
0bff81f0b4 Bump package versions for the official 1.6 release. 2017-10-27 13:00:43 -04:00
Ben Newman
b63ab27986 Bump package versions for 1.6-rc.18 release. 2017-10-26 11:37:15 -04:00
Ben Newman
24c80da9ef Bump package versions for 1.6-rc.17 release. 2017-10-24 18:45:30 -04:00
Ben Newman
d317c29319 Bump package versions for 1.6-rc.16 release. 2017-10-20 16:13:31 -04:00
Ben Newman
6d528e334f Bump package versions for 1.6-rc.15 release. 2017-10-18 21:52:17 -04:00
Ben Newman
22930e876e Bump package versions for 1.6-rc.14 release. 2017-10-17 16:29:44 -04:00
Ben Newman
e2db34bdc5 Bump package versions for 1.6-rc.13 release. 2017-10-16 16:04:42 -04:00
Ben Newman
5a8c0f2743 Bump package versions for 1.6-rc.12 release. 2017-10-16 14:07:19 -04:00
Ben Newman
2777f5f6f7 Bump package versions for 1.6-rc.11 release. 2017-10-16 10:00:45 -04:00
Ben Newman
c476188cc6 Bump package versions for 1.6-rc.10 release. 2017-10-14 15:00:41 -04:00
Ben Newman
5d7058dc17 Bump package versions for 1.6-rc.9 release. 2017-10-13 13:54:47 -04:00
Ben Newman
fdaa0f5145 Bump package versions for 1.6-rc.8 release. 2017-10-12 17:42:21 -04:00
Ben Newman
3b93934217 Bump package versions for 1.6-rc.7 release. 2017-10-12 11:23:36 -04:00
Ben Newman
40ecbb27f2 Bump package versions for 1.6-rc.6 release. 2017-10-10 10:05:36 -04:00
Ben Newman
0c7f4b89a7 Bump package versions for 1.6-rc.5 release. 2017-10-08 20:04:53 -04:00
Ben Newman
25e0a54d4e Bump package versions for 1.6-rc.4 release. 2017-10-08 14:37:19 -04:00