Commit Graph

39 Commits

Author SHA1 Message Date
Nick Martin
4329071334 use a non-default port in tests so we don't fail if someone is running an app at the same time. 2013-10-16 14:59:38 -07:00
David Glasser
fa4509f81b Use npm install --force to get around NPM cache corruption bug.
(This caused test_bundler_npm to fail sporadically with Node 0.8.)
2013-09-24 17:13:37 -07:00
David Glasser
dba5933651 Change package/slice separator in various places to colon from dot.
Allow dots in package names.

Change the internal representation of "package specs" inside Slice to be a
{package,slice} object instead of a "spec" string.

library.getSlices now can take EITHER a "spec" string or a {package,slice}
object.

Linker-created slice files also separate the slice name with a colon (so eg, you
get URLs like "/packages/livedata:tests.js" when running package tests).  (Maybe
this should use a subdirectory instead?)
2013-08-12 18:05:34 -07:00
David Glasser
ad5b20990e get watch-test to pass 2013-07-31 22:56:38 -07:00
David Glasser
4e222d8e26 The standard app packages are brought in explicitly now.
.meteor/packages in new apps now contains "standard-app-packages", which implies
the standard set of packages like mongo-livedata. There is no special-casing in
initFromAppDir.  This line has been added to all the examples, etc.

There's a new concept of "upgraders".  "meteor run-upgrader app-packages" will
add standard-app-packages to the app, as well as all of the package in the app's
packages/ directory (an unrelated change since 0.6.4). This will be integrated
soon with "meteor update"; run-upgrader is essentially for testing.

project.add_package no longer adds packages that are already there.
2013-07-26 19:02:12 -07:00
David Glasser
4b3cb9d305 Rename api.exportSymbol -> api.export. 2013-07-25 18:54:43 -07:00
David Glasser
9f38258b54 Drop all @export lines. Add api.exportSymbol instead. 2013-07-25 18:54:40 -07:00
David Glasser
9538bec685 Replace "asset directory" concept with manifest of assets.
We were partway here already: the client served assets from the manifest instead
of from a static directory (since 5b8e1c1), and we already generated the list of
assets in the slice JSON file. But on the server, we ignored that list and
re-walked the asset directory at bundle time.

Now, the idea of asset directory is solely a part of initFromAppDir.

This also fixes a bug where assets that weren't associated with on-disk files
wouldn't work properly if Asset.get* is called in a package loaded with
unipackage.load. Not really sure how dev-bundle-fetcher even worked...

Also fixes a bug in builder where generated filenames didn't actually avoid
duplicate files.

This does not bump BUILT_BY because the previous commit did, and this commit
will not be pushed without the previous commit.
2013-07-17 00:01:06 -07:00
David Glasser
869bc23c25 Rename "static" directory to "assets". 2013-07-17 00:01:05 -07:00
David Glasser
b0b8b08b2f Make bundler-test pass in the source maps world. 2013-07-12 13:29:08 -07:00
David Glasser
7456124102 Node stack traces are now rewritten based on (slightly wrong) source maps.
Also, assume that the program.json given to boot.js is relative to CWD, not
source file.
2013-07-12 10:11:29 -07:00
Naomi Seyfer
18384d197c rename some things having to do with url path prefixes 2013-07-09 11:21:54 -07:00
David Glasser
1f2a770117 Display stdout and stderr in a test that had been failing (but mysteriously stopped failing) 2013-06-28 16:32:27 -07:00
Emily Stark
7a0c3b7ad8 Include files with no extension handlers as server assets.
Also some miscellaneous test cleanup.
2013-06-18 17:58:06 -07:00
Emily Stark
3ca046729a Make Assets API usable from unipackage; use it for dev-bundle-fetcher.
This involves saving the source directory (not just the bundle location) for
static assets so that they can be loaded when unipackages are run.
2013-06-18 13:55:28 -07:00
David Glasser
ea82e7c4b4 Move PACKAGE/.npm/ to PACKAGE/.npm/package/
This is to isolate the NPM dependencies of the package at runtime from the NPM
dependencies of any build-time plugins in the package, which live in
PACKAGE/.npm/plugin/foo.

Before, plugins could see the node modules at PACKAGE/.npm/node_modules, which
was not isolated enough.

(One issue would be that if you happened to switch a package from having runtime
dependencies to having buildtime dependencies, the buildtime dependencies would
not get installed. This is partially an issue because we don't know to uninstall
all dependencies if they are all removed, but even if that is fixed it would
enforce an unnecessary ordering semantics on NPM updates.)
2013-06-14 11:12:31 -07:00
David Glasser
42e015d2c0 Remove extra log from assets test 2013-06-14 11:12:30 -07:00
estark37
b50a1bf12f Add server static assets and an API for retrieving them.
Server assets can be included in a bundle by putting them in the private/
directory of an application, or by registering a build plugin that calls
compileStep.addAsset with a server file. The Assets API (Assets.getText and
Assets.getBinary) allows an application or package to retrieve the contents of
its own server assets.
2013-06-13 22:53:25 -07:00
Naomi Seyfer
0ccba277cf oops accidentally delted half a line or something 2013-06-13 18:28:04 -07:00
Naomi Seyfer
6eeec29398 fix tests that rely on structure of bundled html generated 2013-06-13 18:05:05 -07:00
David Glasser
2aec63463b fix bundler tests 2013-05-21 18:03:41 -07:00
Emily Stark
75d9f04c5d Add test for bundling apps with public/ directories 2013-05-21 11:10:15 -07:00
David Glasser
957729c8ce Get run-tools-tests.sh passing.
In addition to minor "make the tests match the code" changes, there's also:

 - missing require('tar') in tarball download code
 - fix an fd leak in the bundler that was causing EMFILE on mac
 - switch run.js to listening for 'exit' to 'close' so that the end
   of stdout/err can be read
 - some concerningly necessary deletions of .build directories

Also, the version of cli-test.sh that runs against a fixed release is disabled,
since we're not building releases with the new package format for now.
2013-05-17 18:19:20 -07:00
Geoff Schmidt
cb064eca31 Rewrite bundler and redesign bundle format to support multiple targets. When doing Npm.require on the server, don't infer the node_modules path from the path to the file; read that information out of bundle metadata. 2013-05-13 11:51:52 -07:00
Geoff Schmidt
78a31231cd rename Library.flush -> Library.refresh because the old name was confusing 2013-05-13 11:51:52 -07:00
Geoff Schmidt
24682fd7f4 New Watcher implementation (for watching for changed files and determining when to rebundle the app.) Unlike the old DependencyWatcher, it uses absolute paths and contains no Meteor-specific knowledge. Also unlike the old DependencyWatcher, it has comprehensive unit tests (scripts/watch-test.sh). 2013-05-13 11:51:52 -07:00
Geoff Schmidt
7477cd48fd Unbreak bundler tests 2013-05-13 11:51:52 -07:00
Geoff Schmidt
1266e5278e Don't write bundle dependencies (files to monitor) to disk. Just plumb them through in memory from the bundler to the runner. 2013-05-13 11:51:52 -07:00
Geoff Schmidt
43c29fbd0b move Library into its own file 2013-05-13 11:51:51 -07:00
Geoff Schmidt
562490b776 bundler takes a library 2013-05-13 11:51:51 -07:00
Avital Oliver
4284a5ed1d fix npm tests 2013-05-10 15:00:29 -07:00
Nick Martin
dc887a40c8 Update tools tests for stream -> livedata package merging 2013-04-15 14:12:56 -07:00
David Glasser
817597eb01 Comment updates. 2013-04-04 00:26:17 -07:00
David Glasser
37e518c115 don't shrinkwrap-install things that we're about to (un/re)-install 2013-03-21 15:16:47 -07:00
David Glasser
d714d1f792 support github tarballs as dependencies 2013-03-21 01:14:06 -07:00
David Glasser
9fbe8e1599 change noMinify bundler option to minify 2013-03-20 17:56:04 -07:00
David Glasser
b1b707546d Copy test-runner-app to a temporary directory.
This allows multiple test-packages commands to run in parallel.

We make a best-effort attempt to clean them up on exit.
2013-03-19 22:34:44 -07:00
David Glasser
623ad4ae5f change "release" to "releaseStamp" in bundler options 2013-03-19 19:36:10 -07:00
David Glasser
8a79edb43b "tools" -> "scripts", "engine" -> "tools" 2013-03-19 18:19:31 -07:00