From c04e84313fbb90bbc1b70f95776f66d11ba6fac2 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 25 Oct 2016 11:22:43 -0700 Subject: [PATCH] v1.8.4; fix 'src' usage with node v7 Fixes #454 --- CHANGES.md | 5 +++++ Makefile | 7 ++++++- bin/bunyan | 6 +++--- lib/bunyan.js | 5 +++-- package.json | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9013712..f5c92a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,11 @@ Known issues: ## not yet released +## 1.8.4 + +- [issue #454] Fix `src` usage with node v7. + + ## 1.8.3 - [issue #450] Fix `log.info(null)` crash that resulted from #426 in v1.8.2. diff --git a/Makefile b/Makefile index ba0959e..2eb3fd1 100644 --- a/Makefile +++ b/Makefile @@ -105,8 +105,13 @@ test: $(NODEUNIT) # Note: 'test4' is last so (if all is well) I end up with a binary # dtrace-provider build for my current default node version. .PHONY: testall -testall: test6 test012 test010 test4 +testall: test7 test6 test012 test010 test4 +.PHONY: test7 +test7: + @echo "# Test node 7.x (with node `$(NODEOPT)/node-7/bin/node --version`)" + @$(NODEOPT)/node-7/bin/node --version | grep '^v7\.' + PATH="$(NODEOPT)/node-7/bin:$(PATH)" make distclean all test .PHONY: test6 test6: @echo "# Test node 6.x (with node `$(NODEOPT)/node-6/bin/node --version`)" diff --git a/bin/bunyan b/bin/bunyan index 0f3f412..085ec4f 100755 --- a/bin/bunyan +++ b/bin/bunyan @@ -1,7 +1,7 @@ #!/usr/bin/env node /** - * Copyright 2016 Trent Mick. All rights reserved. - * Copyright 2016 Joyent Inc. All rights reserved. + * Copyright 2016 Trent Mick + * Copyright 2016 Joyent Inc. * * bunyan -- filter and pretty-print Bunyan log files (line-delimited JSON) * @@ -11,7 +11,7 @@ * vim: expandtab:ts=4:sw=4 */ -var VERSION = '1.8.3'; +var VERSION = '1.8.4'; var p = console.log; var util = require('util'); diff --git a/lib/bunyan.js b/lib/bunyan.js index cf60fea..543943a 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -8,7 +8,7 @@ * vim: expandtab:ts=4:sw=4 */ -var VERSION = '1.8.3'; +var VERSION = '1.8.4'; /* * Bunyan log format version. This becomes the 'v' field on all log records. @@ -186,7 +186,6 @@ function getCaller3Info() { var saveLimit = Error.stackTraceLimit; var savePrepare = Error.prepareStackTrace; Error.stackTraceLimit = 3; - Error.captureStackTrace(this, getCaller3Info); Error.prepareStackTrace = function (_, stack) { var caller = stack[2]; @@ -199,7 +198,9 @@ function getCaller3Info() { if (func) obj.func = func; }; + Error.captureStackTrace(this, getCaller3Info); this.stack; + Error.stackTraceLimit = saveLimit; Error.prepareStackTrace = savePrepare; return obj; diff --git a/package.json b/package.json index 53d3763..cfb7979 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bunyan", - "version": "1.8.3", + "version": "1.8.4", "description": "a JSON logging library for node.js services", "author": "Trent Mick (http://trentm.com)", "main": "./lib/bunyan.js",