Skip to content

Commit 005808e

Browse files
committed
Drop support for Node.js 0.6
1 parent 9a78974 commit 005808e

File tree

7 files changed

+13
-147
lines changed

7 files changed

+13
-147
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- "0.6"
43
- "0.8"
54
- "0.10"
65
- "0.12"
@@ -14,7 +13,6 @@ node_js:
1413
- "8.9"
1514
- "9.2"
1615
sudo: false
17-
dist: precise
1816
cache:
1917
directories:
2018
- node_modules
@@ -26,9 +24,8 @@ before_install:
2624
- "npm rm --save-dev benchmark beautify-benchmark || true"
2725

2826
# Setup Node.js version-specific dependencies
29-
- "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul"
3027
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
31-
- "test $TRAVIS_NODE_VERSION = '0.6' -o $TRAVIS_NODE_VERSION = '0.8' || npm install browserify"
28+
- "test $TRAVIS_NODE_VERSION = '0.8' || npm install browserify"
3229
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-markdown eslint-plugin-promise eslint-plugin-standard"
3330

3431
# Update Node.js modules

History.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.x
2+
===
3+
4+
* Drop support for Node.js 0.6
5+
16
1.1.2 / 2018-01-11
27
==================
38

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(The MIT License)
22

3-
Copyright (c) 2014-2017 Douglas Christopher Wilson
3+
Copyright (c) 2014-2018 Douglas Christopher Wilson
44

55
Permission is hereby granted, free of charge, to any person obtaining
66
a copy of this software and associated documentation files (the

index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/*!
22
* depd
3-
* Copyright(c) 2014-2017 Douglas Christopher Wilson
3+
* Copyright(c) 2014-2018 Douglas Christopher Wilson
44
* MIT Licensed
55
*/
66

77
/**
88
* Module dependencies.
99
*/
1010

11-
var callSiteToString = require('./lib/compat').callSiteToString
1211
var eventListenerCount = require('./lib/compat').eventListenerCount
1312
var relative = require('path').relative
1413

@@ -92,7 +91,7 @@ function createStackString (stack) {
9291
}
9392

9493
for (var i = 0; i < stack.length; i++) {
95-
str += '\n at ' + callSiteToString(stack[i])
94+
str += '\n at ' + stack[i].toString()
9695
}
9796

9897
return str
@@ -310,7 +309,7 @@ function formatPlain (msg, caller, stack) {
310309
// add stack trace
311310
if (this._traced) {
312311
for (var i = 0; i < stack.length; i++) {
313-
formatted += '\n at ' + callSiteToString(stack[i])
312+
formatted += '\n at ' + stack[i].toString()
314313
}
315314

316315
return formatted
@@ -335,7 +334,7 @@ function formatColor (msg, caller, stack) {
335334
// add stack trace
336335
if (this._traced) {
337336
for (var i = 0; i < stack.length; i++) {
338-
formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
337+
formatted += '\n \x1b[36mat ' + stack[i].toString() + '\x1b[39m' // cyan
339338
}
340339

341340
return formatted

lib/compat/callsite-tostring.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

lib/compat/index.js

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* depd
3-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
3+
* Copyright(c) 2014-2018 Douglas Christopher Wilson
44
* MIT Licensed
55
*/
66

@@ -18,30 +18,6 @@ var EventEmitter = require('events').EventEmitter
1818
* @public
1919
*/
2020

21-
lazyProperty(module.exports, 'callSiteToString', function callSiteToString () {
22-
var limit = Error.stackTraceLimit
23-
var obj = {}
24-
var prep = Error.prepareStackTrace
25-
26-
function prepareObjectStackTrace (obj, stack) {
27-
return stack
28-
}
29-
30-
Error.prepareStackTrace = prepareObjectStackTrace
31-
Error.stackTraceLimit = 2
32-
33-
// capture the stack
34-
Error.captureStackTrace(obj)
35-
36-
// slice the stack
37-
var stack = obj.stack.slice()
38-
39-
Error.prepareStackTrace = prep
40-
Error.stackTraceLimit = limit
41-
42-
return stack[0].toString ? toString : require('./callsite-tostring')
43-
})
44-
4521
lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () {
4622
return EventEmitter.listenerCount || require('./event-listener-count')
4723
})
@@ -69,11 +45,3 @@ function lazyProperty (obj, prop, getter) {
6945
get: get
7046
})
7147
}
72-
73-
/**
74-
* Call toString() on the obj
75-
*/
76-
77-
function toString (obj) {
78-
return obj.toString()
79-
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"Readme.md"
3030
],
3131
"engines": {
32-
"node": ">= 0.6"
32+
"node": ">= 0.8"
3333
},
3434
"scripts": {
3535
"bench": "node benchmark/index.js",

0 commit comments

Comments
 (0)