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

winston-daily-rotate-file

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-daily-rotate-file - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

4

index.js

@@ -601,2 +601,6 @@ 'use strict';

DailyRotateFile.prototype._getFilename = function () {
if (this.datePattern.substring(0, 1) === '.') {
this.datePattern = this.datePattern.substring(1);
}
var formattedDate = this.getFormattedDate();

@@ -603,0 +607,0 @@

2

package.json
{
"name": "winston-daily-rotate-file",
"version": "1.1.2",
"version": "1.1.3",
"description": "A transport for winston which logs to a rotating file each day.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -52,2 +52,24 @@ /* eslint-disable max-nested-callbacks,no-unused-expressions */

});
it('should remove leading dot if one is provided with datePattern', function () {
var now = moment().format('YYYYMMDD');
var transport = new DailyRotateFile({
filename: path.join(fixturesDir, 'prepend-false.log'),
prepend: false,
datePattern: '.yyyyMMdd'
});
expect(transport._getFilename()).to.equal('prepend-false.log.' + now);
});
it('should remove leading dot if one is provided with datePattern when prepend option is true', function () {
var now = moment().format('YYYY-MM-DD');
var transport = new DailyRotateFile({
filename: path.join(fixturesDir, 'prepend-true.log'),
prepend: true,
datePattern: '.yyyy-MM-dd'
});
expect(transport._getFilename()).to.equal(now + '.prepend-true.log');
});
});

@@ -54,0 +76,0 @@

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