Tobias Nießen
805673a0c8
src: use starts_with instead of rfind/find
...
PR-URL: https://github.com/nodejs/node/pull/61426
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-01-20 11:44:25 +00:00
Aditi
94422e8a40
src: add an option to make compile cache portable
...
Adds an option (NODE_COMPILE_CACHE_PORTABLE) for
the built-in compile cache to encode the hashes with
relative file paths. On enabling the option,
the source directory along with cache directory can be
bundled and moved, and the cache continues to work.
When enabled, paths encoded in hash are relative to
compile cache directory.
PR-URL: https://github.com/nodejs/node/pull/58797
Fixes: https://github.com/nodejs/node/issues/58755
Refs: https://github.com/nodejs/node/issues/52696
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-09-12 11:00:39 +00:00
Joyee Cheung
9029aec834
cli: implement --trace-env and --trace-env-[js|native]-stack
...
This implements --trace-env, --trace-env-js-stack and
--trace-env-native-stack CLI options which can be used to find
out what environment variables are accessed and where they are
accessed.
PR-URL: https://github.com/nodejs/node/pull/55604
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-11-27 09:44:16 +00:00
Hüseyin Açacak
7f68e5466a
path,win: fix bug in resolve and normalize
...
Fixes: https://github.com/nodejs/node/issues/54025
PR-URL: https://github.com/nodejs/node/pull/55623
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-11-05 23:21:54 +00:00
Aviv Keller
ee46d2297c
Revert "path: fix bugs and inconsistencies"
...
This reverts commit efbba60e5b .
PR-URL: https://github.com/nodejs/node/pull/55414
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-10-21 07:10:47 +00:00
Cheng
773e7c67cf
src: do not call path.back() when it is empty
...
PR-URL: https://github.com/nodejs/node/pull/55072
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-09-25 01:36:10 +00:00
Yagiz Nizipli
5a966714c1
src: revert filesystem::path changes
...
PR-URL: https://github.com/nodejs/node/pull/55015
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-09-21 17:22:21 +00:00
Hüseyin Açacak
efbba60e5b
path: fix bugs and inconsistencies
...
Fixes: https://github.com/nodejs/node/issues/54025
PR-URL: https://github.com/nodejs/node/pull/54224
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2024-09-14 14:56:31 +00:00
Cheng
2fd798d980
src: do not get string_view from temp string
...
The result of std::string().substr() will be destroyed at the end of
expression and creating std::string_view from it results in dangling
pointer.
PR-URL: https://github.com/nodejs/node/pull/53688
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-05 00:51:06 +00:00
Yagiz Nizipli
c1dc307221
src: replace kPathSeparator with std::filesystem
...
PR-URL: https://github.com/nodejs/node/pull/53063
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-06-30 20:11:14 +00:00
Yagiz Nizipli
303606690f
src: move FromNamespacedPath to path.cc
...
PR-URL: https://github.com/nodejs/node/pull/53540
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2024-06-27 14:56:33 +00:00
Yagiz Nizipli and Daniel Lemire
399eb338f1
fs: move ToNamespacedPath to c++
...
Co-Authored-By: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/52135
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 02:11:10 +00:00
Yagiz Nizipli
695cd8b9e2
src: reduce unnecessary GetCwd calls
...
PR-URL: https://github.com/nodejs/node/pull/53064
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-05-22 01:45:35 +00:00
Yagiz Nizipli
0b676736a0
test: add missing cctest/test_path.cc
...
PR-URL: https://github.com/nodejs/node/pull/52148
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-21 14:36:40 +00:00
Cheng Zhao
46bc0ffce6
src: do not read string out of bounds
...
PR-URL: https://github.com/nodejs/node/pull/51358
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Keyhan Vakil <kvakil@sylph.kvakil.me >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2024-01-06 21:20:56 +00:00
Rafael Gonzaga and Carlos Espa
338a5be272
lib,src,permission: port path.resolve to C++
...
Co-Authored-By: Carlos Espa <cespatorres@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/50758
Refs: https://github.com/nodejs/security-wg/issues/898
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
2023-12-30 13:46:27 +00:00