Commit Graph

119 Commits

Author SHA1 Message Date
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
ec34a4ecc6 Fix tests by making sure to close optimistic file watchers.
If a test process does not explicitly call process.exit, pathwatcher
watchers may keep it alive indefinitely (either that, or there's a bug
with the persistent:false option to fs.watchFile).

This accidental immortality can be prevented by explicitly closing all
watchers when we no longer have any interest in file change notifications.
2016-10-13 14:09:16 -04:00
Ben Newman
20a6604126 Remove pointless and exception-swallowing assert.doesNotThrow wrappers. 2016-09-29 08:51:57 -04:00
Ben Newman
f8ba1226b1 Rename test entry point module so that it isn't ignored. 2016-09-29 08:51:56 -04:00
Martijn Walraven
38236ddaa5 Make another self-test pass 2016-03-20 12:30:31 +01:00
Martijn Walraven
d54d681697 Make some more self tests pass 2016-03-17 21:20:12 +01:00
Tom Freudenberg
8a24a1b2ba Make Script More Portable With #!/usr/bin/env 2015-11-01 22:04:10 +01:00
Sashko Stubailo
0bb7c7c0b2 New addAssets package.js API; same file can be source and asset
1. Add `addAssets` API to `package.js`
2. Rename `getSourcesFunc` to `getFiles` in internal code
3. Changed `PackageAPI#sources` to `PackageAPI#files` with a new structure that
   has separate objects for assets and sources
4. Added some tests for different error conditions
5. The same file can now be a source and an asset
2015-09-02 13:14:02 -07:00
Slava Kim
3d2282d9ad fix imports for tests for tool-testing 2015-08-06 16:39:01 -07:00
Slava Kim
39d8aef3d9 move files into console/ tool-testing/ 2015-08-06 16:39:00 -07:00
Sashko Stubailo
a50095b2a6 Remove lots of mentions of meteor-platform in tests 2015-08-05 15:15:13 -07:00
Slava Kim
6b1bb038d8 Move files into tools/fs 2015-08-03 22:09:28 -07:00
Slava Kim
36b542f822 move files into tools/packaging 2015-08-03 16:03:15 -07:00
Slava Kim
5472331fc5 Move isopackets.js to tool-env
Because it is only used in tool to load packages, so it is sort of a
setup environment file.
2015-08-01 14:13:53 -07:00
Slava Kim
49a7088c30 Create a folder "tool-env"
Contains uninteresting setup and cleanup files
2015-07-31 18:38:25 -07:00
Slava Kim
3ddd281d8c Move catalog files into tools/catalog/ 2015-07-30 12:12:07 -07:00
David Glasser
2ccaf6a51e Move some files into isobuild subdirectory
The exact borderline between "Isobuild" and "the tool" is a little hazy,
but the idea is that "Isobuild" is the part that you could imagine being
embedded in a non-command-line build tool. It's not about commands or
UI, but just about building packages and apps.

A next step could be moving things that are strictly "the command-line
tool" into their own subdir, and leaving the top directory mostly just
for shared utilities like buildmessage.  (Which could even go in a utils
subdir?)
2015-07-16 15:12:36 -07:00
David Glasser
c8d4d0c722 Use our babel configuration in old tests
Now old tests pass again :)
2015-07-16 14:22:10 -07:00
David Glasser
0d1e51bf6f Fix bundler-options old test 2015-07-13 14:30:31 -07:00
David Glasser
830a5cb86a fix bundler-assets test 2015-07-13 13:56:59 -07:00
David Glasser
7cbdebf847 Fix minify option in cordova and old bundler tests
Rename 'mode' and 'minify' to 'minifyMode' consistently (including in
minifier plugin API).

Make minifyMode default to 'development' (fixes some other old bundler
tests).

This doesn't make bundler-assets pass but it gets farther along.
2015-07-13 13:45:22 -07:00
David Glasser
0ca6f72be4 WatchSet dirs list filenames that override exclude
This will be used to let extensions register for (eg) `.jshintrc` and
override the default "nothing starting with a dot counts".
2015-07-09 11:27:01 -07:00
Sashko Stubailo
312663db67 Transpile the Meteor command line tool with Babel
- Uses Ben's meteor-babel npm package that has a default config
- From a checkout, uses the meteor-babel/register module and compiles at runtime
- When meteor-tool is published, precompiles the files
- Adds tests to make sure source maps work everywhere
2015-06-23 14:32:49 -04:00
David Glasser
3a5893aea6 Fix a self-test 2015-04-14 21:56:29 -07:00
Slava Kim
9abdf1eef1 Fixes to old cli tests 2015-03-30 20:15:36 -07:00
Slava Kim
56e1e08292 Rewrite part of the old/cli-test.sh test to selftest 2015-03-30 16:35:32 -07:00
Avital Oliver
dd5dc01e81 Fix bundler-asset tests on Windows 2015-02-10 12:27:13 -08:00
Sashko Stubailo
2eaa848bcc Convert __dirname to standard path 2015-02-09 13:49:57 -08:00
David Glasser
30481e10bb Mongo 2.6 makes --nohttpinterface the default 2015-02-05 22:40:44 -08:00
David Glasser
bcf2b58946 avoid use of shell
use execFile's callback instead of an event
2015-02-05 20:39:06 -08:00
Slava Kim
8232db93dc Fix bugs introduced with includeNodeModules option change 2015-02-03 18:58:40 -08:00
Avital Oliver
d174d0d134 Fix two self-tests on Windows via files.convertToOSPath 2015-02-02 10:50:44 -08:00
Avital Oliver
67a7a1be50 Don't test symlinked bundled on Windows
(symlinks don't work on Windows)
2015-02-02 10:49:36 -08:00
Slava Kim
8cafda074c Reduce the generality of meteor-npm's execFileSync 2015-01-20 22:03:24 -08:00
David Glasser
6320acabc4 Merge branch 'master' into devel
Conflicts:
	History.md
	tools/safe-pathwatcher.js
	tools/tests/old.js
	tools/watch.js
2014-12-19 11:42:50 -08:00
David Glasser
0befea50f2 Delete versions.json files; they are no longer used 2014-12-19 11:34:07 -08:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
David Glasser
e7bfa5202e Update packages to use Package.registerBuildPlugin 2014-12-09 20:09:34 -08:00
David Glasser
f4e69b9e96 Fix test-bundler-assets some more 2014-11-25 09:06:31 -08:00
David Glasser
1a56f3c55d fix test-bundler-npm
remove one subtest that's been super flaky for ages
2014-11-25 09:06:30 -08:00
David Glasser
3e1621cdf6 fix bundler-assets 2014-11-25 09:06:28 -08:00
David Glasser
5622d3384e fix bundler-options 2014-11-25 09:06:28 -08:00
David Glasser
f0ff76a24b watch local package search dirs 2014-11-25 09:06:18 -08:00
David Glasser
438ddad7bc Remove catalog.complete from core code
It's still in unmigrated commands.

Remove tropohouse's catalog.  It was there to stop you from downloading
local packages but downloadPackagesMissingFromMap does that based on the
PackageMap now.
2014-11-25 09:06:16 -08:00
David Glasser
ee649d3bda Move isopack-compiler back to compiler 2014-11-25 09:06:15 -08:00
David Glasser
c3cd93c989 Get rid of a few random spots that refer to .build. 2014-11-25 09:06:08 -08:00
David Glasser
170c0acad7 Rename unibuild everywhere to isopackets 2014-11-07 16:45:58 -08:00
David Glasser
97f6a0236e get rid of catalog.uniload
There is no longer a uniload catalog when running from a release, since
the release contains whole isopackets (programs) not
isopacks (packages).

We only need a uniload-specific catalog when we're actually rebuilding
isopackets (not in order to load them), so we now have it as a local
variable in the two places that build isopackets.

The deleted code in package-loader.js was specific to the prebuilt
uniload package which no longer exists.
2014-11-07 16:45:58 -08:00