New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

winston-cloudwatch

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-cloudwatch - npm Package Compare versions

Comparing version

to
2.0.3

winston-cloudwatch.code-workspace

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 2.0.3
stringify supports circular references
### 2.0.2

@@ -2,0 +6,0 @@

4

lib/utils.js
var chalk = require('chalk');
var safeStringify = require('fast-safe-stringify')

@@ -12,4 +13,5 @@ function handleErrorObject(key, value) {

}
function stringify(o) { return JSON.stringify(o, handleErrorObject, ' '); }
function stringify(o) { return safeStringify(o, handleErrorObject, ' '); }
function debug() {

@@ -16,0 +18,0 @@ if (!process.env.WINSTON_CLOUDWATCH_DEBUG) return;

{
"name": "winston-cloudwatch",
"version": "2.0.2",
"version": "2.0.3",
"description": "Send logs to Amazon Cloudwatch using Winston.",

@@ -29,2 +29,3 @@ "keywords": [

"chalk": "^2.4.1",
"fast-safe-stringify": "^2.0.6",
"lodash.assign": "^4.2.0",

@@ -31,0 +32,0 @@ "lodash.find": "^4.6.0",

@@ -1,2 +0,2 @@

# winston-cloudwatch [v2.0.2](https://github.com/lazywithclass/winston-cloudwatch/blob/master/CHANGELOG.md#200)
# winston-cloudwatch [v2.0.3](https://github.com/lazywithclass/winston-cloudwatch/blob/master/CHANGELOG.md#203)

@@ -70,6 +70,15 @@ [![Build Status](https://travis-ci.org/lazywithclass/winston-cloudwatch.svg?branch=master)](https://travis-ci.org/lazywithclass/winston-cloudwatch) [![Coverage Status](https://coveralls.io/repos/github/lazywithclass/winston-cloudwatch/badge.svg?branch=master)](https://coveralls.io/github/lazywithclass/winston-cloudwatch?branch=master) [![Dependency Status](https://david-dm.org/lazywithclass/winston-cloudwatch.svg)](https://david-dm.org/lazywithclass/winston-cloudwatch) [![dev dependencies](https://david-dm.org/lazywithclass/winston-cloudwatch/dev-status.svg)](https://david-dm.org/lazywithclass/winston-cloudwatch#info=devDependencies) [![peer dependencies](https://david-dm.org/lazywithclass/winston-cloudwatch/peer-status.svg)](https://david-dm.org/lazywithclass/winston-cloudwatch#info=peerDependencies)

In ES5
```js
var winston = require('winston'),
WinstonCloudWatch = require('../index');
WinstonCloudWatch = require('winston-cloudwatch');
```
In ES6
```js
import winston from 'winston';
import WinstonCloudWatch from 'winston-cloudwatch';
```
```js
winston.add(new WinstonCloudWatch({

@@ -76,0 +85,0 @@ logGroupName: 'testing',

@@ -1,8 +0,8 @@

describe('utils', function() {
describe('utils', function () {
describe('stringify', function() {
describe('stringify', function () {
const lib = require('../lib/utils')
it('stringifies an object', function() {
it('stringifies an object', function () {
const object = { answer: 42 }

@@ -12,5 +12,5 @@ lib.stringify(object).should.equal(JSON.stringify(object, null, ' '))

it('stringifies an Error istance', function() {
it('stringifies an Error istance', function () {
const error = new Error('uh-oh'),
result = JSON.parse(lib.stringify(error))
result = JSON.parse(lib.stringify(error))
result.message.should.equal('uh-oh')

@@ -20,2 +20,13 @@ result.stack.should.be.an.instanceOf(String)

it('handles circular objects', function () {
const circular = {}
const child = { circular }
circular.child = child
const stringify = () => {
lib.stringify(circular)
}
stringify.should.not.throw()
})
})

@@ -22,0 +33,0 @@