Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2d47897
Remove deprecated maxage method
dougwilson Dec 13, 2021
707070d
Remove deprecated index method
dougwilson Dec 13, 2021
0abe1e0
Remove deprecated from alias for root
dougwilson Dec 13, 2021
07eaa19
Remove deprecated etag method
dougwilson Dec 13, 2021
a7eb68c
Remove deprecated root method
dougwilson Dec 13, 2021
e9ff7d9
Drop support for Node.js 0.8
dougwilson Dec 13, 2021
889d310
Use mime-types for file to content type mapping
LinusU Mar 5, 2020
85dfcd7
Remove deprecated hidden option
dougwilson Feb 3, 2022
999788b
deps: [email protected]
dougwilson Feb 5, 2022
771c1f1
build: add version script for npm version releases
dougwilson Feb 5, 2022
00d54b6
1.0.0-beta.1
dougwilson Feb 5, 2022
b5e395c
Merge tag '0.18.0' into 1.0
wesleytodd Mar 21, 2024
384820d
build: fixed ci in node 8/9 with nyc pin back
wesleytodd Mar 21, 2024
e1c26fe
1.0.0-beta.2
wesleytodd Mar 21, 2024
4baced0
fix!: drop node <18
wesleytodd Jul 23, 2024
801401c
fix(dev-deps): mocha@^10.7.0
wesleytodd Jul 23, 2024
902acc3
fix(dev-deps): after@^0.8.2
wesleytodd Jul 23, 2024
b00f374
fix(dev-deps): nyc@^17.0.0
wesleytodd Jul 23, 2024
5e1281b
fix(deps): debug@^4.3.5
wesleytodd Jul 23, 2024
fac1ff5
fix(deps): destroy@^1.2.0
wesleytodd Jul 23, 2024
8f91d6e
fix(deps): encodeurl@^2.0.0
wesleytodd Jul 23, 2024
a8fd1c5
fix(deps): escape-html@^1.0.3
wesleytodd Jul 23, 2024
c4f4f82
fix(deps): etag@^1.8.1
wesleytodd Jul 23, 2024
e9cb458
fix(deps): fresh@^0.5.2
wesleytodd Jul 23, 2024
ac8590f
fix(deps): http-errors@^2.0.0
wesleytodd Jul 23, 2024
d302c04
fix(deps): mime-types@^2.1.35
wesleytodd Jul 23, 2024
15d911c
fix(deps): ms@^2.1.3
wesleytodd Jul 23, 2024
2d5841a
fix(deps): on-finished@^2.4.1
wesleytodd Jul 23, 2024
b0e3e2d
fix(deps): range-parser@^1.2.1
wesleytodd Jul 23, 2024
0c0d374
fix(deps): statuses@^2.0.1
wesleytodd Jul 23, 2024
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
Prev Previous commit
Next Next commit
Remove deprecated root method
  • Loading branch information
dougwilson committed Dec 13, 2021
commit a7eb68c5be7365aeb403e32ac5633fab7e91965d
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
===================
Expand Down
17 changes: 0 additions & 17 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*
Expand Down
14 changes: 0 additions & 14 deletions test/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down