From 39a6bbb72294a34e0a07eae50500e9896df05358 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Wed, 3 Dec 2025 17:52:35 +0100 Subject: [PATCH 01/12] =?UTF-8?q?`windows-2022`=20=E2=86=92=20`windows-202?= =?UTF-8?q?5`=20`windows-2019`=20=E2=86=92=20`windows-2022`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- azure-pipelines.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7b98a59b686..33d217354e5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -125,7 +125,7 @@ jobs: maxParallel: 4 matrix: x86.Debug: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'debug' target: 'x86' special_build: '' @@ -133,7 +133,7 @@ jobs: test_tags: '' build_outdir_suffix: '' x86.Test: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'test' target: 'x86' special_build: '' @@ -141,7 +141,7 @@ jobs: test_tags: '--include-slow' build_outdir_suffix: '' x86.NoJit: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'debug' target: 'x86' special_build: '"/p:BuildJIT=false"' @@ -149,7 +149,7 @@ jobs: test_tags: '-disablejit' build_outdir_suffix: '.NoJIT' x86.Release: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'release' target: 'x86' special_build: '' @@ -157,7 +157,7 @@ jobs: test_tags: '' build_outdir_suffix: '' x64.Debug: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'debug' target: 'x64' special_build: '' @@ -165,7 +165,7 @@ jobs: test_tags: '' build_outdir_suffix: '' x64.Test: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'test' target: 'x64' special_build: '' @@ -173,23 +173,23 @@ jobs: test_tags: '--include-slow' build_outdir_suffix: '' x64.Release: - image_name: 'windows-2022' + image_name: 'windows-2025' build_type: 'release' target: 'x64' special_build: '' do_test: false test_tags: '' build_outdir_suffix: '' - win19.x86.Release: - image_name: 'windows-2019' + win22.x86.Release: + image_name: 'windows-2022' build_type: 'release' target: 'x86' special_build: '' do_test: false test_tags: '' build_outdir_suffix: '' - win19.x64.Release: - image_name: 'windows-2019' + win22.x64.Release: + image_name: 'windows-2022' build_type: 'release' target: 'x64' special_build: '' From 4551683758c74bc56c4f4c7a1a0772bf7b73eb2c Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Thu, 4 Dec 2025 00:35:49 +0100 Subject: [PATCH 02/12] Use windows icu by default --- Build/Chakra.Build.Default.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Chakra.Build.Default.props b/Build/Chakra.Build.Default.props index 5501dbf030e..bc0ba9373fa 100644 --- a/Build/Chakra.Build.Default.props +++ b/Build/Chakra.Build.Default.props @@ -29,7 +29,7 @@ true false - false + windows true From 22d8dbe08b81775ca3acc92d378643614201ff84 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Wed, 24 Dec 2025 15:55:46 +0100 Subject: [PATCH 03/12] Link against "new" `icu.lib` on windows. https://learn.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu-#version-1903-may-2019-update --- Build/Chakra.Build.Default.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Chakra.Build.Default.props b/Build/Chakra.Build.Default.props index bc0ba9373fa..7522f19ba5f 100644 --- a/Build/Chakra.Build.Default.props +++ b/Build/Chakra.Build.Default.props @@ -33,6 +33,6 @@ true - icuuc.lib;icuin.lib + icu.lib From 4a3f0005ac34c6bfaa4f5f5dc62ec308cd6df749 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Wed, 24 Dec 2025 16:40:09 +0100 Subject: [PATCH 04/12] Fix `Intl.getCanonicalLocales` tests --- test/Intl/GetCanonicalLocales.js | 22 ++++++++++++++++------ test/Intl/rlexe.xml | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/test/Intl/GetCanonicalLocales.js b/test/Intl/GetCanonicalLocales.js index 2fe70ecd745..d4cff602844 100644 --- a/test/Intl/GetCanonicalLocales.js +++ b/test/Intl/GetCanonicalLocales.js @@ -90,9 +90,15 @@ var tests = [ // V8 and CC-ICU also give the default value of "yes" to non-boolean keys (co), which also is incorrect. // Everyone (should) correctly re-order extension keys alphabetically // Microsoft/ChakraCore#4490 tracks the incorrect defaulting, Microsoft/ChakraCore#2964 tracks the overall investigation - equal("de-DE-u-co-kn", "de-DE-u-co-yes-kn-true", gcl("de-de-u-kn-co")[0]); - equal("de-DE-u-co-phonebk-kn", "de-DE-u-co-phonebk-kn-true", gcl("de-de-u-kn-co-phonebk")[0]); - equal("de-DE-u-co-phonebk-kn-yes", "de-DE-u-co-phonebk-kn-true", gcl("de-DE-u-kn-yes-co-phonebk")[0]); + if (WScript.Platform.ICU_VERSION < 62) { + assert.areEqual(["de-DE-u-co-yes-kn-true"], Intl.getCanonicalLocales("de-de-u-kn-co")) + assert.areEqual(["de-DE-u-co-phonebk-kn-true"], Intl.getCanonicalLocales("de-de-u-kn-co-phonebk")) + assert.areEqual(["de-DE-u-co-phonebk-kn-true"], Intl.getCanonicalLocales("de-DE-u-kn-yes-co-phonebk")) + } else { + assert.areEqual(["de-DE-u-co-kn"], Intl.getCanonicalLocales("de-de-u-kn-co")) + assert.areEqual(["de-DE-u-co-phonebk-kn"], Intl.getCanonicalLocales("de-de-u-kn-co-phonebk")) + assert.areEqual(["de-DE-u-co-phonebk-kn"], Intl.getCanonicalLocales("de-DE-u-kn-yes-co-phonebk")) + } // De-dupe after locales are canonicalized assert.areEqual(Intl.getCanonicalLocales(['en-us', 'en-us']), ['en-US'], "No duplicates, same input casing (casing was incorrect)"); @@ -100,8 +106,8 @@ var tests = [ assert.areEqual(Intl.getCanonicalLocales(['en-us', 'en-US']), ['en-US'], "No duplicates, different input casing"); assert.areEqual( + ["de-DE", "de-DE-u-co-phonebk-kn"], Intl.getCanonicalLocales(["de-de", "de-DE-u-co-phonebk-kn-true", "de-DE-u-kn-true-co-phonebk"]), - ["de-DE", "de-DE-u-co-phonebk-kn-true"], "No duplicates after re-ordering options" ); } @@ -122,8 +128,12 @@ var tests = [ // TODO (doilij): Investigate what is correct/allowable here (Microsoft/ChakraCore#2964) equal("xx-zzz", "zzz", gcl("xx-zzz")[0]); - // See discussion of defaulting above (V8/CC-ICU and CC-WinGlob/SM distinction remains true here) - equal("xx-ZZ-u-yy-zz", "xx-ZZ-u-yy-yes-zz-yes", gcl("xx-zz-u-zz-yy")[0]); + // See discussion of defaulting above + if (WScript.Platform.ICU_VERSION < 62) { + assert.areEqual(["xx-ZZ-u-yy-yes-zz-yes"], Intl.getCanonicalLocales("xx-zz-u-zz-yy")); + } else { + assert.areEqual(["xx-ZZ-u-yy-zz"], Intl.getCanonicalLocales("xx-zz-u-zz-yy")); + } } }, { diff --git a/test/Intl/rlexe.xml b/test/Intl/rlexe.xml index 33910ad973c..4addd4c4a6d 100644 --- a/test/Intl/rlexe.xml +++ b/test/Intl/rlexe.xml @@ -37,7 +37,7 @@ GetCanonicalLocales.js -args summary -endargs - Intl,exclude_icu62AndAboveTestFailures + Intl From 106af5f5ec9642f7ab15317e317b5fa1df2adbf9 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Fri, 26 Dec 2025 22:26:14 +0100 Subject: [PATCH 05/12] Check icu version dynamically for windows --- .../IntlEngineInterfaceExtensionObject.cpp | 86 ++++++++++--------- lib/Runtime/PlatformAgnostic/ChakraICU.h | 11 +++ test/CMakeLists.txt | 2 - test/Intl/rlexe.xml | 2 +- 4 files changed, 58 insertions(+), 43 deletions(-) diff --git a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp index 4468712b383..2c03d98d351 100644 --- a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp +++ b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp @@ -2437,40 +2437,43 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) return JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext); } -#if defined(ICU_VERSION) && ICU_VERSION >= 61 - UErrorCode status = U_ZERO_ERROR; - ScopedUFieldPositionIterator fpi(ufieldpositer_open(&status)); - - EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) + if (PlatformAgnostic::ICUHelpers::LinkedIcuMajorVersion() >= 61) { - return unum_formatDoubleForFields(*fmt, num, buf, bufLen, fpi, status); - }, scriptContext->GetRecycler(), &formatted, &formattedLen); + UErrorCode status = U_ZERO_ERROR; + ScopedUFieldPositionIterator fpi(ufieldpositer_open(&status)); - NumberFormatPartsBuilder nfpb(num, formatted, formattedLen, scriptContext); + EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) + { + return unum_formatDoubleForFields(*fmt, num, buf, bufLen, fpi, status); + }, scriptContext->GetRecycler(), &formatted, &formattedLen); - int partStart = 0; - int partEnd = 0; - int i = 0; - for (int kind = ufieldpositer_next(fpi, &partStart, &partEnd); kind >= 0; kind = ufieldpositer_next(fpi, &partStart, &partEnd), ++i) - { - nfpb.InsertPart(static_cast(kind), partStart, partEnd); - } + NumberFormatPartsBuilder nfpb(num, formatted, formattedLen, scriptContext); - return nfpb.ToPartsArray(); -#else - JavascriptLibrary *library = scriptContext->GetLibrary(); - JavascriptArray *ret = library->CreateArray(1); - DynamicObject* part = library->CreateObject(); - EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) + int partStart = 0; + int partEnd = 0; + int i = 0; + for (int kind = ufieldpositer_next(fpi, &partStart, &partEnd); kind >= 0; kind = ufieldpositer_next(fpi, &partStart, &partEnd), ++i) + { + nfpb.InsertPart(static_cast(kind), partStart, partEnd); + } + + return nfpb.ToPartsArray(); + } + else { - return unum_formatDouble(*fmt, num, buf, bufLen, nullptr, status); - }, scriptContext->GetRecycler(), &formatted, &formattedLen); - JavascriptOperators::InitProperty(part, PropertyIds::type, library->GetIntlUnknownPartString()); - JavascriptOperators::InitProperty(part, PropertyIds::value, JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext)); + JavascriptLibrary *library = scriptContext->GetLibrary(); + JavascriptArray *ret = library->CreateArray(1); + DynamicObject *part = library->CreateObject(); + EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) + { + return unum_formatDouble(*fmt, num, buf, bufLen, nullptr, status); + }, scriptContext->GetRecycler(), &formatted, &formattedLen); + JavascriptOperators::InitProperty(part, PropertyIds::type, library->GetIntlUnknownPartString()); + JavascriptOperators::InitProperty(part, PropertyIds::value, JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext)); - ret->SetItem(0, part, PropertyOperationFlags::PropertyOperation_None); - return ret; -#endif // #if ICU_VERSION >= 61 ... #else + ret->SetItem(0, part, PropertyOperationFlags::PropertyOperation_None); + return ret; + } #else INTL_CHECK_ARGS( args.Info.Count == 3 && @@ -3012,21 +3015,24 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) // For ICU < 61, we can fake it by creating an array of ["other"], which // uplrules_getKeywords is guaranteed to return at minimum. // This array is only used in resolved options, so the majority of the functionality can remain (namely, select() still works) -#if defined(ICU_VERSION) && ICU_VERSION >= 61 - DynamicObject *state = UnsafeVarTo(args[1]); - FinalizableUPluralRules *pr = GetOrCreateCachedUPluralRules(state, scriptContext); + if (PlatformAgnostic::ICUHelpers::LinkedIcuMajorVersion() >= 61) + { + DynamicObject *state = UnsafeVarTo(args[1]); + FinalizableUPluralRules *pr = GetOrCreateCachedUPluralRules(state, scriptContext); - UErrorCode status = U_ZERO_ERROR; - ScopedUEnumeration keywords(uplrules_getKeywords(*pr, &status)); - ICU_ASSERT(status, true); + UErrorCode status = U_ZERO_ERROR; + ScopedUEnumeration keywords(uplrules_getKeywords(*pr, &status)); + ICU_ASSERT(status, true); - ForEachUEnumeration16(keywords, [&](int index, const char16 *kw, charcount_t kwLength) + ForEachUEnumeration16(keywords, [&](int index, const char16 *kw, charcount_t kwLength) + { + ret->SetItem(index, JavascriptString::NewCopyBuffer(kw, kwLength, scriptContext), PropertyOperation_None); + }); + } + else { - ret->SetItem(index, JavascriptString::NewCopyBuffer(kw, kwLength, scriptContext), PropertyOperation_None); - }); -#else - ret->SetItem(0, scriptContext->GetLibrary()->GetIntlPluralRulesOtherString(), PropertyOperation_None); -#endif + ret->SetItem(0, scriptContext->GetLibrary()->GetIntlPluralRulesOtherString(), PropertyOperation_None); + } return ret; #else diff --git a/lib/Runtime/PlatformAgnostic/ChakraICU.h b/lib/Runtime/PlatformAgnostic/ChakraICU.h index eb30c76a7ff..6d6460da1a3 100644 --- a/lib/Runtime/PlatformAgnostic/ChakraICU.h +++ b/lib/Runtime/PlatformAgnostic/ChakraICU.h @@ -102,6 +102,17 @@ namespace PlatformAgnostic u_getVersion(version); return version[0]; } + + inline int LinkedIcuMajorVersion() + { +#if ICU_VERSION + return ICU_VERSION; +#elif U_ICU_VERSION_MAJOR_NUM + return U_ICU_VERSION_MAJOR_NUM; +#else + return GetICUMajorVersion(); +#endif + } } } #endif // ifdef HAS_ICU diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4e569d9a4f3..d66b8c1c6e4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,8 +8,6 @@ endif () if (NO_ICU) set(TEST_ICU --not-tag exclude_noicu) -elseif (NOT EMBED_ICU) - set(TEST_ICU --not-tag exclude_icu62AndAboveTestFailures) endif() if (BuildJIT) diff --git a/test/Intl/rlexe.xml b/test/Intl/rlexe.xml index 4addd4c4a6d..dd9502b4e4f 100644 --- a/test/Intl/rlexe.xml +++ b/test/Intl/rlexe.xml @@ -23,7 +23,7 @@ NumberFormat.js - Intl,exclude_drt,exclude_icu62AndAboveTestFailures + Intl,exclude_drt From a487d1d3cf1e6cd7ea4e9436ccf07b91adc7a378 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Fri, 26 Dec 2025 22:55:46 +0100 Subject: [PATCH 06/12] Assume windows version will always be >= 62 --- .../IntlEngineInterfaceExtensionObject.cpp | 86 +++++++++---------- lib/Runtime/PlatformAgnostic/ChakraICU.h | 11 --- 2 files changed, 40 insertions(+), 57 deletions(-) diff --git a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp index 2c03d98d351..0c2bbd9d268 100644 --- a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp +++ b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp @@ -2437,43 +2437,40 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) return JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext); } - if (PlatformAgnostic::ICUHelpers::LinkedIcuMajorVersion() >= 61) - { - UErrorCode status = U_ZERO_ERROR; - ScopedUFieldPositionIterator fpi(ufieldpositer_open(&status)); - - EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) - { - return unum_formatDoubleForFields(*fmt, num, buf, bufLen, fpi, status); - }, scriptContext->GetRecycler(), &formatted, &formattedLen); +#if !defined(ICU_VERSION) || ICU_VERSION >= 61 + UErrorCode status = U_ZERO_ERROR; + ScopedUFieldPositionIterator fpi(ufieldpositer_open(&status)); - NumberFormatPartsBuilder nfpb(num, formatted, formattedLen, scriptContext); + EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) + { + return unum_formatDoubleForFields(*fmt, num, buf, bufLen, fpi, status); + }, scriptContext->GetRecycler(), &formatted, &formattedLen); - int partStart = 0; - int partEnd = 0; - int i = 0; - for (int kind = ufieldpositer_next(fpi, &partStart, &partEnd); kind >= 0; kind = ufieldpositer_next(fpi, &partStart, &partEnd), ++i) - { - nfpb.InsertPart(static_cast(kind), partStart, partEnd); - } + NumberFormatPartsBuilder nfpb(num, formatted, formattedLen, scriptContext); - return nfpb.ToPartsArray(); + int partStart = 0; + int partEnd = 0; + int i = 0; + for (int kind = ufieldpositer_next(fpi, &partStart, &partEnd); kind >= 0; kind = ufieldpositer_next(fpi, &partStart, &partEnd), ++i) + { + nfpb.InsertPart(static_cast(kind), partStart, partEnd); } - else + + return nfpb.ToPartsArray(); +#else + JavascriptLibrary *library = scriptContext->GetLibrary(); + JavascriptArray *ret = library->CreateArray(1); + DynamicObject* part = library->CreateObject(); + EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) { - JavascriptLibrary *library = scriptContext->GetLibrary(); - JavascriptArray *ret = library->CreateArray(1); - DynamicObject *part = library->CreateObject(); - EnsureBuffer([&](UChar *buf, int bufLen, UErrorCode *status) - { - return unum_formatDouble(*fmt, num, buf, bufLen, nullptr, status); - }, scriptContext->GetRecycler(), &formatted, &formattedLen); - JavascriptOperators::InitProperty(part, PropertyIds::type, library->GetIntlUnknownPartString()); - JavascriptOperators::InitProperty(part, PropertyIds::value, JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext)); + return unum_formatDouble(*fmt, num, buf, bufLen, nullptr, status); + }, scriptContext->GetRecycler(), &formatted, &formattedLen); + JavascriptOperators::InitProperty(part, PropertyIds::type, library->GetIntlUnknownPartString()); + JavascriptOperators::InitProperty(part, PropertyIds::value, JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext)); - ret->SetItem(0, part, PropertyOperationFlags::PropertyOperation_None); - return ret; - } + ret->SetItem(0, part, PropertyOperationFlags::PropertyOperation_None); + return ret; +#endif // #if ICU_VERSION >= 61 ... #else #else INTL_CHECK_ARGS( args.Info.Count == 3 && @@ -3015,24 +3012,21 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) // For ICU < 61, we can fake it by creating an array of ["other"], which // uplrules_getKeywords is guaranteed to return at minimum. // This array is only used in resolved options, so the majority of the functionality can remain (namely, select() still works) - if (PlatformAgnostic::ICUHelpers::LinkedIcuMajorVersion() >= 61) - { - DynamicObject *state = UnsafeVarTo(args[1]); - FinalizableUPluralRules *pr = GetOrCreateCachedUPluralRules(state, scriptContext); +#if !defined(ICU_VERSION) || ICU_VERSION >= 61 + DynamicObject *state = UnsafeVarTo(args[1]); + FinalizableUPluralRules *pr = GetOrCreateCachedUPluralRules(state, scriptContext); - UErrorCode status = U_ZERO_ERROR; - ScopedUEnumeration keywords(uplrules_getKeywords(*pr, &status)); - ICU_ASSERT(status, true); + UErrorCode status = U_ZERO_ERROR; + ScopedUEnumeration keywords(uplrules_getKeywords(*pr, &status)); + ICU_ASSERT(status, true); - ForEachUEnumeration16(keywords, [&](int index, const char16 *kw, charcount_t kwLength) - { - ret->SetItem(index, JavascriptString::NewCopyBuffer(kw, kwLength, scriptContext), PropertyOperation_None); - }); - } - else + ForEachUEnumeration16(keywords, [&](int index, const char16 *kw, charcount_t kwLength) { - ret->SetItem(0, scriptContext->GetLibrary()->GetIntlPluralRulesOtherString(), PropertyOperation_None); - } + ret->SetItem(index, JavascriptString::NewCopyBuffer(kw, kwLength, scriptContext), PropertyOperation_None); + }); +#else + ret->SetItem(0, scriptContext->GetLibrary()->GetIntlPluralRulesOtherString(), PropertyOperation_None); +#endif return ret; #else diff --git a/lib/Runtime/PlatformAgnostic/ChakraICU.h b/lib/Runtime/PlatformAgnostic/ChakraICU.h index 6d6460da1a3..eb30c76a7ff 100644 --- a/lib/Runtime/PlatformAgnostic/ChakraICU.h +++ b/lib/Runtime/PlatformAgnostic/ChakraICU.h @@ -102,17 +102,6 @@ namespace PlatformAgnostic u_getVersion(version); return version[0]; } - - inline int LinkedIcuMajorVersion() - { -#if ICU_VERSION - return ICU_VERSION; -#elif U_ICU_VERSION_MAJOR_NUM - return U_ICU_VERSION_MAJOR_NUM; -#else - return GetICUMajorVersion(); -#endif - } } } #endif // ifdef HAS_ICU From 8fc4708fc8ecb9160368fbad7c36974c7b2cfd8d Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Thu, 8 Jan 2026 23:03:49 +0100 Subject: [PATCH 07/12] Update `ES6_intl_simple_attach.js` baseline --- .../ES6_intl_simple_attach.js.dbg.baseline | 48 +++++++++++++++---- test/DebuggerCommon/rlexe.xml | 3 +- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/test/DebuggerCommon/ES6_intl_simple_attach.js.dbg.baseline b/test/DebuggerCommon/ES6_intl_simple_attach.js.dbg.baseline index da61b14b4d8..7ca8fce2bc0 100644 --- a/test/DebuggerCommon/ES6_intl_simple_attach.js.dbg.baseline +++ b/test/DebuggerCommon/ES6_intl_simple_attach.js.dbg.baseline @@ -131,7 +131,7 @@ "#__proto__": "Object {...}", "constructor": "function ", "resolvedOptions": "function ", - "compare": "function " + "compare": "Error " }, "length": "number 0", "name": "string Collator", @@ -281,7 +281,8 @@ "#__proto__": "Object {...}", "constructor": "function ", "resolvedOptions": "function ", - "format": "function " + "format": "Error ", + "formatToParts": "function " }, "length": "number 0", "name": "string NumberFormat", @@ -323,6 +324,23 @@ "arguments": "Error " }, "length": "number 1" + }, + "formatToParts": { + "#__proto__": { + "#__proto__": "Object {...}", + "constructor": "function ", + "length": "number 0", + "name": "string ", + "apply": "function ", + "bind": "function ", + "call": "function ", + "toString": "function ", + "Symbol.hasInstance": "function ", + "caller": "Error ", + "arguments": "Error " + }, + "length": "number 1", + "name": "string formatToParts" } } } @@ -430,17 +448,12 @@ "prototype": { "#__proto__": "Object {...}", "constructor": "function ", - "format": "function ", + "format": "Error ", + "formatToParts": "function ", "resolvedOptions": "function " }, "length": "number 0", "name": "string DateTimeFormat", - "__relevantExtensionKeys": { - "#__proto__": "Array []", - "length": "number 2", - "[0]": "string \"ca\"", - "[1]": "string \"nu\"" - }, "supportedLocalesOf": { "#__proto__": "function ", "length": "number 1", @@ -463,6 +476,23 @@ }, "length": "number 1" }, + "formatToParts": { + "#__proto__": { + "#__proto__": "Object {...}", + "constructor": "function ", + "length": "number 0", + "name": "string ", + "apply": "function ", + "bind": "function ", + "call": "function ", + "toString": "function ", + "Symbol.hasInstance": "function ", + "caller": "Error ", + "arguments": "Error " + }, + "length": "number 1", + "name": "string formatToParts" + }, "resolvedOptions": { "#__proto__": { "#__proto__": "Object {...}", diff --git a/test/DebuggerCommon/rlexe.xml b/test/DebuggerCommon/rlexe.xml index d7ecbd85c7c..3bbdd011e03 100644 --- a/test/DebuggerCommon/rlexe.xml +++ b/test/DebuggerCommon/rlexe.xml @@ -218,8 +218,7 @@ ES6_intl_simple_attach.js -dbgbaseline:ES6_intl_simple_attach.js.dbg.baseline -Intl ES6_intl_simple_attach.js.baseline - - Intl,require_winglob + Intl From 18eaa7ed9612c81dcff7201458f75a3213ff8ee9 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Thu, 8 Jan 2026 23:30:07 +0100 Subject: [PATCH 08/12] Remove `require_winglob` --- test/Intl/rlexe.xml | 2 +- test/runtests.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Intl/rlexe.xml b/test/Intl/rlexe.xml index dd9502b4e4f..2e2ba883fba 100644 --- a/test/Intl/rlexe.xml +++ b/test/Intl/rlexe.xml @@ -84,7 +84,7 @@ -Intl -debugLaunch -dbgbaseline:IntlReturnedValueTests.js.dbg.baseline IntlReturnedValueTests.js - Intl,require_winglob + Intl diff --git a/test/runtests.py b/test/runtests.py index 4a7d811cb64..f2dcd4c8279 100755 --- a/test/runtests.py +++ b/test/runtests.py @@ -175,7 +175,6 @@ # xplat: temp hard coded to exclude unsupported tests if sys.platform != 'win32': not_tags.add('exclude_xplat') - not_tags.add('require_winglob') not_tags.add('require_simd') else: not_tags.add('exclude_windows') From 14c1aa7b6ac267bb02dbe7edb7bd445aab1307ee Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Fri, 9 Jan 2026 00:18:06 +0100 Subject: [PATCH 09/12] Fix copyright --- test/Intl/GetCanonicalLocales.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Intl/GetCanonicalLocales.js b/test/Intl/GetCanonicalLocales.js index d4cff602844..02983ae3e6c 100644 --- a/test/Intl/GetCanonicalLocales.js +++ b/test/Intl/GetCanonicalLocales.js @@ -1,5 +1,6 @@ //------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. +// Copyright (c) ChakraCore Project Contributors. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- From a931eadd11ed0128667ff413b55f157bb62a3225 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Thu, 8 Jan 2026 15:21:05 -0800 Subject: [PATCH 10/12] Remove bi-di chars from `IntlReturnedValueTests.js` baseline --- .../IntlReturnedValueTests.js.dbg.baseline | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/Intl/IntlReturnedValueTests.js.dbg.baseline b/test/Intl/IntlReturnedValueTests.js.dbg.baseline index 8270a3cc2d2..c1c1eeb9911 100644 --- a/test/Intl/IntlReturnedValueTests.js.dbg.baseline +++ b/test/Intl/IntlReturnedValueTests.js.dbg.baseline @@ -21,14 +21,14 @@ "this": "Object {...}", "functionCallsReturn": { "[get format returned]": "function ", - "[Intl.DateTimeFormat.prototype.format returned]": "string ‎2‎/‎1‎/‎2000" + "[Intl.DateTimeFormat.prototype.format returned]": "string 2/1/2000" }, "locals": { "Symbol.toStringTag": "string global", "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "undefined undefined", "numberFormat1": "undefined undefined", "formattedNumber1": "undefined undefined", @@ -46,7 +46,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "undefined undefined", "formattedNumber1": "undefined undefined", @@ -64,7 +64,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "undefined undefined", "formattedNumber1": "undefined undefined", @@ -75,14 +75,14 @@ { "this": "Object {...}", "functionCallsReturn": { - "[resolvedOptions returned]": "Object {...}" + "[Intl.DateTimeFormat.prototype.resolvedOptions returned]": "Object {...}" }, "locals": { "Symbol.toStringTag": "string global", "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "undefined undefined", "formattedNumber1": "undefined undefined", @@ -100,7 +100,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "undefined undefined", @@ -119,7 +119,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -137,7 +137,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -148,14 +148,14 @@ { "this": "Object {...}", "functionCallsReturn": { - "[resolvedOptions returned]": "Object {...}" + "[Intl.NumberFormat.prototype.resolvedOptions returned]": "Object {...}" }, "locals": { "Symbol.toStringTag": "string global", "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -173,7 +173,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -192,7 +192,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -210,7 +210,7 @@ "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", @@ -221,14 +221,14 @@ { "this": "Object {...}", "functionCallsReturn": { - "[resolvedOptions returned]": "Object {...}" + "[Intl.Collator.prototype.resolvedOptions returned]": "Object {...}" }, "locals": { "Symbol.toStringTag": "string global", "options": "Object {...}", "dateFormat1": "Object {...}", "date1": "Date ", - "date2": "string ‎2‎/‎1‎/‎2000", + "date2": "string 2/1/2000", "stringDate1": "string ", "numberFormat1": "Object {...}", "formattedNumber1": "string 123.456", From 1684f20f08c6bc552079fb6a672a162107b521ef Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Sat, 10 Jan 2026 22:27:17 +0100 Subject: [PATCH 11/12] Add comment to explain `ICU_VERSION` conditional-compilation. --- lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp index 0c2bbd9d268..884119768ed 100644 --- a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp +++ b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp @@ -2437,6 +2437,7 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) return JavascriptString::NewWithBuffer(formatted, formattedLen, scriptContext); } + // windows-icu does not define `ICU_VERSION` but does support `unum_formatDoubleForFields` (ICU 61+) since Windows 10 1809 "Redstone 5" (`NTDDI_WIN10_RS5`). #if !defined(ICU_VERSION) || ICU_VERSION >= 61 UErrorCode status = U_ZERO_ERROR; ScopedUFieldPositionIterator fpi(ufieldpositer_open(&status)); @@ -3012,6 +3013,8 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc) // For ICU < 61, we can fake it by creating an array of ["other"], which // uplrules_getKeywords is guaranteed to return at minimum. // This array is only used in resolved options, so the majority of the functionality can remain (namely, select() still works) + // + // windows-icu does not define `ICU_VERSION` but does support `uplrules_getKeywords` (ICU 61+) since Windows 10 1809 "Redstone 5" (`NTDDI_WIN10_RS5`). #if !defined(ICU_VERSION) || ICU_VERSION >= 61 DynamicObject *state = UnsafeVarTo(args[1]); FinalizableUPluralRules *pr = GetOrCreateCachedUPluralRules(state, scriptContext); From e661393116151cb5dff7c361003002fefef34902 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Tue, 10 Feb 2026 23:45:44 +0100 Subject: [PATCH 12/12] Check for existence of `icu.dll` in system32 --- Build/Chakra.Build.Default.props | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Build/Chakra.Build.Default.props b/Build/Chakra.Build.Default.props index 7522f19ba5f..8566840adcb 100644 --- a/Build/Chakra.Build.Default.props +++ b/Build/Chakra.Build.Default.props @@ -32,7 +32,17 @@ windows true + + + + <_UseModernWindowsIcu Condition=" Exists('$(SYSTEMROOT)\System32\icu.dll') ">true - icu.lib + icu.lib + icuuc.lib;icuin.lib + + + + +