Commit Graph

23 Commits

Author SHA1 Message Date
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
Douglas Christopher Wilson
a65913776d tests: use strict mode 2022-02-09 01:07:08 -05:00
Douglas Christopher Wilson
bd4fdfe5f7 tests: remove global dependency on should
fixes #4797
2022-02-02 01:55:16 -05:00
Kunal Pathak
19a2eeb476 tests: check render error without engine-specific message
closes #3251
2017-09-21 22:45:26 -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
4aa2801054 Merge tag '3.18.6' 2014-12-12 22:06:21 -05:00
Douglas Christopher Wilson
91824514ce tests: run render tests with internal template engine 2014-11-28 09:10:44 -05:00
Douglas Christopher Wilson
6614352563 Add support for app.set('views', array)
closes #2320
2014-10-23 17:28:53 -04:00
Douglas Christopher Wilson
766b3aecf7 deps: update example dependencies 2014-05-29 23:39:52 -04:00
Douglas Christopher Wilson
db4a061ed6 Merge tag '3.8.0' 2014-05-21 02:08:04 -04:00
Douglas Christopher Wilson
392ef1eb06 tests: add more app.render tests 2014-05-20 22:57:00 -04:00
Douglas Christopher Wilson
203fb05d3e update example dependencies 2014-04-24 17:05:20 -04:00
Matt Copperwaite
fcbe53ddb5 Added appropriate test for more descriptive render error 2013-12-21 17:34:59 +00:00
Caridy Patino
0b4e2df480 add "view" constructor setting to override view behaviour 2013-04-13 09:53:50 -07:00
TJ Holowaychuk
04d43d60b7 added nicer error messages for failed view lookup. Closes #1065 2012-04-02 15:47:10 -07:00
Tj Holowaychuk
d9098c5fcd more tests 2011-11-10 08:23:12 -08:00
Tj Holowaychuk
b9dee730a8 Fixed app.render() absolute path support 2011-11-10 08:22:42 -08:00
Tj Holowaychuk
52e26697a9 Added index.<engine> render test 2011-11-08 20:22:27 -08:00
Tj Holowaychuk
f98c1127a6 Added app.render() local precedence test 2011-11-08 20:09:13 -08:00
Tj Holowaychuk
7e352fe28d Added app.render() app.locals test 2011-11-08 20:07:49 -08:00
Tj Holowaychuk
d3b48e2fd5 Added more app.render() tests 2011-11-08 20:06:15 -08:00
Tj Holowaychuk
23159c094d Added app.render() tests 2011-11-08 20:00:03 -08:00