Commit Graph
199 Commits
Author SHA1 Message Date
TheMysteriousandGitHub 706065cb75 refactor: use cached slice in app.listen (#6897)
Signed-off-by: Tacit1 <[email protected]>
2025-11-23 18:52:16 -05:00
Szymon ŁągiewkaandWes Todd 4199d3218f 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 BartaandGitHub f7919e4c27 fix: Remove utils-merge dependency - use spread syntax instead (#6091) 2025-01-08 09:56:16 -06:00
Jon KoopsandGitHub 713c2a6709 chore: replace methods dependency with standard library (#6196) 2025-01-02 08:00:30 +01:00
Phillip BartaandGitHub 7134549ef9 refactor: Remove Object.setPrototypeOf polyfill (#6081) 2024-10-22 20:22:26 +02:00
Mick A.andGitHub 040a1c1f65 Use Array.flat instead of array-flatten (#5677) 2024-08-01 19:42:07 -04:00
Wes 0daefa0fb7 call callback once on listen error 2024-05-17 13:47:56 -07:00
Evan HahnandWes Todd 32cce1733b Use object with null prototype for settings closes #4835 2024-04-29 10:12:23 -05:00
Evan HahnandWes Todd a716f6270b Use object with null prototype for various app properties
`app.cache`, `app.engines`, and `app.settings` are now created with
`Object.create(null)` instead of `{}`.

This also updates a test to ensure that `app.locals` is created the same
way.
2024-04-29 09:43:25 -05:00
Wes Todd 408d869385 Merge tag '4.19.0' into 5.x
4.19.0
2024-03-20 21:14:00 -05:00
Evan HahnandDouglas Christopher Wilson c17fe05861 Ignore Object.prototype values in settings through app.set/app.get
closes #4802
closes #4803
2022-03-23 20:05:05 -04:00
Douglas Christopher Wilson 3d05e85b0c deps: [email protected] 2022-02-01 21:51:28 -05:00
CzarekandDouglas Christopher Wilson 450c468d04 Change query parser setting default to 'simple'
closes #3361
closes #3621
2021-12-17 23:15:29 -05:00
Douglas Christopher Wilson c7d528cdc0 Merge tag '4.17.2' 2021-12-16 23:01:28 -05:00
Hussein MohamedandDouglas Christopher Wilson 135a05c524 docs: fix typos in jsdoc
closes #4564
2021-07-31 16:00:00 -04:00
Douglas Christopher Wilson 62e12fe710 Merge tag '4.16.2' 2017-10-13 22:27:30 -04:00
Hrvoje ŠimićandDouglas Christopher Wilson 2df1ad26a5 Improve error messages when non-function provided as middleware
closes #3426
2017-09-28 09:20:37 -04:00
Hrvoje ŠimićandDouglas Christopher Wilson fa272edf84 docs: fix typo in jsdoc comment
closes #3430
2017-09-28 08:05:54 -04:00
Douglas Christopher Wilson c319fe260a Merge tag '4.15.4' 2017-08-07 19:33:00 -04:00
asaf davidandDouglas Christopher Wilson c087a45b9c Fix typo in variable name setPrototypeOf
closes #3266
2017-03-31 22:27:00 -04:00
Douglas Christopher Wilson e5dbb0cb4e Merge tag '4.15.2' 2017-03-06 08:40:02 -05:00
Jamie BartonandDouglas Christopher Wilson b4550fbe7a Use ejs instead of jade within engine jsdoc
closes #3222
2017-03-01 19:34:30 -05:00
Douglas Christopher Wilson 501e24e0a9 Merge tag '4.15.0' 2017-03-01 18:17:04 -05:00
Douglas Christopher Wilson 6022567c75 Use setprototypeof module to replace __proto__ setting
closes #1967
closes #2613
closes #3103
closes #3164
2017-02-23 01:56:58 -05:00
Douglas Christopher Wilson 7cafdb5824 Merge tag '4.13.4' 2016-01-21 21:23:07 -05:00
Alexander ShemetovskyandDouglas Christopher Wilson e5ec966b2f Fix param definition is jsdoc for app.render
fixes #2741
2015-11-07 00:18:32 -05:00
Douglas Christopher Wilson cec5780db4 Use router module for routing
closes #2411
2015-07-06 23:46:00 -04:00
Douglas Christopher Wilson b309b873f1 Merge tag '4.13.1' 2015-07-06 16:13:54 -04:00
Douglas Christopher Wilson 2a455890b9 Add settings to debug output
closes #2675
2015-06-20 16:21:12 -04:00
Douglas Christopher Wilson f5a240636d perf: isolate app.render try block 2015-06-20 13:36:40 -04:00
Douglas Christopher Wilson 10502480d0 perf: remove argument reassignments in application 2015-06-20 13:31:03 -04:00
Douglas Christopher Wilson e71014f522 perf: enable strict mode 2015-06-18 23:01:18 -04:00
Deepak KapoorandDouglas Christopher Wilson f7e94a30bc Use array-flatten module for flattening arrays
closes #2624
2015-06-18 22:15:15 -04:00
Douglas Christopher Wilson f6ec710534 Merge tag '4.12.0' 2015-02-23 01:00:12 -05:00
Douglas Christopher Wilson 531f024e48 Merge tag '3.20.0' 2015-02-18 22:33:47 -05:00
Douglas Christopher Wilson b40e74d6b6 Fix "trust proxy" setting to inherit when app is mounted
fixes #2550
fixes #2551
2015-02-18 00:59:56 -05:00
Douglas Christopher Wilson a9ef9e13fb Merge tag '4.11.2' 2015-02-01 15:41:51 -05:00
Ivan FraixedesandDouglas Christopher Wilson fea768dbcc Fix an incorrect @api jsdoc
closes #2522
2015-01-31 20:43:36 -05:00
Douglas Christopher Wilson f31dcff10c Remove app.del 2014-11-06 20:44:42 -05:00
Douglas Christopher Wilson 509ebb1aff Add app.router reference back 2014-11-06 20:20:33 -05:00
Douglas Christopher Wilson 78e50547f1 Refactor away init middleware 2014-11-06 20:18:51 -05:00
Douglas Christopher Wilson dcc4eaabe8 Change req.query to a getter 2014-11-06 20:18:48 -05:00
Douglas Christopher Wilson 8c6f9c4253 Remove app.router error message 2014-11-06 20:18:44 -05:00
Douglas Christopher Wilson 6614352563 Add support for app.set('views', array)
closes #2320
2014-10-23 17:28:53 -04:00
lemmyandDouglas Christopher Wilson dfa7ee4732 Pass context to .forEach instead of closure
Has a slight performance improvement

closes #2347
2014-10-23 02:30:09 -04:00
Douglas Christopher Wilson e9539fc780 docs: visionmedia is now tj on Github 2014-10-23 02:20:51 -04:00
Douglas Christopher Wilson ccc45a74f8 Merge tag '3.18.1' 2014-10-23 02:06:20 -04:00
Douglas Christopher Wilson af1043844f Fix internal utils.merge deprecation warnings 2014-10-22 15:18:10 -04:00
Douglas Christopher Wilson 3c1a964362 Fix regression for empty string path in app.use
fixes #2361
fixes #2362
2014-09-17 19:18:01 -07:00
Douglas Christopher Wilson cf41a8f254 Fix app.use to accept array of middleware without path
fixes #2356
2014-09-12 17:46:49 -04:00