From 2d478973281f098695b626f6969fb7fcd881c869 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 12 Dec 2021 22:08:36 -0500 Subject: [PATCH 01/29] Remove deprecated maxage method --- HISTORY.md | 5 +++++ index.js | 19 ------------------- test/send.js | 50 -------------------------------------------------- 3 files changed, 5 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 8aa3ab3..20cf3a1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +1.x +=== + + * Remove `send.maxage()` -- use `maxAge` in `options` + 0.17.2 / 2021-12-11 =================== diff --git a/index.js b/index.js index 06d7507..63aa3a8 100644 --- a/index.js +++ b/index.js @@ -237,25 +237,6 @@ SendStream.prototype.from = deprecate.function(SendStream.prototype.root, SendStream.prototype.root = deprecate.function(SendStream.prototype.root, 'send.root: pass root as option') -/** - * Set max-age to `maxAge`. - * - * @param {Number} maxAge - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) { - this._maxage = typeof maxAge === 'string' - ? ms(maxAge) - : Number(maxAge) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - debug('max-age %d', this._maxage) - return this -}, 'send.maxage: pass maxAge as option') - /** * Emit error with `status`. * diff --git a/test/send.js b/test/send.js index 4daacfa..5c7986c 100644 --- a/test/send.js +++ b/test/send.js @@ -853,56 +853,6 @@ describe('send(file).pipe(res)', function () { }) }) - describe('.maxage()', function () { - it('should default to 0', function (done) { - var app = http.createServer(function (req, res) { - send(req, 'test/fixtures/name.txt') - .maxage(undefined) - .pipe(res) - }) - - request(app) - .get('/name.txt') - .expect('Cache-Control', 'public, max-age=0', done) - }) - - it('should floor to integer', function (done) { - var app = http.createServer(function (req, res) { - send(req, 'test/fixtures/name.txt') - .maxage(1234) - .pipe(res) - }) - - request(app) - .get('/name.txt') - .expect('Cache-Control', 'public, max-age=1', done) - }) - - it('should accept string', function (done) { - var app = http.createServer(function (req, res) { - send(req, 'test/fixtures/name.txt') - .maxage('30d') - .pipe(res) - }) - - request(app) - .get('/name.txt') - .expect('Cache-Control', 'public, max-age=2592000', done) - }) - - it('should max at 1 year', function (done) { - var app = http.createServer(function (req, res) { - send(req, 'test/fixtures/name.txt') - .maxage(Infinity) - .pipe(res) - }) - - request(app) - .get('/name.txt') - .expect('Cache-Control', 'public, max-age=31536000', done) - }) - }) - describe('.root()', function () { it('should set root', function (done) { var app = http.createServer(function (req, res) { From 707070d4dbcf61a74b1b339e383807233bdac1e5 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 12 Dec 2021 22:15:02 -0500 Subject: [PATCH 02/29] Remove deprecated index method --- HISTORY.md | 1 + index.js | 16 ---------------- test/send.js | 38 -------------------------------------- 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 20cf3a1..a660ab8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ 1.x === + * Remove `send.index()` -- use `index` in `options` * Remove `send.maxage()` -- use `maxAge` in `options` 0.17.2 / 2021-12-11 diff --git a/index.js b/index.js index 63aa3a8..71f42e7 100644 --- a/index.js +++ b/index.js @@ -201,22 +201,6 @@ SendStream.prototype.hidden = deprecate.function(function hidden (val) { return this }, 'send.hidden: use dotfiles option') -/** - * Set index `paths`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean|Array} paths - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = deprecate.function(function index (paths) { - var index = !paths ? [] : normalizeList(paths, 'paths argument') - debug('index %o', paths) - this._index = index - return this -}, 'send.index: pass index as option') - /** * Set root `path`. * diff --git a/test/send.js b/test/send.js index 5c7986c..ba247cd 100644 --- a/test/send.js +++ b/test/send.js @@ -815,44 +815,6 @@ describe('send(file).pipe(res)', function () { }) }) - describe('.index()', function () { - it('should be configurable', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url, { root: fixtures }) - .index('tobi.html') - .pipe(res) - }) - - request(app) - .get('/') - .expect(200, '

tobi

', done) - }) - - it('should support disabling', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url, { root: fixtures }) - .index(false) - .pipe(res) - }) - - request(app) - .get('/pets/') - .expect(403, done) - }) - - it('should support fallbacks', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url, { root: fixtures }) - .index(['default.htm', 'index.html']) - .pipe(res) - }) - - request(app) - .get('/pets/') - .expect(200, fs.readFileSync(path.join(fixtures, 'pets', 'index.html'), 'utf8'), done) - }) - }) - describe('.root()', function () { it('should set root', function (done) { var app = http.createServer(function (req, res) { From 0abe1e0c6fe49f48605d2659ee1bdb5f830ae16d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 12 Dec 2021 22:19:35 -0500 Subject: [PATCH 03/29] Remove deprecated from alias for root --- HISTORY.md | 1 + index.js | 7 ------- test/send.js | 22 ---------------------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a660ab8..4d3caec 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ 1.x === + * Remove `from` alias to `root` -- use `root` directly * Remove `send.index()` -- use `index` in `options` * Remove `send.maxage()` -- use `maxAge` in `options` diff --git a/index.js b/index.js index 71f42e7..1f6baa7 100644 --- a/index.js +++ b/index.js @@ -160,10 +160,6 @@ function SendStream (req, path, options) { this._root = opts.root ? resolve(opts.root) : null - - if (!this._root && opts.from) { - this.from(opts.from) - } } /** @@ -215,9 +211,6 @@ SendStream.prototype.root = function root (path) { return this } -SendStream.prototype.from = deprecate.function(SendStream.prototype.root, - 'send.from: pass root as option') - SendStream.prototype.root = deprecate.function(SendStream.prototype.root, 'send.root: pass root as option') diff --git a/test/send.js b/test/send.js index ba247cd..0935ab7 100644 --- a/test/send.js +++ b/test/send.js @@ -787,20 +787,6 @@ describe('send(file).pipe(res)', function () { }) }) - describe('.from()', function () { - it('should set with deprecated from', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url) - .from(fixtures) - .pipe(res) - }) - - request(app) - .get('/pets/../name.txt') - .expect(200, 'tobi', done) - }) - }) - describe('.hidden()', function () { it('should default support sending hidden files', function (done) { var app = http.createServer(function (req, res) { @@ -939,14 +925,6 @@ describe('send(file, options)', function () { }) }) - describe('from', function () { - it('should set with deprecated from', function (done) { - request(createServer({ from: fixtures })) - .get('/pets/../name.txt') - .expect(200, 'tobi', done) - }) - }) - describe('dotfiles', function () { it('should default to "ignore"', function (done) { request(createServer({ root: fixtures })) From 07eaa191856ce9410439755e248c6e7f1458d6b2 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 13 Dec 2021 01:03:52 -0500 Subject: [PATCH 04/29] Remove deprecated etag method --- HISTORY.md | 1 + index.js | 14 -------------- test/send.js | 15 --------------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 4d3caec..69e1ffc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,7 @@ === * Remove `from` alias to `root` -- use `root` directly + * Remove `send.etag()` -- use `etag` in `options` * Remove `send.index()` -- use `index` in `options` * Remove `send.maxage()` -- use `maxAge` in `options` diff --git a/index.js b/index.js index 1f6baa7..d171a05 100644 --- a/index.js +++ b/index.js @@ -168,20 +168,6 @@ function SendStream (req, path, options) { util.inherits(SendStream, Stream) -/** - * Enable or disable etag generation. - * - * @param {Boolean} val - * @return {SendStream} - * @api public - */ - -SendStream.prototype.etag = deprecate.function(function etag (val) { - this._etag = Boolean(val) - debug('etag %s', this._etag) - return this -}, 'send.etag: pass etag as option') - /** * Enable or disable "hidden" (dot) files. * diff --git a/test/send.js b/test/send.js index 0935ab7..3ea6084 100644 --- a/test/send.js +++ b/test/send.js @@ -772,21 +772,6 @@ describe('send(file).pipe(res)', function () { }) }) - describe('.etag()', function () { - it('should support disabling etags', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url, { root: fixtures }) - .etag(false) - .pipe(res) - }) - - request(app) - .get('/name.txt') - .expect(shouldNotHaveHeader('ETag')) - .expect(200, done) - }) - }) - describe('.hidden()', function () { it('should default support sending hidden files', function (done) { var app = http.createServer(function (req, res) { From a7eb68c5be7365aeb403e32ac5633fab7e91965d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 13 Dec 2021 01:09:22 -0500 Subject: [PATCH 05/29] Remove deprecated root method --- HISTORY.md | 1 + index.js | 17 ----------------- test/send.js | 14 -------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 69e1ffc..1d9a5f3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ * Remove `send.etag()` -- use `etag` in `options` * Remove `send.index()` -- use `index` in `options` * Remove `send.maxage()` -- use `maxAge` in `options` + * Remove `send.root()` -- use `root` in `options` 0.17.2 / 2021-12-11 =================== diff --git a/index.js b/index.js index d171a05..71625f2 100644 --- a/index.js +++ b/index.js @@ -183,23 +183,6 @@ SendStream.prototype.hidden = deprecate.function(function hidden (val) { return this }, 'send.hidden: use dotfiles option') -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = function root (path) { - this._root = resolve(String(path)) - debug('root %s', this._root) - return this -} - -SendStream.prototype.root = deprecate.function(SendStream.prototype.root, - 'send.root: pass root as option') - /** * Emit error with `status`. * diff --git a/test/send.js b/test/send.js index 3ea6084..d74890d 100644 --- a/test/send.js +++ b/test/send.js @@ -785,20 +785,6 @@ describe('send(file).pipe(res)', function () { .expect(200, 'secret', done) }) }) - - describe('.root()', function () { - it('should set root', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url) - .root(fixtures) - .pipe(res) - }) - - request(app) - .get('/pets/../name.txt') - .expect(200, 'tobi', done) - }) - }) }) describe('send(file, options)', function () { From e9ff7d9c4aff3f7e5bb8aaf28180b2a41aaa4ede Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 13 Dec 2021 01:21:03 -0500 Subject: [PATCH 06/29] Drop support for Node.js 0.8 --- .github/workflows/ci.yml | 16 ---------------- HISTORY.md | 1 + index.js | 18 ++---------------- package.json | 2 +- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f80ad3..12a1296 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ jobs: strategy: matrix: name: - - Node.js 0.8 - Node.js 0.10 - Node.js 0.12 - io.js 1.x @@ -28,11 +27,6 @@ jobs: - Node.js 13.x include: - - name: Node.js 0.8 - node-version: "0.8" - npm-i: mocha@2.5.3 supertest@1.1.0 - npm-rm: nyc - - name: Node.js 0.10 node-version: "0.10" npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 @@ -110,21 +104,11 @@ jobs: shell: bash -eo pipefail -l {0} run: | nvm install --default ${{ matrix.node-version }} - if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then - nvm install --alias=npm 0.10 - nvm use ${{ matrix.node-version }} - sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" - npm config set strict-ssl false - fi dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" - name: Configure npm run: npm config set shrinkwrap false - - name: Remove npm module(s) ${{ matrix.npm-rm }} - run: npm rm --silent --save-dev ${{ matrix.npm-rm }} - if: matrix.npm-rm != '' - - name: Install npm module(s) ${{ matrix.npm-i }} run: npm install --save-dev ${{ matrix.npm-i }} if: matrix.npm-i != '' diff --git a/HISTORY.md b/HISTORY.md index 1d9a5f3..66d3ced 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ 1.x === + * Drop support for Node.js 0.8 * Remove `from` alias to `root` -- use `root` directly * Remove `send.etag()` -- use `etag` in `options` * Remove `send.index()` -- use `index` in `options` diff --git a/index.js b/index.js index 71625f2..74bceb1 100644 --- a/index.js +++ b/index.js @@ -539,7 +539,7 @@ SendStream.prototype.send = function send (path, stat) { var ranges = req.headers.range var offset = options.start || 0 - if (headersSent(res)) { + if (res.headersSent) { // impossible to send now this.headersAlreadySent() return @@ -936,7 +936,7 @@ function getHeaderNames (res) { /** * Determine if emitter has listeners of a given type. * - * The way to do this check is done three different ways in Node.js >= 0.8 + * The way to do this check is done three different ways in Node.js >= 0.10 * so this consolidates them into a minimal set using instance methods. * * @param {EventEmitter} emitter @@ -953,20 +953,6 @@ function hasListeners (emitter, type) { return count > 0 } -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - /** * Normalize the index option into an array. * diff --git a/package.json b/package.json index f58140c..2bbce46 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "index.js" ], "engines": { - "node": ">= 0.8.0" + "node": ">= 0.10" }, "scripts": { "lint": "eslint .", From 889d3104f4ef6bd9c062012bc569be6a9fbb92de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 5 Mar 2020 17:37:06 +0000 Subject: [PATCH 07/29] Use mime-types for file to content type mapping closes #192 --- HISTORY.md | 1 + README.md | 27 ++++++++++----------------- index.js | 15 ++++----------- package.json | 2 +- test/send.js | 45 +++++++++------------------------------------ 5 files changed, 25 insertions(+), 65 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 66d3ced..82e1ff2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,7 @@ * Remove `send.index()` -- use `index` in `options` * Remove `send.maxage()` -- use `maxAge` in `options` * Remove `send.root()` -- use `root` in `options` + * Use `mime-types` for file to content type mapping -- removed `send.mime` 0.17.2 / 2021-12-11 =================== diff --git a/README.md b/README.md index fc1d3a1..984a952 100644 --- a/README.md +++ b/README.md @@ -133,15 +133,6 @@ The `SendStream` is an event emitter and will emit the following events: The `pipe` method is used to pipe the response into the Node.js HTTP response object, typically `send(req, path, options).pipe(res)`. -### .mime - -The `mime` export is the global instance of of the -[`mime` npm module](https://www.npmjs.com/package/mime). - -This is used to configure the MIME types that are associated with file extensions -as well as other options for how to resolve the MIME type of a file (like the -default type to use for an unknown file extension). - ## Error-handling By default when no `error` listeners are present an automatic response will be @@ -210,20 +201,22 @@ server.listen(3000) ### Custom file types ```js +var extname = require('path').extname var http = require('http') var parseUrl = require('parseurl') var send = require('send') -// Default unknown types to text/plain -send.mime.default_type = 'text/plain' - -// Add a custom type -send.mime.define({ - 'application/x-my-type': ['x-mt', 'x-mtt'] -}) - var server = http.createServer(function onRequest (req, res) { send(req, parseUrl(req).pathname, { root: '/www/public' }) + .on('headers', function (res, path) { + switch (extname(path)) { + case '.x-mt': + case '.x-mtt': + // custom type for these extensions + res.setHeader('Content-Type', 'application/x-my-type') + break + } + }) .pipe(res) }) diff --git a/index.js b/index.js index 74bceb1..2c6a789 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ var escapeHtml = require('escape-html') var etag = require('etag') var fresh = require('fresh') var fs = require('fs') -var mime = require('mime') +var mime = require('mime-types') var ms = require('ms') var onFinished = require('on-finished') var parseRange = require('range-parser') @@ -68,7 +68,6 @@ var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ */ module.exports = send -module.exports.mime = mime /** * Return a `SendStream` for `req` and `path`. @@ -762,17 +761,11 @@ SendStream.prototype.type = function type (path) { if (res.getHeader('Content-Type')) return - var type = mime.lookup(path) - - if (!type) { - debug('no content-type') - return - } - - var charset = mime.charsets.lookup(type) + var ext = extname(path) + var type = mime.contentType(ext) || 'application/octet-stream' debug('content-type %s', type) - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')) + res.setHeader('Content-Type', type) } /** diff --git a/package.json b/package.json index 2bbce46..0288573 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "1.8.1", - "mime": "1.6.0", + "mime-types": "~2.1.34", "ms": "2.1.3", "on-finished": "~2.3.0", "range-parser": "~1.2.1", diff --git a/test/send.js b/test/send.js index d74890d..0be4282 100644 --- a/test/send.js +++ b/test/send.js @@ -147,16 +147,23 @@ describe('send(file).pipe(res)', function () { it('should set Content-Type via mime map', function (done) { request(app) .get('/name.txt') - .expect('Content-Type', 'text/plain; charset=UTF-8') + .expect('Content-Type', 'text/plain; charset=utf-8') .expect(200, function (err) { if (err) return done(err) request(app) .get('/tobi.html') - .expect('Content-Type', 'text/html; charset=UTF-8') + .expect('Content-Type', 'text/html; charset=utf-8') .expect(200, done) }) }) + it('should default Content-Type to octet-stream', function (done) { + request(app) + .get('/no_ext') + .expect('Content-Type', 'application/octet-stream') + .expect(200, done) + }) + it('should 404 if file disappears after stat, before open', function (done) { var app = http.createServer(function (req, res) { send(req, req.url, { root: 'test/fixtures' }) @@ -1281,40 +1288,6 @@ describe('send(file, options)', function () { }) }) -describe('send.mime', function () { - it('should be exposed', function () { - assert.ok(send.mime) - }) - - describe('.default_type', function () { - before(function () { - this.default_type = send.mime.default_type - }) - - afterEach(function () { - send.mime.default_type = this.default_type - }) - - it('should change the default type', function (done) { - send.mime.default_type = 'text/plain' - - request(createServer({ root: fixtures })) - .get('/no_ext') - .expect('Content-Type', 'text/plain; charset=UTF-8') - .expect(200, done) - }) - - it('should not add Content-Type for undefined default', function (done) { - send.mime.default_type = undefined - - request(createServer({ root: fixtures })) - .get('/no_ext') - .expect(shouldNotHaveHeader('Content-Type')) - .expect(200, done) - }) - }) -}) - function createServer (opts, fn) { return http.createServer(function onRequest (req, res) { try { From 85dfcd7bc86b5661f92582ba86ce3fbfa9800dce Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 2 Feb 2022 23:23:34 -0500 Subject: [PATCH 08/29] Remove deprecated hidden option --- HISTORY.md | 1 + index.js | 40 ++-------------------------------------- package.json | 1 - test/send.js | 32 ++------------------------------ 4 files changed, 5 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 82e1ff2..45b8a43 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,7 @@ === * Drop support for Node.js 0.8 + * Remove `hidden` option -- use `dotfiles` option * Remove `from` alias to `root` -- use `root` directly * Remove `send.etag()` -- use `etag` in `options` * Remove `send.index()` -- use `index` in `options` diff --git a/index.js b/index.js index 2c6a789..3520709 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,6 @@ var createError = require('http-errors') var debug = require('debug')('send') -var deprecate = require('depd')('send') var destroy = require('destroy') var encodeUrl = require('encodeurl') var escapeHtml = require('escape-html') @@ -121,17 +120,6 @@ function SendStream (req, path, options) { throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') } - this._hidden = Boolean(opts.hidden) - - if (opts.hidden !== undefined) { - deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') - } - - // legacy support - if (opts.dotfiles === undefined) { - this._dotfiles = undefined - } - this._extensions = opts.extensions !== undefined ? normalizeList(opts.extensions, 'extensions option') : [] @@ -167,21 +155,6 @@ function SendStream (req, path, options) { util.inherits(SendStream, Stream) -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = deprecate.function(function hidden (val) { - this._hidden = Boolean(val) - this._dotfiles = undefined - debug('hidden %s', this._hidden) - return this -}, 'send.hidden: use dotfiles option') - /** * Emit error with `status`. * @@ -489,17 +462,8 @@ SendStream.prototype.pipe = function pipe (res) { // dotfile handling if (containsDotFile(parts)) { - var access = this._dotfiles - - // legacy support - if (access === undefined) { - access = parts[parts.length - 1][0] === '.' - ? (this._hidden ? 'allow' : 'ignore') - : 'allow' - } - - debug('%s dotfile "%s"', access, path) - switch (access) { + debug('%s dotfile "%s"', this._dotfiles, path) + switch (this._dotfiles) { case 'allow': break case 'deny': diff --git a/package.json b/package.json index 0288573..a815ce6 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ ], "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", "destroy": "~1.0.4", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", diff --git a/test/send.js b/test/send.js index 0be4282..e6c2e02 100644 --- a/test/send.js +++ b/test/send.js @@ -778,20 +778,6 @@ describe('send(file).pipe(res)', function () { .expect(416, done) }) }) - - describe('.hidden()', function () { - it('should default support sending hidden files', function (done) { - var app = http.createServer(function (req, res) { - send(req, req.url, { root: fixtures }) - .hidden(true) - .pipe(res) - }) - - request(app) - .get('/.hidden.txt') - .expect(200, 'secret', done) - }) - }) }) describe('send(file, options)', function () { @@ -910,10 +896,10 @@ describe('send(file, options)', function () { .expect(404, done) }) - it('should allow file within dotfile directory for back-compat', function (done) { + it('should ignore file within dotfile directory', function (done) { request(createServer({ root: fixtures })) .get('/.mine/name.txt') - .expect(200, /tobi/, done) + .expect(404, done) }) it('should reject bad value', function (done) { @@ -1063,20 +1049,6 @@ describe('send(file, options)', function () { }) }) - describe('hidden', function () { - it('should default to false', function (done) { - request(app) - .get('/.hidden.txt') - .expect(404, 'Not Found', done) - }) - - it('should default support sending hidden files', function (done) { - request(createServer({ hidden: true, root: fixtures })) - .get('/.hidden.txt') - .expect(200, 'secret', done) - }) - }) - describe('immutable', function () { it('should default to false', function (done) { request(createServer({ root: fixtures })) From 999788bcfcfa565b1ba55b451c18821afb978c93 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 4 Feb 2022 21:26:41 -0500 Subject: [PATCH 09/29] deps: debug@3.1.0 --- HISTORY.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 45b8a43..d75ba7b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,6 +9,12 @@ * Remove `send.maxage()` -- use `maxAge` in `options` * Remove `send.root()` -- use `root` in `options` * Use `mime-types` for file to content type mapping -- removed `send.mime` + * deps: debug@3.1.0 + - Add `DEBUG_HIDE_DATE` environment variable + - Change timer to per-namespace instead of global + - Change non-TTY date format + - Remove `DEBUG_FD` environment variable support + - Support 256 namespace colors 0.17.2 / 2021-12-11 =================== diff --git a/package.json b/package.json index a815ce6..7741d97 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "server" ], "dependencies": { - "debug": "2.6.9", + "debug": "3.1.0", "destroy": "~1.0.4", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", From 771c1f1c43da740d4aa92bd106412176ae0bc733 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 4 Feb 2022 21:36:28 -0500 Subject: [PATCH 10/29] build: add version script for npm version releases --- package.json | 3 +- scripts/version-history.js | 63 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 scripts/version-history.js diff --git a/package.json b/package.json index 7741d97..7d448ee 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "lint": "eslint .", "test": "mocha --check-leaks --reporter spec --bail", "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" } } diff --git a/scripts/version-history.js b/scripts/version-history.js new file mode 100644 index 0000000..c58268a --- /dev/null +++ b/scripts/version-history.js @@ -0,0 +1,63 @@ +'use strict' + +var fs = require('fs') +var path = require('path') + +var HISTORY_FILE_PATH = path.join(__dirname, '..', 'HISTORY.md') +var MD_HEADER_REGEXP = /^====*$/ +var VERSION = process.env.npm_package_version +var VERSION_PLACEHOLDER_REGEXP = /^(?:unreleased|(\d+\.)+x)$/ + +var historyFileLines = fs.readFileSync(HISTORY_FILE_PATH, 'utf-8').split('\n') + +if (!MD_HEADER_REGEXP.test(historyFileLines[1])) { + console.error('Missing header in HISTORY.md') + process.exit(1) +} + +if (!VERSION_PLACEHOLDER_REGEXP.test(historyFileLines[0])) { + console.error('Missing placeholder version in HISTORY.md') + process.exit(1) +} + +if (historyFileLines[0].indexOf('x') !== -1) { + var versionCheckRegExp = new RegExp('^' + historyFileLines[0].replace('x', '.+') + '$') + + if (!versionCheckRegExp.test(VERSION)) { + console.error('Version %s does not match placeholder %s', VERSION, historyFileLines[0]) + process.exit(1) + } +} + +historyFileLines[0] = VERSION + ' / ' + getLocaleDate() +historyFileLines[1] = repeat('=', historyFileLines[0].length) + +fs.writeFileSync(HISTORY_FILE_PATH, historyFileLines.join('\n')) + +function getLocaleDate () { + var now = new Date() + + return zeroPad(now.getFullYear(), 4) + '-' + + zeroPad(now.getMonth() + 1, 2) + '-' + + zeroPad(now.getDate(), 2) +} + +function repeat (str, length) { + var out = '' + + for (var i = 0; i < length; i++) { + out += str + } + + return out +} + +function zeroPad (number, length) { + var num = number.toString() + + while (num.length < length) { + num = '0' + num + } + + return num +} From 00d54b6f7e61d391fe954ce7e0b46b766ffb7fc6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 4 Feb 2022 21:40:50 -0500 Subject: [PATCH 11/29] 1.0.0-beta.1 --- HISTORY.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d75ba7b..e1861a2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,5 @@ -1.x -=== +1.0.0-beta.1 / 2022-02-04 +========================= * Drop support for Node.js 0.8 * Remove `hidden` option -- use `dotfiles` option diff --git a/package.json b/package.json index 7d448ee..4a1a3fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "send", "description": "Better streaming static file server with Range and conditional-GET support", - "version": "0.17.2", + "version": "1.0.0-beta.1", "author": "TJ Holowaychuk ", "contributors": [ "Douglas Christopher Wilson ", From 384820d2661e4880af04e7a01e0457c2e36eef8c Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Wed, 20 Mar 2024 19:42:58 -0500 Subject: [PATCH 12/29] build: fixed ci in node 8/9 with nyc pin back --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dae43be..46ddc0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,11 +69,11 @@ jobs: - name: Node.js 8.x node-version: "8.16" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 9.x node-version: "9.11" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 10.x node-version: "10.24" From e1c26fe57d164fc83dc387865c034577c6ba2971 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Wed, 20 Mar 2024 19:49:01 -0500 Subject: [PATCH 13/29] 1.0.0-beta.2 --- HISTORY.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 9aaa5fb..2f27fe2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +1.0.0-beta.2 / 2024-03-04 +========================= + + * Changes from 0.18.0 + 1.0.0-beta.1 / 2022-02-04 ========================= diff --git a/package.json b/package.json index 58e2a03..7a70567 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "send", "description": "Better streaming static file server with Range and conditional-GET support", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "author": "TJ Holowaychuk ", "contributors": [ "Douglas Christopher Wilson ", From 4baced084b6f76a4bd5c535b82f20ca0df0eda88 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 17:30:16 -0700 Subject: [PATCH 14/29] fix!: drop node <18 --- .github/workflows/ci.yml | 125 +++++++-------------------------------- 1 file changed, 20 insertions(+), 105 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46ddc0e..281ec09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,15 @@ name: ci on: -- pull_request -- push + push: + branches: + - master + - '1.0' + paths-ignore: + - '*.md' + pull_request: + paths-ignore: + - '*.md' jobs: test: @@ -10,99 +17,22 @@ jobs: strategy: matrix: name: - - Node.js 0.10 - - Node.js 0.12 - - io.js 1.x - - io.js 2.x - - io.js 3.x - - Node.js 4.x - - Node.js 5.x - - Node.js 6.x - - Node.js 7.x - - Node.js 8.x - - Node.js 9.x - - Node.js 10.x - - Node.js 11.x - - Node.js 12.x - - Node.js 13.x - - Node.js 14.x - - Node.js 15.x - - Node.js 16.x - - Node.js 17.x + - Node.js 18.x + - Node.js 20.x + - Node.js 22.x include: - - name: Node.js 0.10 - node-version: "0.10" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + - name: Node.js 18.x + node-version: "18" - - name: Node.js 0.12 - node-version: "0.12" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + - name: Node.js 20.x + node-version: "20" - - name: io.js 1.x - node-version: "1.8" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: io.js 2.x - node-version: "2.5" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: io.js 3.x - node-version: "3.3" - npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - - - name: Node.js 4.x - node-version: "4.9" - npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - - - name: Node.js 5.x - node-version: "5.12" - npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - - - name: Node.js 6.x - node-version: "6.17" - npm-i: mocha@6.2.3 nyc@14.1.1 supertest@6.1.6 - - - name: Node.js 7.x - node-version: "7.10" - npm-i: mocha@6.2.3 nyc@14.1.1 supertest@6.1.6 - - - name: Node.js 8.x - node-version: "8.16" - npm-i: mocha@7.2.0 nyc@14.1.1 - - - name: Node.js 9.x - node-version: "9.11" - npm-i: mocha@7.2.0 nyc@14.1.1 - - - name: Node.js 10.x - node-version: "10.24" - npm-i: mocha@8.4.0 - - - name: Node.js 11.x - node-version: "11.15" - npm-i: mocha@8.4.0 - - - name: Node.js 12.x - node-version: "12.22" - - - name: Node.js 13.x - node-version: "13.14" - - - name: Node.js 14.x - node-version: "14.19" - - - name: Node.js 15.x - node-version: "15.14" - - - name: Node.js 16.x - node-version: "16.14" - - - name: Node.js 17.x - node-version: "17.7" + - name: Node.js 22.x + node-version: "22" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Node.js ${{ matrix.node-version }} shell: bash -eo pipefail -l {0} @@ -111,23 +41,8 @@ jobs: dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" - name: Configure npm - run: npm config set shrinkwrap false - - - name: Install npm module(s) ${{ matrix.npm-i }} - run: npm install --save-dev ${{ matrix.npm-i }} - if: matrix.npm-i != '' - - - name: Setup Node.js version-specific dependencies - shell: bash run: | - # eslint for linting - # - remove on Node.js < 8 - if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then - node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \ - grep -E '^eslint(-|$)' | \ - sort -r | \ - xargs -n1 npm rm --silent --save-dev - fi + npm config set package-lock false - name: Install Node.js dependencies run: npm install From 801401c0ca82f5f624e82842a16cfabb1d6e84ea Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 17:43:18 -0700 Subject: [PATCH 15/29] fix(dev-deps): mocha@^10.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a70567..23e5433 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "5.2.0", "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", + "mocha": "^10.7.0", "nyc": "15.1.0", "supertest": "6.2.2" }, From 902acc3388cf6277505eebf49f95e756eb4fe309 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:13:24 -0700 Subject: [PATCH 16/29] fix(dev-deps): after@^0.8.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23e5433..33a822b 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "statuses": "2.0.1" }, "devDependencies": { - "after": "0.8.2", + "after": "^0.8.2", "eslint": "7.32.0", "eslint-config-standard": "14.1.1", "eslint-plugin-import": "2.25.4", From b00f3748d6c523d31bfe72a9056f5f22feb25ef8 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:14:21 -0700 Subject: [PATCH 17/29] fix(dev-deps): nyc@^17.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33a822b..d008b89 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint-plugin-promise": "5.2.0", "eslint-plugin-standard": "4.1.0", "mocha": "^10.7.0", - "nyc": "15.1.0", + "nyc": "^17.0.0", "supertest": "6.2.2" }, "files": [ From 5e1281b9fda2da12e867535cd7445cc3c2d879a3 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:26:02 -0700 Subject: [PATCH 18/29] fix(deps): debug@^4.3.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d008b89..4e6475c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "server" ], "dependencies": { - "debug": "3.1.0", + "debug": "^4.3.5", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", From fac1ff55696d0db5458f2e33bb6f42b0ce47eabc Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:26:40 -0700 Subject: [PATCH 19/29] fix(deps): destroy@^1.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e6475c..f2ca8ea 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "debug": "^4.3.5", - "destroy": "1.2.0", + "destroy": "^1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", From 8f91d6e159f76530079689d76fc36d5aa3521c56 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:27:02 -0700 Subject: [PATCH 20/29] fix(deps): encodeurl@^2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2ca8ea..780e560 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dependencies": { "debug": "^4.3.5", "destroy": "^1.2.0", - "encodeurl": "~1.0.2", + "encodeurl": "^2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", From a8fd1c5b9b91c0b68568ac631bb0bb36198f2e1e Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:27:29 -0700 Subject: [PATCH 21/29] fix(deps): escape-html@^1.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 780e560..b088d34 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "debug": "^4.3.5", "destroy": "^1.2.0", "encodeurl": "^2.0.0", - "escape-html": "~1.0.3", + "escape-html": "^1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", From c4f4f82442190b93e1f4d2dbd31b29b4a43476a3 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:27:54 -0700 Subject: [PATCH 22/29] fix(deps): etag@^1.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b088d34..42426a0 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "destroy": "^1.2.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", - "etag": "~1.8.1", + "etag": "^1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime-types": "~2.1.34", From e9cb4589043fe46f528654d5fbe4de2f93fb3a60 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:28:36 -0700 Subject: [PATCH 23/29] fix(deps): fresh@^0.5.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 42426a0..37deaad 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", - "fresh": "0.5.2", + "fresh": "^0.5.2", "http-errors": "2.0.0", "mime-types": "~2.1.34", "ms": "2.1.3", From ac8590f3d97832ea9b0f76df944d179dc246f3cd Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:28:58 -0700 Subject: [PATCH 24/29] fix(deps): http-errors@^2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37deaad..9495e6b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^0.5.2", - "http-errors": "2.0.0", + "http-errors": "^2.0.0", "mime-types": "~2.1.34", "ms": "2.1.3", "on-finished": "2.4.1", From d302c04509a10b7ed5656f1e9e314febef00d461 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:29:22 -0700 Subject: [PATCH 25/29] fix(deps): mime-types@^2.1.35 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9495e6b..013e1fa 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "etag": "^1.8.1", "fresh": "^0.5.2", "http-errors": "^2.0.0", - "mime-types": "~2.1.34", + "mime-types": "^2.1.35", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", From 15d911c241751864ed8d1c643ce53035269372dc Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:29:45 -0700 Subject: [PATCH 26/29] fix(deps): ms@^2.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 013e1fa..5e1fb8f 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "fresh": "^0.5.2", "http-errors": "^2.0.0", "mime-types": "^2.1.35", - "ms": "2.1.3", + "ms": "^2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" From 2d5841a5159e2bf2f725a47d1c4f7c5a65208042 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:30:05 -0700 Subject: [PATCH 27/29] fix(deps): on-finished@^2.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e1fb8f..c9380a7 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "http-errors": "^2.0.0", "mime-types": "^2.1.35", "ms": "^2.1.3", - "on-finished": "2.4.1", + "on-finished": "^2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" }, From b0e3e2dfbe6d5cf2d4fbc47d116b23ff1305cb14 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:30:30 -0700 Subject: [PATCH 28/29] fix(deps): range-parser@^1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9380a7..052b88d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "mime-types": "^2.1.35", "ms": "^2.1.3", "on-finished": "^2.4.1", - "range-parser": "~1.2.1", + "range-parser": "^1.2.1", "statuses": "2.0.1" }, "devDependencies": { From 0c0d374b2a21848d996d31cc08d75fd9be349849 Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 22 Jul 2024 18:30:51 -0700 Subject: [PATCH 29/29] fix(deps): statuses@^2.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 052b88d..bfba279 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", - "statuses": "2.0.1" + "statuses": "^2.0.1" }, "devDependencies": { "after": "^0.8.2",