Skip to content

Commit 2772078

Browse files
authored
Merge branch 'nodejs:main' into main
2 parents d395dcb + f5da8f8 commit 2772078

File tree

85 files changed

+1056
-1268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1056
-1268
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
30+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3131
with:
3232
languages: ${{ matrix.language }}
3333
config-file: ./.github/codeql-config.yml
3434

3535
- name: Autobuild
36-
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
36+
uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3737

3838
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
39+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
4040
with:
4141
category: /language:${{matrix.language}}

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Harden Runner
36-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
36+
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
3737
with:
3838
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
3939

@@ -73,6 +73,6 @@ jobs:
7373

7474
# Upload the results to GitHub's code scanning dashboard.
7575
- name: Upload to code-scanning
76-
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
76+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
7777
with:
7878
sarif_file: results.sarif

.mailmap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ Rebecca Turner <[email protected]> <[email protected]>
436436
437437
Reza Akhavan <[email protected]>
438438
Ricardo Sánchez Gregorio <[email protected]>
439-
439+
440+
440441
Rick Olson <[email protected]>
441442
442443

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ For information about the governance of the Node.js project, see
187187
* [RaisinTen](https://github.com/RaisinTen) -
188188
**Darshan Sen** <<[email protected]>> (he/him)
189189
* [richardlau](https://github.com/richardlau) -
190-
**Richard Lau** <<rlau@redhat.com>>
190+
**Richard Lau** <<richard.lau@ibm.com>>
191191
* [ronag](https://github.com/ronag) -
192192
**Robert Nagy** <<[email protected]>>
193193
* [ruyadorno](https://github.com/ruyadorno) -
@@ -411,6 +411,8 @@ For information about the governance of the Node.js project, see
411411
**Moshe Atlow** <<[email protected]>> (he/him)
412412
* [MrJithil](https://github.com/MrJithil) -
413413
**Jithil P Ponnan** <<[email protected]>> (he/him)
414+
* [ovflowd](https://github.com/ovflowd) -
415+
**Claudio Wunder** <<[email protected]>> (he/they)
414416
* [panva](https://github.com/panva) -
415417
**Filip Skokan** <<[email protected]>> (he/him) - [Support me](https://github.com/sponsors/panva)
416418
* [pimterry](https://github.com/pimterry) -
@@ -426,7 +428,7 @@ For information about the governance of the Node.js project, see
426428
* [RaisinTen](https://github.com/RaisinTen) -
427429
**Darshan Sen** <<[email protected]>> (he/him) - [Support me](https://github.com/sponsors/RaisinTen)
428430
* [richardlau](https://github.com/richardlau) -
429-
**Richard Lau** <<rlau@redhat.com>>
431+
**Richard Lau** <<richard.lau@ibm.com>>
430432
* [rluvaton](https://github.com/rluvaton) -
431433
**Raz Luvaton** <<[email protected]>> (he/him)
432434
* [ronag](https://github.com/ronag) -
@@ -639,8 +641,6 @@ For information about the governance of the Node.js project, see
639641
**Alexis Campailla** <<[email protected]>>
640642
* [othiym23](https://github.com/othiym23) -
641643
**Forrest L Norvell** <<[email protected]>> (they/them/themself)
642-
* [ovflowd](https://github.com/ovflowd) -
643-
**Claudio Wunder** <<[email protected]>> (he/they)
644644
* [oyyd](https://github.com/oyyd) -
645645
**Ouyang Yadong** <<[email protected]>> (he/him)
646646
* [petkaantonov](https://github.com/petkaantonov) -
@@ -799,7 +799,7 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
799799
`8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600`
800800
* **Rafael Gonzaga** <<[email protected]>>
801801
`890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4`
802-
* **Richard Lau** <<rlau@redhat.com>>
802+
* **Richard Lau** <<richard.lau@ibm.com>>
803803
`C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C`
804804
* **Ruy Adorno** <<[email protected]>>
805805
`108F52B48DB57BB0CC439B2997B01419BD92F80A`

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.14',
41+
'v8_embedder_string': '-node.16',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/inspector_protocol/BUILD.gn

Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,95 @@
1-
# Copyright 2019 the V8 project authors. All rights reserved.
1+
# Copyright 2018 The Chromium Authors
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
static_library("encoding") {
5+
# This BUILD.gn file is specific to the standalone project. Do not
6+
# copy this downstream.
7+
8+
import("//testing/test.gni")
9+
10+
static_library("crdtp") {
611
sources = [
7-
"encoding/encoding.cc",
8-
"encoding/encoding.h",
12+
"crdtp/cbor.cc",
13+
"crdtp/cbor.h",
14+
"crdtp/dispatch.cc",
15+
"crdtp/dispatch.h",
16+
"crdtp/error_support.cc",
17+
"crdtp/error_support.h",
18+
"crdtp/export.h",
19+
"crdtp/find_by_first.h",
20+
"crdtp/frontend_channel.h",
21+
"crdtp/glue.h",
22+
"crdtp/json.cc",
23+
"crdtp/json.h",
24+
"crdtp/parser_handler.h",
25+
"crdtp/protocol_core.cc",
26+
"crdtp/protocol_core.h",
27+
"crdtp/serializable.cc",
28+
"crdtp/serializable.h",
29+
"crdtp/span.cc",
30+
"crdtp/span.h",
31+
"crdtp/status.cc",
32+
"crdtp/status.h",
933
]
34+
deps = [ ":crdtp_platform" ]
1035
}
1136

12-
# encoding_test is part of the unittests, defined in
13-
# test/unittests/BUILD.gn.
37+
# A small adapter library which only :crdtp may depend on.
38+
static_library("crdtp_platform") {
39+
sources = [
40+
"crdtp/json_platform.cc",
41+
"crdtp/json_platform.h",
42+
]
43+
}
1444

15-
import("../../gni/v8.gni")
45+
# In this (upstream) standalone package, we declare crdtp_test, and a
46+
# few minimal files in testing (accessed via test_platform.{h,cc}) to
47+
# make it look like Chromium's testing package. In Chromium,
48+
# we run these tests as part of the content_unittests, declared in
49+
# content/test/BUILD.gn, and in V8, we run them via unittests, declared
50+
# in test/unittests/BUILD.gn.
1651

17-
v8_source_set("encoding_test") {
52+
test("crdtp_test") {
1853
sources = [
19-
"encoding/encoding_test.cc",
20-
"encoding/encoding_test_helper.h",
21-
]
22-
configs = [
23-
"../..:external_config",
24-
"../..:internal_config_base",
54+
"crdtp/cbor_test.cc",
55+
"crdtp/dispatch_test.cc",
56+
"crdtp/error_support_test.cc",
57+
"crdtp/find_by_first_test.cc",
58+
"crdtp/json_test.cc",
59+
"crdtp/protocol_core_test.cc",
60+
"crdtp/serializable_test.cc",
61+
"crdtp/span_test.cc",
62+
"crdtp/status_test.cc",
63+
"crdtp/status_test_support.cc",
64+
"crdtp/status_test_support.h",
65+
"crdtp/test_string_traits.cc",
66+
"crdtp/test_string_traits.h",
2567
]
68+
include_dirs = [ "." ]
2669
deps = [
27-
":encoding",
28-
"../..:v8_libbase",
29-
"../../src/inspector:inspector_string_conversions",
70+
":crdtp",
71+
":crdtp_test_platform",
72+
]
73+
}
74+
75+
# A small adapter library which only :crdtp_test may depend on.
76+
static_library("crdtp_test_platform") {
77+
sources = [
78+
"crdtp/test_platform.cc",
79+
"crdtp/test_platform.h",
80+
]
81+
testonly = true
82+
include_dirs = [ "." ]
83+
public_deps = [
84+
"//base",
3085
"//testing/gmock",
3186
"//testing/gtest",
87+
"//testing/gtest:gtest_main",
3288
]
33-
testonly = true
89+
}
90+
91+
# A command line utility for converting between JSON and CBOR.
92+
executable("transcode") {
93+
sources = [ "crdtp/transcode.cc" ]
94+
deps = [ ":crdtp" ]
3495
}

deps/inspector_protocol/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2016 The Chromium Authors. All rights reserved.
1+
// Copyright 2016 The Chromium Authors.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions are

deps/inspector_protocol/README.node

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: inspector protocol
22
Short Name: inspector_protocol
33
URL: https://chromium.googlesource.com/deps/inspector_protocol/
44
Version: 0
5-
Revision: 64cc2301620c04f0fe0313ae94a9319f003603cf
5+
Revision: 69d69ddf3aa698b171886551a4a672c5af1ad902
66
License: BSD
77
License File: LICENSE
88
Security Critical: no

deps/inspector_protocol/code_generator.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def dash_to_camelcase(word):
147147

148148
def to_snake_case(name):
149149
name = re.sub(r"([A-Z]{2,})([A-Z][a-z])", r"\1_\2", name)
150-
return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name, sys.maxsize).lower()
150+
return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name, count=sys.maxsize).lower()
151151

152152

153153
def to_method_case(config, name):
@@ -542,6 +542,12 @@ def resolve_type(self, prop):
542542
return wrap_array_definition(self.resolve_type(prop["items"]))
543543
return self.type_definitions[prop["type"]]
544544

545+
def optional_type(self, prop):
546+
type = self.resolve_type(prop)
547+
template = ("std::optional<{}>" if type.get('is_primitive', False)
548+
else "std::unique_ptr<{}>")
549+
return template.format(type.get("raw_type"))
550+
545551
def generate_command(self, domain, command):
546552
if not self.config.protocol.options:
547553
return domain in self.generate_domains

deps/inspector_protocol/crdtp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ to fetch the package (and dependencies) and build and run the tests:
5151
ninja -C out/Release crdtp_test
5252
out/Release/crdtp_test
5353

54-
You'll probably also need to install g++, since Clang uses this to find the
54+
You'll probably also need to install libstdc++, since Clang uses this to find the
5555
standard C++ headers. E.g.,
5656

57-
sudo apt-get install g++-8
57+
sudo apt-get install libstdc++-14-dev
5858

5959
# Purpose of the tests
6060

0 commit comments

Comments
 (0)