Shivam Sharma
98c85eb0dd
chore: enforce explicit Buffer import and add lint rule ( #6525 )
...
Signed-off-by: Shivam Sharma <meshivam81@gmail.com>
2025-06-27 20:10:36 -05:00
Noritaka Kobayashi
dfd1851245
test: fix typos in test descriptions ( #6535 )
2025-05-27 10:36:50 +02:00
Juan José
327af123a1
feat: add support for ETag option in res.sendFile ( #6073 )
...
This patch introduces the ability to control the ETag generation
through the `res.sendFile` function. Specifically, the ETag option
is wired to the application's configuration, allowing it to be
enabled or disabled based on the app's settings.
Fixes: https://github.com/expressjs/express/issues/2294
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-02-13 13:39:31 -06:00
Szymon Łągiewka
41113599af
fix(refactor): prefix built-in node module imports
...
Since v5 relies on node >= 18, this is now possible (since v16, v14.18.0
[^1][^2]).
It's functionally irrelevant:
1. It's not required for CJS nor ESM (with a few exceptions [^3])
2. It has no performance promises
However, there are upsides to this approach:
1. It brings clear boundaries to what's a built-in and what's an
external dependency
2. It reduces the risk of importing unwanted deps where a built-in is
expected
3. It's slightly more interoperable with other JS runtimes that provide
node compatibility[^4], albeit only during development. Once imported
from npm, built-ins are assumed.
[^1]:https://nodejs.org/docs/latest-v22.x/api/modules.html#built-in-modules
[^2]:https://github.com/nodejs/node/pull/37246
[^3]:https://nodejs.org/api/modules.html#built-in-modules-with-mandatory-node-prefix
[^4]:https://docs.deno.com/runtime/fundamentals/node/#using-node's-built-in-modules
2025-01-10 11:53:44 -06:00
Phillip Barta
4e92ac9031
cleanup: remove AsyncLocalStorage check from tests ( #6147 )
...
Co-authored-by: Wes Todd <wes@wesleytodd.com>
2024-11-15 10:23:42 -06:00
Phillip9587
9f8589e31c
cleanup: remove unnecessary require for global Buffer
...
The Buffer object is globally available in Node.js, so there is no need to explicitly require it.
2024-11-15 10:16:29 -06:00
Bhavya Dhiman
c70197ad33
fix(buffer): use node:buffer instead of safe-buffer ( #6071 )
...
Main Changes:
- Removed dependency `safe-buffer@5.2.1`
- Use `node:buffer` core library instead of safe-buffer
2024-10-27 11:10:33 +01:00
Wes Todd
e9f9aaeebd
Merge tag '4.19.0' into 5.x
...
4.19.0
2024-03-20 21:14:00 -05:00
Douglas Christopher Wilson
bb7907b932
build: Node.js@18.10
...
closes #5014
2022-10-07 17:48:59 -04:00
Hashen
1b2e097be2
tests: fix typo in description
...
closes #4882
2022-04-07 19:20:41 -04:00
Douglas Christopher Wilson
2e2d78c4d9
deps: on-finished@2.4.1
2022-04-03 01:15:37 -04:00
Douglas Christopher Wilson
291993d73c
tests: expand res.sendFile options tests
2022-03-01 00:22:09 -05:00
Douglas Christopher Wilson
cf9f662655
tests: fix position of res.sendfile(path, options) test
2022-02-24 00:17:01 -05:00
Douglas Christopher Wilson
18f782bba9
tests: remove duplicate utils
2022-02-23 00:18:36 -05:00
Douglas Christopher Wilson
bc5ca05509
tests: remove usage of should
2022-02-21 19:54:52 -05:00
Douglas Christopher Wilson
318fd4b543
Merge tag '4.17.3'
2022-02-17 00:27:11 -05:00
Douglas Christopher Wilson
a65913776d
tests: use strict mode
2022-02-09 01:07:08 -05:00
Douglas Christopher Wilson
9d0976229d
build: supertest@6.2.2
2022-02-04 21:14:41 -05:00
Douglas Christopher Wilson
121fe9982b
Merge tag '4.17.1'
2019-06-08 19:43:21 -04:00
void
6bcdfef6ad
Improve error message for non-strings to res.sendFile
...
closes #3582
2018-10-27 02:27:15 -04:00
Douglas Christopher Wilson
302a6152b4
Merge tag '4.16.4'
2018-10-23 20:38:42 -04:00
Douglas Christopher Wilson
451ee5d9c1
build: supertest@3.3.0
2018-09-24 23:40:21 -04:00
Douglas Christopher Wilson
3d10279826
Fix issue where "Request aborted" may be logged in res.sendfile
2018-09-19 23:25:16 -04:00
Douglas Christopher Wilson
62e12fe710
Merge tag '4.16.2'
2017-10-13 22:27:30 -04:00
Douglas Christopher Wilson
de129c289d
tests: run mocha with --no-exit to detect hangs
...
closes #3439
2017-10-01 00:48:29 -04:00
Daniel Tschinder
41964580a8
deps: send@0.16.0
...
closes #3431
closes #3435
2017-09-28 12:39:05 -04:00
Douglas Christopher Wilson
ddeb71301c
tests: add maxAge option tests for res.sendFile
2017-09-28 12:32:27 -04:00
Douglas Christopher Wilson
c319fe260a
Merge tag '4.15.4'
2017-08-07 19:33:00 -04:00
Douglas Christopher Wilson
e0066227f7
lint: remove all unused varaibles
2017-08-06 00:19:32 -04:00
Daniel Walasek
713d2aed93
tests: fix incorrect should usage
...
closes #3387
2017-08-05 20:10:35 -04:00
chainhelen
eece3850bc
tests: use path.join instead of concatenation
...
closes #3236
2017-03-05 23:08:47 -05:00
Douglas Christopher Wilson
501e24e0a9
Merge tag '4.15.0'
2017-03-01 18:17:04 -05:00
Douglas Christopher Wilson
fb3946f454
lint: fix broken indentation in tests
2017-02-04 20:54:47 -05:00
Douglas Christopher Wilson
bcbb9d56c5
Merge tag '4.14.1'
2017-01-28 21:02:36 -05:00
Zachary Lester
6723b4419a
tests: add test for res.sendFile "cacheContol" option
...
closes #3061
2017-01-21 00:33:29 -05:00
Douglas Christopher Wilson
1dbfee6623
Merge tag '4.14.0'
2016-06-20 00:37:34 -04:00
Douglas Christopher Wilson
fc40702cb7
deps: send@0.14.1
2016-06-12 22:33:44 -04:00
Douglas Christopher Wilson
12bc16e72f
tests: use supertest to check response header values
...
closes #2983
closes #2992
2016-05-11 08:50:38 +02:00
Douglas Christopher Wilson
f90e045334
Merge tag '4.12.4'
2015-05-18 00:41:42 -04:00
Douglas Christopher Wilson
c894c84e4a
build: support io.js 1.x
...
closes #2539
2015-03-17 02:09:39 -04:00
Douglas Christopher Wilson
dbc61fc191
Fix wrong code on aborted connections from res.sendFile
2015-03-01 17:27:50 -05:00
Douglas Christopher Wilson
8a5ecd3d89
Merge tag '4.11.1'
2015-01-21 03:58:41 -05:00
Douglas Christopher Wilson
3387916efc
Fix incorrect "Request aborted" for res.sendFile when HEAD or 304
...
fixes #2481
2015-01-04 18:26:15 -05:00
Douglas Christopher Wilson
4b26bbde2d
Fix res.sendFile logging standard write errors
...
closes #2451
2014-11-24 23:28:37 -05:00
Douglas Christopher Wilson
b326ae89df
Fix res.sendFile logging standard write errors
...
fixes #2433
2014-11-23 16:53:11 -05:00
Douglas Christopher Wilson
0fc4f0735a
Remove res.sendfile
2014-11-06 21:03:04 -05:00
Douglas Christopher Wilson
2a0c35a108
Invoke callback for sendfile when client aborts
...
fixes #2189
fixes #2300
closes #2303
closes #2305
2014-09-09 00:12:49 -04:00
Douglas Christopher Wilson
4986b1cb4c
tests: add some res.sendfile directory tests
2014-08-24 13:28:39 -04:00
Douglas Christopher Wilson
fbceae2716
tests: add additional res.sendFile test
...
closes #2298
2014-08-15 00:18:54 -04:00
Douglas Christopher Wilson
2cb029f896
Add res.sendFile
...
fixes #1906
closes #2266
2014-08-06 02:26:51 -04:00