www/node12: Update 12.16.3 -> 12.17.0
https://nodejs.org/en/blog/release/v12.17.0/ Sponsored by: Miles AS
This commit is contained in:
parent
973ec248b4
commit
f7e53020af
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=538485
4 changed files with 8 additions and 153 deletions
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= node
|
||||
PORTVERSION= 12.16.3
|
||||
PORTVERSION= 12.17.0
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/
|
||||
|
@ -39,7 +39,7 @@ BUNDLED_SSL_CONFIGURE_OFF= --shared-openssl --openssl-use-def-ca-store
|
|||
BUNDLED_SSL_RUN_DEPENDS_OFF= ca_root_nss>=0:security/ca_root_nss
|
||||
|
||||
NLS_CONFIGURE_ON= --with-intl=system-icu
|
||||
NLS_BUILD_DEPENDS= icu>=64.2:devel/icu
|
||||
NLS_BUILD_DEPENDS= icu>=67.1:devel/icu
|
||||
NLS_LIB_DEPENDS= libicui18n.so:devel/icu
|
||||
|
||||
DTRACE_CONFIGURE_ON= --with-dtrace
|
||||
|
@ -67,7 +67,7 @@ MAKE_ENV+= CC.host=${CC} CFLAGS.host="${CFLAGS}" \
|
|||
LINK.host=${CXX} LDFLAGS.host="${LDFLAGS}"
|
||||
|
||||
BUILD_DEPENDS+= c-ares>=1.15.0:dns/c-ares\
|
||||
libuv>=1.34.2:devel/libuv \
|
||||
libuv>=1.37.0:devel/libuv \
|
||||
libnghttp2>=1.40.0:www/libnghttp2 \
|
||||
objdump:devel/binutils
|
||||
LIB_DEPENDS+= libcares.so:dns/c-ares\
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1591215955
|
||||
SHA256 (node-v12.16.3.tar.gz) = 4694056576b6c48a70ad401cf061181eafbc3cbf5070907cdba4e6de1be567a5
|
||||
SIZE (node-v12.16.3.tar.gz) = 52322941
|
||||
TIMESTAMP = 1591305198
|
||||
SHA256 (node-v12.17.0.tar.gz) = 6198f2db36b2c76933d96919dd11e283620c3af2c2b39c2795301bc9c9ee73db
|
||||
SIZE (node-v12.17.0.tar.gz) = 52417986
|
||||
|
|
|
@ -1,145 +0,0 @@
|
|||
https://github.com/nodejs/node/issues/32660
|
||||
|
||||
--- deps/v8/src/objects/js-number-format.cc.orig 2020-04-28 09:45:23 UTC
|
||||
+++ deps/v8/src/objects/js-number-format.cc
|
||||
@@ -1257,42 +1257,31 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::New(Isolat
|
||||
}
|
||||
|
||||
namespace {
|
||||
-Maybe<icu::UnicodeString> IcuFormatNumber(
|
||||
+Maybe<bool> IcuFormatNumber(
|
||||
Isolate* isolate,
|
||||
const icu::number::LocalizedNumberFormatter& number_format,
|
||||
- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
|
||||
+ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
|
||||
// If it is BigInt, handle it differently.
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
- icu::number::FormattedNumber formatted;
|
||||
if (numeric_obj->IsBigInt()) {
|
||||
Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
|
||||
Handle<String> big_int_string;
|
||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
|
||||
BigInt::ToString(isolate, big_int),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
- formatted = number_format.formatDecimal(
|
||||
+ Nothing<bool>());
|
||||
+ *formatted = number_format.formatDecimal(
|
||||
{big_int_string->ToCString().get(), big_int_string->length()}, status);
|
||||
} else {
|
||||
double number = numeric_obj->Number();
|
||||
- formatted = number_format.formatDouble(number, status);
|
||||
+ *formatted = number_format.formatDouble(number, status);
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
// This happen because of icu data trimming trim out "unit".
|
||||
// See https://bugs.chromium.org/p/v8/issues/detail?id=8641
|
||||
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
|
||||
- NewTypeError(MessageTemplate::kIcuError),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
+ THROW_NEW_ERROR_RETURN_VALUE(
|
||||
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
|
||||
}
|
||||
- if (fp_iter) {
|
||||
- formatted.getAllFieldPositions(*fp_iter, status);
|
||||
- }
|
||||
- icu::UnicodeString result = formatted.toString(status);
|
||||
- if (U_FAILURE(status)) {
|
||||
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
|
||||
- NewTypeError(MessageTemplate::kIcuError),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
- }
|
||||
- return Just(result);
|
||||
+ return Just(true);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -1303,10 +1292,16 @@ MaybeHandle<String> JSNumberFormat::FormatNumeric(
|
||||
Handle<Object> numeric_obj) {
|
||||
DCHECK(numeric_obj->IsNumeric());
|
||||
|
||||
- Maybe<icu::UnicodeString> maybe_format =
|
||||
- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
|
||||
+ icu::number::FormattedNumber formatted;
|
||||
+ Maybe<bool> maybe_format =
|
||||
+ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
|
||||
MAYBE_RETURN(maybe_format, Handle<String>());
|
||||
- return Intl::ToString(isolate, maybe_format.FromJust());
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
+ icu::UnicodeString result = formatted.toString(status);
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
|
||||
+ }
|
||||
+ return Intl::ToString(isolate, result);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -1419,12 +1414,18 @@ std::vector<NumberFormatSpan> FlattenRegionsToParts(
|
||||
}
|
||||
|
||||
namespace {
|
||||
-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
|
||||
- icu::FieldPositionIterator* fp_iter,
|
||||
+Maybe<int> ConstructParts(Isolate* isolate,
|
||||
+ icu::number::FormattedNumber* formatted,
|
||||
Handle<JSArray> result, int start_index,
|
||||
Handle<Object> numeric_obj, bool style_is_unit) {
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
+ icu::UnicodeString formatted_text = formatted->toString(status);
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ THROW_NEW_ERROR_RETURN_VALUE(
|
||||
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
|
||||
+ }
|
||||
DCHECK(numeric_obj->IsNumeric());
|
||||
- int32_t length = formatted.length();
|
||||
+ int32_t length = formatted_text.length();
|
||||
int index = start_index;
|
||||
if (length == 0) return Just(index);
|
||||
|
||||
@@ -1433,13 +1434,14 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu:
|
||||
// other region covers some part of the formatted string. It's possible
|
||||
// there's another field with exactly the same begin and end as this backdrop,
|
||||
// in which case the backdrop's field_id of -1 will give it lower priority.
|
||||
- regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
|
||||
+ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
|
||||
|
||||
{
|
||||
- icu::FieldPosition fp;
|
||||
- while (fp_iter->next(fp)) {
|
||||
- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
|
||||
- fp.getEndIndex()));
|
||||
+ icu::ConstrainedFieldPosition cfp;
|
||||
+ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
|
||||
+ while (formatted->nextPosition(cfp, status)) {
|
||||
+ regions.push_back(
|
||||
+ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1461,7 +1463,7 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu:
|
||||
Handle<String> substring;
|
||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
||||
isolate, substring,
|
||||
- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
|
||||
+ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
|
||||
Nothing<int>());
|
||||
Intl::AddElement(isolate, result, index, field_type_string, substring);
|
||||
++index;
|
||||
@@ -1481,14 +1483,14 @@ MaybeHandle<JSArray> JSNumberFormat::FormatToParts(
|
||||
number_format->icu_number_formatter().raw();
|
||||
CHECK_NOT_NULL(fmt);
|
||||
|
||||
- icu::FieldPositionIterator fp_iter;
|
||||
- Maybe<icu::UnicodeString> maybe_format =
|
||||
- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
|
||||
+ icu::number::FormattedNumber formatted;
|
||||
+ Maybe<bool> maybe_format =
|
||||
+ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
|
||||
MAYBE_RETURN(maybe_format, Handle<JSArray>());
|
||||
|
||||
Handle<JSArray> result = factory->NewJSArray(0);
|
||||
Maybe<int> maybe_format_to_parts = ConstructParts(
|
||||
- isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj,
|
||||
+ isolate, &formatted, result, 0, numeric_obj,
|
||||
number_format->style() == JSNumberFormat::Style::UNIT);
|
||||
MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- node.gypi.orig 2020-04-28 09:45:25 UTC
|
||||
--- node.gypi.orig 2020-05-26 11:53:34 UTC
|
||||
+++ node.gypi
|
||||
@@ -341,6 +341,9 @@
|
||||
@@ -323,6 +323,9 @@
|
||||
['openssl_fips != "" or openssl_is_fips=="true"', {
|
||||
'defines': [ 'NODE_FIPS_MODE' ],
|
||||
}],
|
||||
|
|
Loading…
Reference in a new issue