Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump(main/nodejs): v23.1.0 #22003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nodejs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://nodejs.org/
TERMUX_PKG_DESCRIPTION="Open Source, cross-platform JavaScript runtime environment"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Yaksh Bariya <[email protected]>"
TERMUX_PKG_VERSION=22.8.0
TERMUX_PKG_VERSION=23.1.0
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=f130e82176d1ee0702d99afc1995d0061bf8ed357c38834a32a08c9ef74f1ac7
TERMUX_PKG_SHA256=57cbfd3dd51f9300ea2b8e60a8ed215b1eaa71fbde4c3903a7d31a443a4a4423
# thunder-coding: don't try to autoupdate nodejs, that thing takes 2 whole hours to build for a single arch, and requires a lot of patch updates everytime. Also I run tests everytime I update it to ensure least bugs
TERMUX_PKG_AUTO_UPDATE=false
# Note that we do not use a shared libuv to avoid an issue with the Android
Expand Down
12 changes: 0 additions & 12 deletions packages/nodejs/deps-v8-src-handles-handles.h.patch

This file was deleted.

20 changes: 10 additions & 10 deletions packages/nodejs/lib-os.js.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- ./lib/os.js.orig 2023-01-06 02:53:28.000000000 +0530
+++ ./lib/os.js 2023-01-07 16:38:56.051166243 +0530
@@ -193,7 +193,7 @@
path = safeGetenv('TMPDIR') ||
safeGetenv('TMP') ||
safeGetenv('TEMP') ||
- '/tmp';
+ '@TERMUX_PREFIX@/tmp';
if (path.length > 1 && StringPrototypeEndsWith(path, '/'))
path = StringPrototypeSlice(path, 0, -1);
--- ./lib/os.js.orig 2024-10-28 09:48:51.426924888 +0530
+++ ./lib/os.js 2024-10-28 09:51:52.088950596 +0530
@@ -191,7 +191,7 @@
return path;
}

- return getTempDir() || '/tmp';
+ return getTempDir() || '@TERMUX_PREFIX@/tmp';
}
tmpdir[SymbolToPrimitive] = () => tmpdir();

200 changes: 180 additions & 20 deletions packages/nodejs/node.gyp.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
--- ../node-v22.8.0/node.gyp 2024-09-03 03:18:45.000000000 +0000
+++ ./node.gyp 2024-09-10 21:40:40.985225197 +0000
@@ -560,7 +560,8 @@
--- ./node.gyp.orig 2024-10-24 18:14:08.000000000 +0530
+++ ./node.gyp 2024-10-28 20:02:07.415607786 +0530
@@ -550,7 +550,8 @@
],

'sources': [
Expand All @@ -11,7 +10,7 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
],

'dependencies': [
@@ -1043,51 +1044,6 @@
@@ -1031,298 +1032,7 @@
},
],
}, # node_lib_target_name
Expand All @@ -21,7 +20,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
- ],
-
- 'includes': [
Expand All @@ -33,7 +31,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'deps/sqlite',
- 'test/cctest',
- ],
-
Expand All @@ -60,13 +57,95 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- }],
- ],
- }, # fuzz_env
{ # fuzz_ClientHelloParser.cc
'target_name': 'fuzz_ClientHelloParser',
'type': 'executable',
@@ -1181,89 +1137,6 @@
}],
],
}, # fuzz_strings
- { # fuzz_ClientHelloParser.cc
- 'target_name': 'fuzz_ClientHelloParser',
- 'type': 'executable',
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
- ],
- 'includes': [
- 'node.gypi'
- ],
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'deps/uvwasi/include',
- 'test/cctest',
- ],
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/fuzzers/fuzz_ClientHelloParser.cc',
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'ldflags': [ '-fsanitize=fuzzer' ]
- }],
- # Ensure that ossfuzz flag has been set and that we are on Linux
- [ 'OS!="linux" or ossfuzz!="true"', {
- 'type': 'none',
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # fuzz_ClientHelloParser.cc
- { # fuzz_strings
- 'target_name': 'fuzz_strings',
- 'type': 'executable',
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/googletest/googletest.gyp:gtest_prod',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
- 'deps/ada/ada.gyp:ada',
- 'deps/nbytes/nbytes.gyp:nbytes',
- ],
- 'includes': [
- 'node.gypi'
- ],
- 'include_dirs': [
- 'src',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'deps/uvwasi/include',
- 'test/cctest',
- ],
- 'defines': [
- 'NODE_ARCH="<(target_arch)"',
- 'NODE_PLATFORM="<(OS)"',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/fuzzers/fuzz_strings.cc',
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'ldflags': [ '-fsanitize=fuzzer' ]
- }],
- # Ensure that ossfuzz flag has been set and that we are on Linux
- [ 'OS!="linux" or ossfuzz!="true"', {
- 'type': 'none',
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # fuzz_strings
- {
- 'target_name': 'cctest',
- 'type': 'executable',
Expand All @@ -76,7 +155,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'deps/googletest/googletest.gyp:gtest',
- 'deps/googletest/googletest.gyp:gtest_main',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
- 'deps/simdjson/simdjson.gyp:simdjson',
- 'deps/simdutf/simdutf.gyp:simdutf',
- 'deps/ada/ada.gyp:ada',
Expand All @@ -93,7 +171,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'deps/sqlite',
- 'test/cctest',
- ],
-
Expand Down Expand Up @@ -150,10 +227,89 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- }],
- ],
- }, # cctest
-
- {
- 'target_name': 'embedtest',
- 'type': 'executable',
-
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/ada/ada.gyp:ada',
- 'deps/nbytes/nbytes.gyp:nbytes',
- ],
-
- 'includes': [
- 'node.gypi'
- ],
-
- 'include_dirs': [
- 'src',
- 'tools',
- 'tools/msvs/genfiles',
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'test/embedding',
- ],
-
- 'sources': [
- 'src/node_snapshot_stub.cc',
- 'test/embedding/embedtest.cc',
- ],
-
- 'conditions': [
- ['OS=="solaris"', {
- 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
- }],
- # Skip cctest while building shared lib node for Windows
- [ 'OS=="win" and node_shared=="true"', {
- 'type': 'none',
- }],
- [ 'node_shared=="true"', {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
- },
- }],
- ['OS=="win"', {
- 'libraries': [
- 'Dbghelp.lib',
- 'winmm.lib',
- 'Ws2_32.lib',
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ],
- }, # embedtest
-
- {
- 'target_name': 'overlapped-checker',
- 'type': 'executable',

- 'conditions': [
- ['OS=="win"', {
- 'sources': [
- 'test/overlapped-checker/main_win.c'
- ],
- }],
- ['OS!="win"', {
- 'sources': [
- 'test/overlapped-checker/main_unix.c'
- ],
- }],
- # Avoid excessive LTO
- ['enable_lto=="true"', {
- 'ldflags': [ '-fno-lto' ],
- }],
- ]
- }, # overlapped-checker
{
'target_name': 'embedtest',
@@ -1381,75 +1254,6 @@
'target_name': 'node_js2c',
'type': 'executable',
@@ -1359,79 +1069,6 @@
}],
]
},
Expand All @@ -164,7 +320,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'dependencies': [
- '<(node_lib_target_name)',
- 'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
- 'deps/ada/ada.gyp:ada',
- 'deps/nbytes/nbytes.gyp:nbytes',
- 'deps/simdjson/simdjson.gyp:simdjson',
Expand All @@ -181,7 +336,6 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'deps/v8/include',
- 'deps/cares/include',
- 'deps/uv/include',
- 'deps/sqlite',
- ],
-
- 'defines': [ 'NODE_WANT_INTERNALS=1' ],
Expand All @@ -191,6 +345,12 @@ diff -u -r ../node-v22.8.0/node.gyp ./node.gyp
- 'tools/snapshot/node_mksnapshot.cc',
- ],
-
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'EnableCOMDATFolding': '1', # /OPT:NOICF
- },
- },
-
- 'conditions': [
- ['node_write_snapshot_as_array_literals=="true"', {
- 'defines': [ 'NODE_MKSNAPSHOT_USE_ARRAY_LITERALS=1' ],
Expand Down
Loading