Commit Graph

156 Commits

Author SHA1 Message Date
David Glasser
94c7833c82 Delete unused JSAnalyze.findGlobalDottedRefs.
Because it is currently unused and was the only direct use of the 'estraverse'
module, it seems better to minimize the number of dependencies shipped with
Meteor. Admittedly, estraverse is still a dependency of escope, but if we
upgrade escope to a version that has a more specific version requirement for
estraverse that conflicts with our Npm.depends, we'll be shipping two copies for
no reason.
2013-10-04 09:46:48 -07:00
David Glasser
d1cf1bd2e3 Make sure all packages rebuild.
This isn't quite enough to rebuild NPM packages but it's a start.
2013-09-24 17:13:37 -07:00
Maxime Quandalle
259fb036c8 Fix syntax 2013-09-12 14:29:50 -07:00
Maxime Quandalle
c66b8e3db5 Style tweaks 2013-09-12 14:29:50 -07:00
Maxime Quandalle
d4186524b8 Support multiple extensions in _getSourceHandler 2013-09-12 14:29:50 -07:00
David Glasser
3665b31a82 Remove backwards-compatibility implementation of pre-0.6.5
Package.register_extension API.

It didn't even actually work for producing JavaScript files (eg a
coffeescript-like package): see #1410. Package maintainers should have upgraded
to the more powerful 0.6.5 API by now anyway.
2013-09-12 13:55:15 -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
c3d1f7bbd2 Don't fail if stylus or less files are in a non-client-specific place.
Make the plugin's arch check less sketchy.

Improve less and stylus error handling.
2013-08-02 15:16:53 -07:00
David Glasser
af5efd2996 Better error (with watching!) for missing source files. 2013-08-02 11:18:31 -07:00
David Glasser
392daa0a99 Detect symlink cycles in app dirs. 2013-08-02 10:59:41 -07:00
David Glasser
e483721602 Remember the library resolution of packages used by the plugin program itself. 2013-08-01 12:41:49 -07:00
David Glasser
8de4b48d61 document and rename pluginProviderPackageDirs 2013-08-01 12:17:58 -07:00
David Glasser
2c33d54e5e BUILT_BY bump 2013-08-01 12:17:58 -07:00
David Glasser
17699eb399 Rebuild a package when its dependencies resolve to a different path.
Also simplify a bunch of library code that thought it might have to rebuild
warehouse packages, now that the warehouse contains unipackages.
2013-08-01 12:17:58 -07:00
David Glasser
ecd94142c8 Save to buildinfo the library resolution of all "use"d package.
We call these the pluginProviderPackages because these are the packages that, if
they change, could affect the set of plugins available to this package (and thus
require it to be rebuilt).
2013-08-01 12:17:58 -07:00
David Glasser
8aa63bcb3a Cleanups for PR 1263:
- Display proper caller location (requires extending useMyCaller to take a
  number)

- Recover by only returning valid 'where's so we don't crash later.
2013-08-01 00:29:14 -07:00
Andrew Mao
940a8f3250 added some checks for the where argument 2013-08-01 00:15:41 -07:00
David Glasser
f276b34148 comment about updating BUILT_BY when js-analyze changes 2013-07-31 23:50:31 -07:00
David Glasser
1d45b0bfa8 update comments 2013-07-31 23:26:51 -07:00
David Glasser
625d98768f fix comment 2013-07-31 23:17:52 -07:00
David Glasser
974de6bac3 Update BUILT_BY so everything gets rebuilt. 2013-07-31 22:59:46 -07:00
David Glasser
fac5e219fd Don't put the old pluginWatchSet onto a Package until we know we're using the
unipackage.
2013-07-31 22:56:58 -07:00
David Glasser
1a5d695ee4 fix minor bugs. bundler-test passes! 2013-07-31 22:56:57 -07:00
David Glasser
1b82376b4b in theory, this might work 2013-07-31 22:56:57 -07:00
David Glasser
f84fc21e8f checkpoint for initFromAppDir rewrite 2013-07-31 22:56:38 -07:00
David Glasser
ea22b3ab02 Checkpoint for actually using WatchSets.
Have not yet touched initFromAppDir.
2013-07-31 22:56:38 -07:00
David Glasser
3f5edbfae9 remove dead builder.copyDirectory({depend:true}) code 2013-07-31 22:56:38 -07:00
David Glasser
097b261518 Don't need to merge pluginDependencies into sliceDependencies for checkUpToDate.
In fact, each slice's dependencies already contains pluginDependencies (see
after the linker.prelink call in Slice.build, and recall that a package's
plugins are always active in itself).
2013-07-30 22:49:57 -07:00
David Glasser
c11a791eb2 Remove overzealous ||{}. 2013-07-30 19:48:34 -07:00
David Glasser
2a750e64de build-package-tarballs chooses version based on buildinfo.json. 2013-07-30 15:32:06 -07:00
David Glasser
98db63dd1b Don't lose pluginDependencyInfo when round-tripping through unipackages.
Now, modifying the source of a plugin (or anything that affects it) will
recompile all packages that depend on it.
2013-07-30 14:44:30 -07:00
David Glasser
a86a00b119 Error if you try to save an unbuilt package as a unipackage. 2013-07-30 14:31:08 -07:00
David Glasser
3ce09d8371 Factor out dependencyInfo RegExp/string toggling. 2013-07-30 14:24:32 -07:00
David Glasser
36492a23ac Serialize dependency info by slice.
This makes saveAsUnipackage -> initFromUnipackage less lossy. Also means that,
eg, plugins don't end up dependent on tests in packages they use.

Use of the json file path as the key in sliceDependencies is kind of hacky, but
I'm viewing buildinfo.json as less of a standardized format as unipackage.json.
2013-07-30 13:55:55 -07:00
David Glasser
9b24174e08 Changing package/foo/package.js rebuilds all packages that use 'foo'.
That's because this change could introduce or remove a plugin, which affects how
the dependent package is built (eg, could change an extension between being
handled vs static).

Does not affect transitive dependencies.
2013-07-30 11:16:44 -07:00
David Glasser
fbfd21c07b Comment updates. 2013-07-30 01:00:01 -07:00
David Glasser
1202b781ef Rename 'native' to 'os', in arch names.
Requires a BUILT_BY bump, unless you really want to fail to load your plugins
and crash.
2013-07-29 15:39:50 -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
691bd63f9c Include handlebars and random in the standard app packages list. 2013-07-25 18:54:43 -07:00
David Glasser
3a7eac6dca Declare _FooTest symbols as testOnly; they are only visible to tests.
They are visible to *all* tests, not just the package's own tests.
2013-07-25 18:54:42 -07:00
David Glasser
e4c568b1e1 Merge exports list with package variables in slice JSON.
This implies that all exports are package variables, which made underscore,
jquery, and htmljs (which explicitly assigned to fields on the global variable)
break. We now properly encapsulate these packages (except for window.jQuery,
which we let sneak out because bootstrap wants it).  This means that packages
that want _ need to use underscore, and packages that want $ need to use jquery.
Also, you can't use _ in minimongo $where any more (matching mongod).
2013-07-25 18:54:42 -07:00
David Glasser
db51a3a14c Eliminate the "past" package.
This package was always included in apps, and even if it was possible to remove,
there wasn't a compelling story about when users would remove and replace
it. Plus, not all backwards-compatibility code could even live in it (eg, field
names of objects), so it was incomplete. It also introduced odd load order
constraints.

Instead, we introduce two conventions for backwards-compatibility code:

  - Special comments of the form "// XXX COMPAT WITH 0.6.4"
  - When feasible, put backwards-compatibility code in a file called
    "deprecated.js" in the relevant package.

This is documented at:
https://github.com/meteor/meteor/wiki/Meteor-Style-Guide#deprecated-code-and-backwards-compatibility

Additionally, removed some symbols that existed for backwards compatibility with
Meteor 0.4.0 (changes made 10 months ago): Meteor.is_client, Meteor.is_server,
and (in a method) this.is_simulation.
2013-07-25 18:54:42 -07:00
David Glasser
95c8384e3b Get rid of linkerFileTransform. 2013-07-25 18:54:41 -07:00
David Glasser
060151dd81 test-packages now has no immediate server-side errors (client-side, sure)
eliminate accounts-urls package
2013-07-25 18:54:40 -07:00
David Glasser
75cad725e2 first stab at dropping the @export comment parser 2013-07-25 18:54:40 -07:00
David Glasser
9f38258b54 Drop all @export lines. Add api.exportSymbol instead. 2013-07-25 18:54:40 -07:00
David Glasser
25a3afff54 - drop where from all on_use/on_test (it is no longer being passed in)
- allow `api.use(package, {options})` without where
- fix showdown to use a weak dependency
2013-07-25 18:54:40 -07:00
Geoff Schmidt
3d1c09794f Comprehensive namespace cleanup. 2013-07-25 18:54:40 -07:00
David Glasser
d5ed4fd878 Don't try to read empty files.
Fixes #1237.
2013-07-22 16:58:44 -07:00