 Shivam SharmaandGitHub
|
e270ec050a
|
chore: enforce explicit Buffer import and add lint rule (#6525)
Signed-off-by: Shivam Sharma <[email protected]>
|
2025-06-27 20:10:36 -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 |
|
 Phillip9587andWes Todd
|
b748a0d705
|
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 DhimanandGitHub
|
72e2b8aed2
|
fix(buffer): use node:buffer instead of safe-buffer (#6071)
Main Changes:
- Removed dependency `[email protected]`
- Use `node:buffer` core library instead of safe-buffer
|
2024-10-27 11:10:33 +01:00 |
|
Wes Todd
|
fb7a3fdd7c
|
Merge tag '4.20.0' into 5.0
|
2024-09-09 21:07:57 -05:00 |
|
Ulises Gascón
|
74069598ed
|
feat: upgrade to [email protected]
|
2024-09-10 04:01:43 +02: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
|
620df0e35e
|
deps: [email protected]
|
2022-02-08 09:55:19 -05:00 |
|
 Hussein MohamedandDouglas Christopher Wilson
|
52e9bd67b7
|
tests: fix typos
closes #4564
|
2021-07-31 16:00:16 -04:00 |
|
Douglas Christopher Wilson
|
88f9733ffa
|
deps: [email protected]
|
2019-05-11 19:29:33 -04:00 |
|
Douglas Christopher Wilson
|
6f7a8301a1
|
tests: add express.static test suite
|
2019-05-02 17:49:29 -04:00 |
|