Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
72004f0
module rename
mcollina Jan 11, 2023
ac7922b
fixup
mcollina Jan 11, 2023
70aa309
Update debug
mcollina Jan 11, 2023
a5ba254
Merge pull request #1 from fastify/update-debug
mcollina Jan 11, 2023
e5ebad0
Bumped v1.0.0
mcollina Jan 11, 2023
a225093
chore: repo updates (#3)
Fdawgs Jan 12, 2023
b05ea94
build(deps-dev): bump supertest from 6.2.2 to 6.3.3 (#8)
dependabot[bot] Jan 12, 2023
8a01a72
build(deps-dev): bump mocha from 9.2.2 to 10.2.0 (#9)
dependabot[bot] Jan 12, 2023
e86dba5
replace mocha with tap (#10)
Uzlopak Jan 12, 2023
46fd432
add types, nodenext, upgrade mime (#6)
Uzlopak Jan 12, 2023
5b263c2
use t.error instead of t.pass (#11)
Uzlopak Jan 12, 2023
3c18fc1
use listenerCount immediatly (#13)
Uzlopak Jan 13, 2023
8642dfb
remove deprecated options and methods (#12)
Uzlopak Jan 13, 2023
ae87c17
remove node < 8 ponyfills for res.headersSent and res.getHeaderNames …
Uzlopak Jan 13, 2023
8c05363
100% test coverage (#16)
Uzlopak Jan 13, 2023
7ce38ec
avoid deoptimization in range support (#20)
Uzlopak Jan 13, 2023
3f4ffb2
add example (#19)
Uzlopak Jan 13, 2023
3ec3d1d
add pre-commit (#18)
Uzlopak Jan 13, 2023
75e0ff4
use fast-decode-uri-component (#21)
Uzlopak Jan 13, 2023
ae3d3d9
remove statuses package, precompute errors (#17)
Uzlopak Jan 14, 2023
5e28adc
remove encodeurl (#23)
Uzlopak Jan 14, 2023
9f0df93
remove destroy (#25)
Uzlopak Jan 14, 2023
3d6de26
remove backwards compatibilty of dotfiles (#22)
Uzlopak Jan 14, 2023
5ba5860
remove debug (#24)
Uzlopak Jan 14, 2023
54f74ae
remove etag (#26)
Uzlopak Jan 15, 2023
504b981
restructure (#27)
Uzlopak Jan 16, 2023
d70d7ca
chore(license): use github mit license template; add fastify team (#28)
Fdawgs Jan 16, 2023
123e7e5
docs(readme): grammar and clarity fixes (#29)
Fdawgs Jan 16, 2023
ff81e96
integrate range-parser (#30)
Uzlopak Jan 17, 2023
0c3307b
fix benchmark (#32)
Uzlopak Jan 17, 2023
f78aa09
replace ms with @lukeed/ms (#33)
Uzlopak Jan 17, 2023
9da628f
remove on-finished (#34)
Uzlopak Jan 17, 2023
8795f25
integrate fresh (#31)
Uzlopak Jan 18, 2023
f52d44c
Bumped v2.0.0
mcollina Jan 29, 2023
5a5fc01
fix export of isUtf8MimeType (#35)
Uzlopak Jan 30, 2023
0cda6e4
Bumped v2.0.1
mcollina Jan 30, 2023
0d2e5e8
improve performance of normalizeList (#38)
Uzlopak Feb 2, 2023
cbe096a
improve performance of isUtf8MimeType (#39)
Uzlopak Feb 3, 2023
5c33ef0
improve performance of collapseLeadingSlashes (#40)
Uzlopak Feb 3, 2023
3c25ec0
improve performance of parseRange (#37)
Uzlopak Feb 4, 2023
bd1d0be
improve containsDotFile (#41)
Uzlopak Feb 4, 2023
aa00ede
chore(.gitignore): add bun lockfile (#43)
Fdawgs Mar 5, 2023
b46e529
build(deps-dev): bump tsd from 0.25.0 to 0.26.0 (#44)
dependabot[bot] Mar 6, 2023
a8d538d
build(deps-dev): bump tsd from 0.26.1 to 0.27.0 (#45)
dependabot[bot] Mar 13, 2023
980e12e
build(deps-dev): bump tsd from 0.27.0 to 0.28.0 (#46)
dependabot[bot] Mar 20, 2023
ee9eb2a
test(fixtures/images): compress test image (#47)
Fdawgs Apr 13, 2023
49f3ea4
chore: fix package url
Eomm Apr 13, 2023
cf190d7
Bumped v2.1.0
Eomm Apr 13, 2023
58406d0
ci: only trigger on pushes to main branches (#48)
Fdawgs Apr 28, 2023
1b603e9
build(deps-dev): bump @types/node from 18.16.5 to 20.1.0 (#49)
dependabot[bot] May 8, 2023
45df0ef
build(deps-dev): bump tsd from 0.28.1 to 0.29.0 (#52)
dependabot[bot] Sep 4, 2023
163e4b2
perf: use `node:` prefix to bypass require.cache call for builtins (#53)
Fdawgs Sep 10, 2023
7ac977b
chore: add `.gitattributes` file (#57)
Fdawgs Oct 7, 2023
2cedc02
chore(package): explicitly declare js module type (#58)
Fdawgs Oct 27, 2023
fc1917a
build(deps-dev): bump tsd from 0.29.0 to 0.30.0 (#62)
dependabot[bot] Dec 18, 2023
80ff937
build(deps-dev): bump supertest from 6.3.3 to 6.3.4 (#63)
dependabot[bot] Jan 15, 2024
cfc92c9
chore(.gitignore): add .tap/ dir (#64)
Fdawgs Feb 8, 2024
2081e6e
build(deps-dev): bump tsd from 0.30.7 to 0.31.0 (#65)
dependabot[bot] Apr 1, 2024
6fd44c8
chore: add TypeScript about @types/mime (#67)
climba03003 Apr 2, 2024
ca19a72
docs(readme): tidy typescript section (#68)
Fdawgs Apr 3, 2024
f01ef24
Merge `next` into `master` (#76)
jsumners Jul 5, 2024
7a2fc6a
v3.0.0-pre.fv5.1
jsumners Jul 5, 2024
dc20cfa
build(deps-dev): bump tap from 16.3.10 to 20.0.3 (#75)
dependabot[bot] Jul 5, 2024
5019e3e
refactor!: new implementation (#77)
climba03003 Jul 9, 2024
ab277e4
Bumped v3.0.0
mcollina Jul 9, 2024
d28f7d3
feat: extends send result to provide ability of custom handling (#80)
climba03003 Jul 12, 2024
c0310ba
Bumepd v3.1.0
mcollina Jul 12, 2024
39b3b4e
build(deps-dev): bump tap from 20.0.3 to 21.0.0 (#81)
dependabot[bot] Jul 15, 2024
0e065c4
build(deps-dev): bump @types/node from 20.14.13 to 22.0.0 (#82)
dependabot[bot] Jul 29, 2024
66d3006
build(deps): bump fastify/workflows from 4.2.0 to 5.0.0 (#83)
dependabot[bot] Aug 1, 2024
c522606
fix: template injection (#84)
climba03003 Sep 13, 2024
7dcacdb
Bumped v3.1.1
mcollina Sep 13, 2024
6639f47
docs(readme): replace `var` statements (#86)
Fdawgs Oct 24, 2024
a4b8f4e
build(deps): bump fastify/workflows from 5.0.0 to 5.0.1 (#88)
dependabot[bot] Nov 1, 2024
84d6f72
ci: use major version of workflows
Fdawgs Nov 1, 2024
60c37c2
style: remove trailing whitespace (#89)
Fdawgs Nov 3, 2024
396f0aa
chore(package): add `homepage` and `bugs` urls (#91)
Fdawgs Nov 18, 2024
6f078bb
refactor: use lowercase for charset (#92)
Fdawgs Nov 18, 2024
277a32f
feat: add `contentType` option (#93)
Fdawgs Nov 22, 2024
52f810e
3.2.0
Fdawgs Nov 22, 2024
35c75b4
feat: add `maxContentRangeChunkSize` option (#90)
ledyba Dec 2, 2024
14de39b
3.3.0
Fdawgs Dec 3, 2024
86d28a8
docs(readme): update ci badge syntax (#94)
Fdawgs Dec 5, 2024
5eb7088
build(deps-dev): replace standard with neostandard (#95)
Fdawgs Dec 8, 2024
7ab12a4
types: use `node:` prefix for builtins (#96)
Fdawgs Dec 15, 2024
86d0893
build(deps-dev): bump neostandard from 0.11.9 to 0.12.0 (#97)
dependabot[bot] Dec 16, 2024
20146a1
build(deps-dev): add eslint, peer dep of neostandard (#98)
Fdawgs Dec 16, 2024
63b54f3
chore(package): add contribs and funding (#99)
Fdawgs Dec 22, 2024
ebb1c5e
test(send2): prefix unused params with underscores (#100)
Fdawgs Jan 3, 2025
caa7d3b
docs(readme): grammar fix (#101)
Fdawgs Jan 4, 2025
4826d1b
3.3.1
Fdawgs Jan 4, 2025
c1c723b
fix: rename fixtures to avoid triggering malware (#103)
madrussa Jan 7, 2025
4e783b1
build(dependabot): reduce npm updates to monthly (#104)
Fdawgs Jan 15, 2025
c9627d3
chore: rename master to main (#105)
Fdawgs Feb 3, 2025
d852829
test: move to node test runner (#106)
ilteoood Feb 9, 2025
682f0f8
4.0.0
Fdawgs Feb 9, 2025
7bdf489
ci(ci): set job permissions (#107)
Fdawgs Mar 7, 2025
f76c324
ci: set permissions at workflow level (#108)
Fdawgs Mar 30, 2025
ef99555
ci: restore job level permissions (#109)
Fdawgs Mar 30, 2025
bb6ccc1
build(deps-dev): bump tsd from 0.31.2 to 0.32.0 (#111)
dependabot[bot] May 1, 2025
c2760b1
feat: add highWaterMark option (#113)
johaven Jun 3, 2025
1b54ebf
4.1.0
Fdawgs Jun 5, 2025
107b7e0
chore(license): update date ranges; standardise style (#115)
Fdawgs Jun 23, 2025
c253fab
build(deps-dev): bump @types/node from 22.15.34 to 24.0.8 (#116)
dependabot[bot] Jul 1, 2025
27b6d67
chore(.npmrc): ignore scripts (#118)
Fdawgs Sep 17, 2025
6b70f2c
build(deps-dev): remove @fastify/pre-commit (#119)
Fdawgs Sep 21, 2025
b043307
build(deps-dev): bump tsd from 0.32.0 to 0.33.0 (#120)
dependabot[bot] Oct 1, 2025
3637eaf
ci(ci): add concurrency config (#121)
Fdawgs Oct 17, 2025
030392f
build(deps-dev): bump @types/node from 24.10.4 to 25.0.3 (#122)
dependabot[bot] Jan 1, 2026
2c5a5f2
Merge remote-tracking branch 'fastify/main' into merge-fastify-send-2
bjohansebas Jan 21, 2026
e1469ad
refactor: update package details and README for migration to pillarjs…
bjohansebas Jan 22, 2026
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set default behavior to automatically convert line endings
* text=auto eol=lf
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: CI

on:
push:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
# Node.js release schedule: https://nodejs.org/en/about/releases/
node-version: [18, 19, 20, 21, 22, 23, 24, 25]
node-version: [20, 22, 23, 24, 25]
steps:
- uses: actions/checkout@v6

Expand All @@ -62,7 +62,7 @@ jobs:
run: npm install

- name: Run tests
run: npm run test-ci
run: npm run test:ci

- name: Upload code coverage
uses: actions/upload-artifact@v5
Expand Down
153 changes: 150 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,152 @@
.nyc_output/
coverage/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
npm-debug.log
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Vim swap files
*.swp

# macOS files
.DS_Store

# Clinic
.clinic

# lock files
bun.lockb
package-lock.json
pnpm-lock.yaml
yarn.lock

# editor files
.vscode
.idea

#tap files
.tap/
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore-scripts=true
package-lock=false

14 changes: 7 additions & 7 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,37 +561,37 @@

* update range-parser and fresh

0.1.4 / 2013-08-11
0.1.4 / 2013-08-11
==================

* update fresh

0.1.3 / 2013-07-08
0.1.3 / 2013-07-08
==================

* Revert "Fix fd leak"

0.1.2 / 2013-07-03
0.1.2 / 2013-07-03
==================

* Fix fd leak

0.1.0 / 2012-08-25
0.1.0 / 2012-08-25
==================

* add options parameter to send() that is passed to fs.createReadStream() [kanongil]

0.0.4 / 2012-08-16
0.0.4 / 2012-08-16
==================

* allow custom "Accept-Ranges" definition

0.0.3 / 2012-07-16
0.0.3 / 2012-07-16
==================

* fix normalization of the root directory. Closes #3

0.0.2 / 2012-07-09
0.0.2 / 2012-07-09
==================

* add passing of req explicitly for now (YUCK)
Expand Down
35 changes: 18 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
(The MIT License)
MIT License

Copyright (c) 2012 TJ Holowaychuk
Copyright (c) 2014-2022 Douglas Christopher Wilson
Copyright The Fastify Contributors.
Copyright The Express Contributors.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading