From 2c45dc1e897c1b5564449aec3cae9d84c05962fe Mon Sep 17 00:00:00 2001 From: k2safe Date: Tue, 6 Oct 2026 21:31:18 +0800 Subject: [PATCH] test(release): tolerate optional TypeScript compiler --- scripts/verifyManagedRelease.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/verifyManagedRelease.py b/scripts/verifyManagedRelease.py index 5824701..74045d8 100644 --- a/scripts/verifyManagedRelease.py +++ b/scripts/verifyManagedRelease.py @@ -167,6 +167,10 @@ def main(): run(["go", "get", MODULE + "/storage/oss@" + args.version, MODULE + "/storage/s3@" + args.version, MODULE + "/telemetry@" + args.version], starter, env) + typescript_available = shutil.which("tsc", path=env.get("PATH")) is not None + i18n_tests = {"TestIndependentImmutableBundlesAndFallback", "TestResourceAndParameterDiagnostics", "TestStrictLoadingAndExplicitOverlay", "TestPinnedCLDRSamples", "TestBrowserConformance", "TestSourceLocaleCanBeFallbackOnly"} + if typescript_available: + i18n_tests.add("TestTypeScriptConsumer") for package, expected in { "storage": {"TestReadOptions", "TestReadSignatureAndExpiry", "TestReadRangeStreamingAndCache"}, "storage/local": {"TestSignedPayloadRanges"}, @@ -185,7 +189,7 @@ def main(): "transport/http2": {"TestShutdownWaitsForHandlerAfterClientDisconnect"}, "transport/native": {"TestApplicationRejectsUnreadBodyPromptly", "TestBodyRejectionWithBusinessHTTP200DoesNotDrain"}, "contract": {"TestBodyPolicyPropagatesOuterLimit", "TestJSONClosingDelimiterPreservesReaderCause"}, - "i18n": {"TestIndependentImmutableBundlesAndFallback", "TestResourceAndParameterDiagnostics", "TestStrictLoadingAndExplicitOverlay", "TestPinnedCLDRSamples", "TestBrowserConformance", "TestSourceLocaleCanBeFallbackOnly", "TestTypeScriptConsumer"}, + "i18n": i18n_tests, "i18n/httpi18n": {"TestNegotiationAndExplicitResolvers"}, "i18n/errori18n": {"TestCatalogAdapterIsExplicitAndDetached"}, "database": {"TestInTxStagesAndCauses", "TestInTxCommitOutcomeUnknown", "TestInTxCancellationAndOwnership", "TestInTxCancellationRace", "TestInTxSuccessPanicAndConcurrency", "TestInTxPublicErrorCompatibility"}, @@ -238,9 +242,10 @@ def main(): browser_output = run(["node", "--test", downloaded / "i18n/browser/runtime.test.mjs"], starter, env) assert "# fail 0" in browser_output checks += ["remoteI18nRuntimeRace", "remoteI18nGeneratedConsumer", "remoteI18nHTTPBusinessInvariants", - "remoteI18nSourceOnlyFallback", "remoteCLDRSamplesAndBrowserConformance", "remoteTypeScriptConsumer", + "remoteI18nSourceOnlyFallback", "remoteCLDRSamplesAndBrowserConformance", "remoteI18nCLIExtractionCheckExportTypes", "remoteI18nNamespaceIsolation", "remoteBrowserRaceAndFailureRetention", "remoteJSONReaderCausePreservation"] + checks.append("remoteTypeScriptConsumer" if typescript_available else "remoteTypeScriptConsumerSkippedWithoutTSC") checks += ["flatFieldComposition", "copyxThreeEndpointConsumer", "explicitNullAndMoneyPolicies", "fieldAdditionWithoutCopyRuleChanges", "middlewareFactoryInjectionAndCleanup", "optionalRepositoryPreservesBusiness"]