Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update serve-handler to v6.1.0 and enable etag option by default #546

Merged
merged 3 commits into from Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions bin/serve.js
Expand Up @@ -83,6 +83,8 @@ const getHelp = () => chalk`

-n, --no-clipboard Do not copy the local address to the clipboard

--no-etag Send \`Last-Modified\` header instead of \`ETag\`

-S, --symlinks Resolve symlinks instead of showing 404 errors

{bold ENDPOINTS}
Expand Down Expand Up @@ -327,6 +329,9 @@ const loadConfig = async (cwd, entry, args) => {
}
}

// "ETag" headers are enabled by default unless `--no-etag` is provided
config.etag = !args['--no-etag'];

return config;
};

Expand All @@ -343,6 +348,7 @@ const loadConfig = async (cwd, entry, args) => {
'--config': String,
'--no-clipboard': Boolean,
'--no-compression': Boolean,
'--no-etag': Boolean,
'--symlinks': Boolean,
'-h': '--help',
'-v': '--version',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -43,7 +43,7 @@
"chalk": "2.4.1",
"clipboardy": "1.2.3",
"compression": "1.7.3",
"serve-handler": "6.0.2",
"serve-handler": "6.1.0",
"update-check": "1.5.2"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -977,10 +977,10 @@ semver@^5.5.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==

serve-handler@6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.0.2.tgz#c5afbace1a4aa28645f26483d64725b45f285048"
integrity sha512-D1zgDpvx9Rgjip6rzY2QBjlZwfr/oiDSg66HipOWkEw1appHn7/mXdVRL6F8+bd1KD117Wch4+4x78OTXQVwDg==
serve-handler@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.0.tgz#f1606dc6ff8f9029a1ee042c11dfe7903a5cb92e"
integrity sha512-63N075Tn3PsFYcu0NVV7tb367UbiW3gnC+/50ohL4oqOhAG6bmbaWqiRcXQgbzqc0ALBjSAzg7VTfa0Qw4E3hA==
dependencies:
bytes "3.0.0"
content-disposition "0.5.2"
Expand Down