Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Do not depend on safe-buffer using caret. #5

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions test/verify-dependencies.js
Original file line number Diff line number Diff line change
@@ -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)