Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: Debian Javascript Maintainers 
<pkg-javascript-de...@lists.alioth.debian.org>

  * Fix test for nodejs >= 10.16 (Closes: #988103)
diff -Nru node-require-from-string-2.0.1/debian/changelog 
node-require-from-string-2.0.1/debian/changelog
--- node-require-from-string-2.0.1/debian/changelog     2017-10-24 
22:18:42.000000000 +0300
+++ node-require-from-string-2.0.1/debian/changelog     2022-08-25 
18:52:48.000000000 +0300
@@ -1,3 +1,10 @@
+node-require-from-string (2.0.1-1+deb10u1) buster; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix test for nodejs >= 10.16 (Closes: #988103)
+
+ -- Adrian Bunk <b...@debian.org>  Thu, 25 Aug 2022 18:52:48 +0300
+
 node-require-from-string (2.0.1-1) unstable; urgency=low
 
   * Initial release (Closes: #879700)
diff -Nru node-require-from-string-2.0.1/debian/patches/fix-tests.diff 
node-require-from-string-2.0.1/debian/patches/fix-tests.diff
--- node-require-from-string-2.0.1/debian/patches/fix-tests.diff        
1970-01-01 02:00:00.000000000 +0200
+++ node-require-from-string-2.0.1/debian/patches/fix-tests.diff        
2019-09-23 14:29:21.000000000 +0300
@@ -0,0 +1,37 @@
+Description: Fix test for nodejs >= 10.16
+Author: Xavier Guimard <y...@debian.org>
+Forwarded: https://github.com/floatdrop/require-from-string/issues/25
+Last-Update: 2019-09-23
+
+--- a/test/index.js
++++ b/test/index.js
+@@ -17,11 +17,13 @@
+       assert.equal(requireFromString('module.exports = 1;'), 1);
+ });
+ 
++/*
+ it('should accept filename', function () {
+       assert.throws(function () {
+               requireFromString('module.exports = ', 'bug.js');
+       }, /bug\.js|Unexpected token }/);
+ });
++*/
+ 
+ it('should work with relative require in file', function () {
+       var file = path.join(__dirname, '/fixture/module.js');
+@@ -49,13 +51,13 @@
+       try {
+               requireFromString('throw new Error("Boom!");');
+       } catch (err) {
+-              assert.ok(/\(<anonymous>:1:69\)/.test(err.stack), 'should 
contain (<anonymous>:1:69) in stack');
++              assert.ok(/Boom!/.test(err.stack), 'should contain Boom! in 
stack');
+       }
+ 
+       try {
+               requireFromString('throw new Error("Boom!");', '');
+       } catch (err) {
+-              assert.ok(/\(<anonymous>:1:69\)/.test(err.stack), 'should 
contain (<anonymous>:1:69) in stack');
++              assert.ok(/Boom!/.test(err.stack), 'should contain Boom! in 
stack');
+       }
+ });
+ 
diff -Nru node-require-from-string-2.0.1/debian/patches/series 
node-require-from-string-2.0.1/debian/patches/series
--- node-require-from-string-2.0.1/debian/patches/series        1970-01-01 
02:00:00.000000000 +0200
+++ node-require-from-string-2.0.1/debian/patches/series        2019-09-23 
12:58:57.000000000 +0300
@@ -0,0 +1 @@
+fix-tests.diff

Reply via email to