fastify-static
Advanced tools
Comparing version 0.14.0 to 1.0.0
@@ -134,4 +134,4 @@ 'use strict' | ||
module.exports = fp(fastifyStatic, { | ||
fastify: '>= 1.2.0', | ||
fastify: '^1.11.0', | ||
name: 'fastify-static' | ||
}) |
{ | ||
"name": "fastify-static", | ||
"version": "0.14.0", | ||
"version": "1.0.0", | ||
"description": "Plugin for serving static files as fast as possible.", | ||
@@ -30,3 +30,3 @@ "main": "index.js", | ||
"fastify-plugin": "^1.2.0", | ||
"readable-stream": "^3.0.0", | ||
"readable-stream": "^3.0.2", | ||
"send": "^0.16.0" | ||
@@ -36,11 +36,11 @@ }, | ||
"coveralls": "^3.0.2", | ||
"fastify": "^1.9.0", | ||
"fastify-compress": "^0.6.0", | ||
"fastify": "^1.11.0", | ||
"fastify-compress": "^0.7.0", | ||
"pre-commit": "^1.2.2", | ||
"proxyquire": "^2.0.0", | ||
"proxyquire": "^2.1.0", | ||
"simple-get": "^3.0.3", | ||
"snazzy": "^7.0.0", | ||
"standard": "^11.0.0", | ||
"snazzy": "^8.0.0", | ||
"standard": "^12.0.0", | ||
"tap": "^12.0.0" | ||
} | ||
} |
# fastify-static | ||
[![Build Status](https://travis-ci.org/fastify/fastify-static.svg?branch=master)](https://travis-ci.org/fastify/fastify-static) [![Greenkeeper badge](https://badges.greenkeeper.io/fastify/fastify-static.svg)](https://greenkeeper.io/) [![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-static/badge.svg)](https://snyk.io/test/github/fastify/fastify-static) | ||
Plugin for serving static files as fast as possible. | ||
Plugin for serving static files as fast as possible. Supports Fastify versions `^1.11.0`. | ||
@@ -6,0 +6,0 @@ ## Install |
@@ -28,3 +28,3 @@ 'use strict' | ||
function genericErrorResponseChecks (t, response) { | ||
t.strictEqual(response.headers['content-type'], 'application/json') | ||
t.strictEqual(response.headers['content-type'], 'application/json; charset=utf-8') | ||
t.ok(response.headers.date) | ||
@@ -563,4 +563,4 @@ } | ||
t.plan(1) | ||
const pluginOptions = {root: path.join(__dirname, 'static')} | ||
const fastify = Fastify({logger: false}) | ||
const pluginOptions = { root: path.join(__dirname, 'static') } | ||
const fastify = Fastify({ logger: false }) | ||
t.doesNotThrow(() => fastify.register(fastifyStatic, pluginOptions)) | ||
@@ -583,3 +583,3 @@ }) | ||
} | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
const fastifyStatic = require('proxyquire')('../', { | ||
@@ -602,3 +602,3 @@ send: function sendStub (req, pathName, options) { | ||
fastify.register(fastifyStatic, pluginOptions) | ||
fastify.inject({url: '/index.html'}) | ||
fastify.inject({ url: '/index.html' }) | ||
}) | ||
@@ -646,3 +646,3 @@ | ||
const pluginOptions = {} | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -657,3 +657,3 @@ .ready(err => { | ||
const pluginOptions = { root: 42 } | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -668,3 +668,3 @@ .ready(err => { | ||
const pluginOptions = { root: './my/path' } | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -679,3 +679,3 @@ .ready(err => { | ||
const pluginOptions = { root: path.join(__dirname, 'foo', 'bar') } | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -690,3 +690,3 @@ .ready(err => { | ||
const pluginOptions = { root: __filename } | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -701,3 +701,3 @@ .ready(err => { | ||
const pluginOptions = { root: __dirname, setHeaders: 'headers' } | ||
const fastify = Fastify({logger: false}) | ||
const fastify = Fastify({ logger: false }) | ||
fastify.register(fastifyStatic, pluginOptions) | ||
@@ -704,0 +704,0 @@ .ready(err => { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
38616
17
0
1
Updatedreadable-stream@^3.0.2