[Pkg-javascript-commits] [node-string-decoder] 06/11: Do not depend on safe-buffer using caret.

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 13 10:27:59 UTC 2017


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

rouca pushed a commit to annotated tag v1.0.3
in repository node-string-decoder.

commit 1dd7b26e2b5d9424934af9fe8a888f2c5b823c1a
Author: Matteo Collina <hello at matteocollina.com>
Date:   Tue Jun 6 16:13:52 2017 +0200

    Do not depend on safe-buffer using caret.
---
 package.json                |  4 ++--
 test/verify-dependencies.js | 13 +++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 8978c6f..9ea05e8 100644
--- a/package.json
+++ b/package.json
@@ -4,14 +4,14 @@
   "description": "The string_decoder module from Node core",
   "main": "lib/string_decoder.js",
   "dependencies": {
-    "safe-buffer": "^5.0.1"
+    "safe-buffer": "~5.0.1"
   },
   "devDependencies": {
     "babel-polyfill": "^6.23.0",
     "tap": "~0.4.8"
   },
   "scripts": {
-    "test": "tap test/parallel/*.js"
+    "test": "tap test/parallel/*.js && node test/verify-dependencies"
   },
   "repository": {
     "type": "git",
diff --git a/test/verify-dependencies.js b/test/verify-dependencies.js
new file mode 100644
index 0000000..e7fba50
--- /dev/null
+++ b/test/verify-dependencies.js
@@ -0,0 +1,13 @@
+'use strict'
+
+var pack = require('../package.json');
+var assert = require('assert');
+
+function verifyNoCaret(deps) {
+  var keys = Object.keys(deps);
+  for (var i = 0; i < keys.length; i++) {
+    assert(deps[keys[i]][0] !== '^', keys[i] + ' must not be depended on using ^')
+  }
+}
+
+verifyNoCaret(pack.dependencies)

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



More information about the Pkg-javascript-commits mailing list