In particular, it is very important that the 'modules' package qualifies
as using itself, or else its require function will not be able to find
files unless they are mentioned in package.js.
Fixes#6673
The Meteor "dev bundle bin commands" which proxy through to the
meteor version of npm/node was not returning the exit code from the
command which it executed. This creates problems for things like
`meteor npm run script-name` when the exit code is important. This
comes into play when you run npm scripts which run tests, lint code, etc.
This fix causes the meteor-tool to process.exit with the spawned process
exit code.
Windows Disclaimer: I used the same flush-buffers-on-exit-in-windows
that the tool/cli/main.js uses because I would assume the same problem
exists, however, I don't have the Windows environment to test or confirm
that this code works at all.
Also, couldn't find any tests that directly tested this dev bundle
bin-command passing scenario (though hard to search through them all),
so I created a barebones test app and tests.
Building the iOS app for release should be done from Xcode anyway, to
correctly code sign and submit to TestFlight or the App Store.
Because building would override `build-extras.xcconfig`, this would
remove a temporary workaround for #6492, which is now correctly applied
on both `meteor run` and `meteor build`.
This reverts a change I made in 75f9214959.
I thought allowing partial paths would make files.pathRelative more
robust, but it had the unintended consequence of causing #6586.
Importing meteor-node-stubs in a statically analyzable way is important to
ensure all the aliases for built-in Node modules get set up properly. This
does *not* mean that all meteor-node-stubs/defs/* modules will be imported
unconditionally.
Part of #6562.
This reverts commit b56f4d58fd, which may
help with #6561, because we won't be copying node_modules directories into
the development bundle on Windows anymore.
This reverts commit 7227f64ea8.
This reverts commit b4972af3a5.
Saving 400ms of rebuild time isn't worth sometimes having to restart the
app from scratch.
This extra hash input makes it easier for us to force relinking when the
linker implementation changes, and will probably make upgrading to Meteor
1.3 smoother for many existing apps.
Specifically, with this change, the ImportScanner will never include two
files whose paths differ only in case. If one of the files is processed by
compiler plugins, then that file's actual path will "win" in the sense
that its installed module identifier will preserve the original casing.
Fixes#6428.
For package dependencies, the node_modules directory immediately follows
the /package/ part of the path, but for plugins the name of the plugin
comes before the node_modules directory.
We no longer go to the trouble of generating source maps for files not
processed by compiler plugins, since that was slow and not very useful
(see ad3f56a0bf).
However, that means the test app and package that we use to test source
maps and stack trace rewriting need to use the ecmascript package in order
to behave as they did before that commit.