Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ unreleased
* deps: depd@~2.0.0
- Replace internal `eval` usage with `Function` constructor
- Use instance methods on `process` to check for listeners
* refactored deprecation message for `default` format to fix issue when using `esm` module

1.9.1 / 2018-09-10
==================
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ morgan.format('common', ':remote-addr - :remote-user [:date[clf]] ":method :url
* Default format.
*/

// @deprecated
morgan.format('default', ':remote-addr - :remote-user [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"')
deprecate.property(morgan, 'default', 'default format: use combined format')

/**
* Short format.
Expand Down Expand Up @@ -448,6 +448,10 @@ function getFormatFunction (name) {
// lookup format
var fmt = morgan[name] || name || morgan.default

if (fmt === morgan.default) {
deprecate('default format: use combined format')
}

// return compiled format
return typeof fmt !== 'function'
? compile(fmt)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"on-headers": "~1.0.1"
},
"devDependencies": {
"eslint": "5.9.0",
"eslint": "5.10.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-markdown": "1.0.0-rc.0",
Expand Down