Comparing version 1.2.1 to 1.2.2
# CHANGELOG | ||
### 1.2.2 | ||
**2017/12/05** | ||
- [#4], [#11] Fix timestamp and replace `date-fns` with `fecha` (with test cases) [`@ChrisAlderson`]. | ||
### 1.2.1 | ||
@@ -4,0 +9,0 @@ **2017/10/01** |
@@ -0,1 +1,3 @@ | ||
/* eslint no-unused-vars: 0 */ | ||
const { format } = require('../'); | ||
@@ -21,4 +23,4 @@ const { combine, timestamp, label } = format; | ||
const willNeverThrow = format.combine( | ||
format(info => { return false })(), // Ignores everything | ||
format(info => { throw new Error('Never reached') })() | ||
format(info => { return false; })(), // Ignores everything | ||
format(info => { throw new Error('Never reached'); })() | ||
); | ||
@@ -29,2 +31,2 @@ | ||
message: 'wow such testing' | ||
})) | ||
})); |
@@ -0,1 +1,2 @@ | ||
/* eslint no-unused-vars: 0 */ | ||
const { format } = require('../'); | ||
@@ -2,0 +3,0 @@ |
{ | ||
"name": "logform", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "An mutable object-based log format designed for chaining & objectMode streams.", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "populist *.js", | ||
"pretest": "populist *.js test/*.js examples/*.js", | ||
"lint": "populist *.js test/*.js examples/*.js", | ||
"pretest": "npm run lint", | ||
"test": "nyc mocha test/*.test.js" | ||
@@ -29,3 +29,3 @@ }, | ||
"colors": "^1.1.2", | ||
"date-fns": "^1.28.5" | ||
"fecha": "^2.3.2" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
@@ -12,3 +12,3 @@ # logform | ||
format.align(), | ||
format.printf(info => `${info.timestamp} ${info.level}: ${message}`) | ||
format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`) | ||
); | ||
@@ -15,0 +15,0 @@ ``` |
'use strict'; | ||
const fecha = require('fecha'); | ||
const format = require('./format'); | ||
const formatDate = require('date-fns/format'); | ||
@@ -18,3 +18,3 @@ /* | ||
? opts.format() | ||
: formatDate(opts.format); | ||
: fecha.format(new Date(), opts.format); | ||
} | ||
@@ -21,0 +21,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
527
23548
+ Addedfecha@^2.3.2
+ Addedfecha@2.3.3(transitive)
- Removeddate-fns@^1.28.5
- Removeddate-fns@1.30.1(transitive)