Commit Graph

6113 Commits

Author SHA1 Message Date
Ben Newman
24b0ea9fdd Bump compiler/linker/bundler salts to trigger fresh builds. 2016-11-14 21:18:03 -05:00
Ben Newman
e4c7b0890c Watch all imported files in linked npm packages on server. 2016-11-14 14:25:22 -05:00
Ben Newman
e3387599a2 Test lazy main modules and stray imports in modules test app. 2016-11-14 13:35:50 -05:00
Ben Newman
41713dacf7 Include meteor npm install in new app instructions.
Thanks to @ptica for this suggestion:
https://github.com/meteor/meteor/issues/8042#issuecomment-260277876
2016-11-14 12:51:00 -05:00
Ben Newman
2437f72cd7 Strip unnecessary imports for packages with no modules.
Note that even an empty package needs to define Package[name] = {}, so
that other packages can tell at runtime whether it's installed.

Fixes #7927.
2016-11-14 12:51:00 -05:00
Ben Newman
911f25bbf4 Allow lazy api.mainModule modules.
If you call api.mainModule(path, where, { lazy: true }), that main
module will not be evaluated until other code imports it at runtime, and
won't even be bundled if no other code imports it.

Closes #6132.
2016-11-14 12:51:00 -05:00
Ben Newman
8d1133743d Fix options.transformFilename behavior in files.cp_r.
The options.transformFilename function is only supposed to transform
target file names, not the names of source files to be copied.

This behavior was broken by c5809a4a1c
between Meteor 1.4.0.1 and 1.4.1. Thank goodness for `git bisect`!

The biggest symptom of this mistake was that `meteor create --package`
no longer created files based on the ~fs-name~.js and ~fs-name~-tests.js
template files.

This probably merits a 1.4.1.4 release in addition to 1.4.2.2.
2016-11-14 11:50:50 -05:00
Mehdi AHRAOUI
0466fdd37f Scaffold an official project structure
Scaffold an official project structure
Add --bare option to meteor create

Notice scaffold options on meteor create

add full skeleton

add spaces

remove shell-server package from skew-full + add description of new packages

Add --bare option to meteor create

Notice scaffold options on meteor create

add full skeleton

add spaces

remove shell-server package from skew-full + add description of new packages

improve PR

resolve conflict

Fix rebase

fix static-assets readme

Fix tipo

Remove insecure and auto publish packages

Remove useraccounts-configuration.js

add tests

fix PR
2016-11-11 11:00:33 -05:00
Ben Newman
61ada2d27b Update statOrNull method of cached Resolver objects.
This solves a problem that sometimes occurs when new modules are added
to an app but the cached Resolver object cannot find them because its
statOrNull method is still using a previous instance of the
corresponding ImportScanner.

Related issues and comments:

https://forums.meteor.com/t/meteor-not-detecting-new-files/31151
https://github.com/Akryum/meteor-vue-component/issues/80
https://github.com/meteor/meteor/pull/7975#issuecomment-259263650
https://github.com/meteor/meteor/issues/8008
2016-11-10 17:50:59 -05:00
Ben Newman
7abd832f75 Upgrade modules test app to Meteor 1.4.2.1. 2016-11-10 17:50:59 -05:00
Ben Newman
8f07a87bd5 Give package test modules access to Npm.depends dependencies.
Similar in spirit to bbac272530.

Fixes #7999.
2016-11-08 15:36:36 -05:00
Ben Newman
932115120f Don't let options.hash override File#hash() salting. 2016-11-08 14:08:08 -05:00
Ben Newman
4ada5c8a17 Bump LINKER_CACHE_SALT and compiler.BUILT_BY for good measure.
This will trigger recompilation and relinking, which should help prevent
various stale caching issues, e.g. #7977.
2016-11-08 13:50:32 -05:00
Ben Newman
940cc4f4d6 Add salt to File#hash in bundler.js.
This is what determines, among other things, source map URL names of the
form <hash>.map, so this may help to avoid #7977.
2016-11-08 13:48:54 -05:00
Ben Newman
a43d66991b Allow watch.sha1 to accept multiple arguments. 2016-11-08 13:48:23 -05:00
Ben Newman
a7ac32e00a Tolerate ENOENT errors in Builder#copyDirectory. 2016-11-08 13:33:20 -05:00
Ben Newman
ad460e0d7d Tolerate files.realpath throwing ELOOP exceptions. 2016-11-04 18:45:51 -04:00
Ben Newman
52697c7167 Cache getProdPackageNames optimistically. 2016-11-04 18:26:03 -04:00
Ben Newman
7f35e94713 Tolerate files.realpath throwing ENOENT exceptions. 2016-11-04 18:14:09 -04:00
Ben Newman
af51b8160c Use absolute paths for external symlinks in Builder#copyDirectory.
Thanks to @worldsayshi for reporting this issue with a reproduction.

Fixes #8005.
Fixes #2876.
Fixes #7154.
2016-11-04 17:44:42 -04:00
Ben Newman
57fe26161d Use Meteor.setTimeout to re-run tryInsert function. 2016-11-03 12:18:42 -04:00
Ben Newman
f290abc72e Another attempt to make "run --once" test more reliable. 2016-11-03 11:48:02 -04:00
Ben Newman
19fdc5c65f Make npm-rebuild.js more Windows-friendly.
Fixes #8007.
2016-11-03 10:25:55 -04:00
Ben Newman
acc98c7c15 Set NPM_CONFIG_PREFIX to dev_bundle by default. 2016-11-02 19:23:09 -04:00
Ben Newman
cfc167a67b Make test more reliable by calling insert in Meteor.startup. 2016-11-02 17:25:26 -04:00
Ben Newman
e345fc2d27 Separate failing part of "run --once" test into own test. 2016-11-02 17:07:50 -04:00
Ben Newman
476d6bf7b3 Attempt to fix "run --once" test by giving Mongo a chance to exit.
This test has been failing intermittently on Circle CI.
2016-11-02 16:25:37 -04:00
Ben Newman
31e7b8bb48 Clean up temporary package.json files. 2016-11-02 15:45:04 -04:00
Ben Newman
643a9f12da Move default npm deps install function into own module.
This extraction was necessary because importing tools/cli/commands.js is
not entirely side-effect-free, and was interfering with older tests.
2016-11-02 15:38:39 -04:00
Ben Newman
4bf69409fa Call installDefaultNpmDeps in old bundler-assets test. 2016-11-02 15:16:30 -04:00
Ben Newman
fd57b86125 Run npm install in test apps even if package.json exists. 2016-11-02 14:18:43 -04:00
Ben Newman
5f0ffc5217 Remove coffeescript version constraint in modules test app. 2016-11-02 14:18:42 -04:00
Ben Newman
a90011b885 Improve meteor shell self-test. 2016-11-02 14:18:42 -04:00
Ben Newman
5dc2eaa0f7 Add babel-runtime to test app package.json files. 2016-11-02 13:32:01 -04:00
Ben Newman
8bc4fe20c6 Cache .meteor-portable values temporarily in memory.
This is another way to fix the bug I previously fixed by passing
options.allowSyntaxError to optimisticReadJsonOrNull.

To reproduce the bug (and/or verify that it is fixed), run the following
commands in a terminal:

  rm -rf meteor/packages/npm-mongo/.npm
  meteor/meteor --get-ready

Before these two commits, optimisticReadJsonOrNull would throw a
SyntaxError when reading one of the .meteor-portable files because an
asynchronous write to the same file had not yet finished.
2016-11-02 13:15:57 -04:00
Ben Newman
909419b36e Optionally tolerate SyntaxError in optimisticReadJsonOrNull. 2016-11-02 13:04:09 -04:00
Ben Newman
6b6a71b073 Fix and improve app creation tests. 2016-11-02 12:47:01 -04:00
Ben Newman
270b5cc8ef Run meteor npm install as part of meteor create tests. 2016-11-02 12:05:33 -04:00
Ben Newman
6dcd8b78f2 Run installDefaultNpmDeps whenever creating self-test apps.
Some tests disable the --prepare-app step, but still need babel-runtime
to be installed.
2016-11-02 12:05:33 -04:00
Ben Newman
10f997ae0e Make --prepare-app install default npm deps to fix self-tests.
Tests were broken by the new dependency on the babel-runtime npm
package, but fortunately all those tests run `meteor --prepare-app`
whenever an app is created by a self-test, so this change should fix
most of the breakages.
2016-11-02 12:05:33 -04:00
Ben Newman
f0355276a5 Remove babel-runtime-specific logic from compiler-plugin.js. 2016-11-02 12:05:33 -04:00
Ben Newman
b3746d8879 Install basic npm dependencies when running test-packages.
At this point, the only dependencies installed in this way are
babel-runtime and meteor-node-stubs, but that set of packages will
expand in the future as we move more dependencies to npm.
2016-11-02 12:05:33 -04:00
Ben Newman
24489295f2 Add babel-runtime to the default new-app package.json file.
In light of issues like #7956, I would very much like for app developers
to be responsible for providing node_modules/babel-runtime, and for the
Meteor babel-runtime package to stop attempting to implement a subset of
the helpers.
2016-11-02 12:05:33 -04:00
Ben Newman
d8c0739a13 Make some matches in compiler-plugins.js test order-insensitive.
Also increased various timeouts to make tests more reliable.
2016-11-01 19:38:08 -04:00
Ben Newman
51819a6cb3 Implement Run#matchBeforeExit(pattern) for order-insensitive matching. 2016-11-01 18:23:35 -04:00
Ben Newman
dd012bf6e5 Tolerate " => awaited here:" in parseStackFrames.
da826064bc
2016-11-01 17:25:42 -04:00
Ben Newman
ca4baed90a Disable yielding for files.* operations unless explicitly un-disabled.
Set METEOR_DISABLE_FS_FIBERS=false to un-disable files.* fibers if you
suspect this commit has introduced a problematic difference in behavior.

cc @veered
2016-10-31 21:33:39 -04:00
Ben Newman
8fe91e22e7 Set METEOR_ALLOW_SUPERUSER if necessary when springboarding.
Part of #7959.
2016-10-31 13:57:27 -04:00
Jesse Rosenberger
74afdd5daf Don't pass --allow-superuser flags to a springboarded version of Meteor
By removing the `--allow-superuser` and `--unsafe-perm` arguments before springboarding, it prevents older versions of Meteor from objecting to its use.  Catching it at the highest level should be sufficient to discourage root usage as intended in meteor/meteor#7821

Intended to fix...  meteor/meteor#7959
2016-10-31 13:26:04 -04:00
Ben Newman
f5c61de2fa Fix watching of @scoped, linked npm packages.
https://github.com/meteor/meteor/issues/7978#issuecomment-257056243

Part of #7978.
2016-10-31 12:38:59 -04:00