[Pkg-javascript-commits] [node-promise] 02/02: first debian files commit

Leo Iannacone l3on-guest at moszumanska.debian.org
Tue May 6 13:48:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

l3on-guest pushed a commit to branch master
in repository node-promise.

commit 63ecfe1c5e5869783a9829b570e4ddf24f1fa7f3
Author: Leo Iannacone <l3on at ubuntu.com>
Date:   Tue May 6 15:48:17 2014 +0200

    first debian files commit
---
 debian/changelog                        |   6 +
 debian/compat                           |   1 +
 debian/control                          |  26 ++++
 debian/copyright                        |  40 +++++
 debian/docs                             |   1 +
 debian/install                          |   3 +
 debian/patches/bundle_module_asap.patch | 259 ++++++++++++++++++++++++++++++++
 debian/patches/series                   |   1 +
 debian/rules                            |  15 ++
 debian/source/format                    |   1 +
 debian/watch                            |   3 +
 11 files changed, 356 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..accf932
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+node-promise (5.0.0-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #747224)
+
+ -- Leo Iannacone <l3on at ubuntu.com>  Tue, 06 May 2014 14:47:04 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4ee5c06
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,26 @@
+Source: node-promise
+Section: web
+Priority: extra
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Leo Iannacone <l3on at ubuntu.com>
+Build-Depends:
+ debhelper (>= 8)
+ , dh-buildinfo
+ , nodejs
+Standards-Version: 3.9.5
+Homepage: https://www.promisejs.org
+Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-promise.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/node-promise.git
+
+Package: node-promise
+Architecture: all
+Depends:
+ ${misc:Depends}
+ , nodejs
+Description: bare bones Promises/A+ implementation - Node.js module
+ Simple implementation of Promises. A super set of ES6 Promises
+ designed to have readable, performant code and to provide
+ just the extensions that are absolutely necessary for using
+ promises today.
+ .
+ Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2c59e55
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,40 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: promise
+Upstream-Contact: https://github.com/then/promise/issues
+Source: https://github.com/then/promise
+
+Files: *
+Copyright: 2014 Forbes Lindesay <forbes at lindesay.co.uk>
+License: Expat
+
+Files: debian/*
+Copyright: 2014 Leo Iannacone <l3on at ubuntu.com>
+License: Expat
+
+Files: */asap/*
+Copyright: Robert Katić <robert.katic at gmail.com>
+           Kris Kowal <kris at cixar.com>
+           Domenic Denicola <domenic at domenicdenicola.com>
+           Petka Antonov <petka.antonov at gmail.com>
+License: Expat
+
+License: Expat
+ 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.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..ad1245d
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+Readme.md
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..12ca43e
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,3 @@
+package.json usr/lib/nodejs/promise/
+*.js usr/lib/nodejs/promise/
+node_modules/asap/*.js* usr/lib/nodejs/promise/node_modules/asap/
diff --git a/debian/patches/bundle_module_asap.patch b/debian/patches/bundle_module_asap.patch
new file mode 100644
index 0000000..6332ae9
--- /dev/null
+++ b/debian/patches/bundle_module_asap.patch
@@ -0,0 +1,259 @@
+Description: Bundle module dependecy asap as patch, since
+ asap has really few rdepends.
+Author: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+
+---
+ node_modules/asap/LICENSE.md   |   20 +++++++
+ node_modules/asap/README.md    |   81 +++++++++++++++++++++++++++++
+ node_modules/asap/asap.js      |  113 +++++++++++++++++++++++++++++++++++++++++
+ node_modules/asap/package.json |   21 +++++++
+ 4 files changed, 235 insertions(+)
+
+--- /dev/null
++++ b/node_modules/asap/LICENSE.md
+@@ -0,0 +1,20 @@
++
++Copyright 2009–2013 Contributors. 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.
++
+--- /dev/null
++++ b/node_modules/asap/README.md
+@@ -0,0 +1,81 @@
++
++# ASAP
++
++This `asap` CommonJS package contains a single `asap` module that
++exports a single `asap` function that executes a function **as soon as
++possible**.
++
++```javascript
++asap(function () {
++    // ...
++});
++```
++
++More formally, ASAP provides a fast event queue that will execute tasks
++until it is empty before yielding to the JavaScript engine's underlying
++event-loop.  When the event queue becomes non-empty, ASAP schedules a
++flush event, preferring for that event to occur before the JavaScript
++engine has an opportunity to perform IO tasks or rendering, thus making
++the first task and subsequent tasks semantically indistinguishable.
++ASAP uses a variety of techniques to preserve this invariant on
++different versions of browsers and NodeJS.
++
++By design, ASAP can starve the event loop on the theory that, if there
++is enough work to be done synchronously, albeit in separate events, long
++enough to starve input or output, it is a strong indicator that the
++program needs to push back on scheduling more work.
++
++Take care.  ASAP can sustain infinite recursive calls indefinitely
++without warning.  This is behaviorally equivalent to an infinite loop.
++It will not halt from a stack overflow, but it *will* chew through
++memory (which is an oddity I cannot explain at this time).  Just as with
++infinite loops, you can monitor a Node process for this behavior with a
++heart-beat signal.  As with infinite loops, a very small amount of
++caution goes a long way to avoiding problems.
++
++```javascript
++function loop() {
++    asap(loop);
++}
++loop();
++```
++
++ASAP is distinct from `setImmediate` in that it does not suffer the
++overhead of returning a handle and being possible to cancel.  For a
++`setImmediate` shim, consider [setImmediate][].
++
++[setImmediate]: https://github.com/noblejs/setimmediate
++
++If a task throws an exception, it will not interrupt the flushing of
++high-priority tasks.  The exception will be postponed to a later,
++low-priority event to avoid slow-downs, when the underlying JavaScript
++engine will treat it as it does any unhandled exception.
++
++## Heritage
++
++ASAP has been factored out of the [Q][] asynchronous promise library.
++It originally had a naïve implementation in terms of `setTimeout`, but
++[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be
++useful for creating a high-priority, no-delay event dispatch hack.
++Since then, Internet Explorer proposed and implemented `setImmediate`.
++Robert Kratić began contributing to Q by measuring the performance of
++the internal implementation of `asap`, paying particular attention to
++error recovery.  Domenic, Robert, and I collectively settled on the
++current strategy of unrolling the high-priority event queue internally
++regardless of what strategy we used to dispatch the potentially
++lower-priority flush event.  Domenic went on to make ASAP cooperate with
++NodeJS domains.
++
++[Q]: https://github.com/kriskowal/q
++[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html
++
++For further reading, Nicholas Zakas provided a thorough article on [The
++Case for setImmediate][NCZ].
++
++[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
++
++## License
++
++Copyright 2009-2013 by Contributors
++MIT License (enclosed)
++
+--- /dev/null
++++ b/node_modules/asap/asap.js
+@@ -0,0 +1,113 @@
++
++// Use the fastest possible means to execute a task in a future turn
++// of the event loop.
++
++// linked list of tasks (single, with head node)
++var head = {task: void 0, next: null};
++var tail = head;
++var flushing = false;
++var requestFlush = void 0;
++var isNodeJS = false;
++
++function flush() {
++    /* jshint loopfunc: true */
++
++    while (head.next) {
++        head = head.next;
++        var task = head.task;
++        head.task = void 0;
++        var domain = head.domain;
++
++        if (domain) {
++            head.domain = void 0;
++            domain.enter();
++        }
++
++        try {
++            task();
++
++        } catch (e) {
++            if (isNodeJS) {
++                // In node, uncaught exceptions are considered fatal errors.
++                // Re-throw them synchronously to interrupt flushing!
++
++                // Ensure continuation if the uncaught exception is suppressed
++                // listening "uncaughtException" events (as domains does).
++                // Continue in next event to avoid tick recursion.
++                if (domain) {
++                    domain.exit();
++                }
++                setTimeout(flush, 0);
++                if (domain) {
++                    domain.enter();
++                }
++
++                throw e;
++
++            } else {
++                // In browsers, uncaught exceptions are not fatal.
++                // Re-throw them asynchronously to avoid slow-downs.
++                setTimeout(function() {
++                   throw e;
++                }, 0);
++            }
++        }
++
++        if (domain) {
++            domain.exit();
++        }
++    }
++
++    flushing = false;
++}
++
++if (typeof process !== "undefined" && process.nextTick) {
++    // Node.js before 0.9. Note that some fake-Node environments, like the
++    // Mocha test runner, introduce a `process` global without a `nextTick`.
++    isNodeJS = true;
++
++    requestFlush = function () {
++        process.nextTick(flush);
++    };
++
++} else if (typeof setImmediate === "function") {
++    // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate
++    if (typeof window !== "undefined") {
++        requestFlush = setImmediate.bind(window, flush);
++    } else {
++        requestFlush = function () {
++            setImmediate(flush);
++        };
++    }
++
++} else if (typeof MessageChannel !== "undefined") {
++    // modern browsers
++    // http://www.nonblocking.io/2011/06/windownexttick.html
++    var channel = new MessageChannel();
++    channel.port1.onmessage = flush;
++    requestFlush = function () {
++        channel.port2.postMessage(0);
++    };
++
++} else {
++    // old browsers
++    requestFlush = function () {
++        setTimeout(flush, 0);
++    };
++}
++
++function asap(task) {
++    tail = tail.next = {
++        task: task,
++        domain: isNodeJS && process.domain,
++        next: null
++    };
++
++    if (!flushing) {
++        flushing = true;
++        requestFlush();
++    }
++};
++
++module.exports = asap;
++
+--- /dev/null
++++ b/node_modules/asap/package.json
+@@ -0,0 +1,21 @@
++{
++  "name": "asap",
++  "version": "1.0.0",
++  "description": "High-priority task queue for Node.js and browsers",
++  "keywords": [
++    "event",
++    "task",
++    "queue"
++  ],
++  "licenses": [
++    {
++      "type": "MIT",
++      "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md"
++    }
++  ],
++  "main": "asap",
++  "readme": "\n# ASAP\n\nThis `asap` CommonJS package contains a single `asap` module that\nexports a single `asap` function that executes a function **as soon as\npossible**.\n\n```javascript\nasap(function () {\n    // ...\n});\n```\n\nMore formally, ASAP provides a fast event queue that will execute tasks\nuntil it is empty before yielding to the JavaScript engine's underlying\nevent-loop.  When the event queue becomes non-empty, ASAP schedules a\nflush event, preferring for that eve [...]
++  "readmeFilename": "README.md",
++  "_id": "asap at 1.0.0",
++  "_from": "asap@~1.0.0"
++}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ec2da57
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+bundle_module_asap.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..de57af0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh $@
+
+#override_dh_auto_build:
+
+#override_dh_auto_test:
+
+
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..014683e
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-promise-$1.tar.gz/ \
+ https://github.com/then/promise/tags .*/archive/v?([\d\.]+).tar.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-promise.git



More information about the Pkg-javascript-commits mailing list