Skip to content

Commit 9640884

Browse files
committed
Merge remote-tracking branch 'origin/main' into patch-1
2 parents 06b76d5 + 80c368b commit 9640884

125 files changed

Lines changed: 200386 additions & 181005 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/java.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
"message": 4
2222
}
2323
]
24+
},
25+
{
26+
"owner": "maven-javac",
27+
"pattern": [
28+
{
29+
"regexp": "^\\[(WARNING|ERROR)\\]\\s+(.+?\\.java):\\[(\\d+),(\\d+)\\]\\s+(.+)$",
30+
"severity": 1,
31+
"file": 2,
32+
"line": 3,
33+
"column": 4,
34+
"message": 5
35+
}
36+
]
2437
}
2538
]
2639
}

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Describe your changes.
55
Add link to the related issue.
66

77
**Check list:**
8+
- [ ] Ran `npm run check` locally (format, lint, build, test) and all checks pass.
89
- [ ] Mark if documentation changes are required.
910
- [ ] Mark if tests were added or updated to cover the changes.

.github/workflows/e2e-local-file.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
id: setup-java
4848
with:
4949
distribution: 'jdkfile'
50-
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
50+
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
5151
java-version: '11.0.0-ea'
5252
architecture: x64
5353
- name: Verify Java version
@@ -88,7 +88,7 @@ jobs:
8888
id: setup-java
8989
with:
9090
distribution: 'jdkfile'
91-
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
91+
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
9292
java-version: '11.0.0-ea'
9393
architecture: x64
9494
- name: Verify Java version
@@ -129,6 +129,7 @@ jobs:
129129
id: setup-java
130130
with:
131131
distribution: 'jdkfile'
132+
# Intentionally uses the deprecated `jdkFile` alias to keep it covered.
132133
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
133134
java-version: '11.0.0-ea'
134135
architecture: x64

.github/workflows/e2e-versions.yml

Lines changed: 168 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919

2020
jobs:
2121
setup-java-major-versions:
22-
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
22+
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
2323
runs-on: ${{ matrix.os }}
2424
strategy:
2525
fail-fast: false
@@ -36,7 +36,9 @@ jobs:
3636
'corretto',
3737
'dragonwell',
3838
'sapmachine',
39-
'jetbrains'
39+
'jetbrains',
40+
'kona',
41+
'liberica-nik'
4042
] # internally 'adopt-hotspot' is the same as 'adopt'
4143
version: ['21', '11', '17']
4244
exclude:
@@ -54,6 +56,24 @@ jobs:
5456
- distribution: microsoft
5557
os: macos-latest
5658
version: 25
59+
- distribution: kona
60+
os: windows-latest
61+
version: 25
62+
- distribution: kona
63+
os: ubuntu-latest
64+
version: 25
65+
- distribution: kona
66+
os: macos-latest
67+
version: 25
68+
- distribution: liberica-nik
69+
os: windows-latest
70+
version: 25
71+
- distribution: liberica-nik
72+
os: ubuntu-latest
73+
version: 25
74+
- distribution: liberica-nik
75+
os: macos-latest
76+
version: 25
5777
- distribution: oracle
5878
os: macos-15-intel
5979
version: 17
@@ -96,7 +116,7 @@ jobs:
96116
shell: bash
97117

98118
setup-java-alpine-linux:
99-
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }}
119+
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - alpine-linux - ${{ matrix.os }}
100120
runs-on: ${{ matrix.os }}
101121
container:
102122
image: alpine:3.21
@@ -127,7 +147,7 @@ jobs:
127147
shell: bash
128148

129149
setup-java-major-minor-versions:
130-
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
150+
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
131151
needs: setup-java-major-versions
132152
runs-on: ${{ matrix.os }}
133153
strategy:
@@ -275,7 +295,7 @@ jobs:
275295
shell: bash
276296

277297
setup-java-ea-versions-zulu:
278-
name: zulu ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
298+
name: zulu ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
279299
needs: setup-java-major-minor-versions
280300
runs-on: ${{ matrix.os }}
281301
strategy:
@@ -302,7 +322,7 @@ jobs:
302322
shell: bash
303323

304324
setup-java-ea-versions-temurin:
305-
name: temurin ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
325+
name: temurin ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
306326
needs: setup-java-major-minor-versions
307327
runs-on: ${{ matrix.os }}
308328
strategy:
@@ -328,8 +348,64 @@ jobs:
328348
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
329349
shell: bash
330350

351+
setup-java-temurin-signature-verification:
352+
name: temurin ${{ matrix.version }} signature verification - ${{ matrix.os }}
353+
needs: setup-java-major-minor-versions
354+
runs-on: ${{ matrix.os }}
355+
strategy:
356+
fail-fast: false
357+
matrix:
358+
os: [macos-latest, windows-latest, ubuntu-latest]
359+
version: ['21', '17']
360+
steps:
361+
- name: Checkout
362+
uses: actions/checkout@v7
363+
with:
364+
persist-credentials: false
365+
- name: setup-java with signature verification
366+
uses: ./
367+
id: setup-java
368+
with:
369+
java-version: ${{ matrix.version }}
370+
distribution: temurin
371+
verify-signature: true
372+
- name: Verify Java
373+
env:
374+
JAVA_VERSION: ${{ matrix.version }}
375+
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
376+
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
377+
shell: bash
378+
379+
setup-java-microsoft-signature-verification:
380+
name: microsoft ${{ matrix.version }} signature verification - ${{ matrix.os }}
381+
needs: setup-java-major-minor-versions
382+
runs-on: ${{ matrix.os }}
383+
strategy:
384+
fail-fast: false
385+
matrix:
386+
os: [macos-latest, windows-latest, ubuntu-latest]
387+
version: ['21', '17']
388+
steps:
389+
- name: Checkout
390+
uses: actions/checkout@v7
391+
with:
392+
persist-credentials: false
393+
- name: setup-java with signature verification
394+
uses: ./
395+
id: setup-java
396+
with:
397+
java-version: ${{ matrix.version }}
398+
distribution: microsoft
399+
verify-signature: true
400+
- name: Verify Java
401+
env:
402+
JAVA_VERSION: ${{ matrix.version }}
403+
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
404+
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
405+
shell: bash
406+
331407
setup-java-ea-versions-sapmachine:
332-
name: sapmachine ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
408+
name: sapmachine ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
333409
needs: setup-java-major-minor-versions
334410
runs-on: ${{ matrix.os }}
335411
strategy:
@@ -384,6 +460,10 @@ jobs:
384460
java-package: jre+fx
385461
version: '11'
386462
os: ubuntu-latest
463+
- distribution: 'liberica-nik'
464+
java-package: jdk+fx
465+
version: '21'
466+
os: ubuntu-latest
387467
- distribution: 'corretto'
388468
java-package: jre
389469
version: '8'
@@ -612,3 +692,84 @@ jobs:
612692
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
613693
run: bash __tests__/verify-java.sh "17.0.10" "$JAVA_PATH"
614694
shell: bash
695+
696+
setup-java-set-default:
697+
name: set-default option - ${{ matrix.os }}
698+
needs: setup-java-major-versions
699+
runs-on: ${{ matrix.os }}
700+
strategy:
701+
fail-fast: false
702+
matrix:
703+
os: [macos-latest, windows-latest, ubuntu-latest]
704+
steps:
705+
- name: Checkout
706+
uses: actions/checkout@v7
707+
with:
708+
persist-credentials: false
709+
- name: Setup Java 17 as default
710+
uses: ./
711+
id: setup-java-17
712+
with:
713+
distribution: 'temurin'
714+
java-version: '17'
715+
env:
716+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
717+
- name: Setup Java 21 without setting as default
718+
uses: ./
719+
id: setup-java-21
720+
with:
721+
distribution: 'temurin'
722+
java-version: '21'
723+
set-default: false
724+
env:
725+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
726+
- name: Verify JAVA_HOME still points to Java 17
727+
env:
728+
JAVA_17_PATH: ${{ steps.setup-java-17.outputs.path }}
729+
run: |
730+
echo "JAVA_HOME=$JAVA_HOME"
731+
echo "Java 17 path=$JAVA_17_PATH"
732+
if [ "$JAVA_HOME" != "$JAVA_17_PATH" ]; then
733+
echo "JAVA_HOME should still point to Java 17"
734+
exit 1
735+
fi
736+
shell: bash
737+
- name: Verify java -version reports Java 17
738+
run: |
739+
JAVA_VERSION=$(java -version 2>&1 | head -1)
740+
echo "java -version: $JAVA_VERSION"
741+
if ! echo "$JAVA_VERSION" | grep -q "17"; then
742+
echo "Default java should still be version 17"
743+
exit 1
744+
fi
745+
shell: bash
746+
- name: Verify JAVA_HOME_21 env var is set
747+
run: |
748+
$envName = "JAVA_HOME_21_${env:RUNNER_ARCH}"
749+
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
750+
if (-not $JavaVersionPath) {
751+
Write-Host "$envName is not set"
752+
exit 1
753+
}
754+
if (-not (Test-Path "$JavaVersionPath")) {
755+
Write-Host "$envName path does not exist: $JavaVersionPath"
756+
exit 1
757+
}
758+
Write-Host "$envName=$JavaVersionPath"
759+
shell: pwsh
760+
- name: Verify Java 21 outputs are set
761+
env:
762+
JAVA_21_PATH: ${{ steps.setup-java-21.outputs.path }}
763+
JAVA_21_VERSION: ${{ steps.setup-java-21.outputs.version }}
764+
run: |
765+
echo "Java 21 path=$JAVA_21_PATH"
766+
echo "Java 21 version=$JAVA_21_VERSION"
767+
if [ -z "$JAVA_21_PATH" ]; then
768+
echo "Java 21 path output should be set"
769+
exit 1
770+
fi
771+
if [ -z "$JAVA_21_VERSION" ]; then
772+
echo "Java 21 version output should be set"
773+
exit 1
774+
fi
775+
shell: bash

.github/workflows/zizmor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
security-events: write # to upload SARIF results to code scanning
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v6
26+
uses: actions/checkout@v7
2727
with:
2828
persist-credentials: false
2929

3030
- name: Set up Python
31-
uses: actions/setup-python@v5
31+
uses: actions/setup-python@v6
3232
with:
3333
python-version: '3.x'
3434

@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Upload SARIF results to code scanning
4444
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
45-
uses: github/codeql-action/upload-sarif@v3
45+
uses: github/codeql-action/upload-sarif@v4
4646
with:
4747
sarif_file: zizmor.sarif
4848
category: zizmor

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run build && npm test

.licensed.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ allowed:
1010
- mit
1111
- cc0-1.0
1212
- unlicense
13+
- blueoak-1.0.0
1314

1415
reviewed:
1516
npm:
1617
- "@actions/http-client" # MIT (license text present), but detected as "other"
17-
- "argparse" # Python Software Foundation License (PSF), but detected as "other"
18+
- "argparse" # Python Software Foundation License (PSF), but detected as "other"
19+
- "balanced-match"
20+
- "brace-expansion"

0 commit comments

Comments
 (0)