Compare commits

..

2 Commits

Author SHA1 Message Date
“gowridurgad”
8be1e72903 commit 2025-06-04 15:09:45 +05:30
“gowridurgad”
46a44325a7 error handling 2025-04-25 12:42:02 +05:30
66 changed files with 2755 additions and 6953 deletions

View File

@@ -16,4 +16,4 @@ jobs:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '24.x'
node-version: '20.x'

View File

@@ -16,4 +16,4 @@ jobs:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '24.x'
node-version: '20.x'

View File

@@ -24,13 +24,13 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
with:
distribution: 'adopt'
java-version: '17'
java-version: '11'
cache: gradle
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- name: Create files to cache
@@ -51,7 +51,7 @@ jobs:
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@@ -76,7 +76,7 @@ jobs:
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java

View File

@@ -21,16 +21,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
with:
distribution: 'adopt'
java-version: '17'
java-version: '11'
cache: gradle
- name: Create files to cache
# Need to avoid using Gradle daemon to stabilize the save process on Windows
@@ -46,11 +46,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: gradle-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@@ -70,10 +70,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@@ -93,11 +93,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: maven-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@@ -121,10 +121,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-22.04]
os: [macos-13, windows-latest, ubuntu-22.04]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java
@@ -133,7 +133,7 @@ jobs:
java-version: '11'
cache: sbt
- name: Setup SBT
if: matrix.os == 'macos-15-intel'
if: matrix.os == 'macos-13'
run: |
echo ""Installing SBT...""
brew install sbt
@@ -141,7 +141,7 @@ jobs:
run: sbt update
- name: Check files to cache on macos-latest
if: matrix.os == 'macos-15-intel'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
@@ -170,11 +170,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-22.04]
os: [macos-13, windows-latest, ubuntu-22.04]
needs: sbt-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java
@@ -184,7 +184,7 @@ jobs:
cache: sbt
- name: Confirm that ~/Library/Caches/Coursier directory has been made
if: matrix.os == 'macos-15-intel'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"

View File

@@ -21,7 +21,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Download Adopt OpenJDK file
run: |
if ($IsLinux) {
@@ -58,7 +58,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Download Zulu OpenJDK file
run: |
if ($IsLinux) {
@@ -95,7 +95,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Download Eclipse Temurin file
run: |
if ($IsLinux) {

View File

@@ -25,7 +25,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -60,7 +60,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@@ -96,7 +96,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@@ -133,7 +133,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java

View File

@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution: [
'temurin',
'adopt',
@@ -39,19 +39,10 @@ jobs:
- distribution: microsoft
version: 8
- distribution: dragonwell
os: macos-15-intel
os: macos-13
include:
- distribution: microsoft
os: windows-latest
version: 25
- distribution: microsoft
os: ubuntu-latest
version: 25
- distribution: microsoft
os: macos-latest
version: 25
- distribution: oracle
os: macos-15-intel
os: macos-13
version: 17
- distribution: oracle
os: windows-latest
@@ -73,7 +64,7 @@ jobs:
version: '24-ea'
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -123,7 +114,7 @@ jobs:
version: '17.0.7'
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -158,7 +149,7 @@ jobs:
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -194,7 +185,7 @@ jobs:
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -229,11 +220,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
version: ['17-ea', '15.0.0-ea.14']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -255,7 +246,7 @@ jobs:
version: ['17-ea']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -277,7 +268,7 @@ jobs:
version: ['17-ea', '21-ea']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -295,7 +286,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution:
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
java-package: ['jre']
@@ -364,7 +355,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -392,7 +383,7 @@ jobs:
version: ['11']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@@ -415,7 +406,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "17" > .java-version
@@ -444,7 +435,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "11" > .java-version
@@ -472,7 +463,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "17.0.10" > .java-version
@@ -490,26 +481,23 @@ jobs:
shell: bash
setup-java-version-from-file-major-minor-patch-with-dist:
name: ${{ matrix.distribution }} version from file '${{ matrix.java-version-file }}' - ${{ matrix.os }}
name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['adopt', 'zulu', 'liberica']
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "openjdk64-17.0.10" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java openjdk64-17.0.10" > .tool-versions
- name: Create .sdkmanrc file
shell: bash
run: echo "java=17.0.10-tem" > .sdkmanrc
- name: setup-java
uses: ./
id: setup-java

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4

View File

@@ -1,6 +1,6 @@
---
name: "@types/node"
version: 24.1.0
version: 20.11.24
type: npm
summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node

View File

@@ -1,6 +1,6 @@
---
name: brace-expansion
version: 1.1.12
version: 1.1.11
type: npm
summary: Brace expansion as known from sh/bash
homepage: https://github.com/juliangruber/brace-expansion

View File

@@ -1,32 +0,0 @@
---
name: call-bind-apply-helpers
version: 1.0.2
type: npm
summary: Helper functions around Function call/apply/bind, for use in `call-bind`
homepage: https://github.com/ljharb/call-bind-apply-helpers#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: dunder-proto
version: 1.0.1
type: npm
summary: If available, the `Object.prototype.__proto__` accessor and mutator, call-bound
homepage: https://github.com/es-shims/dunder-proto#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 ECMAScript Shims
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: es-define-property
version: 1.0.1
type: npm
summary: "`Object.defineProperty`, but not IE 8's broken one."
homepage: https://github.com/ljharb/es-define-property#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: es-errors
version: 1.3.0
type: npm
summary: A simple cache for a few of the JS Error constructors.
homepage: https://github.com/ljharb/es-errors#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: es-object-atoms
version: 1.1.1
type: npm
summary: 'ES Object-related atoms: Object, ToObject, RequireObjectCoercible'
homepage: https://github.com/ljharb/es-object-atoms#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: es-set-tostringtag
version: 2.1.0
type: npm
summary: A helper to optimistically set Symbol.toStringTag, when possible.
homepage: https://github.com/es-shims/es-set-tostringtag#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2022 ECMAScript Shims
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,10 +1,10 @@
---
name: form-data
version: 2.5.5
version: 2.5.1
type: npm
summary: A library to create readable "multipart/form-data" streams. Can be used to
submit forms and file uploads to other web applications.
homepage:
homepage: https://github.com/form-data/form-data#readme
license: mit
licenses:
- sources: License

View File

@@ -1,10 +1,10 @@
---
name: form-data
version: 4.0.4
version: 4.0.0
type: npm
summary: A library to create readable "multipart/form-data" streams. Can be used to
submit forms and file uploads to other web applications.
homepage:
homepage: https://github.com/form-data/form-data#readme
license: mit
licenses:
- sources: License
@@ -28,6 +28,6 @@ licenses:
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- sources: README.md
- sources: Readme.md
text: Form-Data is released under the [MIT](License) license.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: function-bind
version: 1.1.2
type: npm
summary: Implementation of Function.prototype.bind
homepage: https://github.com/Raynos/function-bind
license: mit
licenses:
- sources: LICENSE
text: |+
Copyright (c) 2013 Raynos.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
notices: []
...

View File

@@ -1,33 +0,0 @@
---
name: get-intrinsic
version: 1.3.0
type: npm
summary: Get and robustly cache all JS language-level intrinsics at first require
time
homepage: https://github.com/ljharb/get-intrinsic#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2020 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: get-proto
version: 1.0.1
type: npm
summary: Robustly get the [[Prototype]] of an object
homepage: https://github.com/ljharb/get-proto#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2025 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: gopd
version: 1.2.0
type: npm
summary: "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation."
homepage: https://github.com/ljharb/gopd#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2022 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: has-symbols
version: 1.1.0
type: npm
summary: Determine if the JS environment has Symbol support. Supports spec, or shams.
homepage: https://github.com/ljharb/has-symbols#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2016 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,33 +0,0 @@
---
name: has-tostringtag
version: 1.0.2
type: npm
summary: Determine if the JS environment has `Symbol.toStringTag` support. Supports
spec, or shams.
homepage: https://github.com/inspect-js/has-tostringtag#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2021 Inspect JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: hasown
version: 2.0.2
type: npm
summary: A robust, ES3 compatible, "has own property" predicate.
homepage: https://github.com/inspect-js/hasOwn#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) Jordan Harband and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,32 +0,0 @@
---
name: math-intrinsics
version: 1.1.0
type: npm
summary: ES Math-related intrinsics and helpers, robustly cached.
homepage: https://github.com/es-shims/math-intrinsics#readme
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2024 ECMAScript Shims
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@@ -1,34 +0,0 @@
---
name: safe-buffer
version: 5.2.1
type: npm
summary: Safer Node.js Buffer API
homepage: https://github.com/feross/safe-buffer
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License (MIT)
Copyright (c) Feross Aboukhadijeh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- sources: README.md
text: MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
notices: []

View File

@@ -1,17 +1,15 @@
---
name: undici-types
version: 7.8.0
version: 5.26.5
type: npm
summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org
license: mit
licenses:
- sources: LICENSE
- sources: Auto-generated MIT license text
text: |
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

View File

@@ -1,6 +1,6 @@
---
name: undici
version: 5.29.0
version: 5.28.5
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org

View File

@@ -18,20 +18,11 @@ The `setup-java` action provides the following functionality for GitHub Actions
This action allows you to work with Java and Scala projects.
## Breaking changes in V5
- Upgraded action from node20 to node24
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0)
## V2 vs V1
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2.
For information about the latest releases, recent updates, and newly supported distributions, please refer to the `setup-java` [Releases](https://github.com/actions/setup-java/releases).
## Usage
- `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified.
@@ -78,8 +69,8 @@ For information about the latest releases, recent updates, and newly supported d
#### Eclipse Temurin
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'
@@ -89,8 +80,8 @@ steps:
#### Azul Zulu OpenJDK
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
@@ -145,8 +136,8 @@ The cache input is optional, and caching is turned off by default.
#### Caching gradle dependencies
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -160,8 +151,8 @@ steps:
#### Caching maven dependencies
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -174,8 +165,8 @@ steps:
#### Caching sbt dependencies
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -194,8 +185,8 @@ Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -214,8 +205,8 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -233,9 +224,9 @@ jobs:
java: [ '8', '11', '17', '21' ]
name: Java ${{ matrix.Java }} sample
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: ${{ matrix.java }}
@@ -244,11 +235,11 @@ jobs:
### Install multiple JDKs
All configured Java versions are added to the PATH. The last one added to the PATH (i.e., the last JDK set up by this action) will be used as the default and available globally. Other Java versions can be accessed through environment variables such as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. To use a specific Java version, set the JAVA_HOME environment variable accordingly and prepend its bin directory to the PATH to ensure it takes priority during execution.
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'.
```yaml
steps:
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |

File diff suppressed because it is too large Load Diff

View File

@@ -1,47 +1,4 @@
[
{
"version": "25.0.0",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-25.0.0-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-x64.zip"
},
{
"filename": "microsoft-jdk-25.0.0-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-aarch64.zip"
}
]
},
{
"version": "21.0.0",
"stable": true,

View File

@@ -1,135 +0,0 @@
6.0.119-zulu, 6.0.119
7.0.352-zulu, 7.0.352
8.0.282-trava, 8.0.282
8.0.432-albba, 8.0.432
8.0.432-amzn, 8.0.432
8.0.432-kona, 8.0.432
8.0.432-librca, 8.0.432
8.0.432-sem, 8.0.432
8.0.432-tem, 8.0.432
8.0.432-zulu, 8.0.432
8.0.432.fx-librca, 8.0.432
8.0.432.fx-zulu, 8.0.432
8.0.442-amzn, 8.0.442
8.0.442-librca, 8.0.442
8.0.442-tem, 8.0.442
8.0.442-zulu, 8.0.442
8.0.442.fx-librca, 8.0.442
8.0.442.fx-zulu, 8.0.442
11.0.14.1-jbr, 11.0.14
11.0.15-trava, 11.0.15
11.0.25-albba, 11.0.25
11.0.25-amzn, 11.0.25
11.0.25-kona, 11.0.25
11.0.25-librca, 11.0.25
11.0.25-ms, 11.0.25
11.0.25-sapmchn, 11.0.25
11.0.25-sem, 11.0.25
11.0.25-tem, 11.0.25
11.0.25-zulu, 11.0.25
11.0.25.fx-librca, 11.0.25
11.0.25.fx-zulu, 11.0.25
11.0.26-amzn, 11.0.26
11.0.26-librca, 11.0.26
11.0.26-ms, 11.0.26
11.0.26-sapmchn, 11.0.26
11.0.26-zulu, 11.0.26
11.0.26.fx-librca, 11.0.26
11.0.26.fx-zulu, 11.0.26
17.0.12-graal, 17.0.12
17.0.12-jbr, 17.0.12
17.0.12-oracle, 17.0.12
17.0.13-albba, 17.0.13
17.0.13-amzn, 17.0.13
17.0.13-kona, 17.0.13
17.0.13-librca, 17.0.13
17.0.13-ms, 17.0.13
17.0.13-sapmchn, 17.0.13
17.0.13-sem, 17.0.13
17.0.13-tem, 17.0.13
17.0.13-zulu, 17.0.13
17.0.13.crac-librca, 17.0.13
17.0.13.crac-zulu, 17.0.13
17.0.13.fx-librca, 17.0.13
17.0.13.fx-zulu, 17.0.13
17.0.14-amzn, 17.0.14
17.0.14-librca, 17.0.14
17.0.14-ms, 17.0.14
17.0.14-sapmchn, 17.0.14
17.0.14-zulu, 17.0.14
17.0.14.fx-librca, 17.0.14
17.0.14.fx-zulu, 17.0.14
17.0.9-graalce, 17.0.9
21.0.2-graalce, 21.0.2
21.0.2-open, 21.0.2
21.0.5-amzn, 21.0.5
21.0.5-graal, 21.0.5
21.0.5-jbr, 21.0.5
21.0.5-kona, 21.0.5
21.0.5-librca, 21.0.5
21.0.5-ms, 21.0.5
21.0.5-oracle, 21.0.5
21.0.5-sapmchn, 21.0.5
21.0.5-sem, 21.0.5
21.0.5-tem, 21.0.5
21.0.5-zulu, 21.0.5
21.0.5.crac-librca, 21.0.5
21.0.5.crac-zulu, 21.0.5
21.0.5.fx-librca, 21.0.5
21.0.5.fx-zulu, 21.0.5
21.0.6-amzn, 21.0.6
21.0.6-graal, 21.0.6
21.0.6-librca, 21.0.6
21.0.6-ms, 21.0.6
21.0.6-oracle, 21.0.6
21.0.6-sapmchn, 21.0.6
21.0.6-tem, 21.0.6
21.0.6-zulu, 21.0.6
21.0.6.fx-librca, 21.0.6
21.0.6.fx-zulu, 21.0.6
22.0.2-oracle, 22.0.2
22.1.0.1.r11-gln, 22.1.0
22.1.0.1.r17-gln, 22.1.0
22.3.5.r11-nik, 22.3.5
22.3.5.r17-mandrel, 22.3.5
22.3.5.r17-nik, 22.3.5
23-open, 23
23.0.1-amzn, 23.0.1
23.0.1-graal, 23.0.1
23.0.1-graalce, 23.0.1
23.0.1-librca, 23.0.1
23.0.1-open, 23.0.1
23.0.1-oracle, 23.0.1
23.0.1-sapmchn, 23.0.1
23.0.1-tem, 23.0.1
23.0.1-zulu, 23.0.1
23.0.1.crac-zulu, 23.0.1
23.0.1.fx-librca, 23.0.1
23.0.1.fx-zulu, 23.0.1
23.0.2-amzn, 23.0.2
23.0.2-graal, 23.0.2
23.0.2-graalce, 23.0.2
23.0.2-librca, 23.0.2
23.0.2-oracle, 23.0.2
23.0.2-sapmchn, 23.0.2
23.0.2-tem, 23.0.2
23.0.2-zulu, 23.0.2
23.0.2.fx-librca, 23.0.2
23.0.2.fx-zulu, 23.0.2
23.0.6.fx-nik, 23.0.6
23.0.6.r17-mandrel, 23.0.6
23.0.6.r17-nik, 23.0.6
23.1.5.fx-nik, 23.1.5
23.1.5.r21-mandrel, 23.1.5
23.1.5.r21-nik, 23.1.5
24.0.2.r22-mandrel, 24.0.2
24.ea.27-graal, 24.0.0
24.ea.28-graal, 24.0.0
24.ea.31-open, 24.0.0
24.ea.32-open, 24.0.0
24.1.1.r23-mandrel, 24.1.1
24.1.1.r23-nik, 24.1.1
25.ea.4-graal, 25.0.0
25.ea.5-graal, 25.0.0
25.ea.5-open, 25.0.0
25.ea.6-open, 25.0.0
1 6.0.119-zulu 6.0.119
2 7.0.352-zulu 7.0.352
3 8.0.282-trava 8.0.282
4 8.0.432-albba 8.0.432
5 8.0.432-amzn 8.0.432
6 8.0.432-kona 8.0.432
7 8.0.432-librca 8.0.432
8 8.0.432-sem 8.0.432
9 8.0.432-tem 8.0.432
10 8.0.432-zulu 8.0.432
11 8.0.432.fx-librca 8.0.432
12 8.0.432.fx-zulu 8.0.432
13 8.0.442-amzn 8.0.442
14 8.0.442-librca 8.0.442
15 8.0.442-tem 8.0.442
16 8.0.442-zulu 8.0.442
17 8.0.442.fx-librca 8.0.442
18 8.0.442.fx-zulu 8.0.442
19 11.0.14.1-jbr 11.0.14
20 11.0.15-trava 11.0.15
21 11.0.25-albba 11.0.25
22 11.0.25-amzn 11.0.25
23 11.0.25-kona 11.0.25
24 11.0.25-librca 11.0.25
25 11.0.25-ms 11.0.25
26 11.0.25-sapmchn 11.0.25
27 11.0.25-sem 11.0.25
28 11.0.25-tem 11.0.25
29 11.0.25-zulu 11.0.25
30 11.0.25.fx-librca 11.0.25
31 11.0.25.fx-zulu 11.0.25
32 11.0.26-amzn 11.0.26
33 11.0.26-librca 11.0.26
34 11.0.26-ms 11.0.26
35 11.0.26-sapmchn 11.0.26
36 11.0.26-zulu 11.0.26
37 11.0.26.fx-librca 11.0.26
38 11.0.26.fx-zulu 11.0.26
39 17.0.12-graal 17.0.12
40 17.0.12-jbr 17.0.12
41 17.0.12-oracle 17.0.12
42 17.0.13-albba 17.0.13
43 17.0.13-amzn 17.0.13
44 17.0.13-kona 17.0.13
45 17.0.13-librca 17.0.13
46 17.0.13-ms 17.0.13
47 17.0.13-sapmchn 17.0.13
48 17.0.13-sem 17.0.13
49 17.0.13-tem 17.0.13
50 17.0.13-zulu 17.0.13
51 17.0.13.crac-librca 17.0.13
52 17.0.13.crac-zulu 17.0.13
53 17.0.13.fx-librca 17.0.13
54 17.0.13.fx-zulu 17.0.13
55 17.0.14-amzn 17.0.14
56 17.0.14-librca 17.0.14
57 17.0.14-ms 17.0.14
58 17.0.14-sapmchn 17.0.14
59 17.0.14-zulu 17.0.14
60 17.0.14.fx-librca 17.0.14
61 17.0.14.fx-zulu 17.0.14
62 17.0.9-graalce 17.0.9
63 21.0.2-graalce 21.0.2
64 21.0.2-open 21.0.2
65 21.0.5-amzn 21.0.5
66 21.0.5-graal 21.0.5
67 21.0.5-jbr 21.0.5
68 21.0.5-kona 21.0.5
69 21.0.5-librca 21.0.5
70 21.0.5-ms 21.0.5
71 21.0.5-oracle 21.0.5
72 21.0.5-sapmchn 21.0.5
73 21.0.5-sem 21.0.5
74 21.0.5-tem 21.0.5
75 21.0.5-zulu 21.0.5
76 21.0.5.crac-librca 21.0.5
77 21.0.5.crac-zulu 21.0.5
78 21.0.5.fx-librca 21.0.5
79 21.0.5.fx-zulu 21.0.5
80 21.0.6-amzn 21.0.6
81 21.0.6-graal 21.0.6
82 21.0.6-librca 21.0.6
83 21.0.6-ms 21.0.6
84 21.0.6-oracle 21.0.6
85 21.0.6-sapmchn 21.0.6
86 21.0.6-tem 21.0.6
87 21.0.6-zulu 21.0.6
88 21.0.6.fx-librca 21.0.6
89 21.0.6.fx-zulu 21.0.6
90 22.0.2-oracle 22.0.2
91 22.1.0.1.r11-gln 22.1.0
92 22.1.0.1.r17-gln 22.1.0
93 22.3.5.r11-nik 22.3.5
94 22.3.5.r17-mandrel 22.3.5
95 22.3.5.r17-nik 22.3.5
96 23-open 23
97 23.0.1-amzn 23.0.1
98 23.0.1-graal 23.0.1
99 23.0.1-graalce 23.0.1
100 23.0.1-librca 23.0.1
101 23.0.1-open 23.0.1
102 23.0.1-oracle 23.0.1
103 23.0.1-sapmchn 23.0.1
104 23.0.1-tem 23.0.1
105 23.0.1-zulu 23.0.1
106 23.0.1.crac-zulu 23.0.1
107 23.0.1.fx-librca 23.0.1
108 23.0.1.fx-zulu 23.0.1
109 23.0.2-amzn 23.0.2
110 23.0.2-graal 23.0.2
111 23.0.2-graalce 23.0.2
112 23.0.2-librca 23.0.2
113 23.0.2-oracle 23.0.2
114 23.0.2-sapmchn 23.0.2
115 23.0.2-tem 23.0.2
116 23.0.2-zulu 23.0.2
117 23.0.2.fx-librca 23.0.2
118 23.0.2.fx-zulu 23.0.2
119 23.0.6.fx-nik 23.0.6
120 23.0.6.r17-mandrel 23.0.6
121 23.0.6.r17-nik 23.0.6
122 23.1.5.fx-nik 23.1.5
123 23.1.5.r21-mandrel 23.1.5
124 23.1.5.r21-nik 23.1.5
125 24.0.2.r22-mandrel 24.0.2
126 24.ea.27-graal 24.0.0
127 24.ea.28-graal 24.0.0
128 24.ea.31-open 24.0.0
129 24.ea.32-open 24.0.0
130 24.1.1.r23-mandrel 24.1.1
131 24.1.1.r23-nik 24.1.1
132 25.ea.4-graal 25.0.0
133 25.ea.5-graal 25.0.0
134 25.ea.5-open 25.0.0
135 25.ea.6-open 25.0.0

View File

@@ -191,9 +191,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const installerOptions: JavaInstallerOptions = {
version: '17',

View File

@@ -287,7 +287,7 @@ describe('setupJava', () => {
spyCoreSetOutput = jest.spyOn(core, 'setOutput');
spyCoreSetOutput.mockImplementation(() => undefined);
jest.spyOn(os, 'arch').mockReturnValue('x86' as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue('x86');
});
afterEach(() => {

View File

@@ -150,8 +150,9 @@ describe('getAvailableVersions', () => {
});
mockPlatform(distribution, platform);
const availableVersion =
await distribution['findPackageForDownload'](version);
const availableVersion = await distribution['findPackageForDownload'](
version
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);
});
@@ -202,27 +203,29 @@ describe('getAvailableVersions', () => {
});
it.each([
['amd64', 'x64'],
['arm64', 'aarch64']
['arm64', 'aarch64'],
['amd64', 'x64']
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new CorrettoDistribution({
version: '17',
const version = '17';
const installerOptions: JavaInstallerOptions = {
version,
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
};
const distribution = new CorrettoDistribution(installerOptions);
mockPlatform(distribution, 'macos');
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
const availableVersion =
await distribution['findPackageForDownload']('17');
const availableVersion = await distribution['findPackageForDownload'](
version
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);
}

View File

@@ -206,8 +206,9 @@ describe('getAvailableVersions', () => {
});
mockPlatform(distribution, platform);
const availableVersion =
await distribution['findPackageForDownload'](jdkVersion);
const availableVersion = await distribution['findPackageForDownload'](
jdkVersion
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);
}

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,9 @@ describe('getAvailableVersions', () => {
expect(availableVersions).not.toBeNull();
const length =
os.platform() === 'win32' ? manifestData.length : manifestData.length + 2;
os.platform() === 'win32'
? manifestData.length - 1
: manifestData.length + 1;
expect(availableVersions.length).toBe(length);
}, 10_000);
});
@@ -76,8 +78,9 @@ describe('findPackageForDownload', () => {
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData as any;
const resolvedVersion =
await distribution['findPackageForDownload'](input);
const resolvedVersion = await distribution['findPackageForDownload'](
input
);
const url = resolvedVersion.url;
const options = {method: 'HEAD'};

View File

@@ -105,11 +105,9 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distributions = new LibericaDistributions({
const distribution = new LibericaDistributions({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
@@ -119,11 +117,11 @@ describe('getAvailableVersions', () => {
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
distributions['getPlatformOption'] = () => 'macos';
distribution['getPlatformOption'] = () => 'macos';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=macos&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
await distributions['getAvailableVersions']();
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);

View File

@@ -105,9 +105,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new LibericaDistributions({
version: '17',

View File

@@ -105,9 +105,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new LibericaDistributions({
version: '17',

View File

@@ -29,11 +29,6 @@ describe('findPackageForDownload', () => {
});
it.each([
[
'25.x',
'25.0.0',
'https://aka.ms/download-jdk/microsoft-jdk-25.0.0-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
],
[
'21.x',
'21.0.0',
@@ -100,9 +95,7 @@ describe('findPackageForDownload', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('darwin');
const version = '17';
@@ -126,9 +119,7 @@ describe('findPackageForDownload', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('linux');
const version = '17';
@@ -152,9 +143,7 @@ describe('findPackageForDownload', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('win32');
const version = '17';

View File

@@ -95,9 +95,7 @@ describe('findPackageForDownload', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('linux');
const version = '18';

View File

@@ -61,8 +61,9 @@ describe('getAvailableVersions', () => {
mockPlatform(distribution, 'linux');
const availableVersion =
await distribution['findPackageForDownload'](version);
const availableVersion = await distribution['findPackageForDownload'](
version
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(
'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz'
@@ -229,8 +230,9 @@ describe('getAvailableVersions', () => {
});
mockPlatform(distribution, platform);
const availableVersion =
await distribution['findPackageForDownload'](normalizedVersion);
const availableVersion = await distribution['findPackageForDownload'](
normalizedVersion
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);
}

View File

@@ -147,9 +147,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(distroArch);
const installerOptions: JavaInstallerOptions = {
version: '17',

View File

@@ -1,4 +1,5 @@
import {HttpClient} from '@actions/http-client';
import * as semver from 'semver';
import {ZuluDistribution} from '../../src/distributions/zulu/installer';
import {IZuluVersions} from '../../src/distributions/zulu/models';
import * as utils from '../../src/util';
@@ -125,9 +126,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new ZuluDistribution({
version: '17',

View File

@@ -126,9 +126,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new ZuluDistribution({
version: '17',
@@ -137,9 +135,7 @@ describe('getAvailableVersions', () => {
checkLatest: false
});
distribution['getPlatformOption'] = () => 'linux';
// Override extension for linux default arch case to match util behavior
spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz');
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=tar.gz&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
await distribution['getAvailableVersions']();

View File

@@ -126,9 +126,7 @@ describe('getAvailableVersions', () => {
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new ZuluDistribution({
version: '17',

View File

@@ -1,10 +1,7 @@
import * as cache from '@actions/cache';
import * as core from '@actions/core';
import * as fs from 'fs';
import * as path from 'path';
import {
convertVersionToSemver,
getVersionFromFileContent,
isVersionSatisfies,
isCacheFeatureAvailable,
isGhes
@@ -85,43 +82,6 @@ describe('convertVersionToSemver', () => {
});
});
describe('getVersionFromFileContent', () => {
describe('.sdkmanrc', () => {
it.each([
['java=11.0.20.1-tem', '11.0.20'],
['java = 11.0.20.1-tem', '11.0.20'],
['java=11.0.20.1-tem # a comment in sdkmanrc', '11.0.20'],
['java=11.0.20.1-tem\n#java=21.0.20.1-tem\n', '11.0.20'], // choose first match
['java=11.0.20.1-tem\njava=21.0.20.1-tem\n', '11.0.20'], // choose first match
['#java=11.0.20.1-tem\njava=21.0.20.1-tem\n', '21.0.20'] // first one is 'commented' in .sdkmanrc
])('parsing %s should return %s', (content: string, expected: string) => {
const actual = getVersionFromFileContent(content, 'openjdk', '.sdkmanrc');
expect(actual).toBe(expected);
});
describe('known versions', () => {
const csv = fs.readFileSync(
path.join(__dirname, 'data/sdkman-java-versions.csv'),
'utf8'
);
const versions = csv.split('\n').map(r => r.split(', '));
it.each(versions)(
'parsing %s should return %s',
(sdkmanJavaVersion: string, expected: string) => {
const asContent = `java=${sdkmanJavaVersion}`;
const actual = getVersionFromFileContent(
asContent,
'openjdk',
'.sdkmanrc'
);
expect(actual).toBe(expected);
}
);
});
});
});
describe('isGhes', () => {
const pristineEnv = process.env;

View File

@@ -81,6 +81,6 @@ outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
runs:
using: 'node24'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cleanup/index.js'

1457
dist/cleanup/index.js vendored

File diff suppressed because it is too large Load Diff

1761
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -31,8 +31,8 @@ Inputs `java-version` and `distribution` are mandatory and needs to be provided.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
@@ -44,8 +44,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt-hotspot'
java-version: '11'
@@ -56,8 +56,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
@@ -69,8 +69,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '21'
@@ -82,8 +82,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '21'
@@ -97,7 +97,7 @@ steps:
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
```yaml
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
token: ${{ secrets.GH_DOTCOM_TOKEN }}
distribution: 'microsoft'
@@ -111,8 +111,8 @@ If the runner is not able to access github.com, any Java versions requested duri
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
@@ -124,8 +124,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '21'
@@ -137,8 +137,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'dragonwell'
java-version: '8'
@@ -149,8 +149,8 @@ steps:
**NOTE:** An OpenJDK release maintained and supported by SAP
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'sapmachine'
java-version: '21'
@@ -162,8 +162,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'graalvm'
java-version: '21'
@@ -181,8 +181,8 @@ For example, `11.0.24` is not available but `11.0.16` is.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'jetbrains'
java-version: '11'
@@ -194,8 +194,8 @@ GitHub token to the action to increase the rate limit. Set the `GITHUB_TOKEN` en
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'jetbrains'
java-version: '17'
@@ -219,8 +219,8 @@ The available package types are:
## Installing custom Java package type
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@@ -232,8 +232,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@@ -249,7 +249,7 @@ steps:
- run: |
download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@@ -275,7 +275,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver')
echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT"
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@@ -296,9 +296,9 @@ jobs:
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
@@ -316,9 +316,9 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
@@ -333,9 +333,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@@ -349,7 +349,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Set up Apache Maven Central
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '11'
@@ -446,9 +446,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Set up JDK 11 for Shared Runner
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@@ -472,10 +472,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@@ -509,14 +509,14 @@ Subsequent calls to `setup-java` with distinct distribution and version paramete
```yaml
steps:
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
8
11
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '15'
@@ -528,7 +528,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
- run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@@ -545,7 +545,7 @@ Each JDK provider will receive a default `vendor` using the `distribution` input
- run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@@ -560,7 +560,7 @@ In case you install multiple versions of Java at once with multi-line `java-vers
```yaml
steps:
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
@@ -574,8 +574,8 @@ Each JDK provider will receive a default `id` based on the combination of `distr
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
@@ -587,7 +587,7 @@ In case you install multiple versions of Java at once you can use the same synta
```yaml
steps:
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
@@ -601,37 +601,18 @@ steps:
## Java version file
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
Supported files are `.java-version`, `.tool-versions` and `.sdkmanrc`.
* In `.java-version` file, only the version should be specified (e.g., 17.0.7). The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv).
* In `.tool-versions` file, java version should be preceded by the java keyword (e.g., java 17.0.7). The `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)).
* In `.sdkmanrc` file, java version should be preceded by the `java=` prefix (e.g., java=17.0.7-tem) and include the distribution. The `.sdkmanrc` file supports version specifications in accordance with [file format](https://sdkman.io/usage#env-command), see [Sdkman! documentation](https://sdkman.io/jdks) for more information.
Supported files are .java-version and .tool-versions.
In .java-version file, only the version should be specified (e.g., 17.0.7).
In .tool-versions file, java version should be preceded by the java keyword (e.g., java 17.0.7).
The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). Similarly, the `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)).
If both java-version and java-version-file inputs are provided, the java-version input will be used.
If both `java-version` and `java-version-file` **inputs** are provided, the `java-version` input will be used.
**Example step using `Sdkman!`**:
```yml
- name: Setup java
uses: actions/setup-java@v5
with:
java-version-file: '.sdkmanrc'
distribution: 'temurin'
```
**Example `.sdkmanrc`**:
```
java=17.0.7-tem
```
Valid entry options (does not apply to `.sdkmanrc`):
Valid entry options:
```
major versions: 8, 11, 16, 17, 21
more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0
early access (EA) versions: 15-ea, 15.0.0-ea
versions with specified distribution: openjdk64-11.0.2
LTS versions : temurin-21.0.5+11.0.LTS
```
If the file contains multiple versions, only the first one will be recognized.
***NOTE***:
For the tool-version file, ensure that you use standard semantic versioning (semver) formats, as non-standard formats (such as jetbrains-21b212.1) may not be parsed correctly. Additionally, for complex version strings containing multiple version-like segments (for example, java semeru-openj9-11.0.15+10_openj9-0.32.0), the extraction logic may incorrectly capture the last segment (0.32.0) instead of the main version (11.0.15+10).

View File

@@ -68,7 +68,7 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub.
Adding or changing tests is an integral part of making a change to the code.
Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly take a look at the files with `e2e` prefix, for instance, [e2e-cache.yml](https://github.com/actions/setup-java/blob/main/.github/workflows/e2e-cache.yml).
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in their opinion, will be necessary and sufficient for testing new or changed functionality
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality
- Tests should cover a successful execution, as well as some edge cases and possible errors
- As already mentioned, pull requests without tests will be considered more carefully by maintainers. If you are sure that in this situation the tests are not needed or cannot be implemented with a commensurate effort - please add this clarification message to your pull request
@@ -76,7 +76,7 @@ Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workf
- CI will start automatically with some checks. Wait until the end of the execution and make sure that all checks passed successfully. If some checks fail, you can open them one by one, try to find the reason for failing and make changes to your code to resolve the problem
- Maintainers will review your pull request
- If a maintainer requests changes, first of all, try to think about their request critically and only after that implement and request another review
- If a maintainer requests changes, first of all, try to think about his request critically and only after that implement and request another review
- If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag
> Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart:

656
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,9 @@
{
"name": "setup-java",
"version": "5.0.0",
"version": "4.0.0",
"private": true,
"description": "setup java action",
"main": "dist/setup/index.js",
"engines": {
"node": ">=24.0.0"
},
"scripts": {
"build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
@@ -41,18 +38,18 @@
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^24.1.0",
"@types/node": "^20.11.24",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.35.1",
"@typescript-eslint/parser": "^8.35.1",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^3.6.2",
"prettier": "^2.8.4",
"ts-jest": "^29.3.0",
"typescript": "^5.3.3"
},
@@ -60,4 +57,4 @@
"url": "https://github.com/actions/setup-java/issues"
},
"homepage": "https://github.com/actions/setup-java#readme"
}
}

View File

@@ -51,115 +51,43 @@ export abstract class JavaBase {
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
} else {
core.info('Trying to resolve the latest version from remote');
const MAX_RETRIES = 4;
const RETRY_DELAY_MS = 2000;
const retryableCodes = [
'ETIMEDOUT',
'ECONNRESET',
'ENOTFOUND',
'ECONNREFUSED'
];
let retries = MAX_RETRIES;
while (retries > 0) {
try {
// Clear console timers before each attempt to prevent conflicts
if (retries < MAX_RETRIES && core.isDebug()) {
const consoleAny = console as any;
consoleAny._times?.clear?.();
}
const javaRelease = await this.findPackageForDownload(this.version);
core.info(`Resolved latest version as ${javaRelease.version}`);
if (foundJava?.version === javaRelease.version) {
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
} else {
core.info('Trying to download...');
foundJava = await this.downloadTool(javaRelease);
core.info(`Java ${foundJava.version} was downloaded`);
}
break;
} catch (error: any) {
retries--;
// Check if error is retryable (including aggregate errors)
const isRetryable =
(error instanceof tc.HTTPError &&
error.httpStatusCode &&
[429, 502, 503, 504].includes(error.httpStatusCode)) ||
retryableCodes.includes(error?.code) ||
(error?.errors &&
Array.isArray(error.errors) &&
error.errors.some((err: any) =>
retryableCodes.includes(err?.code)
));
if (retries > 0 && isRetryable) {
core.debug(
`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`
);
await new Promise(r => setTimeout(r, RETRY_DELAY_MS));
continue;
}
if (error instanceof tc.HTTPError) {
if (error.httpStatusCode === 403) {
core.error('HTTP 403: Permission denied or access restricted.');
} else if (error.httpStatusCode === 429) {
core.warning(
'HTTP 429: Rate limit exceeded. Please retry later.'
);
} else {
core.error(`HTTP ${error.httpStatusCode}: ${error.message}`);
}
} else if (error && error.errors && Array.isArray(error.errors)) {
core.error(
`Java setup failed due to network or configuration error(s)`
);
if (error instanceof Error && error.stack) {
core.debug(error.stack);
}
for (const err of error.errors) {
const endpoint = err?.address || err?.hostname || '';
const port = err?.port ? `:${err.port}` : '';
const message = err?.message || 'Aggregate error';
const endpointInfo = !message.includes(endpoint)
? ` ${endpoint}${port}`
: '';
const localInfo =
err.localAddress && err.localPort
? ` - Local (${err.localAddress}:${err.localPort})`
: '';
const logMessage = `${message}${endpointInfo}${localInfo}`;
core.error(logMessage);
core.debug(`${err.stack || err.message}`);
Object.entries(err).forEach(([key, value]) => {
core.debug(`"${key}": ${JSON.stringify(value)}`);
});
}
} else {
const message =
error instanceof Error ? error.message : JSON.stringify(error);
core.error(`Java setup process failed due to: ${message}`);
if (typeof error?.code === 'string') {
core.debug(error.stack);
}
const errorDetails = {
name: error.name,
message: error.message,
...Object.getOwnPropertyNames(error)
.filter(prop => !['name', 'message', 'stack'].includes(prop))
.reduce<{[key: string]: any}>((acc, prop) => {
acc[prop] = error[prop];
return acc;
}, {})
};
Object.entries(errorDetails).forEach(([key, value]) => {
core.debug(`"${key}": ${JSON.stringify(value)}`);
});
}
throw error;
try {
const javaRelease = await this.findPackageForDownload(this.version);
core.info(`Resolved latest version as ${javaRelease.version}`);
if (foundJava?.version === javaRelease.version) {
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
} else {
core.info('Trying to download...');
foundJava = await this.downloadTool(javaRelease);
core.info(`Java ${foundJava.version} was downloaded`);
}
} catch (error: any) {
if (error instanceof tc.HTTPError && error.httpStatusCode === 403) {
core.error(
`Received HTTP 403: Permission denied or restricted access.`
);
} else if (
error instanceof tc.HTTPError &&
error.httpStatusCode === 429
) {
core.warning(
`Received HTTP 429: Rate limit exceeded. Try again later.`
);
} else {
const message =
error instanceof Error ? error.message : JSON.stringify(error);
core.error(
`Failed to set up Java due to a network issue or timeout: ${message}`
);
}
if (error instanceof Error && error.stack) {
core.debug(error.stack);
}
throw error;
}
}
if (!foundJava) {
throw new Error('Failed to resolve Java version');
}
// JDK folder may contain postfix "Contents/Home" on macOS
const macOSPostfixPath = path.join(
foundJava.path,

View File

@@ -1,10 +1,10 @@
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
import fs from 'fs';
import path from 'path';
import {JavaBase} from '../base-installer';
import {HttpCodes} from '@actions/http-client';
import {GraalVMEAVersion} from './models';
import {
JavaDownloadRelease,
JavaInstallerOptions,
@@ -16,14 +16,12 @@ import {
getGitHubHttpHeaders,
renameWinArchive
} from '../../util';
import {HttpCodes} from '@actions/http-client';
import {GraalVMEAVersion} from './models';
const GRAALVM_DL_BASE = 'https://download.oracle.com/graalvm';
const IS_WINDOWS = process.platform === 'win32';
const GRAALVM_PLATFORM = IS_WINDOWS ? 'windows' : process.platform;
const GRAALVM_MIN_VERSION = 17;
const SUPPORTED_ARCHITECTURES = ['x64', 'aarch64'] as const;
type SupportedArchitecture = (typeof SUPPORTED_ARCHITECTURES)[number];
type OsVersions = 'linux' | 'macos' | 'windows';
export class GraalVMDistribution extends JavaBase {
constructor(installerOptions: JavaInstallerOptions) {
@@ -33,67 +31,38 @@ export class GraalVMDistribution extends JavaBase {
protected async downloadTool(
javaRelease: JavaDownloadRelease
): Promise<JavaInstallerResults> {
try {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (IS_WINDOWS) {
javaArchivePath = renameWinArchive(javaArchivePath);
}
const extractedJavaPath = await extractJdkFile(
javaArchivePath,
extension
);
// Add validation for extracted path
if (!fs.existsSync(extractedJavaPath)) {
throw new Error(
`Extraction failed: path ${extractedJavaPath} does not exist`
);
}
const dirContents = fs.readdirSync(extractedJavaPath);
if (dirContents.length === 0) {
throw new Error(
'Extraction failed: no files found in extracted directory'
);
}
const archivePath = path.join(extractedJavaPath, dirContents[0]);
const version = this.getToolcacheVersionName(javaRelease.version);
const javaPath = await tc.cacheDir(
archivePath,
this.toolcacheFolderName,
version,
this.architecture
);
return {version: javaRelease.version, path: javaPath};
} catch (error) {
core.error(`Failed to download and extract GraalVM: ${error}`);
throw error;
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (process.platform === 'win32') {
javaArchivePath = renameWinArchive(javaArchivePath);
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
const archiveName = fs.readdirSync(extractedJavaPath)[0];
const archivePath = path.join(extractedJavaPath, archiveName);
const version = this.getToolcacheVersionName(javaRelease.version);
const javaPath = await tc.cacheDir(
archivePath,
this.toolcacheFolderName,
version,
this.architecture
);
return {version: javaRelease.version, path: javaPath};
}
protected async findPackageForDownload(
range: string
): Promise<JavaDownloadRelease> {
// Add input validation
if (!range || typeof range !== 'string') {
throw new Error('Version range is required and must be a string');
}
const arch = this.distributionArchitecture();
if (!SUPPORTED_ARCHITECTURES.includes(arch as SupportedArchitecture)) {
throw new Error(
`Unsupported architecture: ${this.architecture}. Supported architectures are: ${SUPPORTED_ARCHITECTURES.join(', ')}`
);
if (arch !== 'x64' && arch !== 'aarch64') {
throw new Error(`Unsupported architecture: ${this.architecture}`);
}
if (!this.stable) {
@@ -106,113 +75,52 @@ export class GraalVMDistribution extends JavaBase {
const platform = this.getPlatform();
const extension = getDownloadArchiveExtension();
const major = range.includes('.') ? range.split('.')[0] : range;
const majorVersion = parseInt(major);
if (isNaN(majorVersion)) {
throw new Error(`Invalid version format: ${range}`);
let major;
let fileUrl;
if (range.includes('.')) {
major = range.split('.')[0];
fileUrl = `${GRAALVM_DL_BASE}/${major}/archive/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`;
} else {
major = range;
fileUrl = `${GRAALVM_DL_BASE}/${range}/latest/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`;
}
if (majorVersion < GRAALVM_MIN_VERSION) {
throw new Error(
`GraalVM is only supported for JDK ${GRAALVM_MIN_VERSION} and later. Requested version: ${major}`
);
if (parseInt(major) < 17) {
throw new Error('GraalVM is only supported for JDK 17 and later');
}
const fileUrl = this.constructFileUrl(
range,
major,
platform,
arch,
extension
);
const response = await this.http.head(fileUrl);
this.handleHttpResponse(response, range);
if (response.message.statusCode === HttpCodes.NotFound) {
throw new Error(`Could not find GraalVM for SemVer ${range}`);
}
if (response.message.statusCode !== HttpCodes.OK) {
throw new Error(
`Http request for GraalVM failed with status code: ${response.message.statusCode}`
);
}
return {url: fileUrl, version: range};
}
private constructFileUrl(
range: string,
major: string,
platform: string,
arch: string,
extension: string
): string {
return range.includes('.')
? `${GRAALVM_DL_BASE}/${major}/archive/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`
: `${GRAALVM_DL_BASE}/${range}/latest/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`;
}
private handleHttpResponse(response: any, range: string): void {
const statusCode = response.message.statusCode;
if (statusCode === HttpCodes.NotFound) {
throw new Error(
`Could not find GraalVM for SemVer ${range}. Please check if this version is available at ${GRAALVM_DL_BASE}`
);
}
if (
statusCode === HttpCodes.Unauthorized ||
statusCode === HttpCodes.Forbidden
) {
throw new Error(
`Access denied when downloading GraalVM. Status code: ${statusCode}. Please check your credentials or permissions.`
);
}
if (statusCode !== HttpCodes.OK) {
throw new Error(
`HTTP request for GraalVM failed with status code: ${statusCode} (${response.message.statusMessage || 'Unknown error'})`
);
}
}
private async findEABuildDownloadUrl(
javaEaVersion: string
): Promise<JavaDownloadRelease> {
core.debug(`Searching for EA build: ${javaEaVersion}`);
const versions = await this.fetchEAJson(javaEaVersion);
core.debug(`Found ${versions.length} EA versions`);
const latestVersion = versions.find(v => v.latest);
if (!latestVersion) {
core.error(
`Available versions: ${versions.map(v => v.version).join(', ')}`
);
throw new Error(`Unable to find latest version for '${javaEaVersion}'`);
}
core.debug(`Latest version found: ${latestVersion.version}`);
const arch = this.distributionArchitecture();
const file = latestVersion.files.find(
f => f.arch === arch && f.platform === GRAALVM_PLATFORM
);
if (!file) {
core.error(
`Available files for architecture ${arch}: ${JSON.stringify(latestVersion.files)}`
);
throw new Error(
`Unable to find file for architecture '${arch}' and platform '${GRAALVM_PLATFORM}'`
);
if (!file || !file.filename.startsWith('graalvm-jdk-')) {
throw new Error(`Unable to find file metadata for '${javaEaVersion}'`);
}
if (!file.filename.startsWith('graalvm-jdk-')) {
throw new Error(
`Invalid filename format: ${file.filename}. Expected to start with 'graalvm-jdk-'`
);
}
const downloadUrl = `${latestVersion.download_base_url}${file.filename}`;
core.debug(`Download URL: ${downloadUrl}`);
return {
url: downloadUrl,
url: `${latestVersion.download_base_url}${file.filename}`,
version: latestVersion.version
};
}
@@ -220,59 +128,49 @@ export class GraalVMDistribution extends JavaBase {
private async fetchEAJson(
javaEaVersion: string
): Promise<GraalVMEAVersion[]> {
const url = `https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/${javaEaVersion}.json?ref=main`;
const owner = 'graalvm';
const repository = 'oracle-graalvm-ea-builds';
const branch = 'main';
const filePath = `versions/${javaEaVersion}.json`;
const url = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers = getGitHubHttpHeaders();
core.debug(
`Trying to fetch available version info for GraalVM EA builds from '${url}'`
);
let fetchedJson;
try {
const response = await this.http.getJson<GraalVMEAVersion[]>(
url,
headers
);
if (!response.result) {
throw new Error(
`No GraalVM EA build found for version '${javaEaVersion}'. Please check if the version is correct.`
);
}
return response.result;
} catch (error) {
if (error instanceof Error) {
// Check if it's a 404 error (file not found)
if (error.message?.includes('404')) {
throw new Error(
`GraalVM EA version '${javaEaVersion}' not found. Please verify the version exists in the EA builds repository.`
);
}
// Re-throw with more context
throw new Error(
`Failed to fetch GraalVM EA version information for '${javaEaVersion}': ${error.message}`
);
}
// If it's not an Error instance, throw a generic error
throw new Error(
`Failed to fetch GraalVM EA version information for '${javaEaVersion}'`
fetchedJson = (await this.http.getJson<GraalVMEAVersion[]>(url, headers))
.result;
} catch (err) {
throw Error(
`Fetching version info for GraalVM EA builds from '${url}' failed with the error: ${
(err as Error).message
}`
);
}
if (fetchedJson === null) {
throw Error(
`No GraalVM EA build found. Are you sure java-version: '${javaEaVersion}' is correct?`
);
}
return fetchedJson;
}
public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions {
const platformMap: Record<string, OsVersions> = {
darwin: 'macos',
win32: 'windows',
linux: 'linux'
};
const result = platformMap[platform];
if (!result) {
throw new Error(
`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`
);
switch (platform) {
case 'darwin':
return 'macos';
case 'win32':
return 'windows';
case 'linux':
return 'linux';
default:
throw new Error(
`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`
);
}
return result;
}
}

View File

@@ -113,18 +113,9 @@ export class JetBrainsDistribution extends JavaBase {
core.debug(`Gathering available versions from '${rawUrl}'`);
}
const paginationPageResult = (
const paginationPage = (
await this.http.getJson<IJetBrainsRawVersion[]>(rawUrl, requestHeaders)
).result;
if (!paginationPageResult || paginationPageResult.length === 0) {
// break infinity loop because we have reached end of pagination
break;
}
const paginationPage: IJetBrainsRawVersion[] =
paginationPageResult.filter(version =>
this.stable ? !version.prerelease : version.prerelease
);
if (!paginationPage || paginationPage.length === 0) {
// break infinity loop because we have reached end of pagination
break;
@@ -134,13 +125,9 @@ export class JetBrainsDistribution extends JavaBase {
page_index++;
}
if (this.stable) {
// Add versions not available from the API but are downloadable
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
rawVersions.push(
...hidden.map(tag => ({tag_name: tag, name: tag, prerelease: false}))
);
}
// Add versions not available from the API but are downloadable
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
rawVersions.push(...hidden.map(tag => ({tag_name: tag, name: tag})));
const versions0 = rawVersions.map(async v => {
// Release tags look like one of these:
@@ -161,7 +148,7 @@ export class JetBrainsDistribution extends JavaBase {
const vsplit = vstring.split('b');
let semver = vsplit[0];
const build = vsplit[1];
const build = +vsplit[1];
// Normalize semver
if (!semver.includes('.') && !semver.includes('_'))

View File

@@ -3,12 +3,11 @@
export interface IJetBrainsRawVersion {
tag_name: string;
name: string;
prerelease: boolean;
}
export interface IJetBrainsVersion {
tag_name: string;
semver: string;
build: string;
build: number;
url: string;
}

View File

@@ -116,7 +116,7 @@ export class MicrosoftDistributions extends JavaBase {
}
} catch (err) {
core.debug(
`Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}. Error: ${err}`
`Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}`
);
return null;
}

View File

@@ -1,133 +1,90 @@
[
{
"version": "25.0.0",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-25.0.0-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-x64.zip"
},
{
"filename": "microsoft-jdk-25.0.0-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-25.0.0-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-aarch64.zip"
}
]
},
"version": "21.0.2",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-21.0.2-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-x64.zip"
},
{
"filename": "microsoft-jdk-21.0.2-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-aarch64.zip"
}
]
},
{
"version": "21.0.2",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-21.0.2-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-x64.zip"
},
{
"filename": "microsoft-jdk-21.0.2-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.2-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-aarch64.zip"
}
]
},
{
"version": "21.0.1",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-21.0.1-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-x64.zip"
},
{
"filename": "microsoft-jdk-21.0.1-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-aarch64.zip"
}
]
},
"version": "21.0.1",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-21.0.1-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-x64.zip"
},
{
"filename": "microsoft-jdk-21.0.1-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.1-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-aarch64.zip"
}
]
},
{
"version": "21.0.0",
"stable": true,
@@ -219,42 +176,42 @@
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-17.0.9-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-x64.zip"
},
{
"filename": "microsoft-jdk-17.0.9-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-aarch64.zip"
}
{
"filename": "microsoft-jdk-17.0.9-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-x64.zip"
},
{
"filename": "microsoft-jdk-17.0.9-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.9-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-aarch64.zip"
}
]
},
{
@@ -878,4 +835,4 @@
}
]
}
]
]

View File

@@ -8,6 +8,7 @@ import {
convertVersionToSemver,
extractJdkFile,
getDownloadArchiveExtension,
getGitHubHttpHeaders,
isVersionSatisfies,
renameWinArchive
} from '../../util';
@@ -63,12 +64,13 @@ export class SapMachineDistribution extends JavaBase {
const arch = this.distributionArchitecture();
let fetchedReleasesJson = await this.fetchReleasesFromUrl(
'https://sapmachine.io/assets/data/sapmachine-releases-all.json'
'https://sap.github.io/SapMachine/assets/data/sapmachine-releases-all.json'
);
if (!fetchedReleasesJson) {
fetchedReleasesJson = await this.fetchReleasesFromUrl(
'https://sap.github.io/SapMachine/assets/data/sapmachine-releases-all.json'
'https://api.github.com/repos/SAP/SapMachine/contents/assets/data/sapmachine-releases-all.json?ref=gh-pages',
getGitHubHttpHeaders()
);
}

View File

@@ -59,8 +59,9 @@ export async function createToolchainsSettings({
// when an alternate m2 location is specified use only that location (no .m2 directory)
// otherwise use the home/.m2/ path
await io.mkdirP(settingsDirectory);
const originalToolchains =
await readExistingToolchainsFile(settingsDirectory);
const originalToolchains = await readExistingToolchainsFile(
settingsDirectory
);
const updatedToolchains = generateToolchainDefinition(
originalToolchains,
jdkInfo.version,

View File

@@ -133,25 +133,21 @@ export function getVersionFromFileContent(
const versionFileName = getFileName(versionFile);
if (versionFileName == '.tool-versions') {
javaVersionRegExp =
/^java\s+(?:\S*-)?(?<version>\d+(?:\.\d+)*([+_.-](?:openj9[-._]?\d[\w.-]*|java\d+|jre[-_\w]*|OpenJDK\d+[\w_.-]*|[a-z0-9]+))*)/im;
} else if (versionFileName == '.sdkmanrc') {
javaVersionRegExp = /^java\s*=\s*(?<version>[^-]+)/m;
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
} else {
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
}
const capturedVersion = content.match(javaVersionRegExp)?.groups?.version
const fileContent = content.match(javaVersionRegExp)?.groups?.version
? (content.match(javaVersionRegExp)?.groups?.version as string)
: '';
core.debug(
`Parsed version '${capturedVersion}' from file '${versionFileName}'`
);
if (!capturedVersion) {
if (!fileContent) {
return null;
}
const tentativeVersion = avoidOldNotation(capturedVersion);
core.debug(`Version from file '${fileContent}'`);
const tentativeVersion = avoidOldNotation(fileContent);
const rawVersion = tentativeVersion.split('-')[0];
let version = semver.validRange(rawVersion)
@@ -188,8 +184,8 @@ export function convertVersionToSemver(version: number[] | string) {
}
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
const resolvedToken = core.getInput('token') || process.env.GITHUB_TOKEN;
const auth = !resolvedToken ? undefined : `token ${resolvedToken}`;
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers: OutgoingHttpHeaders = {
accept: 'application/vnd.github.VERSION.raw'