This change dramatically reduces the number of attempted files.stat calls
during module resolution, especially for apps that use a large number of
compiler plugins, and thus have many different file extensions to try.
My attempt at fixing #10195.
@klaussner Feel free to submit your PR if it's ready, or just review this
one if you prefer. It's important to get this right, so it's not a
terrible idea for both of us to attempt it independently.
Follow-up to af51b816, which fixed#8005 by copying symlinks to external
directories as directories rather than trying to preserve the symlinks.
Issue #10177 revealed a flaw in this strategy: the filter function that we
use to strip development npm packages always rejects external paths, even
if the original symlink was found in a valid production npm package, and
thus its contents should be included in the production bundle.
In the process of fixing this problem, I realized that the only important
part of af51b816 was this code:
// Update fileStatus to match the actual file rather than the
// symbolic link, thus forcing the file to be copied below.
fileStatus = optimisticLStatOrNull(externalPath);
and the code for manipulating thisAbsFrom and _currentRealRootDirectory
could be removed.
Fixes several cases causing cordova plugins reinstall on every build:
- proper handling of scoped npm cordova plugins
- proper detection of plugin removal (previously a cordova plugin containing a dependency would make the algorithm think a package was removed from cordova-plugins)
- proper handling of plugins which have plugin.xml id different than the npm package name
Additionally rechecks the build integrity verifying if packages were really installed and perform a retry if needed.
Allows to override a meteor package cordova dependency with scoped package i.e. @scope/cordova-dummy-plugin will now override a cordova-dummy-plugin dependency.
Meteor 1.6.x through 1.7.0.x use the `babel-runtime@1.2.x` packages, and
this change is only intended to affect those versions.
This will no longer be necessary in Meteor 1.7.1, since we account for
the changes to `@babel/runtime` through changes to the `meteor/babel`
package, but this ensures that anyone who updates to `@babel/runtime@7` (the
final, latest release), or anything newer, isn't surprised by their broken
application.