Skip to content

Commit

Permalink
Merge pull request #988 from nodejs/main
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio authored May 13, 2024
2 parents 20d2e1b + 1d7d094 commit 0249d63
Show file tree
Hide file tree
Showing 198 changed files with 61,830 additions and 20,097 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ module.exports = {
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
message: 'Use `new` keyword when throwing an `Error`.',
},
{
selector: "CallExpression[callee.property.name='substr']",
message: 'Use String.prototype.slice() or String.prototype.substring() instead of String.prototype.substr()',
},
{
selector: "CallExpression[callee.name='isNaN']",
message: 'Use Number.isNaN() instead of the global isNaN() function.',
Expand Down Expand Up @@ -346,6 +350,7 @@ module.exports = {
Crypto: 'readable',
CryptoKey: 'readable',
DecompressionStream: 'readable',
EventSource: 'readable',
fetch: 'readable',
FormData: 'readable',
navigator: 'readable',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
npm ci
NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs)
if [ "$NEW_VERSION" != "" ]; then
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
echo "NEW_VERSION=new version" >> $GITHUB_ENV
rm -rf package-lock.json node_modules
# Include $NEW_VERSION to explicitly update the package.json
# entry for the dependency and also so that semver-major updates
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.13.0">20.13.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.13.1">20.13.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.13.0">20.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.2">20.12.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.1">20.12.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.0">20.12.0</a><br/>
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ For information about the governance of the Node.js project, see

* [aduh95](https://github.com/aduh95) -
**Antoine du Hamel** <<[email protected]>> (he/him)
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<[email protected]>> (he/him)
* [apapirovski](https://github.com/apapirovski) -
**Anatoli Papirovski** <<[email protected]>> (he/him)
* [benjamingr](https://github.com/benjamingr) -
Expand Down Expand Up @@ -205,6 +203,8 @@ For information about the governance of the Node.js project, see

#### TSC regular members

* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<[email protected]>> (he/him)
* [BethGriggs](https://github.com/BethGriggs) -
**Beth Griggs** <<[email protected]>> (she/her)
* [bnoordhuis](https://github.com/bnoordhuis) -
Expand Down Expand Up @@ -773,7 +773,7 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
`8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600`
* **Myles Borins** <<[email protected]>>
`C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
* **RafaelGSS** <<[email protected]>>
* **Rafael Gonzaga** <<[email protected]>>
`890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4`
* **Richard Lau** <<[email protected]>>
`C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C`
Expand All @@ -786,17 +786,17 @@ To import the full set of trusted release keys (including subkeys possibly used
to sign releases):

```bash
gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
gpg --keyserver hkps://keys.openpgp.org --recv-keys 141F07595B7B3FFE74309A937405533BE57C7D57
gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7
gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F
gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4
gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C
gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A
gpg --keyserver hkps://keys.openpgp.org --recv-keys A363A499291CBBC940DD62E41F10027AF002F8B0
gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C # Beth Griggs
gpg --keyserver hkps://keys.openpgp.org --recv-keys 141F07595B7B3FFE74309A937405533BE57C7D57 # Bryan English
gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201 # Danielle Adams
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 # Juan José Arboleda
gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F # Marco Ippolito
gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 # Michaël Zasso
gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 # Myles Borins
gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 # Rafael Gonzaga
gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C # Richard Lau
gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A # Ruy Adorno
gpg --keyserver hkps://keys.openpgp.org --recv-keys A363A499291CBBC940DD62E41F10027AF002F8B0 # Ulises Gascón
```

See [Verifying binaries](#verifying-binaries) for how to use these keys to
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/bench-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function main({ len, n }) {
let header = `GET /hello HTTP/1.1${CRLF}Content-Type: text/plain${CRLF}`;

for (let i = 0; i < len; i++) {
header += `X-Filler${i}: ${Math.random().toString(36).substr(2)}${CRLF}`;
header += `X-Filler${i}: ${Math.random().toString(36).substring(2)}${CRLF}`;
}
header += CRLF;

Expand Down
18 changes: 8 additions & 10 deletions benchmark/misc/startup-cli-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ const path = require('path');
// tends to be minimal and fewer operations are done to generate
// these so that the startup cost is still dominated by a more
// indispensible part of the CLI.
// NOTE: not all tools are present in tarball hence need to filter
const availableCli = [
'tools/node_modules/eslint/bin/eslint.js',
'deps/npm/bin/npx-cli.js',
'deps/npm/bin/npm-cli.js',
'deps/corepack/dist/corepack.js',
].filter((cli) => existsSync(path.resolve(__dirname, '../../', cli)));
const bench = common.createBenchmark(main, {
cli: [
'tools/node_modules/eslint/bin/eslint.js',
'deps/npm/bin/npx-cli.js',
'deps/npm/bin/npm-cli.js',
'deps/corepack/dist/corepack.js',
],
cli: availableCli,
count: [30],
});

Expand Down Expand Up @@ -47,10 +49,6 @@ function spawnProcess(cli, bench, state) {

function main({ count, cli }) {
cli = path.resolve(__dirname, '../../', cli);
if (!existsSync(cli)) {
return;
}

const warmup = 3;
const state = { count, finished: -warmup };
spawnProcess(cli, bench, state);
Expand Down
8 changes: 3 additions & 5 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
'configuring_node%': 0,
'asan%': 0,
'ubsan%': 0,
'werror': '', # Turn off -Werror in V8 build.
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
Expand Down Expand Up @@ -107,7 +106,6 @@
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
}],
['OS=="mac"', {
'clang%': 1,
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
}],
Expand Down Expand Up @@ -182,10 +180,10 @@
}, {
'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD)
}],
['llvm_version=="0.0"', {
'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC
}, {
['clang==1', {
'lto': ' -flto ', # Clang
}, {
'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC
}],
],
},
Expand Down
106 changes: 96 additions & 10 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,28 @@
dest='shared_openssl_libpath',
help='a directory to search for the shared OpenSSL DLLs')

shared_optgroup.add_argument('--shared-uvwasi',
action='store_true',
dest='shared_uvwasi',
default=None,
help='link to a shared uvwasi DLL instead of static linking')

shared_optgroup.add_argument('--shared-uvwasi-includes',
action='store',
dest='shared_uvwasi_includes',
help='directory containing uvwasi header files')

shared_optgroup.add_argument('--shared-uvwasi-libname',
action='store',
dest='shared_uvwasi_libname',
default='uvwasi',
help='alternative lib name to link to [default: %default]')

shared_optgroup.add_argument('--shared-uvwasi-libpath',
action='store',
dest='shared_uvwasi_libpath',
help='a directory to search for the shared uvwasi DLL')

shared_optgroup.add_argument('--shared-zlib',
action='store_true',
dest='shared_zlib',
Expand All @@ -404,6 +426,74 @@
dest='shared_zlib_libpath',
help='a directory to search for the shared zlib DLL')

shared_optgroup.add_argument('--shared-simdjson',
action='store_true',
dest='shared_simdjson',
default=None,
help='link to a shared simdjson DLL instead of static linking')

shared_optgroup.add_argument('--shared-simdjson-includes',
action='store',
dest='shared_simdjson_includes',
help='directory containing simdjson header files')

shared_optgroup.add_argument('--shared-simdjson-libname',
action='store',
dest='shared_simdjson_libname',
default='simdjson',
help='alternative lib name to link to [default: %(default)s]')

shared_optgroup.add_argument('--shared-simdjson-libpath',
action='store',
dest='shared_simdjson_libpath',
help='a directory to search for the shared simdjson DLL')


shared_optgroup.add_argument('--shared-simdutf',
action='store_true',
dest='shared_simdutf',
default=None,
help='link to a shared simdutf DLL instead of static linking')

shared_optgroup.add_argument('--shared-simdutf-includes',
action='store',
dest='shared_simdutf_includes',
help='directory containing simdutf header files')

shared_optgroup.add_argument('--shared-simdutf-libname',
action='store',
dest='shared_simdutf_libname',
default='simdutf',
help='alternative lib name to link to [default: %(default)s]')

shared_optgroup.add_argument('--shared-simdutf-libpath',
action='store',
dest='shared_simdutf_libpath',
help='a directory to search for the shared simdutf DLL')


shared_optgroup.add_argument('--shared-ada',
action='store_true',
dest='shared_ada',
default=None,
help='link to a shared ada DLL instead of static linking')

shared_optgroup.add_argument('--shared-ada-includes',
action='store',
dest='shared_ada_includes',
help='directory containing ada header files')

shared_optgroup.add_argument('--shared-ada-libname',
action='store',
dest='shared_ada_libname',
default='ada',
help='alternative lib name to link to [default: %(default)s]')

shared_optgroup.add_argument('--shared-ada-libpath',
action='store',
dest='shared_ada_libpath',
help='a directory to search for the shared ada DLL')

shared_optgroup.add_argument('--shared-brotli',
action='store_true',
dest='shared_brotli',
Expand Down Expand Up @@ -448,8 +538,6 @@
dest='shared_cares_libpath',
help='a directory to search for the shared cares DLL')

parser.add_argument_group(shared_optgroup)

for builtin in shareable_builtins:
builtin_id = 'shared_builtin_' + builtin + '_path'
shared_builtin_optgroup.add_argument('--shared-builtin-' + builtin + '-path',
Expand All @@ -458,15 +546,11 @@
help='Path to shared file for ' + builtin + ' builtin. '
'Will be used instead of bundled version at runtime')

parser.add_argument_group(shared_builtin_optgroup)

static_optgroup.add_argument('--static-zoslib-gyp',
action='store',
dest='static_zoslib_gyp',
help='path to zoslib.gyp file for includes and to link to static zoslib library')

parser.add_argument_group(static_optgroup)

parser.add_argument('--tag',
action='store',
dest='tag',
Expand Down Expand Up @@ -646,8 +730,6 @@
default='deps',
help='Download directory [default: %(default)s]')

parser.add_argument_group(intl_optgroup)

parser.add_argument('--debug-lib',
action='store_true',
dest='node_debug_lib',
Expand All @@ -660,8 +742,6 @@
default=None,
help='build nghttp2 with DEBUGBUILD (default is false)')

parser.add_argument_group(http2_optgroup)

parser.add_argument('--without-npm',
action='store_true',
dest='without_npm',
Expand Down Expand Up @@ -1042,6 +1122,7 @@ def get_gas_version(cc):
# quite prepared to go that far yet.
def check_compiler(o):
if sys.platform == 'win32':
o['variables']['clang'] = 0
o['variables']['llvm_version'] = '0.0'
if not options.openssl_no_asm and options.dest_cpu in ('x86', 'x64'):
nasm_version = get_nasm_version('nasm')
Expand All @@ -1051,6 +1132,7 @@ def check_compiler(o):
return

ok, is_clang, clang_version, gcc_version = try_check_compiler(CXX, 'c++')
o['variables']['clang'] = B(is_clang)
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
print_verbose(f"Detected {'clang ' if is_clang else ''}C++ compiler (CXX={CXX}) version: {version_str}")
if not ok:
Expand Down Expand Up @@ -2054,11 +2136,15 @@ def make_bin_override():
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('libuv', output)
configure_library('ada', output)
configure_library('simdjson', output)
configure_library('simdutf', output)
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
configure_library('cares', output, pkgname='libcares')
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_library('nghttp3', output, pkgname='libnghttp3')
configure_library('ngtcp2', output, pkgname='libngtcp2')
configure_library('uvwasi', output, pkgname='libuvwasi')
configure_v8(output)
configure_openssl(output)
configure_intl(output)
Expand Down
2 changes: 1 addition & 1 deletion deps/googletest/include/gtest/gtest-assertion-result.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace testing {
//
// Expected: Foo() is even
// Actual: it's 5
//

class GTEST_API_ AssertionResult {
public:
// Copy constructor.
Expand Down
8 changes: 4 additions & 4 deletions deps/googletest/include/gtest/gtest-param-test.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ TEST_P(DerivedTest, DoesBlah) {
#include <utility>

#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-param-util.h"
#include "gtest/internal/gtest-param-util.h" // IWYU pragma: export
#include "gtest/internal/gtest-port.h"

namespace testing {
Expand Down Expand Up @@ -469,7 +469,7 @@ internal::ParamConverterGenerator<T> ConvertGenerator(
::testing::internal::CodeLocation(__FILE__, __LINE__)); \
return 0; \
} \
static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_; \
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static int gtest_registering_dummy_; \
}; \
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
test_name)::gtest_registering_dummy_ = \
Expand Down Expand Up @@ -514,8 +514,8 @@ internal::ParamConverterGenerator<T> ConvertGenerator(
::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
DUMMY_PARAM_))))(info); \
} \
static int gtest_##prefix##test_suite_name##_dummy_ \
GTEST_ATTRIBUTE_UNUSED_ = \
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static int \
gtest_##prefix##test_suite_name##_dummy_ = \
::testing::UnitTest::GetInstance() \
->parameterized_test_registry() \
.GetTestSuitePatternHolder<test_suite_name>( \
Expand Down
Loading

0 comments on commit 0249d63

Please sign in to comment.