[Pkg-javascript-commits] [node-astw] 28/30: Finalize

Bastien Roucariès rouca at moszumanska.debian.org
Tue Sep 26 12:55:06 UTC 2017


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

rouca pushed a commit to branch master
in repository node-astw.

commit d0192ef1a650b274a66975da23adea896c38eddd
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Wed Aug 30 16:39:25 2017 +0200

    Finalize
---
 debian/changelog          |  4 ++--
 debian/control            | 12 +++++++++---
 debian/rules              | 13 +++++++++++++
 debian/tests/control      |  8 +++++++-
 debian/tests/runexamples  |  5 +++++
 debian/tests/runtestsuite | 15 +++++++++++++++
 6 files changed, 51 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8ad7f14..c6094af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-node-astw (2.2.0-1) UNRELEASED; urgency=low
+node-astw (2.2.0-1) unstable; urgency=low
 
-  * Initial release (Closes: #nnnn)
+  * Initial release (Closes: #854510)
 
  -- Bastien Roucariès <rouca at debian.org>  Mon, 28 Aug 2017 23:43:44 +0200
 
diff --git a/debian/control b/debian/control
index 5815705..c5479b9 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,9 @@ Build-Depends:
  , dh-buildinfo
  , nodejs (>= 6)
  , dpkg-dev (>= 1.17.14)
- , node-acorn (>= 4.0.3) <!nocheck>
+ , node-acorn (>= 5.1.1+ds1-3~) <!nocheck>
  , node-tape (>= 2.4.1) <!nocheck>
+ , node-escodegen (>= 0.0.17) <!nocheck>
 Standards-Version: 4.1.0
 Homepage: https://github.com/substack/astw
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-astw.git
@@ -20,8 +21,13 @@ Architecture: all
 Depends:
  ${misc:Depends}
  , nodejs (>= 6)
- , node-acorn (>= 4.0.3)
+ , node-acorn (>= 5.1.1+ds1-3~)
 Description: walk the ast with references to parent nodes
- FIX_ME long description
+ This package walk AST (abstract tree) and track parents nodes
+ without doing source transform.
+ .
+ It is a dependency of Browserify is a JavaScript tool
+ that allows developers to write Node.js-style modules that compile
+ for use in the browser.
  .
  Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/rules b/debian/rules
index 408c549..483d0c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,3 +17,16 @@ else
 	@echo 'Skip test suite                                           '
 	@echo '**********************************************************'
 endif
+
+
+override_dh_installexamples:
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+	dh_installexamples
+	find debian/node-astw/usr/share/doc/node-astw/examples/ -name '*.js' -exec \
+	    sed -i "s,require[(]'../*'[)],require('astw'),g" {} \;
+
+else
+	@echo '**********************************************************'
+	@echo 'Skip test suite                                           '
+	@echo '**********************************************************'
+endif
diff --git a/debian/tests/control b/debian/tests/control
index 42c1cb3..38343e7 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,8 @@
 Tests: require
-Depends: node-astw
+Depends: node-astw, nodejs (>=6)
+
+Tests: runtestsuite
+Depends: node-astw, nodejs (>=6), node-tape (>= 2.4.1), node-escodegen (>= 0.0.17)
+
+Tests: runexamples
+Depends: node-astw, nodejs (>=6), node-escodegen (>= 0.0.17)
diff --git a/debian/tests/runexamples b/debian/tests/runexamples
new file mode 100755
index 0000000..181fcad
--- /dev/null
+++ b/debian/tests/runexamples
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+
+cd /usr/share/doc/astw/examples
+nodejs type.js
\ No newline at end of file
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..e0fc23f
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='astw'
+SEDCMD="s,(require|resolve)\s*[(]\s*'[.][.]/,\\1('$PACKAGE,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/test
+find test/ -maxdepth 1 -name '*.js' -print0 | \
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+cd $tmpdir
+node test/*.js

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



More information about the Pkg-javascript-commits mailing list