Commit Graph

21753 Commits

Author SHA1 Message Date
Ben Newman
ca2d44204f Bump package versions for the official 1.8.0.1 release. release/METEOR@1.8.0.1 2018-11-23 11:50:10 -05:00
Ben Newman
eecc11ea63 Note release date for Meteor 1.8.0.1 in History.md. 2018-11-23 11:48:11 -05:00
Ben Newman
0f5bed4707 Avoid passing lots of ...args to watch.sha1. 2018-11-20 17:47:49 -05:00
Ben Newman
e8440a491d Bump package versions for 1.8.0.1-rc.4 release. release/METEOR@1.8.0.1-rc.4 2018-11-20 17:14:23 -05:00
Ben Newman
f440ef4d7a Bump $BUNDLE_VERSION to 8.11.4.7 before rebuilding dev bundle. 2018-11-20 16:47:11 -05:00
Ben Newman
269a12efe9 Merge branch 'devel' into release-1.8.0.1 2018-11-20 16:34:06 -05:00
Ben Newman
d5cee78567 Update meteor-babel to version 7.1.6.
Change responsible for the source maps improvements:
389cf7dfed
2018-11-20 16:29:13 -05:00
Ben Newman
346d512b13 Propagate input hashes all the way through bundling.
Hashes have a number of overlapping but not entirely redundant or
equivalent purposes within the build system.

Hashes of source code are important because they can be computed before
compilation and processing, and thus are useful as keys for caching that
expensive work. Source hashes remain useful even after compilation, as a
way of reflecting the contributions of source-code-sensitive assets like
source maps.

However, source hashes do not tell the whole story, and using them as
cache keys can be risky if the work that's being cached depends on
generated code rather than source code, as we recently discovered with the
findImportedModuleIdentifiers function. The preliminary fix for that
problem (#10330) was to cache findImportedModuleIdentifiers using a hash
of the generated code rather than the source hash.

PR #10330 swung a bit too far in the direction of ignoring source hashes
and considering only hashes of generated code. For example, the URLs of
source maps share the hash of the corresponding resource, but source maps
can change (because of superficial changes in the source code) without
changing the generated code of the resource. Ignoring the source hash when
computing source map URLs resulted in stale source maps with incorrect
line numbers.

A better solution seems to be to propagate the source hash (along with any
hashes of intermediate generated artifacts) all the way through bundling,
so that the final hash of any static resource reflects all information
that could/should change the behavior of that static resource, including
its source map, which embeds the exact source code of all contributing
files in the sourcesContent property. At every step of the way, we merge
all the input hashes into a single hash, so we don't have to keep juggling
multiple hashes, thankfully.

Sub-Resource Integrity (SRI) hashes still need to be computed from just
the final contents of a given asset, so that the browser can verify those
contents without knowing anything about the Meteor build system, but
that's handled separately.
2018-11-20 11:19:42 -05:00
Ben Newman
4ceb405f27 Bump package versions for 1.8.0.1-rc.3 release. release/METEOR@1.8.0.1-rc.3 2018-11-19 12:45:51 -05:00
Ben Newman
7ce3ca29fd Avoid computing servePath from undefined targetPath.
https://github.com/meteor/meteor/issues/10337#issuecomment-439674497
2018-11-19 12:40:33 -05:00
Ben Newman
c0a35f0457 Bump package versions for 1.8.0.1-rc.2 release. release/METEOR@1.8.0.1-rc.2 2018-11-17 15:27:35 -05:00
Ben Newman
b55806f931 Relax precondition in ResourceSlot#addJavaScript.
https://github.com/meteor/meteor/issues/10337#issuecomment-439638590
2018-11-17 15:26:05 -05:00
Ben Newman
4c22e5ec97 Bump package versions for 1.8.0.1-rc.1 release. release/METEOR@1.8.0.1-rc.1 2018-11-15 13:51:00 -05:00
Ben Newman
0561124bde Note PR #10330 in History.md. 2018-11-15 13:50:59 -05:00
Ben Newman
c326591bb8 Note PR #10334 in History.md. 2018-11-15 13:50:53 -05:00
Ben Newman
0296f15880 Bump webapp and modern-browsers package versions for #10334. 2018-11-15 13:50:50 -05:00
Ben Newman
f3f584d96b Make modern/legacy browser name check case-insensitive.
https://github.com/meteor/meteor/pull/10334#commitcomment-31302219

cc @abernix @hwillson
2018-11-15 13:50:49 -05:00
Jesse Rosenberger
128c9311ea For modern bundles, treat Chromium and "Headless Chrome" the same as Chrome.
Best I can tell, the major version portion of Chromium versions has always
tracked all the way through to Chrome Canary, Dev and Stable releases.
Since we observe the major version of Chrome in terms of identifying it as a
"modern browser", it seems to make sense to treat "Headless Chrome" and
Chromium in the same regard.

Interestingly, when the same Chrome as we all use on our machines is run
with the `--headless` flag, it switches its `navigator.userAgent` to
`HeadlessChrome/`, rather than `Chrome/`.

This was initially problematic since the `useragent` npm we use for parsing
user agents didn't understand this designation, however, with the update of
`webapp`'s `useragent` npm in 058351b7, `headlesschrome` will now have its
version available from `WebAppInternals.identifyBrowser`, so we can
accurately identify it and serve it the modern bundle.
2018-11-15 13:50:49 -05:00
Jesse Rosenberger
5e98790291 Update webapp's useragent npm to v2.3.0 to support HeadlessChrome.
Previously, while the `useragent` package was able to parse the User-Agent
for so-called "Headless Chrome" and generate a family of "HeadlessChrome",
it was unable to parse out the individual portions of the version number
(e.g. major, minor, patch).

For example, the following User-Agent (herein referred to as `userAgentAbove`):

```
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/69.0.3497.100 Safari/537.36
```

Previously resulted in:

```
> require('useragent').lookup(userAgentAbove);

{
  family: 'HeadlessChrome',
  major: '0',
  minor: '0',
  patch: '0',
  /* ... */
}
```

With the newer version of `useragent`, these are now properly extracted and
set which will enable Meteor to treat Headless Chrome the same as Chrome in
a follow-up commit.  Now:

```
> require('useragent').lookup(userAgentAbove);

{
  family: 'HeadlessChrome',
  major: '69',
  minor: '0',
  patch: '3497'
  /* ... */
}
```
2018-11-15 13:50:48 -05:00
Ben Newman
5e7e809cd1 Implement ResourceSlot#_addDirectlyToJsOutputResources to fix #10337. (#10338) 2018-11-15 13:50:48 -05:00
Ben Newman
258d7f2eb0 Merge pull request #10334 from meteor/abernix/update-useragent-for-modern-browsers
Identify Chromium and Headless Chrome as "modern" browsers.
2018-11-15 11:13:12 -06:00
Ben Newman
014dfab1ac Implement ResourceSlot#_addDirectlyToJsOutputResources to fix #10337. (#10338) 2018-11-15 11:10:47 -06:00
Ben Newman
0bbb6df449 Mention PR #10334 in History.md. 2018-11-15 11:57:16 -05:00
Ben Newman
65e44f6da6 Bump webapp and modern-browsers package versions for #10334. 2018-11-15 11:44:25 -05:00
Ben Newman
dc2f2487ac Make modern/legacy browser name check case-insensitive.
https://github.com/meteor/meteor/pull/10334#commitcomment-31302219

cc @abernix @hwillson
2018-11-15 11:44:24 -05:00
Jesse Rosenberger
b65f8b0610 For modern bundles, treat Chromium and "Headless Chrome" the same as Chrome.
Best I can tell, the major version portion of Chromium versions has always
tracked all the way through to Chrome Canary, Dev and Stable releases.
Since we observe the major version of Chrome in terms of identifying it as a
"modern browser", it seems to make sense to treat "Headless Chrome" and
Chromium in the same regard.

Interestingly, when the same Chrome as we all use on our machines is run
with the `--headless` flag, it switches its `navigator.userAgent` to
`HeadlessChrome/`, rather than `Chrome/`.

This was initially problematic since the `useragent` npm we use for parsing
user agents didn't understand this designation, however, with the update of
`webapp`'s `useragent` npm in 058351b7, `headlesschrome` will now have its
version available from `WebAppInternals.identifyBrowser`, so we can
accurately identify it and serve it the modern bundle.
2018-11-15 11:44:24 -05:00
Jesse Rosenberger
ea28a34a2c Update webapp's useragent npm to v2.3.0 to support HeadlessChrome.
Previously, while the `useragent` package was able to parse the User-Agent
for so-called "Headless Chrome" and generate a family of "HeadlessChrome",
it was unable to parse out the individual portions of the version number
(e.g. major, minor, patch).

For example, the following User-Agent (herein referred to as `userAgentAbove`):

```
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/69.0.3497.100 Safari/537.36
```

Previously resulted in:

```
> require('useragent').lookup(userAgentAbove);

{
  family: 'HeadlessChrome',
  major: '0',
  minor: '0',
  patch: '0',
  /* ... */
}
```

With the newer version of `useragent`, these are now properly extracted and
set which will enable Meteor to treat Headless Chrome the same as Chrome in
a follow-up commit.  Now:

```
> require('useragent').lookup(userAgentAbove);

{
  family: 'HeadlessChrome',
  major: '69',
  minor: '0',
  patch: '3497'
  /* ... */
}
```
2018-11-15 11:44:24 -05:00
Ben Newman
c06a31a322 Bump package versions for 1.8.0.1-rc.0 release. release/METEOR@1.8.0.1-rc.0 2018-11-14 12:08:13 -05:00
Ben Newman
7a7d5bd8a2 Bump $BUNDLE_VERSION to 8.11.4.6 before rebuilding dev bundle. 2018-11-14 11:44:14 -05:00
Ben Newman
f7bd8e9f37 Merge pull request #10330 from meteor/fix-findImportedModuleIdentifiers-hash-collision
Ensure file.hash is always computed from sha1(file.data).
2018-11-12 20:48:49 -05:00
Ben Newman
152879c093 Bump diff-sequence package version to fix #10320. (#10331)
After @nathan-muir's PR #10053, we did not publish a new version of the
diff-sequence package, which would have contained DiffSequence.diffMaps.

I honestly have no idea why #10320 did not manifest before now, but
publishing these changes seems to fix it.
2018-11-12 20:44:49 -05:00
Ben Newman
253213c24f Bump ecmascript package version after bumping babel-compiler version. 2018-11-12 19:35:50 -05:00
Ben Newman
4294414506 Update meteor-babel to version 7.1.5. 2018-11-12 19:35:47 -05:00
Ben Newman
44e713f046 Ensure file.hash is always computed from sha1(file.data).
With the introduction of lazy compilation in Meteor 1.8, calling

  inputFile.addJavaScript({
    ...
    hash: inputFile.getSourceHash(),
    ...
  }, function () {
    return compiler.processFilesForTarget(inputFile);
  });

becomes problematic, since inputFile.getSourceHash() is usually different
from compiler.processFilesForTarget(inputFile).hash, because the latter is
computed from the compiled code, whereas the former is computed from the
source code.

For example, when we use file.hash to cache imported module identifiers in
ImportScanner#_findImportedModuleIdentifiers, we really need to be using
the hash of the compiled code, since a single source module can be
compiled in different ways. If we cache based on the source hash, there's
a risk of reusing the scanned imports from the web.browser version for the
web.browser.legacy version, which can lead to all sorts of problems that
are only apparent in legacy browsers.

The quick fix is easy enough: BabelCompiler can simply stop including a
hash in the eager options to inputFile.addJavaScript. This fix can be
published as a minor update to the babel-compiler and ecmascript packages.

The remaining changes in this commit add another layer of defense against
this problem, by ignoring any hash options provided by compiler plugins,
in favor of simply computing the hash from the compiled data buffer.
These additional changes will become available in the next release of
Meteor (likely 1.8.1).
2018-11-12 18:57:06 -05:00
Ben Newman
13388b4955 Bump session package version. 2018-11-03 16:21:32 -04:00
Ben Newman
6a18c7a2bf Bump caching-compiler package version. 2018-11-03 16:21:16 -04:00
Seba Kerckhof
05ae386b79 Sanitize compiler name for environment variables (#10270)
While strictly speaking more characters are allowed, they are not usable in a shell except for uppercase / digits / underscore.
( https://stackoverflow.com/a/2821183 )
2018-11-03 16:14:47 -04:00
Seba Kerckhof
f8e59735f6 Modernize session package (#10228) 2018-11-03 16:12:06 -04:00
Ben Newman
249f31707a Bump [standard-]minifier-css package versions. 2018-11-03 16:06:41 -04:00
lukas strassel
689ae3dfa7 Update postcss and cssnano to latest non breaking versions (#10260) 2018-11-03 16:04:42 -04:00
Geoffrey Challen
c5b51b0fc2 user.services is not an array. (#10299) 2018-11-03 15:48:29 -04:00
Lars Gleim
a54c9261ad Fix uncaught TypeError in autoupdate_client.js (#10281)
This fixes an issue (c.f. https://github.com/Urigo/meteor-client-bundler/issues/87) where when the __meteor_runtime_config__ does not contain a proper autoupdate configuration object, the client would fail to load properly.
2018-11-03 15:45:47 -04:00
Jan Dvorak
c622e51cd8 Fix #10305 (#10310) 2018-10-31 11:33:49 -04:00
Ben Newman
0e983deb69 Update coffeescript-compiler constraint in coffeescript/package.js. 2018-10-31 11:14:59 -04:00
Ben Newman
d7339dd3db Bump oauth1 patch version to 1.2.2. 2018-10-31 11:12:39 -04:00
Ben Newman
b04485c777 Merge pull request #10312 from meteor/lazy-coffeescript-compilation
Bump CoffeeScript to version 2.3.2 and enable lazy compilation.
2018-10-31 11:10:02 -04:00
Thomas Spiesser
eb4ae8b8fa [oauth1] Add default value for whitelistedQueryParams. (#10301) 2018-10-31 11:03:53 -04:00
Ben Newman
c96278700d Fix compiler plugins self-tests by waiting for lazy compilation to finish. 2018-10-31 10:41:31 -04:00
Ben Newman
ea173640f2 Bump CoffeeScript to version 2.3.2 and enable lazy compilation.
The introduction of lazy compilation should help with #10298.
2018-10-30 14:24:40 -04:00
Nathan Muir
8f86f19cd0 ddp-client: fix usage of reload package (#10286)
- Return type of onMigrate callback should be an array.
- onMigrate callback can be invoked many times until all components
  are ready to migrate.
- DDP negotiation failures should always migrate immediately.
2018-10-23 10:38:08 -04:00