Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-telegram

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-telegram - npm Package Compare versions

Comparing version 2.3.5 to 2.4.0

.github/workflows/tests.yml

7

CHANGELOG.md

@@ -10,2 +10,6 @@ # Changelog

## [v2.4.0] - 2021-09-25
### Added
- [#27](https://github.com/ivanmarban/winston-telegram/pull/27) Pass full data argument to `formatMessage` method.
## [v2.3.5] - 2021-05-23

@@ -136,3 +140,4 @@ ### Changed

[unreleased]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.5...develop
[unreleased]: https://github.com/ivanmarban/winston-telegram/compare/v2.4.0...develop
[v2.4.0]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.5...v2.4.0
[v2.3.5]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.4...v2.3.5

@@ -139,0 +144,0 @@ [v2.3.4]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.3...v2.3.4

2

lib/winston-telegram.d.ts

@@ -28,3 +28,3 @@ import TransportStream = require("winston-transport")

/** Format output message by own method. */
formatMessage?: (params: WinstonTelegram.FormatOptions) => string
formatMessage?: (params: WinstonTelegram.FormatOptions, info: any) => string
/** Handle uncaught exceptions. (default true) */

@@ -31,0 +31,0 @@ handleExceptions?: boolean

@@ -78,3 +78,3 @@ /*

if (this.formatMessage) {
messageText = this.formatMessage(formatOptions)
messageText = this.formatMessage(formatOptions, info)
} else {

@@ -81,0 +81,0 @@ messageText = format(this.template, formatOptions)

{
"name": "winston-telegram",
"description": "A Telegram transport for winston",
"version": "2.3.5",
"version": "2.4.0",
"author": "Ivan Marban",

@@ -22,3 +22,3 @@ "repository": {

"dependencies": {
"sf": "^0.2.0",
"sf": "^0.1.9",
"winston-transport": "^4.3.0"

@@ -36,17 +36,17 @@ },

"devDependencies": {
"chai": "^4.2.0",
"coveralls": "^3.1.0",
"eslint": "^7.13.0",
"eslint-config-standard": "^16.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^32.3.0",
"eslint-plugin-mocha": "^8.0.0",
"chai": "^4.3.4",
"coveralls": "^3.1.1",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jsdoc": "^36.1.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"mocha": "^8.2.1",
"nock": "^13.0.4",
"mocha": "^9.1.1",
"nock": "^13.1.3",
"nyc": "^15.1.0",
"prettier-standard": "^16.4.1",
"sinon": "^10.0.0",
"prettier-standard": "^15.0.1",
"sinon": "^11.1.2",
"winston": "^3.0.0"

@@ -57,6 +57,4 @@ },

"format": "prettier-standard 'lib/**/*.js' 'test/**/*.js' 'examples/**/*.js'",
"test": "nyc mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test:coverage": "nyc --reporter=text --reporter=html mocha"
"test": "nyc --reporter=text --reporter=html --reporter=lcovonly mocha"
}
}

@@ -9,3 +9,3 @@ # winston-telegram

[![npm Downloads](https://img.shields.io/npm/dw/winston-telegram.svg)](https://npmcharts.com/compare/winston-telegram?minimal=true)
[![Build Status](https://travis-ci.org/ivanmarban/winston-telegram.svg?branch=master)](https://travis-ci.org/ivanmarban/winston-telegram)
[![Tests Status](https://github.com/ivanmarban/winston-telegram/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/ivanmarban/winston-telegram/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/ivanmarban/winston-telegram/badge.svg?branch=master)](https://coveralls.io/github/ivanmarban/winston-telegram?branch=master)

@@ -12,0 +12,0 @@ [![dependencies Status](https://david-dm.org/ivanmarban/winston-telegram/status.svg)](https://david-dm.org/ivanmarban/winston-telegram)

@@ -214,7 +214,13 @@ const should = require('chai').should()

level: 'error',
formatMessage: function (options) {
formatMessage: function (options, info) {
let message = options.message
if (options.level === 'error') {
message = '[Error] ' + message
}
if (info.superUrgent) {
message += '!!!'
}
return message

@@ -224,4 +230,4 @@ }

)
winston.error('Some error!!')
assert.strictEqual(JSON.parse(spy.getCalls()[0].args[1]).text, '[Error] Some error!!')
winston.error('Some error', { superUrgent: true })
assert.strictEqual(JSON.parse(spy.getCalls()[0].args[1]).text, '[Error] Some error!!!')
assert.ok(spy.callCount === 1)

@@ -228,0 +234,0 @@ done()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc