Skip to content

Commit

Permalink
Merge branch 'release/v2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmarban committed Sep 25, 2021
2 parents 0752bce + ca99b66 commit 65516f9
Show file tree
Hide file tree
Showing 10 changed files with 5,374 additions and 5,606 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: tests
on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
node: [12, 14, 16]
name: Node ${{ matrix.node }} test
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Set Node.js version ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.node }}
parallel: true

finish:
name: Coveralls Coverage
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- repo: https://github.com/Yelp/detect-secrets
rev: v1.1.0
hooks:
- id: detect-secrets
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [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
### Changed
- [#26](https://github.com/ivanmarban/winston-telegram/issues/26) Set `handleExceptions` option `true` by default.
Expand Down Expand Up @@ -132,7 +136,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [v0.1.0] - 2015-11-12
- First version.

[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
[v2.3.4]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.3...v2.3.4
[v2.3.3]: https://github.com/ivanmarban/winston-telegram/compare/v2.3.2...v2.3.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A [Telegram][0] transport for [winston][1].

[![Version npm](https://img.shields.io/npm/v/winston-telegram.svg)](https://www.npmjs.com/package/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)
[![dependencies Status](https://david-dm.org/ivanmarban/winston-telegram/status.svg)](https://david-dm.org/ivanmarban/winston-telegram)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
Expand Down
2 changes: 1 addition & 1 deletion lib/winston-telegram.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare namespace WinstonTelegram {
/** Format output message. (default "[{level}] [message]") */
template?: string
/** Format output message by own method. */
formatMessage?: (params: WinstonTelegram.FormatOptions) => string
formatMessage?: (params: WinstonTelegram.FormatOptions, info: any) => string
/** Handle uncaught exceptions. (default true) */
handleExceptions?: boolean
/** Time in ms within which to batch messages together. (default = 0) (0 = disabled) */
Expand Down
2 changes: 1 addition & 1 deletion lib/winston-telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = class Telegram extends Transport {
}

if (this.formatMessage) {
messageText = this.formatMessage(formatOptions)
messageText = this.formatMessage(formatOptions, info)
} else {
messageText = format(this.template, formatOptions)
}
Expand Down
Loading

0 comments on commit 65516f9

Please sign in to comment.