From 2e5cfb28780f4c250dd0bc6b1c9cc24d2f724cbc Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 14 Oct 2026 10:40:45 +0100 Subject: [PATCH] Update for ESM --- pr-checks/check-cs-config.ts | 2 +- pr-checks/check-js.ts | 2 +- pr-checks/check-sarif.ts | 2 +- pr-checks/update-bundle.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pr-checks/check-cs-config.ts b/pr-checks/check-cs-config.ts index f520fc403..461f58e7b 100755 --- a/pr-checks/check-cs-config.ts +++ b/pr-checks/check-cs-config.ts @@ -95,6 +95,6 @@ function main() { return 0; } -if (require.main === module) { +if (import.meta.main) { process.exit(main()); } diff --git a/pr-checks/check-js.ts b/pr-checks/check-js.ts index 835bb0056..1927d94a2 100755 --- a/pr-checks/check-js.ts +++ b/pr-checks/check-js.ts @@ -62,6 +62,6 @@ function main() { return 0; } -if (require.main === module) { +if (import.meta.main) { process.exit(main()); } diff --git a/pr-checks/check-sarif.ts b/pr-checks/check-sarif.ts index 7c744c34c..5fd436013 100644 --- a/pr-checks/check-sarif.ts +++ b/pr-checks/check-sarif.ts @@ -120,6 +120,6 @@ function main() { } } -if (require.main === module) { +if (import.meta.main) { process.exit(main()); } diff --git a/pr-checks/update-bundle.ts b/pr-checks/update-bundle.ts index 8e4b333dc..655f2347c 100755 --- a/pr-checks/update-bundle.ts +++ b/pr-checks/update-bundle.ts @@ -88,6 +88,6 @@ function main() { return 0; } -if (require.main === module) { +if (import.meta.main) { process.exit(main()); }