drop safe-buffer dependency, bump min node to 6 - fixes #20

This commit is contained in:
silverwind 2018-06-01 09:33:34 +02:00
parent 3c7b50f1ac
commit 4c00781ed4
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443
4 changed files with 6 additions and 10 deletions

View File

@ -1,5 +1,4 @@
language: node_js language: node_js
node_js: node_js:
- "8" - node
- "6" - lts/*
- "4"

View File

@ -5,7 +5,6 @@ const rcodes = require('./rcodes')
const opcodes = require('./opcodes') const opcodes = require('./opcodes')
const classes = require('./classes') const classes = require('./classes')
const ip = require('ip') const ip = require('ip')
const Buffer = require('safe-buffer').Buffer
const QUERY_FLAG = 0 const QUERY_FLAG = 0
const RESPONSE_FLAG = 1 << 15 const RESPONSE_FLAG = 1 << 15

View File

@ -7,14 +7,13 @@
"repository": "mafintosh/dns-packet", "repository": "mafintosh/dns-packet",
"homepage": "https://github.com/mafintosh/dns-packet", "homepage": "https://github.com/mafintosh/dns-packet",
"engines": { "engines": {
"node": ">=4" "node": ">=6"
}, },
"scripts": { "scripts": {
"test": "eslint --color *.js && tape test.js" "test": "eslint --color *.js && tape test.js"
}, },
"dependencies": { "dependencies": {
"ip": "^1.1.5", "ip": "^1.1.5"
"safe-buffer": "^5.1.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^4.19.1", "eslint": "^4.19.1",

View File

@ -4,7 +4,6 @@ const tape = require('tape')
const packet = require('./') const packet = require('./')
const rcodes = require('./rcodes') const rcodes = require('./rcodes')
const opcodes = require('./opcodes') const opcodes = require('./opcodes')
const Buffer = require('safe-buffer').Buffer
tape('unknown', function (t) { tape('unknown', function (t) {
testEncoder(t, packet.unknown, Buffer.from('hello world')) testEncoder(t, packet.unknown, Buffer.from('hello world'))
@ -417,8 +416,8 @@ tape('nsec3', function (t) {
algorithm: 1, algorithm: 1,
flags: 0, flags: 0,
iterations: 257, iterations: 257,
salt: new Buffer([42, 42, 42]), salt: Buffer.from([42, 42, 42]),
nextDomain: new Buffer([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]), nextDomain: Buffer.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]),
rrtypes: ['A', 'DNSKEY', 'CAA', 'DLV'] rrtypes: ['A', 'DNSKEY', 'CAA', 'DLV']
}) })
t.end() t.end()