Commit Graph

5526 Commits

Author SHA1 Message Date
Ben Newman
d7f87b00bf Don't colonConverter.convert(name) again. 2016-04-03 13:26:45 -04:00
Ben Newman
aeb2b6b0ed Avoid unnecessarily long node_modules paths for plugin isopacks.
Long paths pose real problems on Windows, and may have exacerbatd the
consequences of #6609.
2016-04-02 20:25:21 -04:00
Ben Newman
5fc2e0c043 Use IsopackCache#uses to determine useMeteorInstall. 2016-04-01 21:39:31 -04:00
Ben Newman
6c1c12318c Refactor IsopackCache#{uses,implies} so modules use/imply themselves.
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.
2016-04-01 21:22:51 -04:00
Ben Newman
0e62234fe0 Bump compiler.BUILT_BY to 'meteor/20'. 2016-04-01 19:53:49 -04:00
Ben Newman
5bde892812 Tolerate \r\n line endings when splitting lines in linker.
Fixes #6660.
2016-04-01 14:16:40 -04:00
Ben Newman
8248d86fb2 Consolidate exit code logic for meteor npm and meteor node.
Follow-up to #6675.
2016-04-01 12:08:55 -04:00
Jesse Rosenberger
97cb2c14a8 "meteor npm/node" should return exit code from command
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.
2016-04-01 17:09:03 +03:00
Ben Newman
be986fd709 Report compilation errors for lazy files at import time. 2016-03-31 20:09:53 -04:00
Ben Newman
a847988be7 Omit lazy resources from unibuild JSON files when not using modules.
Fixes #6618.
Fixes #6484.
2016-03-31 20:09:53 -04:00
Ben Newman
e9d5ec34da Implement IsopackCache#{uses,implies}. 2016-03-31 19:17:02 -04:00
Ben Newman
e8f9972a5b Convert IsopackCache to an ES2015 class.
No behavioral changes.
2016-03-31 16:17:50 -04:00
Ben Newman
85047f9d3f Improve wording of missing modules warnings. 2016-03-31 16:17:50 -04:00
Ben Newman
77f2fdf426 Silence missing module warnings generated by Meteor packages.
A better way to verify package dependencies is coming: #6322.
2016-03-31 16:17:49 -04:00
Ben Newman
a86c61eb9b Don't warn about unresolved modules in Browserify/Webpack bundle files.
Fixes https://github.com/practicalmeteor/meteor-mocha/issues/19
Related: https://github.com/meteor/todos/issues/90
See also: 62c41b2ef5
2016-03-31 16:17:49 -04:00
Ben Newman
f6fb8b6114 Try harder to determine file.sourcePath in ImportScanner. 2016-03-31 16:17:49 -04:00
Martijn Walraven
88d43a0f16 Only prepare instead of build the Cordova project for iOS
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`.
2016-03-30 13:37:01 +02:00
Wexpo Lyu
d63daaa6a9 A space added. 2016-03-29 13:37:11 +08:00
Wexpo Lyu
8d99779f78 Update the info when on latest recommended. 2016-03-29 13:33:58 +08:00
Ben Newman
2ccb7467c9 Merge branch 'master' into devel 2016-03-28 18:35:58 -04:00
Ben Newman
b61b38d473 Write .meteor-portable files asynchronously.
Fixes #6591.
2016-03-25 17:05:44 -04:00
Ben Newman
151e8fa295 Silence some noisy missing module warnings.
Follow-up to #6562.
2016-03-24 20:35:37 -04:00
Ben Newman
5f6f585276 Test fallback to index.js when package.json has no "main" field.
Related to #6589.
2016-03-24 20:07:14 -04:00
Ben Newman
a1a30891be Don't be fooled by absolute-looking relative paths.
Fixes https://github.com/meteor/meteor/issues/6586#issuecomment-201066077
2016-03-24 19:45:53 -04:00
Ben Newman
5a63d66b50 Revert "Check logging level at beginning of _warnAboutMissingModules."
This reverts commit 58a7082aa3, which
effectively disabled warnings about missing modules.

Fixes #6562.
2016-03-24 15:23:36 -04:00
Ben Newman
d3e7aa9141 Revert enabling partial paths for files.pathRelative.
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.
2016-03-24 13:35:31 -04:00
Martijn Walraven
5a1dd20dc6 Replace links to installation Wiki pages with links to the mobile guide 2016-03-24 15:11:23 +01:00
Ben Newman
dc0345b0ff Bundle partial package.json files unconditionally.
Fixes #6582.
2016-03-24 01:02:11 -04:00
Ben Newman
75f9214959 Use OS-specific absolute paths with require.resolve. 2016-03-24 00:48:40 -04:00
Ben Newman
58a7082aa3 Check logging level at beginning of _warnAboutMissingModules. 2016-03-23 20:26:26 -04:00
Ben Newman
07db1eb340 Avoid spurious missing module warnings about server-lib/node_modules. 2016-03-23 20:26:26 -04:00
Ben Newman
11f136228e Revert dynamic meteor-node-stubs import.
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.
2016-03-23 19:57:10 -04:00
Ben Newman
11cbd89e1b Print helpful warnings about unresolved modules. 2016-03-23 18:55:24 -04:00
Ben Newman
df273f3cb4 Report successes as well as failures from ImportScanner#addNodeModules. 2016-03-23 18:55:24 -04:00
Ben Newman
420d001b75 Make sure findAppDir uses correct OS paths.
Fixes #6568.
2016-03-23 13:47:49 -04:00
Ben Newman
15986e6aeb Additional packageName parsing logic for .npm/package/node_modules. 2016-03-22 18:13:25 -04:00
Ben Newman
b8a0340dc9 Fix findAppDir when running from a temp test directory. 2016-03-22 18:13:25 -04:00
Ben Newman
020f9163bb Revert "Always symlink/copy local node_modules into .meteor/local/build."
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.
2016-03-22 18:13:24 -04:00
Ben Newman
4c9ecc3c1f Revert watch.isUpToDate optimizations to fix #6556.
This reverts commit 7227f64ea8.
This reverts commit b4972af3a5.

Saving 400ms of rebuild time isn't worth sometimes having to restart the
app from scratch.
2016-03-22 14:17:20 -04:00
Martijn Walraven
0ff7d2b55c Pass-through options for App.accessRule
Closes #6554.
2016-03-22 16:47:12 +01:00
Maciej Trębacz
a133afb375 Get proper packageName in bundler.js. Fixes #6555 2016-03-22 14:41:36 +01:00
Ben Newman
13db0e89ef Nullify source maps if they have no mappings.
Fixes #6506.
2016-03-21 21:51:15 -04:00
Ben Newman
c12c4f455c Add salt to linker cache keys.
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.
2016-03-21 21:51:15 -04:00
Ben Newman
ba63cbd959 Make ImportScanner case-insensitive.
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.
2016-03-21 21:08:21 -04:00
Ben Newman
65f83bbce6 Allow plugins to import native Node modules.
Fixes #6549.
2016-03-21 19:54:06 -04:00
Ben Newman
5d7b14a82b Infer package name for plugin node_modules directories.
Part of #6549.
2016-03-21 19:54:06 -04:00
Ben Newman
67491a66dd Fix .npm/{package,plugin}/... parsing.
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.
2016-03-21 19:54:05 -04:00
Ben Newman
be871bf2ed Upgrade modules-runtime install package to v0.6.1.
Fixes #6543.
2016-03-20 13:44:10 -04:00
Ben Newman
5d4bc59a20 Fix source maps-related self-tests.
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.
2016-03-20 13:44:09 -04:00
Ben Newman
e901134004 Fix findAssignedGlobals self-test.
It turns out the test itself was wrong, and the new findAssignedGlobals
implementation does a better job than the old.
2016-03-20 11:41:45 -04:00