serve-handler
Advanced tools
Comparing version 2.3.12 to 2.3.13
{ | ||
"name": "serve-handler", | ||
"version": "2.3.12", | ||
"version": "2.3.13", | ||
"description": "The routing foundation of `serve` and static deployments on Now", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -302,9 +302,6 @@ // Native | ||
details.relative += slashSuffix; | ||
// This is not camelcase, as we might be sending | ||
// the data away as JSON later, which shouldn't contain | ||
// any camelcased keys. | ||
details['is-directory'] = true; | ||
details.type = 'directory'; | ||
} else { | ||
details.ext = details.ext.split('.')[1] || 'txt'; | ||
details.type = 'file'; | ||
@@ -332,4 +329,4 @@ details.size = bytes(stats.size, { | ||
files = files.sort((a, b) => { | ||
const aIsDir = a['is-directory']; | ||
const bIsDir = b['is-directory']; | ||
const aIsDir = a.type === 'directory'; | ||
const bIsDir = b.type === 'directory'; | ||
@@ -359,5 +356,7 @@ /* istanbul ignore next */ | ||
files.unshift({ | ||
type: 'directory', | ||
base: '..', | ||
relative, | ||
title: relative | ||
title: relative, | ||
ext: '' | ||
}); | ||
@@ -364,0 +363,0 @@ } |
31232