Refactor error handling and improve test logging for installers by chiranjib-swain · Pull Request #989 · actions/setup-java

src/distributions/base-installer.ts Adds createVersionNotFoundError helper for standardized errors. src/distributions/adopt/installer.ts Uses the new helper when no satisfied version is found. src/distributions/corretto/installer.ts Uses the new helper when no satisfied version is found. src/distributions/dragonwell/installer.ts Uses the new helper when no satisfied version is found. src/distributions/graalvm/installer.ts Switches to the helper for some “not found” paths and appends a GraalVM URL hint on 404. src/distributions/jetbrains/installer.ts Uses the new helper when no satisfied version is found. src/distributions/liberica/installer.ts Uses the new helper when no satisfied version is found. src/distributions/microsoft/installer.ts Uses the new helper when no satisfied version is found (includes manifest versions). src/distributions/oracle/installer.ts Uses the new helper when no satisfied version is found. src/distributions/sapmachine/installer.ts Uses the new helper when no satisfied version is found. src/distributions/semeru/installer.ts Uses the new helper and adds platform context to the error. src/distributions/temurin/installer.ts Uses the new helper when no satisfied version is found. src/distributions/zulu/installer.ts Uses the new helper when no satisfied version is found. dist/setup/index.js Updates the compiled distribution bundle to reflect source changes. tests/distributors/adopt-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/base-installer.test.ts Updates version-not-found expectations and adds unit tests for the helper. tests/distributors/corretto-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/dragonwell-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/graalvm-installer.test.ts Updates error expectations and removes assertions tied to old core.error logging behavior. tests/distributors/jetbrains-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/liberica-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/liberica-linux-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/liberica-windows-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/local-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/microsoft-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/oracle-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/sapmachine-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/semeru-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/temurin-installer.test.ts Mocks core.error to suppress logs during tests. tests/distributors/zulu-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/zulu-linux-installer.test.ts Updates error expectations and mocks core.error. tests/distributors/zulu-windows-installer.test.ts Updates error expectations and mocks core.error. tests/cache.test.ts Mocks core.error and strengthens cleanup of Jest mocks between tests. tests/cleanup-java.test.ts Mocks core.error and strengthens cleanup of Jest mocks between tests.