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

[12.x] deps: update to [email protected] #39530

Closed
Closed
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
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.55',
'v8_embedder_string': '-node.56',

##### V8 defaults for Node.js #####

Expand Down
3 changes: 3 additions & 0 deletions deps/cjs-module-lexer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.2.2
- Fix RollupJS reexports bug (https://github.com/guybedford/cjs-module-lexer/pull/59)

1.2.1
- Support Unicode escapes in strings (https://github.com/guybedford/cjs-module-lexer/pull/55)
- Filter export strings to valid surrogate pairs (https://github.com/guybedford/cjs-module-lexer/pull/56)
Expand Down
2 changes: 1 addition & 1 deletion deps/cjs-module-lexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2
(`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)?
)?
) |
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER$1 `, ` IDENTIFIER$2 `)` | IDENTIFIER$1 `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
)
(
EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? |
Expand Down
2 changes: 1 addition & 1 deletion deps/cjs-module-lexer/dist/lexer.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deps/cjs-module-lexer/dist/lexer.mjs

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions deps/cjs-module-lexer/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,10 @@ function tryParseObjectDefineOrKeys (keys) {
if (ch !== 33/*!*/) break;
pos += 1;
ch = commentWhitespace();
if (source.startsWith(id, pos)) {
pos += id.length;
if (ch === 79/*O*/ && source.startsWith('bject', pos + 1) && source[pos + 6] === '.') {
if (!tryParseObjectHasOwnProperty(it_id)) break;
}
else if (identifier()) {
ch = commentWhitespace();
if (ch !== 46/*.*/) break;
pos++;
Expand All @@ -669,7 +671,7 @@ function tryParseObjectDefineOrKeys (keys) {
if (ch !== 41/*)*/) break;
pos += 1;
}
else if (!tryParseObjectHasOwnProperty(it_id)) break;
else break;
ch = commentWhitespace();
}
if (ch !== 41/*)*/) break;
Expand Down
2 changes: 1 addition & 1 deletion deps/cjs-module-lexer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cjs-module-lexer",
"version": "1.2.1",
"version": "1.2.2",
"description": "Lexes CommonJS modules, returning their named exports metadata",
"main": "lexer.js",
"exports": {
Expand Down
32 changes: 32 additions & 0 deletions deps/v8/src/objects/js-list-format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
#include "unicode/fpositer.h"
#include "unicode/listformatter.h"
#include "unicode/ulistformatter.h"
#include "unicode/uvernum.h"

namespace v8 {
namespace internal {

namespace {

#if U_ICU_VERSION_MAJOR_NUM < 67
const char* kStandard = "standard";
const char* kOr = "or";
const char* kUnit = "unit";
Expand Down Expand Up @@ -72,6 +75,31 @@ const char* GetIcuStyleString(JSListFormat::Style style,
}
UNREACHABLE();
}
#else
UListFormatterWidth GetIcuWidth(JSListFormat::Style style) {
switch (style) {
case JSListFormat::Style::LONG:
return ULISTFMT_WIDTH_WIDE;
case JSListFormat::Style::SHORT:
return ULISTFMT_WIDTH_SHORT;
case JSListFormat::Style::NARROW:
return ULISTFMT_WIDTH_NARROW;
}
UNREACHABLE();
}

UListFormatterType GetIcuType(JSListFormat::Type type) {
switch (type) {
case JSListFormat::Type::CONJUNCTION:
return ULISTFMT_TYPE_AND;
case JSListFormat::Type::DISJUNCTION:
return ULISTFMT_TYPE_OR;
case JSListFormat::Type::UNIT:
return ULISTFMT_TYPE_UNITS;
}
UNREACHABLE();
}
#endif

} // namespace

Expand Down Expand Up @@ -170,7 +198,11 @@ MaybeHandle<JSListFormat> JSListFormat::New(Isolate* isolate, Handle<Map> map,
icu::Locale icu_locale = r.icu_locale;
UErrorCode status = U_ZERO_ERROR;
icu::ListFormatter* formatter = icu::ListFormatter::createInstance(
#if U_ICU_VERSION_MAJOR_NUM < 67
icu_locale, GetIcuStyleString(style_enum, type_enum), status);
#else
icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status);
#endif
if (U_FAILURE(status)) {
delete formatter;
FATAL("Failed to create ICU list formatter, are ICU data files missing?");
Expand Down
2 changes: 1 addition & 1 deletion doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ success!
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
[dynamic instantiate hook]: #esm_code_dynamicinstantiate_code_hook
[`util.TextDecoder`]: util.md#util_class_util_textdecoder
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.1
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.2
[special scheme]: https://url.spec.whatwg.org/#special-scheme
[the official standard format]: https://tc39.github.io/ecma262/#sec-modules
[transpiler loader example]: #esm_transpiler_loader
Expand Down
6 changes: 5 additions & 1 deletion src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
# include <arpa/nameser.h>
#endif

#if defined(__OpenBSD__)
// OpenBSD does not define these
#ifndef AI_ALL
# define AI_ALL 0
#endif
#ifndef AI_V4MAPPED
# define AI_V4MAPPED 0
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ void NodePlatform::AddIsolateFinishedCallback(Isolate* isolate,
Mutex::ScopedLock lock(per_isolate_mutex_);
auto it = per_isolate_.find(isolate);
if (it == per_isolate_.end()) {
CHECK(it->second);
cb(data);
return;
}
CHECK(it->second);
it->second->AddShutdownCallback(cb, data);
}

Expand Down