[Pkg-javascript-commits] [Git][js-team/node-safe-buffer][master] 9 commits: cme fix
Xavier Guimard
gitlab at salsa.debian.org
Sun Mar 1 20:02:48 GMT 2020
Xavier Guimard pushed to branch master at Debian JavaScript Maintainers / node-safe-buffer
Commits:
d6d307cf by Xavier Guimard at 2020-02-19T07:33:28+01:00
cme fix
- - - - -
aaec132f by Xavier Guimard at 2020-03-01T20:51:37+01:00
Use pkg-js-tools test & install
- - - - -
4a0e1c39 by Xavier Guimard at 2020-03-01T20:51:39+01:00
Add "Rules-Requires-Root: no"
- - - - -
06540186 by Xavier Guimard at 2020-03-01T20:51:39+01:00
Add debian/gbp.conf
- - - - -
ee363bd6 by Xavier Guimard at 2020-03-01T20:52:30+01:00
New upstream version 5.2.0
- - - - -
75ec5d64 by Xavier Guimard at 2020-03-01T20:52:30+01:00
Update upstream source from tag 'upstream/5.2.0'
Update to upstream version '5.2.0'
with Debian dir fc17bf59a84b4d527a68335995365032b3988868
- - - - -
0f7a1f70 by Xavier Guimard at 2020-03-01T20:54:52+01:00
Remove dpkg-dev dep
- - - - -
65a8d009 by Xavier Guimard at 2020-03-01T21:00:06+01:00
Replace Buffer() by Buffer.from() and Buffer.alloc()
- - - - -
6497ffe5 by Xavier Guimard at 2020-03-01T21:02:31+01:00
releasing package node-safe-buffer version 5.2.0-1
- - - - -
17 changed files:
- .npmignore
- − .travis.yml
- README.md
- debian/changelog
- debian/control
- debian/copyright
- + debian/gbp.conf
- − debian/install
- + debian/patches/fix-buffer-usage.diff
- + debian/patches/series
- debian/rules
- − debian/tests/control
- + debian/tests/pkg-js/test
- − debian/tests/require
- − debian/tests/runtestsuite
- index.js
- package.json
Changes:
=====================================
.npmignore
=====================================
@@ -1,2 +1,3 @@
+.github/
.travis.yml
test/
=====================================
.travis.yml deleted
=====================================
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - '10'
- - '8'
- - '6'
- - '4'
- - '0.12'
- - '0.10'
=====================================
README.md
=====================================
@@ -22,6 +22,8 @@
npm install safe-buffer
```
+[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme)
+
## usage
The goal of this package is to provide a safe replacement for the node.js `Buffer`.
=====================================
debian/changelog
=====================================
@@ -1,12 +1,24 @@
-node-safe-buffer (5.1.2-2) UNRELEASED; urgency=medium
+node-safe-buffer (5.2.0-1) unstable; urgency=medium
+ * Team upload
+
+ [ Debian Janitor ]
* Bump debhelper from old 11 to 12.
* Set debhelper-compat version in Build-Depends.
* Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
Repository-Browse.
* Use canonical URL in Vcs-Browser.
- -- Debian Janitor <janitor at jelmer.uk> Sun, 02 Feb 2020 08:50:24 +0000
+ [ Xavier Guimard ]
+ * Declare compliance with policy 4.5.0
+ * Use pkg-js-tools test & install
+ * Add "Rules-Requires-Root: no"
+ * Add debian/gbp.conf
+ * New upstream version 5.2.0
+ * Update copyright
+ * Replace Buffer() by Buffer.from() and Buffer.alloc()
+
+ -- Xavier Guimard <yadd at debian.org> Sun, 01 Mar 2020 21:00:15 +0100
node-safe-buffer (5.1.2-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -3,22 +3,20 @@ Section: javascript
Priority: optional
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
Uploaders: Shirish Togarla <shirishtogarla533 at gmail.com>
-Build-Depends:
- debhelper-compat (= 12)
- , dh-buildinfo
- , nodejs (>= 4.7)
- , dpkg-dev (>= 1.17.14)
- , node-tape (>= 4.0) <!nocheck>
- , node-tap (>= 10) <!nocheck>
-Standards-Version: 4.1.4
-Homepage: https://github.com/feross/safe-buffer
-Vcs-Git: https://salsa.debian.org/js-team/node-safe-buffer.git
+Build-Depends: debhelper-compat (= 12)
+ , node-tap (>= 10)
+ , node-tape
+ , pkg-js-tools (>= 0.9.20~)
+Standards-Version: 4.5.0
Vcs-Browser: https://salsa.debian.org/js-team/node-safe-buffer
+Vcs-Git: https://salsa.debian.org/js-team/node-safe-buffer.git
+Homepage: https://github.com/feross/safe-buffer
+Testsuite: autopkgtest-pkg-nodejs
+Rules-Requires-Root: no
Package: node-safe-buffer
Architecture: all
-Depends:
- ${misc:Depends}
+Depends: ${misc:Depends}
, nodejs (>= 4.7)
Description: Safer Node.js Buffer API
The goal of this package is to provide a safe replacement for the node.js
=====================================
debian/copyright
=====================================
@@ -4,12 +4,13 @@ Upstream-Contact: https://github.com/feross/safe-buffer/issues
Source: https://github.com/feross/safe-buffer
Files: *
-Copyright: 2017-2018 Feross Aboukhadijeh <feross at feross.org> (http://feross.org)
+Copyright: Feross Aboukhadijeh <feross at feross.org>
License: Expat
Files: debian/*
Copyright: 2017 Shirish Togarla <shirishtogarla533 at gmail.com>
2018 Bastien Roucariès <rouca at debian.org>
+ 2020 Xavier Guimard <yadd at debian.org>
License: Expat
License: Expat
@@ -32,4 +33,3 @@ License: Expat
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.
-
=====================================
debian/gbp.conf
=====================================
@@ -0,0 +1,5 @@
+[DEFAULT]
+pristine-tar = True
+
+[import-orig]
+filter = [ '.gitignore', '.travis.yml', '.git*' ]
=====================================
debian/install deleted
=====================================
@@ -1,3 +0,0 @@
-index.js usr/lib/nodejs/safe-buffer/
-index.d.ts usr/lib/nodejs/safe-buffer/
-package.json usr/lib/nodejs/safe-buffer/
=====================================
debian/patches/fix-buffer-usage.diff
=====================================
@@ -0,0 +1,54 @@
+Description: replace Buffer() by Buffer.from() or Buffer.alloc()
+Author: Xavier Guimard <yadd at debian.org>
+Forwarded: no
+Last-Update: 2020-03-01
+
+--- a/test/basic.js
++++ b/test/basic.js
+@@ -4,11 +4,11 @@
+ var SafeBuffer = require('../').Buffer
+
+ test('new SafeBuffer(value) works just like Buffer', function (t) {
+- t.deepEqual(new SafeBuffer('hey'), new Buffer('hey'))
+- t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8'))
+- t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex'))
+- t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3]))
+- t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
++ t.deepEqual(new SafeBuffer('hey'), new Buffer.from('hey'))
++ t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer.from('hey', 'utf8'))
++ t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer.from('686579', 'hex'))
++ t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer.from([1, 2, 3]))
++ t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer.from(new Uint8Array([1, 2, 3])))
+
+ t.equal(typeof SafeBuffer.isBuffer, 'function')
+ t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true)
+@@ -19,22 +19,22 @@
+ })
+
+ test('SafeBuffer.from(value) converts to a Buffer', function (t) {
+- t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey'))
+- t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8'))
+- t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex'))
+- t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3]))
+- t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
++ t.deepEqual(SafeBuffer.from('hey'), new Buffer.from('hey'))
++ t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer.from('hey', 'utf8'))
++ t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer.from('686579', 'hex'))
++ t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer.from([1, 2, 3]))
++ t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer.from(new Uint8Array([1, 2, 3])))
+
+ t.end()
+ })
+
+ test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) {
+ for (var i = 0; i < 10; i++) {
+- var expected1 = new Buffer(1000)
++ var expected1 = new Buffer.alloc(1000)
+ expected1.fill(0)
+ t.deepEqual(SafeBuffer.alloc(1000), expected1)
+
+- var expected2 = new Buffer(1000 * 1000)
++ var expected2 = new Buffer.alloc(1000 * 1000)
+ expected2.fill(0)
+ t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2)
+ }
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+fix-buffer-usage.diff
=====================================
debian/rules
=====================================
@@ -5,15 +5,4 @@
#export DH_VERBOSE=1
%:
- dh $@
-
-#override_dh_auto_build:
-
-override_dh_auto_test:
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
- tap -R spec test/*.js
-else
- @echo '**********************************************************'
- @echo 'Skip test suite '
- @echo '**********************************************************'
-endif
+ dh $@ --with nodejs
=====================================
debian/tests/control deleted
=====================================
@@ -1,5 +0,0 @@
-Tests: require
-Depends: node-safe-buffer, nodejs (>= 6)
-
-Tests: runtestsuite
-Depends: node-safe-buffer, node-tape (>= 4.0), node-tap (>= 10)
=====================================
debian/tests/pkg-js/test
=====================================
@@ -0,0 +1 @@
+tap -R spec test/*.js
=====================================
debian/tests/require deleted
=====================================
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-node -e "require('safe-buffer');"
=====================================
debian/tests/runtestsuite deleted
=====================================
@@ -1,15 +0,0 @@
-#!/bin/sh
-set -e
-# notice the / at end in order to load this module
-PACKAGE='safe-buffer'
-SEDCMD="s,require\s*[(]\s*'[.][.]/,require('$PACKAGE/,g"
-
-tmpdir=$(mktemp -d)
-trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
-
-cp -r test "$tmpdir"
-find test -name '*.js' -print0 | \
- xargs -0 -n1 \
- sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
-cd "$tmpdir"
-tap -R spec test/*.js
=====================================
index.js
=====================================
@@ -20,6 +20,8 @@ function SafeBuffer (arg, encodingOrOffset, length) {
return Buffer(arg, encodingOrOffset, length)
}
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)
=====================================
package.json
=====================================
@@ -1,7 +1,7 @@
{
"name": "safe-buffer",
"description": "Safer Node.js Buffer API",
- "version": "5.1.2",
+ "version": "5.2.0",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross at feross.org",
View it on GitLab: https://salsa.debian.org/js-team/node-safe-buffer/-/compare/b3bfcf9a3a3367651bfe682ede6c33f1ba99ea81...6497ffe5cb1f35ae30584ab3c99884fcf64d9e5e
--
View it on GitLab: https://salsa.debian.org/js-team/node-safe-buffer/-/compare/b3bfcf9a3a3367651bfe682ede6c33f1ba99ea81...6497ffe5cb1f35ae30584ab3c99884fcf64d9e5e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-commits/attachments/20200301/c3141fc8/attachment-0001.html>
More information about the Pkg-javascript-commits
mailing list