Commit Graph

6621 Commits

Author SHA1 Message Date
Ben Newman
eec8a1f8e9 Merge branch 'devel' into release-1.6 2017-09-18 17:25:11 -04:00
Ben Newman
e59e0a582a Convert \s to /s in Npm.require'd module identifiers.
This is another way of addressing the problem I attempted to fix with
f34c5ec926 earlier today.

Apparently, older versions of compiler plugin-registering packages such as
standard-minifier-css and templating-compiler still depend on older
versions of the meteor package, which may still use path.join to import
fibers/future. This can be fixed by republishing those packages, as I did
in 917b01ac5f, but I'd prefer not to
republish every compiler plugin package.

Fortunately, we can also solve the problem by being more tolerant in the
implementation of Npm.require, which is what this commit does.
2017-09-18 16:54:23 -04:00
Ben Newman
c7612c18e7 Merge branch 'devel' into release-1.6 2017-09-18 14:27:11 -04:00
Ben Newman
565e6904d7 Avoid using meteor/tools/node_modules symlink (missing on Windows). 2017-09-18 14:22:41 -04:00
Ben Newman
7ebf9b3497 Merge branch 'devel' into release-1.6 2017-09-18 12:45:34 -04:00
Ben Newman
7cbb2bb579 Tolerate : or _ in dynamic version identifiers, and add tests.
Follow-up to #9103.
2017-09-18 12:34:47 -04:00
Ben Newman
971d2b1272 Standardize Npm.require exceptions and limit lookup paths. (#9095)
Ever since Meteor 1.3 first introduced a module system based on something
other than `Npm.require`, we've continued throwing missing module
exceptions that refer to `Npm.depends` and/or `Npm.require`, even if the
developer called `require` or used an `import` declaration. This commit
fixes that, so that all missing module exceptions look like 'Cannot find
module "module/name"'.

I also noticed recently that `Npm.require` is capable of returning modules
installed in `node_modules` directories completely outside the app, which
is bad news for development/production reproducibility. Fixed that too.

CC @hwillson who has spoken of deprecating `Npm.require` entirely, and
just using `require` everywhere, instead.
2017-09-18 11:39:45 -04:00
Ben Newman
34f49fa519 Upgrade babel-runtime dependency of a few more test apps. 2017-09-15 17:11:37 -04:00
Ben Newman
3e426ffde3 Upgrade babel-runtime dependency of dynamic-import test app. 2017-09-14 18:20:00 -04:00
Ben Newman
f90bc3f29e Upgrade babel-runtime dependency of modules test app. 2017-09-14 18:20:00 -04:00
Ben Newman
2b8199c76b Upgrade babel-compiler and ecmascript to Babel 7.
Specifically, as of this commit, Babel 7.0.0-beta.0.
2017-09-14 18:20:00 -04:00
Ben Newman
0d26adfee5 Merge branch 'devel' into release-1.6 2017-09-13 12:27:45 -04:00
Christian Klaussner
c5960a6509 Add shell-server package to scaffold app skeleton (#9085) 2017-09-13 11:50:48 -04:00
Ben Newman
e94349937e Update dynamic-import test app to Meteor 1.5.2. 2017-09-11 15:32:39 -04:00
Ben Newman
d6666c96f5 Update modules test app to Meteor 1.5.2. 2017-09-11 15:27:25 -04:00
Ben Newman
31fa502148 Enable transform-do-expressions in production for modules test app. 2017-09-11 15:24:47 -04:00
Ben Newman
08eb1f28a9 Merge branch 'devel' into release-1.6 2017-09-06 12:18:49 -04:00
Ben Newman
0d7ce023e0 Merge pull request #8702 from vlasky/devel
Support for UNIX sockets (#7392)
2017-09-06 11:11:51 -04:00
Hugh Willson
050688d81b Merge branch 'devel' into devel 2017-08-23 11:03:10 -04:00
Ben Newman
dd5d7e2786 Merge branch 'release-1.5.2' into release-1.6 2017-08-22 22:04:03 -04:00
Ben Newman
754b0c5abc Merge branch 'devel' into release-1.5.2 2017-08-22 20:55:33 -04:00
Ben Newman
67b76abc78 Make node-gyp look for headers in dev_bundle/include/node.
Thanks to @abernix for identifying this solution to the duplication
between dev_bundle/include/node and dev_bundle/.node-gyp/*/node.
2017-08-22 16:41:01 -04:00
Jesse Rosenberger
20c5036541 Fix auto-install of cordova-lib during meteor build.
As a follow-up to meteor/meteor#8976, this properly installs
the `cordova-lib` package when during a `meteor build`.

Addresses: https://github.com/meteor/meteor/pull/8728#issuecomment-323493331,
as reported by @markoshust.
2017-08-22 23:06:22 +03:00
Hugh Willson
e027a46d71 Add missing CLI help for test/test-packages --driver-package (#9035) 2017-08-22 15:57:43 -04:00
Ben Newman
00ff851352 Avoid calling files.statOrNull(absPath) in readAndWatchFileWithHash.
This is performance-sensitive code, and I think this extra (uncached) call
to files.statOrNull could be contributing to test timeouts on Circle CI.

Follow-up to #9030.
2017-08-22 13:40:19 -04:00
Hugh Willson
b498c41401 Avoid creating a watcher when --settings is set to a directory (#9030)
As outlined in #3854, if `meteor --settings` points to a
directory instead of a file, an application gets caught up
in an infinite rebuild loop. Since it was assumed only a
file would be configured via `--settings`, a file watcher
is created for the specified directory, and that watcher
is then triggered ad infinitum.

These changes prevent a file watcher from being created
on a `--settings` directory.
2017-08-21 16:25:15 -04:00
Hugh Willson
cc5525f9a8 Use UNIX_SOCKET_PATH instead of PORT for socket files. 2017-08-18 08:44:34 -04:00
Ben Newman
6804aedc6c Merge branch 'release-1.5.2' into release-1.6 2017-08-17 10:19:46 -04:00
Ben Newman
d2213f0288 Merge branch 'devel' into release-1.5.2 2017-08-17 10:08:20 -04:00
Jesse Rosenberger
d86b0c712e Be more considerate of interactive environments and expired tokens. (#9015)
If a login token is expired, or no longer valid, make sure that Meteor doesn't
just sit there at a login prompt that the user can't see.

This currently only applies if `headless` mode is enabled, though a follow-up
to this commit might consider setting `headless = true` automatically
in a CI environment using environment variables such as: `CI`, `TRAVIS`,
`JENKINS_URL`, etc., as the npm-registry-client does in a similar way.

See: https://github.com/npm/npm-registry-client/pull/129/files

Fixes #8839.
2017-08-16 11:21:53 -04:00
Jesse Rosenberger
5626ad7dee JUnit support for meteor self-test test runner. (#9014) 2017-08-16 11:21:07 -04:00
Jesse Rosenberger
fe9401a5ef Observe requirements for running .cmd scripts on Windows.
The `child_process` documentation indicates that .cmd scripts (such as
the `npm.cmd` script for npm) must be started within a shell, such as
cmd.exe.

While it was tempting to switch this to use `child_process`'s `spawn`,
which supports a `shell` option, it would have required us to buffer
our own stdout/stderr output via `data` event handlers.

Ref: https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows
2017-08-16 00:59:07 +03:00
Jesse Rosenberger
f68de59464 Stop setting NPM_CONFIG_PREFIX in getEnv.
This was causing problems with `npm@5`, but realistically it may not be
be necessary anymore since `npm@5` has a much smarter global,
self-healing `cacache`.
2017-08-15 14:16:53 -07:00
Ben Newman
f53288efb7 Merge branch 'release-1.5.2' into release-1.6 2017-08-14 22:37:58 -04:00
Lee Pender
092c0af3dc Add sizes necessary for legacy iOs icon support. (#9012) 2017-08-14 11:31:26 -04:00
Ben Newman
3bdc0bb4eb Move standard-minifiers self-test timeout *after* slow run.match. 2017-08-11 19:36:32 -04:00
Ben Newman
a7e8e27ca7 Move standard-minifiers self-test timeout *after* slow run.match. 2017-08-11 19:36:01 -04:00
Jesse Rosenberger
073fb0c1fd Remove duplicated import of ../tool-env/install-runtime.js.
From the d16552112e merge of `release-1.5.2`.
2017-08-11 22:53:32 +03:00
Ben Newman
0b9ea6e2c5 Merge branch 'release-1.5.2' into release-1.6 2017-08-11 15:52:26 -04:00
Ben Newman
0e723593a6 Merge branch 'devel' into release-1.5.2 2017-08-11 15:23:39 -04:00
Ben Newman
93d0c5f2ba Merge pull request #9007 from meteor/immediately-dirty-optimistic-functions
Immediately dirty optimistic functions when relevant paths modified.
2017-08-11 15:22:49 -04:00
Ben Newman
4dfa9c3ae2 Add METEOR_WATCH_PRIORITIZE_CHANGED=false back to two self-tests. 2017-08-11 15:21:50 -04:00
Ben Newman
837f12c3c4 Add additional timeouts to 'update during run' self-test. 2017-08-11 15:21:50 -04:00
Ben Newman
56aea02723 Stop setting METEOR_WATCH_PRIORITIZE_CHANGED=false in self-tests.
Assuming #9007 fixes the file watcher timing problems, it should no longer
be necessary to disable the optimizations of #8866.
2017-08-11 15:21:50 -04:00
Jesse Rosenberger
5c011253f7 Change "expected" for meteor list command-line test.
This test doesn't actually run normally, as it's quite slow, but
started failing with the changes to #8936.  This fixes that!
2017-08-11 21:17:41 +03:00
Ben Newman
0f9c58d6b9 Immediately dirty optimistic functions when relevant paths modified.
Should fix #8988 and #8942.

Now that #8866 is the default behavior, it can take up to 5000ms for
changes to files modified during the build process to be noticed.

Before #8866, when we called e.g. files.writeFile(path), a native file
watcher would notice the change immediately, almost always before the
build process read the file again. This was definitely racy, but we were
getting away with it consistently... until #8866.

I was able to reproduce the problem in #8988 by running

  echo some-local-package-name >> .meteor/packages

in an app with a local package of the given name. After debugging the
endless rebuild cycle, I found that .meteor/versions was being rewritten
by files.writeFile during the build process, but the file watching system
was not noticing the change in time to prevent watch.isUpToDate from
returning true. The change was finally detected when restarting the
Watcher responsible for .meteor/versions, which of course triggered
another rebuild, so the same problem kept happening again and again.
2017-08-11 13:57:16 -04:00
Ben Newman
d16552112e Merge branch 'release-1.5.2' into release-1.6 2017-08-10 16:16:03 -04:00
Ben Newman
8d9fd49d02 Use urlParse instead of url.parse in meteor-services/config.js.
Looks like this was a neglected find/replace that should've happened in
10e8d7d08d (cc @abernix).
2017-08-10 15:16:56 -04:00
Ben Newman
e1b60a661e Use urlParse instead of url.parse in meteor-services/config.js.
Looks like this was a neglected find/replace that should've happened in
10e8d7d08d (cc @abernix).
2017-08-10 15:14:52 -04:00
Ben Newman
083b184bf6 Merge branch 'devel' into release-1.5.2 2017-08-10 15:01:44 -04:00