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.
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).
While strictly speaking more characters are allowed, they are not usable in a shell except for uppercase / digits / underscore.
( https://stackoverflow.com/a/2821183 )
`autoupdate` and `reactive-dict` are using the `reload` package if it's available. To ensure that all packages are loaded in the correct order, these dependencies must be explicit.
- 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.
https://github.com/meteor/meteor/issues/10112#issuecomment-428646872
Further down in the mergeCss function, when we call CssTools.stringifyCss,
we pass the following option:
// don't try to read the referenced sourcemaps from the input
inputSourcemaps: false
Apparently this isn't enough to avoid reading inline source maps from the
input file, so we should be a bit more aggressive about preventing postcss
from picking up inline source maps.
This change mostly affects .css files imported from node_modules, and
possibly raw .css files in the application that happen to have inline
sourceMappingURL= comments. For CSS output from compiler plugins like LESS
and SCSS, we have a totally different mechanism of handling source maps,
namely file.getSourceMap().
Should fix#10112.
As reported by @mariusrak here:
https://github.com/meteor/meteor/issues/10220#issuecomment-425244894
Only errors thrown by @babel/parser have the e.loc property. Other errors
thrown by Babel transforms do not have e.loc, but do (usually) have line
number information embedded in e.message. Either way, it's better to use
inputFile.error than to throw the error, since throwing here crashes the
build process.