From 120f15af1d1aac136f9f00614a63249e201a5d42 Mon Sep 17 00:00:00 2001
From: Fabio Niephaus <fabio.niephaus@oracle.com>
Date: Mon, 10 Feb 2025 09:04:34 +0100
Subject: [PATCH] Update imports.

---
 src/cleanup.ts          |  8 ++++----
 src/dependencies.ts     |  4 ++--
 src/features/musl.ts    |  4 ++--
 src/features/reports.ts |  4 ++--
 src/features/sbom.ts    |  4 ++--
 src/gds.ts              |  6 +++---
 src/graalvm.ts          |  6 +++---
 src/gu.ts               |  6 +++---
 src/liberica.ts         |  4 ++--
 src/main.ts             | 24 ++++++++++++------------
 src/mandrel.ts          |  4 ++--
 src/msvc.ts             |  2 +-
 src/utils.ts            |  2 +-
 13 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/src/cleanup.ts b/src/cleanup.ts
index 30a89ce..60b1f85 100644
--- a/src/cleanup.ts
+++ b/src/cleanup.ts
@@ -25,10 +25,10 @@
  */
 
 import * as core from '@actions/core'
-import * as constants from './constants'
-import {save} from './features/cache'
-import {generateReports} from './features/reports'
-import {processSBOM} from './features/sbom'
+import * as constants from './constants.js'
+import {save} from './features/cache.js'
+import {generateReports} from './features/reports.js'
+import {processSBOM} from './features/sbom.js'
 
 /**
  * Check given input and run a save process for the specified package manager
diff --git a/src/dependencies.ts b/src/dependencies.ts
index 465144b..a8a1d16 100644
--- a/src/dependencies.ts
+++ b/src/dependencies.ts
@@ -1,6 +1,6 @@
 import * as core from '@actions/core'
-import {GRAALVM_PLATFORM} from './constants'
-import {exec} from './utils'
+import {GRAALVM_PLATFORM} from './constants.js'
+import {exec} from './utils.js'
 
 const APT_GET_INSTALL_BASE = 'sudo apt-get -y --no-upgrade install'
 const COMPONENT_TO_DEPS = new Map<string, Map<string, string>>([
diff --git a/src/features/musl.ts b/src/features/musl.ts
index a5cde2d..534d959 100644
--- a/src/features/musl.ts
+++ b/src/features/musl.ts
@@ -1,7 +1,7 @@
-import * as c from '../constants'
+import * as c from '../constants.js'
 import * as core from '@actions/core'
 import * as tc from '@actions/tool-cache'
-import {exec} from '../utils'
+import {exec} from '../utils.js'
 import {join} from 'path'
 
 const MUSL_NAME = 'x86_64-linux-musl-native'
diff --git a/src/features/reports.ts b/src/features/reports.ts
index 3793b31..f34294c 100644
--- a/src/features/reports.ts
+++ b/src/features/reports.ts
@@ -1,4 +1,4 @@
-import * as c from '../constants'
+import * as c from '../constants.js'
 import * as core from '@actions/core'
 import * as fs from 'fs'
 import * as github from '@actions/github'
@@ -11,7 +11,7 @@ import {
   updatePRComment,
   tmpfile,
   setNativeImageOption
-} from '../utils'
+} from '../utils.js'
 
 const BUILD_OUTPUT_JSON_PATH = tmpfile('native-image-build-output.json')
 const BYTES_TO_KiB = 1024
diff --git a/src/features/sbom.ts b/src/features/sbom.ts
index 125e077..ad4ae88 100644
--- a/src/features/sbom.ts
+++ b/src/features/sbom.ts
@@ -1,11 +1,11 @@
-import * as c from '../constants'
+import * as c from '../constants.js'
 import * as core from '@actions/core'
 import * as fs from 'fs'
 import * as github from '@actions/github'
 import * as glob from '@actions/glob'
 import {basename} from 'path'
 import * as semver from 'semver'
-import {setNativeImageOption} from '../utils'
+import {setNativeImageOption} from '../utils.js'
 
 const INPUT_NI_SBOM = 'native-image-enable-sbom'
 const SBOM_FILE_SUFFIX = '.sbom.json'
diff --git a/src/gds.ts b/src/gds.ts
index 87d4f4e..ac3f59d 100644
--- a/src/gds.ts
+++ b/src/gds.ts
@@ -1,4 +1,4 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as core from '@actions/core'
 import * as fs from 'fs'
 import * as httpClient from '@actions/http-client'
@@ -8,8 +8,8 @@ import * as stream from 'stream'
 import * as util from 'util'
 import * as semver from 'semver'
 import {IncomingHttpHeaders, OutgoingHttpHeaders} from 'http'
-import {RetryHelper} from '@actions/tool-cache/lib/retry-helper'
-import {calculateSHA256} from './utils'
+import {RetryHelper} from '@actions/tool-cache/lib/retry-helper.js'
+import {calculateSHA256} from './utils.js'
 import {ok} from 'assert'
 import {v4 as uuidv4} from 'uuid'
 
diff --git a/src/graalvm.ts b/src/graalvm.ts
index f939bba..ea62641 100644
--- a/src/graalvm.ts
+++ b/src/graalvm.ts
@@ -1,4 +1,4 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as core from '@actions/core'
 import * as semver from 'semver'
 import {
@@ -8,8 +8,8 @@ import {
   getLatestRelease,
   getMatchingTags,
   getTaggedRelease
-} from './utils'
-import {downloadGraalVM, downloadGraalVMEELegacy} from './gds'
+} from './utils.js'
+import {downloadGraalVM, downloadGraalVMEELegacy} from './gds.js'
 import {downloadTool} from '@actions/tool-cache'
 import {basename} from 'path'
 
diff --git a/src/gu.ts b/src/gu.ts
index 166d425..8ca5e1e 100644
--- a/src/gu.ts
+++ b/src/gu.ts
@@ -1,8 +1,8 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as core from '@actions/core'
 import * as semver from 'semver'
-import {GRAALVM_PLATFORM} from './constants'
-import {exec} from './utils'
+import {GRAALVM_PLATFORM} from './constants.js'
+import {exec} from './utils.js'
 import {join} from 'path'
 
 const BASE_FLAGS = ['--non-interactive', 'install', '--no-progress']
diff --git a/src/liberica.ts b/src/liberica.ts
index 7e65cfd..63f3507 100644
--- a/src/liberica.ts
+++ b/src/liberica.ts
@@ -1,10 +1,10 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as semver from 'semver'
 import {
   downloadExtractAndCacheJDK,
   getTaggedRelease,
   getMatchingTags
-} from './utils'
+} from './utils.js'
 import {downloadTool} from '@actions/tool-cache'
 import {spawnSync} from 'child_process'
 
diff --git a/src/main.ts b/src/main.ts
index 7a27c13..1307aa3 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,20 +1,20 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as core from '@actions/core'
-import * as graalvm from './graalvm'
+import * as graalvm from './graalvm.js'
 import * as semver from 'semver'
 import {isFeatureAvailable as isCacheAvailable} from '@actions/cache'
 import {basename, join} from 'path'
-import {restore} from './features/cache'
-import {setUpDependencies} from './dependencies'
-import {setUpGUComponents} from './gu'
-import {setUpMandrel} from './mandrel'
-import {setUpLiberica} from './liberica'
-import {checkForUpdates} from './features/check-for-updates'
-import {setUpNativeImageMusl} from './features/musl'
-import {setUpWindowsEnvironment} from './msvc'
-import {setUpNativeImageBuildReports} from './features/reports'
+import {restore} from './features/cache.js'
+import {setUpDependencies} from './dependencies.js'
+import {setUpGUComponents} from './gu.js'
+import {setUpMandrel} from './mandrel.js'
+import {setUpLiberica} from './liberica.js'
+import {checkForUpdates} from './features/check-for-updates.js'
+import {setUpNativeImageMusl} from './features/musl.js'
+import {setUpWindowsEnvironment} from './msvc.js'
+import {setUpNativeImageBuildReports} from './features/reports.js'
 import {exec} from '@actions/exec'
-import {setUpSBOMSupport} from './features/sbom'
+import {setUpSBOMSupport} from './features/sbom.js'
 
 async function run(): Promise<void> {
   try {
diff --git a/src/mandrel.ts b/src/mandrel.ts
index cb766ff..987e129 100644
--- a/src/mandrel.ts
+++ b/src/mandrel.ts
@@ -1,6 +1,6 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as httpClient from '@actions/http-client'
-import {downloadExtractAndCacheJDK} from './utils'
+import {downloadExtractAndCacheJDK} from './utils.js'
 import {downloadTool} from '@actions/tool-cache'
 import {basename} from 'path'
 
diff --git a/src/msvc.ts b/src/msvc.ts
index 3899659..9070fe9 100644
--- a/src/msvc.ts
+++ b/src/msvc.ts
@@ -1,7 +1,7 @@
 import * as core from '@actions/core'
 import {execSync} from 'child_process'
 import {existsSync} from 'fs'
-import {VERSION_DEV} from './constants'
+import {VERSION_DEV} from './constants.js'
 
 // Keep in sync with https://github.com/actions/virtual-environments
 const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [
diff --git a/src/utils.ts b/src/utils.ts
index 5273b54..fbf8031 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,4 +1,4 @@
-import * as c from './constants'
+import * as c from './constants.js'
 import * as core from '@actions/core'
 import * as github from '@actions/github'
 import * as httpClient from '@actions/http-client'