Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F21417993 for ; Tue, 30 Sep 2014 07:45:51 +0000 (UTC) Received: (qmail 14035 invoked by uid 500); 30 Sep 2014 07:45:50 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 13998 invoked by uid 500); 30 Sep 2014 07:45:50 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 13249 invoked by uid 99); 30 Sep 2014 07:45:49 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2014 07:45:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8385EA03617; Tue, 30 Sep 2014 07:45:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: sgrebnov@apache.org To: commits@cordova.apache.org Date: Tue, 30 Sep 2014 07:46:23 -0000 Message-Id: In-Reply-To: <961d6d08bf9946c39668472b47e26081@git.apache.org> References: <961d6d08bf9946c39668472b47e26081@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [37/38] CB-7666 Merge node_modules and move to package root http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/52c99052/bin/node_modules/nopt/test/basic.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/nopt/test/basic.js b/bin/node_modules/nopt/test/basic.js deleted file mode 100644 index 2f9088c..0000000 --- a/bin/node_modules/nopt/test/basic.js +++ /dev/null @@ -1,251 +0,0 @@ -var nopt = require("../") - , test = require('tap').test - - -test("passing a string results in a string", function (t) { - var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) - t.same(parsed.key, "myvalue") - t.end() -}) - -// https://github.com/npm/nopt/issues/31 -test("Empty String results in empty string, not true", function (t) { - var parsed = nopt({ empty: String }, {}, ["--empty"], 0) - t.same(parsed.empty, "") - t.end() -}) - -test("~ path is resolved to $HOME", function (t) { - var path = require("path") - if (!process.env.HOME) process.env.HOME = "/tmp" - var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) - t.same(parsed.key, path.resolve(process.env.HOME, "val")) - t.end() -}) - -// https://github.com/npm/nopt/issues/24 -test("Unknown options are not parsed as numbers", function (t) { - var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) - t.equal(parsed['leave-as-is'], '1.20') - t.equal(parsed['parse-me'], 1.2) - t.end() -}); - -test("other tests", function (t) { - - var util = require("util") - , Stream = require("stream") - , path = require("path") - , url = require("url") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } - - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - , path: path - } - - ; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know=the-rules --and=so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, '100']} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate=2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ,["-cl 1" - ,{config: true, length: 1} - ,[] - ,{config: Boolean, length: Number, clear: Boolean} - ,{c: "--config", l: "--length"}] - ,["--acount bla" - ,{"acount":true} - ,["bla"] - ,{account: Boolean, credentials: Boolean, options: String} - ,{a:"--account", c:"--credentials",o:"--options"}] - ,["--clear" - ,{clear:true} - ,[] - ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} - ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] - ,["--file -" - ,{"file":"-"} - ,[] - ,{file:String} - ,{}] - ,["--file -" - ,{"file":true} - ,["-"] - ,{file:Boolean} - ,{}] - ,["--path" - ,{"path":null} - ,[]] - ,["--path ." - ,{"path":process.cwd()} - ,[]] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - t.deepEqual(e, a) - } else { - t.equal(e, a) - } - } - t.deepEqual(rem, parsed.remain) - }) - t.end() -}) http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/52c99052/bin/node_modules/q/CONTRIBUTING.md ---------------------------------------------------------------------- diff --git a/bin/node_modules/q/CONTRIBUTING.md b/bin/node_modules/q/CONTRIBUTING.md deleted file mode 100644 index 500ab17..0000000 --- a/bin/node_modules/q/CONTRIBUTING.md +++ /dev/null @@ -1,40 +0,0 @@ - -For pull requests: - -- Be consistent with prevalent style and design decisions. -- Add a Jasmine spec to `specs/q-spec.js`. -- Use `npm test` to avoid regressions. -- Run tests in `q-spec/run.html` in as many supported browsers as you - can find the will to deal with. -- Do not build minified versions; we do this each release. -- If you would be so kind, add a note to `CHANGES.md` in an - appropriate section: - - - `Next Major Version` if it introduces backward incompatibilities - to code in the wild using documented features. - - `Next Minor Version` if it adds a new feature. - - `Next Patch Version` if it fixes a bug. - -For releases: - -- Run `npm test`. -- Run tests in `q-spec/run.html` in a representative sample of every - browser under the sun. -- Run `npm run cover` and make sure you're happy with the results. -- Run `npm run minify` and be sure to commit the resulting `q.min.js`. -- Note the Gzipped size output by the previous command, and update - `README.md` if it has changed to 1 significant digit. -- Stash any local changes. -- Update `CHANGES.md` to reflect all changes in the differences - between `HEAD` and the previous tagged version. Give credit where - credit is due. -- Update `README.md` to address all new, non-experimental features. -- Update the API reference on the Wiki to reflect all non-experimental - features. -- Use `npm version major|minor|patch` to update `package.json`, - commit, and tag the new version. -- Use `npm publish` to send up a new release. -- Send an email to the q-continuum mailing list announcing the new - release and the notes from the change log. This helps folks - maintaining other package ecosystems. - http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/52c99052/bin/node_modules/q/LICENSE ---------------------------------------------------------------------- diff --git a/bin/node_modules/q/LICENSE b/bin/node_modules/q/LICENSE deleted file mode 100644 index 8a706b5..0000000 --- a/bin/node_modules/q/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2009–2014 Kristopher Michael Kowal. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/52c99052/bin/node_modules/q/README.md ---------------------------------------------------------------------- diff --git a/bin/node_modules/q/README.md b/bin/node_modules/q/README.md deleted file mode 100644 index bdd4168..0000000 --- a/bin/node_modules/q/README.md +++ /dev/null @@ -1,820 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/kriskowal/q.png?branch=master)](http://travis-ci.org/kriskowal/q) - - - Promises/A+ logo - - -*This is Q version 1, from the `v1` branch in Git. This documentation applies to -the latest of both the version 1 and version 0.9 release trains. These releases -are stable. There will be no further releases of 0.9 after 0.9.7 which is nearly -equivalent to version 1.0.0. All further releases of `q@~1.0` will be backward -compatible. The version 2 release train introduces significant but -backward-incompatible changes and is experimental at this time.* - -If a function cannot return a value or throw an exception without -blocking, it can return a promise instead. A promise is an object -that represents the return value or the thrown exception that the -function may eventually provide. A promise can also be used as a -proxy for a [remote object][Q-Connection] to overcome latency. - -[Q-Connection]: https://github.com/kriskowal/q-connection - -On the first pass, promises can mitigate the “[Pyramid of -Doom][POD]”: the situation where code marches to the right faster -than it marches forward. - -[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/ - -```javascript -step1(function (value1) { - step2(value1, function(value2) { - step3(value2, function(value3) { - step4(value3, function(value4) { - // Do something with value4 - }); - }); - }); -}); -``` - -With a promise library, you can flatten the pyramid. - -```javascript -Q.fcall(promisedStep1) -.then(promisedStep2) -.then(promisedStep3) -.then(promisedStep4) -.then(function (value4) { - // Do something with value4 -}) -.catch(function (error) { - // Handle any error from all above steps -}) -.done(); -``` - -With this approach, you also get implicit error propagation, just like `try`, -`catch`, and `finally`. An error in `promisedStep1` will flow all the way to -the `catch` function, where it’s caught and handled. (Here `promisedStepN` is -a version of `stepN` that returns a promise.) - -The callback approach is called an “inversion of control”. -A function that accepts a callback instead of a return value -is saying, “Don’t call me, I’ll call you.”. Promises -[un-invert][IOC] the inversion, cleanly separating the input -arguments from control flow arguments. This simplifies the -use and creation of API’s, particularly variadic, -rest and spread arguments. - -[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript - - -## Getting Started - -The Q module can be loaded as: - -- A ``