From 0a9866ed76dc143ec00124bd4b817138c89bb850 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Wed, 25 Nov 2015 17:21:44 +1100 Subject: [PATCH] Added some documentation and history about git change. --- History.md | 2 ++ docs/client/data.js | 20 ++++++++++---------- tools/isobuild/package-source.js | 19 ++++++++++++++++--- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/History.md b/History.md index 8ed4303a3e..c1978d2cbf 100644 --- a/History.md +++ b/History.md @@ -10,6 +10,8 @@ * Move `DDPRateLimiter` to the server only, since it won't work if it is called from the client. It will now error if referenced from the client at all. +* Allow `git+` URL schemes for npm dependencies #844 + Patches contributed by GitHub users vereed, ... diff --git a/docs/client/data.js b/docs/client/data.js index e685cfb4ca..c4f12a7a41 100644 --- a/docs/client/data.js +++ b/docs/client/data.js @@ -12,7 +12,7 @@ DocsData = { "Accounts.addEmail": { "filepath": "accounts-password/password_server.js", "kind": "function", - "lineno": 847, + "lineno": 852, "locus": "Server", "longname": "Accounts.addEmail", "memberof": "Accounts", @@ -353,7 +353,7 @@ DocsData = { "Accounts.removeEmail": { "filepath": "accounts-password/password_server.js", "kind": "function", - "lineno": 930, + "lineno": 935, "locus": "Server", "longname": "Accounts.removeEmail", "memberof": "Accounts", @@ -427,7 +427,7 @@ DocsData = { "Accounts.sendEnrollmentEmail": { "filepath": "accounts-password/password_server.js", "kind": "function", - "lineno": 584, + "lineno": 589, "locus": "Server", "longname": "Accounts.sendEnrollmentEmail", "memberof": "Accounts", @@ -460,7 +460,7 @@ DocsData = { "Accounts.sendResetPasswordEmail": { "filepath": "accounts-password/password_server.js", "kind": "function", - "lineno": 519, + "lineno": 524, "locus": "Server", "longname": "Accounts.sendResetPasswordEmail", "memberof": "Accounts", @@ -493,7 +493,7 @@ DocsData = { "Accounts.sendVerificationEmail": { "filepath": "accounts-password/password_server.js", "kind": "function", - "lineno": 723, + "lineno": 728, "locus": "Server", "longname": "Accounts.sendVerificationEmail", "memberof": "Accounts", @@ -5207,7 +5207,7 @@ DocsData = { "optional": true, "type": { "names": [ - "Any" + "EJSONable" ] } }, @@ -5659,7 +5659,7 @@ DocsData = { "Mongo.Collection#insert": { "filepath": "mongo/collection.js", "kind": "function", - "lineno": 426, + "lineno": 429, "locus": "Anywhere", "longname": "Mongo.Collection#insert", "memberof": "Mongo.Collection", @@ -5718,7 +5718,7 @@ DocsData = { "Mongo.Collection#remove": { "filepath": "mongo/collection.js", "kind": "function", - "lineno": 568, + "lineno": 571, "locus": "Anywhere", "longname": "Mongo.Collection#remove", "memberof": "Mongo.Collection", @@ -5751,7 +5751,7 @@ DocsData = { "Mongo.Collection#update": { "filepath": "mongo/collection.js", "kind": "function", - "lineno": 507, + "lineno": 510, "locus": "Anywhere", "longname": "Mongo.Collection#update", "memberof": "Mongo.Collection", @@ -6088,7 +6088,7 @@ DocsData = { "options": [], "params": [ { - "description": "

An object where the keys are package\nnames and the values are version numbers in string form or URLs to a\ngit commit by SHA. You can only depend on exact versions of NPM\npackages. Example:

\n
Npm.depends({\n  moment: "2.8.3",\n  async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz"\n});
", + "description": "

An object where the keys are package\nnames and the values are one of:

\n
    \n
  1. Version numbers in string form
  2. \n
  3. Http(s) URLs to a git commit by SHA.
  4. \n
  5. Git URLs in the format described here
  6. \n
  7. Absolute file:// paths
  8. \n
\n

Https URL example:

\n
Npm.depends({\n  moment: "2.8.3",\n  async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz"\n});

Git URL example:

\n
Npm.depends({\n  moment: "2.8.3",\n  async: "git+https://github.com/caolan/async#master"\n});
", "name": "dependencies", "type": { "names": [ diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index bc6821d7d0..d83422a53b 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -827,9 +827,13 @@ _.extend(PackageSource.prototype, { * @summary Specify which [NPM](https://www.npmjs.org/) packages * your Meteor package depends on. * @param {Object} dependencies An object where the keys are package - * names and the values are version numbers in string form or URLs to a - * git commit by SHA. You can only depend on exact versions of NPM - * packages. Example: + * names and the values are one of: + * 1. Version numbers in string form + * 2. Http(s) URLs to a git commit by SHA. + * 3. Git URLs in the format described [here](https://docs.npmjs.com/files/package.json#git-urls-as-dependencies) + * 4. Absolute file:// paths + * + * Https URL example: * * ```js * Npm.depends({ @@ -837,6 +841,15 @@ _.extend(PackageSource.prototype, { * async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz" * }); * ``` + * + * Git URL example: + * + * ```js + * Npm.depends({ + * moment: "2.8.3", + * async: "git+https://github.com/caolan/async#master" + * }); + * ``` * @locus package.js * @memberOf Npm */