Compare commits

..

26 Commits

Author SHA1 Message Date
dependabot[bot]
e2cf7c663b Bump eslint-plugin-jest from 29.15.2 to 29.16.6 (#771)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 29.15.2 to 29.16.6.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v29.15.2...v29.16.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-version: 29.16.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 13:03:55 -05:00
dependabot[bot]
75763629d4 Bump eslint from 10.5.0 to 10.11.0 (#772)
Bumps [eslint](https://github.com/eslint/eslint) from 10.5.0 to 10.11.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.5.0...v10.11.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 13:03:19 -05:00
v-mahabaleshwars
074373ff88 Add check-latest input to reuse a locally installed .NET SDK and skip network calls (#774)
* check-latest-input feature implemented

* e2e test update

* e2e-tests.yml updated

* update documentation

* fix: align local SDK matching with the online resolver

* implement review comments

* implement review comments

* implement review comments

* implement review comments

* implement review comments

* implement review comments

* implement review comments

---------

Co-authored-by: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com>
2026-09-28 09:46:01 -05:00
v-mahabaleshwars
4d6fc87ace Clarify dotnet-quality behavior for multiple SDK versions (#780)
* docs: clarify dotnet-quality behavior

* implement copilot review

---------

Co-authored-by: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com>
2026-09-23 11:24:40 -05:00
dependabot[bot]
9b203d2b06 Bump browserslist from 4.28.2 to 4.28.8 (#781)
* Bump browserslist from 4.28.2 to 4.28.8

Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.28.2 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.28.2...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: add support for .NET 11.0 in verify-dotnet script and update package-lock.json for peer dependencies

* Revert "feat: add support for .NET 11.0 in verify-dotnet script and update package-lock.json for peer dependencies"

This reverts commit b7ba059f41.

* feat: add support for .NET 11.0 in verify-dotnet script and update js-yaml version in package-lock.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: priya-kinthali <priya-kinthali@github.com>
Co-authored-by: priyagupta108 <priyagupta108@github.com>
2026-09-15 16:27:47 -05:00
lmvysakh
bbbb8c9ab6 Docs: Updating Documentation in README (#776)
* Documentation updation

* doc update

* Documentation updated

---------

Co-authored-by: lmvysakh <lmvysakh@github.com>
2026-08-24 14:58:40 -05:00
dependabot[bot]
4713b0c4d9 Bump actions/checkout from 7.0.0 to 7.0.1 (#764)
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-20 11:35:24 -05:00
Philip Gai
9eae3fe338 ci: make validation caches read-only (#777) 2026-08-18 10:38:43 -05:00
Priya Gupta
c97148f473 docs: add reference link for dotnet-quality options (#773) 2026-08-09 21:41:34 -05:00
Haritha
e92112b014 Fix security vulnerabilities (#767)
* fix: resolve npm audit vulnerabilities, refresh license cache, rebuild dist

- npm audit fix resolves brace-expansion (high), fast-xml-parser (high),
  and undici (moderate) advisories via transitive dependency updates
- Regenerated .licenses/npm cache to match updated dependency tree
- Rebuilt dist/setup and dist/cache-save bundles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: sync vendored install-dotnet.ps1 with upstream dot.net script

Basic Validation was failing because the vendored copy of
externals/install-dotnet.ps1 was out of date compared to the live
script served from https://dot.net/v1/dotnet-install.ps1, which
installation-scripts.test.ts compares against on every run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-05 16:49:13 -05:00
Priya Gupta
5e931af6be Document sdk.version validation for rollForward in global.json (#763)
* docs: update README to include validation for sdk.version in global.json with rollForward

* docs: clarify sdk.version must be fully-qualified for rollForward in global.json
2026-07-22 09:48:54 -05:00
Philip Gai
a98b56852c chore(deps): bump @actions/cache to 6.2.0 (#756)
* chore(deps): bump @actions/cache to 5.2.0

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a4005a74-ab24-4f47-a559-e9caf4870437

* chore(deps): update licensed record for @actions/cache 5.2.0

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a4005a74-ab24-4f47-a559-e9caf4870437

* chore(deps): bump @actions/cache to 6.2.0

Bump @actions/cache from ^6.1.0 to ^6.2.0, refresh the lockfile,
rebuild the dist bundle, and update the license record.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0025a82b-5990-4c08-851c-4570aa7f7bbf

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-15 21:52:42 -05:00
dependabot[bot]
afb2931642 Bump actions/checkout from 6.0.3 to 7.0.0 (#751)
* Bump actions/checkout from 6.0.3 to 7.0.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](df4cb1c069...9c091bb21b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update actions/checkout to v7 and actions/setup-dotnet to v6 in README examples

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: priya-kinthali <priya-kinthali@github.com>
2026-07-15 21:45:27 -05:00
Priya Gupta
6df8cefd14 Migrate to ESM and upgrade dependencies (#752)
* Migrate to ESM and upgrade dependencies

* Address review: use type-only import for QualityOptions

* update version to 6.0.0 in package.json and package-lock.json

* Add ESM migration note to README for V6

* Update test imports for ESM and clean up devDependencies (ts-node, @types/jest)

* Pin @types/node to 24.x and refine tsconfig/README wording
2026-07-15 15:41:57 -05:00
Stephen Cleary
26b0ec14cb Expand the CSC problem matcher to light up more errors on GitHub. (#717)
Expand csc problem matcher with more real-world scenarios.

Co-authored-by: Stephen Cleary <900597+StephenCleary@users.noreply.github.com>
2026-06-25 14:00:19 -05:00
Kranthi Poturaju
da5e5482f2 docs(action): explicitly mark all optional inputs with required: false (#737)
Co-authored-by: Kranthi Poturaju <Kranthi.Poturaju1@aexp.com>
2026-06-23 12:45:52 -05:00
Michal Domanski
9bd3b44355 Improve readability of global.json creation command (#694)
Updated the command to create global.json for better readability and execution.
2026-06-23 12:35:56 -05:00
Jason Ginchereau
4406a635cd Bump @actions/cache to 5.1.0, log cache write denied (#746)
* Bump @actions/cache to 5.1.0, log cache write denied

* Add cache save failure test case

* Update dist

* Resolve high-severity audit issues
2026-06-22 13:33:08 -05:00
priya-kinthali
dc3262dda8 pin actions to commit SHAs in workflows (#744)
* fix basic validation with npm command

* Revert "fix basic validation with npm command"

This reverts commit 27a0803a2a.

* pin workflow actions to full commit SHAs with patch

* update cooldown

* update redundant global.json test and rollForward fields

* update cooldown for npm section
2026-06-22 11:59:12 -05:00
Priya Gupta
95a3f8b067 Validate global.json SDK version before rollForward optimization (#742) 2026-06-16 12:26:42 -05:00
Priya Gupta
9a946fdbd5 Add rollForward note in README, improve proxy health check in e2e tests and bump version to v5.3.0 (#738)
* docs: add note about latest* rollForward support in global.json

* update health check options for squid proxy in e2e tests
2026-05-27 21:45:27 -05:00
js6pak
98af08bf64 Support global.json's rollForward latest* variants (#538)
* Rename toolcache directory instead of moving to tmp

This further enhances time savings seen in #213, down from a few minutes to seconds.

* Remove branch constraint on workflows used for testing

This means you are going to be notified of CI issues quicker, especially if you have to wait for a confirmation before running the workflows on your PR.

* Support global.json's rollForward latest* variants

* Remove e2e-test's dependency on Microsoft.NET.Test.Sdk

The newer versions are net8.0/net462+ only, making older .NET sdks more annoying to test

* Revert "Remove e2e-test's dependency on Microsoft.NET.Test.Sdk"

This reverts commit 14839a662649cdea79ccecc3a7ce9a91386185b4.

* Don't run unsupported versions in global.json tests

* Revert "Remove branch constraint on workflows used for testing"

This reverts commit d9dae35030.
2026-05-26 17:43:27 -05:00
Michael Simons
8404272362 Update install scripts to v2026.05.19 (#736)
Update externals/install-dotnet.ps1 and externals/install-dotnet.sh to
the v2026.05.19 release of dotnet/install-scripts. This uptakes the
changes from dotnet/install-scripts#697 which preserves archive links
during installation (hardlinks on Windows, symlinks on Linux) as part
of dotnet/sdk#52182.

On Windows, .NET 11.0+ is now installed via tar.gz archives which
preserves hardlinks, significantly reducing disk space usage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 12:22:17 -05:00
Alexander Köplinger
f1970f5ca3 Don't download releases-index.json to resolve major version (#560)
* Don't download releases-index.json to resolving major version

Starting with .NET 5 the minor version is always zero.
The earlier releases don't get new versions anymore so we can hardcode the minor version instead of downloading releases-index.json to do the lookup.

* Remove unused variable

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Commit dist/setup/index.js

* Refresh after copilot commits

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-05-11 12:11:45 -05:00
mahabaleshwars
af9211b136 Add dotnet-version: latest support with dotnet-channel input (#730)
* feat: add dotnet-version: latest keyword with dotnet-channel support (#497)

* restore test-proxy container image

* update e2e-tests.yml and documentation

* fix(tests): correct release-type and support-phase values in latest-version test mocks
2026-04-27 13:24:18 -05:00
Copilot
df991aeaf2 chore: bump @actions/* and fast-xml-parser dependencies (#728)
* chore: update dependencies and license cache

Agent-Logs-Url: https://github.com/actions/setup-dotnet/sessions/e045029b-9f7d-4035-8714-f2c0a75f22f0

* fix: revert .licensed.yml change and set http-client license to mit

Agent-Logs-Url: https://github.com/actions/setup-dotnet/sessions/df77fea2-a442-4d42-9d49-a8617aa773a8

* Revert "fix: revert .licensed.yml change and set http-client license to mit"

This reverts commit 80db01fc60.

Co-authored-by: priyagupta108 <147705955+priyagupta108@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: priyagupta108 <147705955+priyagupta108@users.noreply.github.com>
2026-04-15 12:38:47 -05:00
101 changed files with 138605 additions and 142909 deletions

View File

@@ -1,6 +0,0 @@
# Ignore list
/*
# Do not ignore these folders:
!__tests__/
!src/

View File

@@ -1,51 +0,0 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin-jest/recommended',
'eslint-config-prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
'yoda': 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'node/no-extraneous-import': 'error'
},
overrides: [
{
files: ['**/*{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off',
}
}
],
env: {
node: true,
es6: true,
'jest/globals': true
}
};

11
.github/csc.json vendored
View File

@@ -4,13 +4,14 @@
"owner": "csc", "owner": "csc",
"pattern": [ "pattern": [
{ {
"regexp": "^([^\\s].*)\\((\\d+)(?:,\\d+|,\\d+,\\d+)?\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d+):\\s*(.*?)\\s+\\[(.*?)\\]$", "regexp": "^\\s*(?:\\d+>\\s*)?([^\\s].*)\\((\\d+)(?:,(\\d+))?(?:,\\d+)*\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d*):\\s*(.*?)\\s+\\[(.*?)\\]$",
"file": 1, "file": 1,
"line": 2, "line": 2,
"severity": 3, "column": 3,
"code": 4, "severity": 4,
"message": 5, "code": 5,
"fromPath": 6 "message": 6,
"fromPath": 7
} }
] ]
} }

View File

@@ -12,6 +12,8 @@ updates:
# Check the npm registry for updates every day (weekdays) # Check the npm registry for updates every day (weekdays)
schedule: schedule:
interval: 'weekly' interval: 'weekly'
cooldown:
default-days: 7
# Enable version updates for GitHub Actions # Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions' - package-ecosystem: 'github-actions'
@@ -20,3 +22,5 @@ updates:
directory: '/' directory: '/'
schedule: schedule:
interval: 'weekly' interval: 'weekly'
cooldown:
default-days: 7

View File

@@ -14,6 +14,7 @@ on:
jobs: jobs:
call-basic-validation: call-basic-validation:
name: Basic validation name: Basic validation
cache-mode: read
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with: with:
node-version: '24' node-version: '24'

View File

@@ -14,6 +14,7 @@ on:
jobs: jobs:
call-check-dist: call-check-dist:
name: Check dist/ name: Check dist/
cache-mode: read
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with: with:
node-version: '24' node-version: '24'

View File

@@ -27,7 +27,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -57,7 +57,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -92,7 +92,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -123,7 +123,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -149,7 +149,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -180,7 +180,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -208,7 +208,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -239,7 +239,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -247,7 +247,7 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '{"sdk":{"version": "9.0.308","rollForward": "latestFeature"}}' > ./subdirectory/global.json echo '{"sdk":{"version": "9.0.308"}}' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
@@ -257,22 +257,15 @@ jobs:
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0" run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0"
test-setup-global-json-only: test-setup-global-json-rollforward-latestmajor:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macos-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -280,14 +273,64 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '{"sdk":{"version": "10.0.101","rollForward": "latestFeature"}}' > ./subdirectory/global.json echo '{"sdk":{"version": "8.0.100","rollForward": "latestMajor"}}' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
global-json-file: ./subdirectory/global.json global-json-file: ./subdirectory/global.json
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0" run: __tests__/verify-dotnet.ps1 -Patterns "^(?!8)"
test-setup-global-json-rollforward-latestfeature:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "10.0.100","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.(?!1)"
test-setup-global-json-rollforward-latestpatch:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "10.0.100","rollForward": "latestPatch"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.1(?!00)"
test-global-json-with-comments: test-global-json-with-comments:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
@@ -304,7 +347,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -312,7 +355,7 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "10.0.101","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json echo '/* should support comments */ {"sdk":{"version": "10.0.101"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
@@ -336,7 +379,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -367,7 +410,7 @@ jobs:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -405,7 +448,7 @@ jobs:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -439,7 +482,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -472,7 +515,7 @@ jobs:
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -502,12 +545,17 @@ jobs:
image: ubuntu/squid:latest image: ubuntu/squid:latest
ports: ports:
- 3128:3128 - 3128:3128
options: >-
--health-cmd "bash -c '</dev/tcp/localhost/3128'"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env: env:
https_proxy: http://squid-proxy:3128 https_proxy: http://squid-proxy:3128
http_proxy: http://squid-proxy:3128 http_proxy: http://squid-proxy:3128
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -530,7 +578,7 @@ jobs:
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -562,7 +610,7 @@ jobs:
higher-version: ['10.0.101'] higher-version: ['10.0.101']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -591,7 +639,7 @@ jobs:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest] [ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -630,7 +678,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
@@ -649,3 +697,75 @@ jobs:
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.416$", "^9.0.308$", "^10.0.101$", "^8.0" run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.416$", "^9.0.308$", "^10.0.101$", "^8.0"
test-setup-latest-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet latest
uses: ./
with:
dotnet-version: latest
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^\d+\.\d+\.\d+"
test-setup-latest-with-channel-abcxx:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [macos-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet latest with A.B.Cxx channel
uses: ./
with:
dotnet-version: latest
dotnet-channel: '9.0.1xx'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9\.0\.1\d{2}"
test-check-latest-false:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Oldest 9.0.1xx SDK: resolving '9.0.1xx' online would return a newer patch.
- name: Setup dotnet 9.0.100
uses: ./
with:
dotnet-version: '9.0.100'
- name: Setup dotnet 9.0.1xx with check-latest false
id: reuse
uses: ./
with:
dotnet-version: '9.0.1xx'
check-latest: false
- name: Verify dotnet
shell: pwsh
run: |
if ('${{ steps.reuse.outputs.dotnet-version }}' -ne '9.0.100') {
throw "Expected 9.0.100 to be reused, got '${{ steps.reuse.outputs.dotnet-version }}'."
}
__tests__/verify-dotnet.ps1 -Patterns "^9\.0\.100$"

View File

@@ -14,7 +14,7 @@ jobs:
steps: steps:
- name: Checking out - name: Checking out
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Publish - name: Publish
id: publish id: publish
uses: actions/publish-immutable-action@v0.0.4 uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4

View File

@@ -23,7 +23,7 @@ jobs:
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag id: update-major-tag
uses: actions/publish-action@v0.4.0 uses: actions/publish-action@23f4c6f12633a2da8f44938b71fde9afec138fb4 # v0.4.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -28,7 +28,7 @@ jobs:
dotnet-version: ['8.0', '9.0', '10.0'] dotnet-version: ['8.0', '9.0', '10.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

View File

@@ -10,7 +10,11 @@ allowed:
- mit - mit
- cc0-1.0 - cc0-1.0
- unlicense - unlicense
- blueoak-1.0.0
reviewed: reviewed:
npm: npm:
- sax # ISC + MIT - sax # ISC + MIT
- "@actions/http-client" # MIT
- balanced-match # MIT
- brace-expansion # MIT

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/cache" name: "@actions/cache"
version: 5.0.5 version: 6.2.0
type: npm type: npm
summary: Actions cache lib summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache homepage: https://github.com/actions/toolkit/tree/main/packages/cache

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/core" name: "@actions/core"
version: 2.0.3 version: 3.0.1
type: npm type: npm
summary: Actions core lib summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core homepage: https://github.com/actions/toolkit/tree/main/packages/core

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/exec" name: "@actions/exec"
version: 2.0.0 version: 3.0.0
type: npm type: npm
summary: Actions exec lib summary: Actions exec lib
homepage: https://github.com/actions/toolkit/tree/main/packages/exec homepage: https://github.com/actions/toolkit/tree/main/packages/exec

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/github" name: "@actions/github"
version: 6.0.1 version: 9.1.1
type: npm type: npm
summary: Actions github lib summary: Actions github lib
homepage: https://github.com/actions/toolkit/tree/main/packages/github homepage: https://github.com/actions/toolkit/tree/main/packages/github

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/glob" name: "@actions/glob"
version: 0.5.1 version: 0.6.1
type: npm type: npm
summary: Actions glob lib summary: Actions glob lib
homepage: https://github.com/actions/toolkit/tree/main/packages/glob homepage: https://github.com/actions/toolkit/tree/main/packages/glob

View File

@@ -1,20 +1,20 @@
--- ---
name: "@octokit/openapi-types" name: "@actions/glob"
version: 24.2.0 version: 0.7.0
type: npm type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com summary: Actions glob lib
homepage: homepage: https://github.com/actions/toolkit/tree/main/packages/glob
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE.md
text: |- text: |-
Copyright 2020 Gregor Martynus The MIT License (MIT)
Copyright 2019 GitHub
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: 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 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. 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](LICENSE)"
notices: [] notices: []

View File

@@ -4,7 +4,7 @@ version: 3.0.2
type: npm type: npm
summary: Actions Http Client summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: mit license: other
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |

View File

@@ -1,10 +1,10 @@
--- ---
name: "@actions/http-client" name: "@actions/http-client"
version: 2.2.3 version: 4.0.1
type: npm type: npm
summary: Actions Http Client summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: mit license: other
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/io" name: "@actions/io"
version: 2.0.0 version: 3.0.2
type: npm type: npm
summary: Actions io lib summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/main/packages/io homepage: https://github.com/actions/toolkit/tree/main/packages/io

View File

@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-client" name: "@azure/core-client"
version: 1.10.1 version: 1.10.2
type: npm type: npm
summary: Core library for interfacing with AutoRest generated code summary: Core library for interfacing with AutoRest generated code
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/

View File

@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-http-compat" name: "@azure/core-http-compat"
version: 2.3.1 version: 2.4.0
type: npm type: npm
summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages. summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/

View File

@@ -1,9 +1,9 @@
--- ---
name: "@azure/core-rest-pipeline" name: "@azure/core-rest-pipeline"
version: 1.22.2 version: 1.24.0
type: npm type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser. summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-rest-pipeline/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-xml" name: "@azure/core-xml"
version: 1.5.0 version: 1.5.1
type: npm type: npm
summary: Core library for interacting with XML payloads summary: Core library for interacting with XML payloads
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/

View File

@@ -1,9 +1,9 @@
--- ---
name: "@azure/storage-blob" name: "@azure/storage-blob"
version: 12.29.1 version: 12.32.0
type: npm type: npm
summary: Microsoft Azure Storage SDK for JavaScript - Blob summary: Microsoft Azure Storage SDK for JavaScript - Blob
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -1,9 +1,9 @@
--- ---
name: "@azure/storage-common" name: "@azure/storage-common"
version: 12.1.1 version: 12.4.1
type: npm type: npm
summary: Azure Storage Common Client Library for JavaScript summary: Azure Storage Common Client Library for JavaScript
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-common/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

11
.licenses/npm/@nodable/entities.dep.yml generated Normal file
View File

@@ -0,0 +1,11 @@
---
name: "@nodable/entities"
version: 3.0.0
type: npm
summary: Entity parser for XML, HTML, External entites with security and NCR control
homepage:
license: mit
licenses:
- sources: README.md
text: MIT
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/auth-token" name: "@octokit/auth-token"
version: 4.0.0 version: 6.0.0
type: npm type: npm
summary: GitHub API token authentication for browsers and Node.js summary: GitHub API token authentication for browsers and Node.js
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/core" name: "@octokit/core"
version: 5.0.1 version: 7.0.6
type: npm type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs summary: Extendable client for GitHub's REST & GraphQL APIs
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/endpoint" name: "@octokit/endpoint"
version: 9.0.6 version: 11.0.3
type: npm type: npm
summary: Turns REST API endpoints into generic request options summary: Turns REST API endpoints into generic request options
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/graphql" name: "@octokit/graphql"
version: 7.0.2 version: 9.0.3
type: npm type: npm
summary: GitHub GraphQL API client for browsers and Node summary: GitHub GraphQL API client for browsers and Node
homepage: homepage:

View File

@@ -1,14 +1,14 @@
--- ---
name: "@octokit/openapi-types" name: "@octokit/openapi-types"
version: 20.0.0 version: 27.0.0
type: npm type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage: homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: |- text: |
Copyright 2020 Gregor Martynus Copyright (c) GitHub 2025 - Licensed as MIT.
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: 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:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/plugin-paginate-rest" name: "@octokit/plugin-paginate-rest"
version: 9.2.2 version: 14.0.0
type: npm type: npm
summary: Octokit plugin to paginate REST API endpoint responses summary: Octokit plugin to paginate REST API endpoint responses
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/plugin-rest-endpoint-methods" name: "@octokit/plugin-rest-endpoint-methods"
version: 10.4.1 version: 17.0.0
type: npm type: npm
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/request-error" name: "@octokit/request-error"
version: 5.1.1 version: 7.1.0
type: npm type: npm
summary: Error class for Octokit request errors summary: Error class for Octokit request errors
homepage: homepage:

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/request" name: "@octokit/request"
version: 8.4.1 version: 10.0.10
type: npm type: npm
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
and Node and Node

View File

@@ -1,20 +0,0 @@
---
name: "@octokit/types"
version: 13.10.0
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License Copyright (c) 2019 Octokit 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 (including the next paragraph) 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](LICENSE)"
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: "@octokit/types" name: "@octokit/types"
version: 12.6.0 version: 16.0.0
type: npm type: npm
summary: Shared TypeScript definitions for Octokit projects summary: Shared TypeScript definitions for Octokit projects
homepage: homepage:

View File

@@ -1,9 +1,9 @@
--- ---
name: "@typespec/ts-http-runtime" name: "@typespec/ts-http-runtime"
version: 0.3.2 version: 0.3.6
type: npm type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser. summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/ts-http-runtime/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

35
.licenses/npm/anynum.dep.yml generated Normal file
View File

@@ -0,0 +1,35 @@
---
name: anynum
version: 1.0.1
type: npm
summary: Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to
ASCII numerals. Zero dependencies, performance-first.
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
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
notices: []

View File

@@ -0,0 +1,34 @@
---
name: balanced-match
version: 4.0.4
type: npm
summary: Match balanced character pairs, like "{" and "}"
homepage:
license: other
licenses:
- sources: LICENSE.md
text: |
(MIT)
Original code Copyright Julian Gruber <julian@juliangruber.com>
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
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,6 +1,6 @@
--- ---
name: before-after-hook name: before-after-hook
version: 2.2.3 version: 4.0.0
type: npm type: npm
summary: asynchronous before/error/after hooks for internal functionality summary: asynchronous before/error/after hooks for internal functionality
homepage: homepage:

View File

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

View File

@@ -1,30 +1,34 @@
--- ---
name: "@fastify/busboy" name: brace-expansion
version: 2.1.1 version: 5.0.9
type: npm type: npm
summary: A streaming parser for HTML form data for node.js summary: Brace expansion as known from sh/bash
homepage: homepage:
license: mit license: other
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: |- text: |
Copyright Brian White. All rights reserved. MIT License
Copyright Julian Gruber <julian@juliangruber.com>
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to of this software and associated documentation files (the "Software"), to deal
deal in the Software without restriction, including without limitation the in the Software without restriction, including without limitation the rights
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
sell copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in all
all copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
IN THE SOFTWARE. SOFTWARE.
notices: [] notices: []

47
.licenses/npm/content-type.dep.yml generated Normal file
View File

@@ -0,0 +1,47 @@
---
name: content-type
version: 2.0.0
type: npm
summary: Create and parse HTTP Content-Type header
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
(The MIT License)
Copyright (c) 2015 Douglas Christopher Wilson
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](LICENSE)
[npm-image]: https://img.shields.io/npm/v/content-type
[npm-url]: https://npmjs.org/package/content-type
[downloads-image]: https://img.shields.io/npm/dm/content-type
[downloads-url]: https://npmjs.org/package/content-type
[build-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-type/ci.yml?branch=master
[build-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml?query=branch%3Amaster
[coverage-image]: https://img.shields.io/codecov/c/gh/jshttp/content-type
[coverage-url]: https://codecov.io/gh/jshttp/content-type
[license-image]: http://img.shields.io/npm/l/content-type.svg?style=flat
[license-url]: LICENSE
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: debug name: debug
version: 4.3.4 version: 4.4.3
type: npm type: npm
summary: Lightweight debugging utility for Node.js and the browser summary: Lightweight debugging utility for Node.js and the browser
homepage: homepage:

View File

@@ -1,28 +0,0 @@
---
name: deprecation
version: 2.3.1
type: npm
summary: Log a deprecation message with stack
homepage: https://github.com/gr2m/deprecation#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Gregor Martynus and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- sources: README.md
text: "[ISC](LICENSE)"
notices: []

View File

@@ -1,9 +1,9 @@
--- ---
name: fast-xml-builder name: fast-xml-builder
version: 1.1.4 version: 1.2.0
type: npm type: npm
summary: Build XML from JSON without C/C++ based libraries summary: Build XML from JSON without C/C++ based libraries
homepage: homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@@ -1,6 +1,6 @@
--- ---
name: fast-xml-parser name: fast-xml-parser
version: 5.5.11 version: 5.10.1
type: npm type: npm
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
homepage: homepage:

35
.licenses/npm/is-unsafe.dep.yml generated Normal file
View File

@@ -0,0 +1,35 @@
---
name: is-unsafe
version: 2.0.0
type: npm
summary: Zero-dependency, DOM-free, pure predicate for detecting unsafe strings across
HTML, XML, SVG, SQL, SHELL, and REGEX contexts
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
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
notices: []

View File

@@ -1,16 +1,17 @@
--- ---
name: "@azure/abort-controller" name: json-with-bigint
version: 1.1.0 version: 3.5.8
type: npm type: npm
summary: Microsoft Azure SDK for JavaScript - Aborter summary: JS library that allows you to easily serialize and deserialize data with
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md BigInt values
homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |
The MIT License (MIT) MIT License
Copyright (c) 2020 Microsoft Copyright (c) 2023 Ivan Korolenko
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,26 +0,0 @@
---
name: lru-cache
version: 6.0.0
type: npm
summary: A cache object that deletes the least-recently-used items.
homepage:
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

66
.licenses/npm/minimatch-10.2.5.dep.yml generated Normal file
View File

@@ -0,0 +1,66 @@
---
name: minimatch
version: 10.2.5
type: npm
summary: a glob matcher in javascript
homepage:
license: blueoak-1.0.0
licenses:
- sources: LICENSE.md
text: |
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
**_As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim._**
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: ms name: ms
version: 2.1.2 version: 2.1.3
type: npm type: npm
summary: Tiny millisecond conversion utility summary: Tiny millisecond conversion utility
homepage: homepage:
@@ -10,7 +10,7 @@ licenses:
text: | text: |
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 Zeit, Inc. Copyright (c) 2020 Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,26 +0,0 @@
---
name: once
version: 1.4.0
type: npm
summary: Run a function exactly one time
homepage: https://github.com/isaacs/once#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: path-expression-matcher name: path-expression-matcher
version: 1.4.0 version: 1.6.2
type: npm type: npm
summary: Efficient path tracking and pattern matching for XML/JSON parsers summary: Efficient path tracking and pattern matching for XML/JSON parsers
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme

View File

@@ -1,26 +0,0 @@
---
name: semver
version: 6.3.1
type: npm
summary: The semantic version parser used by npm.
homepage:
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

View File

@@ -1,6 +1,6 @@
--- ---
name: semver name: semver
version: 7.6.0 version: 7.8.5
type: npm type: npm
summary: The semantic version parser used by npm. summary: The semantic version parser used by npm.
homepage: homepage:

View File

@@ -1,9 +1,9 @@
--- ---
name: strnum name: strnum
version: 2.2.3 version: 2.4.1
type: npm type: npm
summary: Parse String to Number based on configuration summary: Parse String to Number based on configuration
homepage: homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

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

View File

@@ -1,8 +1,8 @@
--- ---
name: universal-user-agent name: universal-user-agent
version: 6.0.1 version: 7.0.3
type: npm type: npm
summary: Get a user agent string in both browser and node summary: Get a user agent string across all JavaScript Runtime Environments
homepage: homepage:
license: isc license: isc
licenses: licenses:
@@ -10,7 +10,7 @@ licenses:
text: | text: |
# [ISC License](https://spdx.org/licenses/ISC) # [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

View File

@@ -1,26 +0,0 @@
---
name: wrappy
version: 1.0.2
type: npm
summary: Callback wrapping utility
homepage: https://github.com/npm/wrappy
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

12
.licenses/npm/xml-naming-0.1.0.dep.yml generated Normal file
View File

@@ -0,0 +1,12 @@
---
name: xml-naming
version: 0.1.0
type: npm
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
for XML 1.0 and 1.1
homepage:
license: mit
licenses:
- sources: README.md
text: MIT
notices: []

View File

@@ -1,16 +1,17 @@
--- ---
name: undici name: xml-naming
version: 5.29.0 version: 0.3.0
type: npm type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
homepage: https://undici.nodejs.org for XML 1.0 and 1.1
homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |
MIT License MIT License
Copyright (c) Matteo Collina and Undici contributors Copyright (c) 2026 Natural Intelligence
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,26 +0,0 @@
---
name: yallist
version: 4.0.0
type: npm
summary: Yet Another Linked List
homepage:
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

View File

@@ -1,11 +0,0 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'none',
bracketSpacing: false,
arrowParens: 'avoid'
};

10
.prettierrc.json Normal file
View File

@@ -0,0 +1,10 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
}

153
README.md
View File

@@ -5,7 +5,7 @@
This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by: This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by:
- optionally downloading and caching a version(s) of dotnet by SDK version(s) and adding to PATH - optionally download and install the requested .NET SDK version(s) and add them to the PATH
- registering problem matchers for error output - registering problem matchers for error output
- setting up authentication to private package sources like GitHub Packages - setting up authentication to private package sources like GitHub Packages
@@ -15,12 +15,16 @@ documentation:
[Software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software) [Software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software)
for .NET SDK versions that are currently available. for .NET SDK versions that are currently available.
## What's new in V6
- Migrated action internals to ESM for compatibility with latest `@actions/*` packages. No changes to action inputs, outputs, or behavior.
## Breaking changes in V5 ## Breaking changes in V5
- Upgraded action from node20 to node24 - Upgraded action from node20 to node24
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. see [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1) > Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. see [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
For more details, see the full release notes on the [release page](https://github.com/actions/setup-dotnet/releases/tag/v5.0.0) For more details, see the full release notes on the [release page](https://github.com/actions/setup-dotnet/releases)
## Usage ## Usage
@@ -29,8 +33,8 @@ See [action.yml](action.yml)
**Basic**: **Basic**:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- run: dotnet build <my project> - run: dotnet build <my project>
@@ -40,9 +44,9 @@ steps:
**Multiple version installation**: **Multiple version installation**:
```yml ```yml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v6
with: with:
dotnet-version: | dotnet-version: |
8.0.x 8.0.x
@@ -57,7 +61,30 @@ The `dotnet-version` input supports following syntax:
- **A.B** or **A.B.x** (e.g. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, including prerelease versions (preview, rc) - **A.B** or **A.B.x** (e.g. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, including prerelease versions (preview, rc)
- **A** or **A.x** (e.g. 8, 8.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc) - **A** or **A.x** (e.g. 8, 8.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
- **A.B.Cxx** (e.g. 8.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc). - **A.B.Cxx** (e.g. 8.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
- **latest** - dynamically resolves to the highest active .NET SDK version. By default, it installs the latest **stable (GA)** version (excluding previews and end-of-life releases). Can be combined with `dotnet-channel` and `dotnet-quality`.
## Using with `dotnet-channel` input
The optional `dotnet-channel` input specifies the source channel for the installation. Supported values:
| Value | Description |
|-------|-------------|
| `STS` | The most recent Standard Term Support release |
| `LTS` | The most recent Long Term Support release |
| `A.B` (e.g. `8.0`) | A specific release channel |
| `A.B.Cxx` (e.g. `8.0.1xx`) | A specific SDK release (available since 5.0) |
> **Note**: The `dotnet-channel` input is only applied when `dotnet-version` is set to `latest`. If used with a specific version, a warning will be logged and the channel input will be ignored.
**Install latest LTS version:**
```yaml
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: latest
dotnet-channel: LTS
```
## Using the `architecture` input ## Using the `architecture` input
Using the architecture input, it is possible to specify the required .NET SDK architecture. Possible values: `x64`, `x86`, `arm64`, `amd64`, `arm`, `s390x`, `ppc64le`, `riscv64`. If the input is not specified, the architecture defaults to the host OS architecture (not all of the architectures are available on all platforms). Using the architecture input, it is possible to specify the required .NET SDK architecture. Possible values: `x64`, `x86`, `arm64`, `amd64`, `arm`, `s390x`, `ppc64le`, `riscv64`. If the input is not specified, the architecture defaults to the host OS architecture (not all of the architectures are available on all platforms).
@@ -65,9 +92,9 @@ Using the architecture input, it is possible to specify the required .NET SDK ar
**Example: Install multiple SDK versions for a specific architecture** **Example: Install multiple SDK versions for a specific architecture**
```yml ```yml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- name: Setup dotnet (x86) - name: Setup dotnet (x86)
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v6
with: with:
dotnet-version: | dotnet-version: |
8.0.x 8.0.x
@@ -77,20 +104,47 @@ steps:
``` ```
## Using the `dotnet-quality` input ## Using the `dotnet-quality` input
This input sets up the action to install the latest build of the specified quality in the channel. The possible values of `dotnet-quality` are: **daily**, **signed**, **validated**, **preview**, **ga**.
> **Note**: `dotnet-quality` input can be used only with .NET SDK version in 'A.B', 'A.B.x', 'A', 'A.x' and 'A.B.Cxx' formats where the major version is higher than 5. In other cases, `dotnet-quality` input will be ignored. The `dotnet-quality` input installs the latest build of the specified quality in the channel. Supported values: `daily`, `preview`, `ga`. For more details about quality options, see the [official .NET documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#options).
> **Important**: `dotnet-quality` is a single input shared across all versions listed in `dotnet-version` for the same step (and is only applied where supported by the version format), so per-version quality is not supported. For example, setting `dotnet-quality: preview` for `10.0.x` and `11.0.x` resolves both versions as previews. To install a released SDK alongside a preview SDK, use separate steps:
```yaml
steps:
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '11.0.x'
dotnet-quality: 'preview'
```
> **Note**: When used with a specific SDK version, `dotnet-quality` supports only `A.B`, `A.B.x`, `A`, `A.x`, and `A.B.Cxx` formats where the major version is higher than 5. For all other formats, `dotnet-quality` will be ignored.
```yml ```yml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
dotnet-quality: 'preview' dotnet-quality: 'preview'
- run: dotnet build <my project> - run: dotnet build <my project>
``` ```
`dotnet-quality` can also be combined with `dotnet-version: latest` and `dotnet-channel` to target specific builds such as the latest `daily` build from the `LTS` channel.
```yaml
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: latest
dotnet-channel: LTS
dotnet-quality: daily
```
## Using the `global-json-file` input ## Using the `global-json-file` input
`setup-dotnet` action can read .NET SDK version from a `global.json` file. Input `global-json-file` is used for specifying the path to the `global.json`. If the file that was supplied to `global-json-file` input doesn't exist, the action will fail with error. `setup-dotnet` action can read .NET SDK version from a `global.json` file. Input `global-json-file` is used for specifying the path to the `global.json`. If the file that was supplied to `global-json-file` input doesn't exist, the action will fail with error.
@@ -98,14 +152,18 @@ steps:
```yml ```yml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
global-json-file: csharp/global.json global-json-file: csharp/global.json
- run: dotnet build <my project> - run: dotnet build <my project>
working-directory: csharp working-directory: csharp
``` ```
> **Note**: The action supports `latest*` variants of the [rollForward](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward) field in `global.json`. When set to `latestPatch`, `latestFeature`, `latestMinor`, or `latestMajor`, the action installs the appropriate SDK version. For prerelease versions, the exact pinned version is always installed regardless of the `rollForward` setting.
> **Important**: When using `rollForward` in `global.json`, the `sdk.version` field must be a fully-qualified SDK version (e.g., `8.0.100`, `10.0.100`). Wildcard versions (e.g., `10.0.*`) and runtime-style versions (e.g., `8.0.0`) are not supported. See the [.NET SDK version specification](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#version) for details.
## Caching NuGet Packages ## Caching NuGet Packages
The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under the hood for caching global packages data but requires less configuration settings. The `cache` input is optional, and caching is turned off by default. The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under the hood for caching global packages data but requires less configuration settings. The `cache` input is optional, and caching is turned off by default.
@@ -115,8 +173,8 @@ The action searches for [NuGet Lock files](https://learn.microsoft.com/nuget/con
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: 8.x dotnet-version: 8.x
cache: true cache: true
@@ -140,8 +198,8 @@ steps:
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: 8.x dotnet-version: 8.x
cache: true cache: true
@@ -154,8 +212,8 @@ steps:
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: 8.x dotnet-version: 8.x
cache: true cache: true
@@ -174,9 +232,9 @@ jobs:
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ] dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample name: Dotnet ${{ matrix.dotnet }} sample
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v6
with: with:
dotnet-version: ${{ matrix.dotnet }} dotnet-version: ${{ matrix.dotnet }}
- name: Execute dotnet - name: Execute dotnet
@@ -194,14 +252,15 @@ jobs:
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ] dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample name: Dotnet ${{ matrix.dotnet }} sample
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v6
id: stepid id: stepid
with: with:
dotnet-version: ${{ matrix.dotnet }} dotnet-version: ${{ matrix.dotnet }}
- name: Create temporary global.json - name: Create temporary global.json
run: echo '{"sdk":{"version": "${{ steps.stepid.outputs.dotnet-version }}"}}' > ./global.json run: |
echo '{"sdk":{"version": "${{ steps.stepid.outputs.dotnet-version }}"}}' > ./global.json
- name: Execute dotnet - name: Execute dotnet
run: dotnet build <my project> run: dotnet build <my project>
``` ```
@@ -211,8 +270,8 @@ jobs:
### Github Package Registry (GPR) ### Github Package Registry (GPR)
```yml ```yml
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
source-url: https://nuget.pkg.github.com/<owner>/index.json source-url: https://nuget.pkg.github.com/<owner>/index.json
@@ -227,7 +286,7 @@ steps:
### Azure Artifacts ### Azure Artifacts
```yml ```yml
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
env: env:
@@ -238,7 +297,7 @@ steps:
### nuget.org ### nuget.org
```yml ```yml
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.x
- name: Publish the package to nuget.org - name: Publish the package to nuget.org
@@ -255,7 +314,7 @@ The `workloads` input allows you to install .NET workloads as part of the SDK se
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Setup .NET with workloads - name: Setup .NET with workloads
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v6
with: with:
dotnet-version: '9.0.x' dotnet-version: '9.0.x'
workloads: workload1, workload2 # Specify the workloads required for the project, such as wasm-tools, maui, etc. workloads: workload1, workload2 # Specify the workloads required for the project, such as wasm-tools, maui, etc.
@@ -264,6 +323,29 @@ steps:
> **Note**: Ensure workloads are compatible with your runner's OS, architecture, and .NET SDK version before enabling workload installation. Some workloads may require additional installation time due to large toolchain downloads. > **Note**: Ensure workloads are compatible with your runner's OS, architecture, and .NET SDK version before enabling workload installation. Some workloads may require additional installation time due to large toolchain downloads.
## Using the `check-latest` input
By default (`check-latest: true`) the action resolves and installs the latest version matching the request online, which is the historical behavior. With `check-latest: false` it first looks for an SDK already installed under [`DOTNET_INSTALL_DIR`](#environment-variables) and reuses it, skipping SDK resolution and download — useful for air-gapped or preloaded runners (the `cache` and `workloads` inputs still use the network). If none matches, it installs online as usual.
```yaml
steps:
- uses: actions/checkout@v7
- name: Reuse a preinstalled SDK when available
uses: actions/setup-dotnet@v6
with:
dotnet-version: '8.0.x'
check-latest: false
- run: dotnet build <my project>
```
An installed SDK is reused only when it matches the requested spec (`A.B.C`, `A.B`, `A.B.x`, `A.B.Cxx`, `A`, `A.x` or `latest`; `x`, `X` and `*` interchange except in a feature band, which is lowercase `Cxx`), satisfies `dotnet-quality`, is not older than the `sdk.version` declared in `global.json`, and sits next to a runnable `dotnet` executable. As online, `dotnet-quality` is ignored for a full `A.B.C` request, so such a request always resolves to a GA SDK. Cross-architecture requests, `latest` with an `LTS` or `STS` channel, and a bare wildcard always install online.
When the request comes from `global.json`, the SDK is picked the way the .NET resolver picks one: `latestPatch`, `latestFeature`, `latestMinor` and `latestMajor` take the **highest** SDK the policy allows, while `feature`, `minor` and `major` roll forward to the **nearest** higher feature band, minor or major and then take its latest patch. `patch` — the default when `rollForward` is omitted — prefers the declared version, otherwise the latest patch in its band. `disable` and a prerelease `sdk.version` require an exact match, and `allowPrerelease` is not used: `dotnet-quality` is the only prerelease control.
### Setting `check-latest` from the environment
When the input is not set, the action reads the `DOTNET_CHECK_LATEST` environment variable (`true` or `false`, case-insensitive; an unsupported value warns and is ignored), which covers workflows you cannot edit. Setting it on a self-hosted runner alongside SDKs preinstalled under [`DOTNET_INSTALL_DIR`](#environment-variables) lets those workflows run without reaching `aka.ms`, `builds.dotnet.microsoft.com` or `ci.dot.net`. It applies to every job on that runner, so a dedicated runner is recommended; any workflow can still override it with an explicit `check-latest` input.
# Outputs and environment variables # Outputs and environment variables
## Outputs ## Outputs
@@ -277,7 +359,7 @@ Using the **dotnet-version** output it's possible to get the installed by the ac
In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action. In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action.
```yaml ```yaml
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
id: stepid id: stepid
with: with:
dotnet-version: 8.0.416 dotnet-version: 8.0.416
@@ -289,7 +371,7 @@ In case of a single version installation, the `dotnet-version` output contains t
In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action. In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action.
```yaml ```yaml
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
id: stepid id: stepid
with: with:
dotnet-version: | dotnet-version: |
@@ -302,7 +384,7 @@ In case of a multiple version installation, the `dotnet-version` output contains
When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`. When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
```yaml ```yaml
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
id: stepid id: stepid
with: with:
dotnet-version: | dotnet-version: |
@@ -322,6 +404,7 @@ Some environment variables may be necessary for your particular case or to impro
| **Env.variable** | **Description** | **Default value** | | **Env.variable** | **Description** | **Default value** |
| ----------- | ----------- | ----------- | | ----------- | ----------- | ----------- |
| DOTNET_INSTALL_DIR |Specifies a directory where .NET SDKs should be installed by the action.|*default value for each OS* | | DOTNET_INSTALL_DIR |Specifies a directory where .NET SDKs should be installed by the action.|*default value for each OS* |
| DOTNET_CHECK_LATEST |Fallback for the [`check-latest`](#setting-check-latest-from-the-environment) input, for workflows that cannot set it. Ignored when the input is set.|*true*|
| DOTNET_NOLOGO |Removes logo and telemetry message from first run of dotnet cli|*false*| | DOTNET_NOLOGO |Removes logo and telemetry message from first run of dotnet cli|*false*|
| DOTNET_CLI_TELEMETRY_OPTOUT |Opt-out of telemetry being sent to Microsoft|*false*| | DOTNET_CLI_TELEMETRY_OPTOUT |Opt-out of telemetry being sent to Microsoft|*false*|
| DOTNET_MULTILEVEL_LOOKUP |Configures whether the global install location is used as a fall-back|*true*| | DOTNET_MULTILEVEL_LOOKUP |Configures whether the global install location is used as a fall-back|*true*|
@@ -342,8 +425,8 @@ build:
DOTNET_INSTALL_DIR: "path/to/directory" DOTNET_INSTALL_DIR: "path/to/directory"
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5 - uses: actions/setup-dotnet@v6
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
cache: true cache: true

View File

@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`authutil tests existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR 1`] = ` exports[`authutil tests existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version="1.0"?> "<?xml version="1.0"?>

View File

@@ -1,6 +1,10 @@
import {afterAll, beforeEach, describe, expect, it} from '@jest/globals';
import * as io from '@actions/io'; import * as io from '@actions/io';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
import {fileURLToPath} from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const fakeSourcesDirForTesting = path.join( const fakeSourcesDirForTesting = path.join(
__dirname, __dirname,
@@ -71,7 +75,7 @@ const azureartifactsnugetorgNuGetConfig = `<?xml version="1.0" encoding="utf-8"?
const nugetConfigFile = path.join(fakeSourcesDirForTesting, '../nuget.config'); const nugetConfigFile = path.join(fakeSourcesDirForTesting, '../nuget.config');
process.env['GITHUB_REPOSITORY'] = 'OwnerName/repo'; process.env['GITHUB_REPOSITORY'] = 'OwnerName/repo';
import * as auth from '../src/authutil'; import * as auth from '../src/authutil.js';
describe('authutil tests', () => { describe('authutil tests', () => {
beforeEach(async () => { beforeEach(async () => {

View File

@@ -1,16 +1,40 @@
import {readdir} from 'node:fs/promises'; import {
import * as cache from '@actions/cache'; afterEach,
import * as core from '@actions/core'; beforeAll,
import * as glob from '@actions/glob'; beforeEach,
import {restoreCache} from '../src/cache-restore'; describe,
import {getNuGetFolderPath} from '../src/cache-utils'; expect,
import {lockFilePatterns} from '../src/constants'; it,
jest
} from '@jest/globals';
jest.mock('node:fs/promises'); jest.unstable_mockModule('node:fs/promises', () => ({
jest.mock('@actions/cache'); readdir: jest.fn()
jest.mock('@actions/core'); }));
jest.mock('@actions/glob'); jest.unstable_mockModule('@actions/cache', () => ({
jest.mock('../src/cache-utils'); restoreCache: jest.fn()
}));
jest.unstable_mockModule('@actions/core', () => ({
saveState: jest.fn(),
setOutput: jest.fn(),
info: jest.fn(),
warning: jest.fn(),
debug: jest.fn()
}));
jest.unstable_mockModule('@actions/glob', () => ({
hashFiles: jest.fn()
}));
jest.unstable_mockModule('../src/cache-utils', () => ({
getNuGetFolderPath: jest.fn()
}));
const {readdir} = await import('node:fs/promises');
const cache = await import('@actions/cache');
const core = await import('@actions/core');
const glob = await import('@actions/glob');
const {restoreCache} = await import('../src/cache-restore.js');
const {getNuGetFolderPath} = await import('../src/cache-utils.js');
const {lockFilePatterns} = await import('../src/constants.js');
describe('cache-restore tests', () => { describe('cache-restore tests', () => {
describe.each(lockFilePatterns)('restoreCache("%s")', lockFilePattern => { describe.each(lockFilePatterns)('restoreCache("%s")', lockFilePattern => {
@@ -32,7 +56,9 @@ describe('cache-restore tests', () => {
jest.mocked(core.setOutput).mockClear(); jest.mocked(core.setOutput).mockClear();
jest.mocked(cache.restoreCache).mockClear(); jest.mocked(cache.restoreCache).mockClear();
}); });
afterEach(() => (process.env.GITHUB_WORKSPACE = githubWorkspace)); afterEach(() => {
process.env.GITHUB_WORKSPACE = githubWorkspace;
});
it('throws error when lock file is not found', async () => { it('throws error when lock file is not found', async () => {
jest.mocked(glob.hashFiles).mockResolvedValue(''); jest.mocked(glob.hashFiles).mockResolvedValue('');

View File

@@ -1,13 +1,32 @@
import * as cache from '@actions/cache'; import {beforeAll, beforeEach, describe, expect, it, jest} from '@jest/globals';
import * as core from '@actions/core';
import fs from 'node:fs';
import {run} from '../src/cache-save';
import {getNuGetFolderPath} from '../src/cache-utils';
jest.mock('@actions/cache'); jest.unstable_mockModule('@actions/cache', () => ({
jest.mock('@actions/core'); saveCache: jest.fn()
jest.mock('node:fs'); }));
jest.mock('../src/cache-utils'); jest.unstable_mockModule('@actions/core', () => ({
setFailed: jest.fn(),
getState: jest.fn(),
setOutput: jest.fn(),
getBooleanInput: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warning: jest.fn()
}));
jest.unstable_mockModule('node:fs', () => ({
default: {
existsSync: jest.fn()
}
}));
jest.unstable_mockModule('../src/cache-utils', () => ({
getNuGetFolderPath: jest.fn()
}));
const cache = await import('@actions/cache');
const core = await import('@actions/core');
const fs = (await import('node:fs')).default;
const {run} = await import('../src/cache-save.js');
const {getNuGetFolderPath} = await import('../src/cache-utils.js');
const {State} = await import('../src/constants.js');
describe('cache-save tests', () => { describe('cache-save tests', () => {
beforeAll(() => { beforeAll(() => {
@@ -84,4 +103,22 @@ describe('cache-save tests', () => {
expect(jest.mocked(core.getState)).toHaveBeenCalledTimes(2); expect(jest.mocked(core.getState)).toHaveBeenCalledTimes(2);
expect(jest.mocked(cache.saveCache)).toHaveBeenCalled(); expect(jest.mocked(cache.saveCache)).toHaveBeenCalled();
}); });
it('does not fail and traces when saveCache returns -1', async () => {
jest.mocked(core.getBooleanInput).mockReturnValue(true);
jest.mocked(core.getState).mockImplementation(s => s);
jest.mocked(fs.existsSync).mockReturnValue(true);
jest.mocked(cache.saveCache).mockResolvedValue(-1);
await run();
expect(jest.mocked(core.setFailed)).not.toHaveBeenCalled();
expect(jest.mocked(cache.saveCache)).toHaveBeenCalled();
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
`Cache was not saved for the key: ${State.CachePrimaryKey}`
);
expect(jest.mocked(core.info)).not.toHaveBeenCalledWith(
`Cache saved with the key: ${State.CachePrimaryKey}`
);
});
}); });

View File

@@ -1,11 +1,29 @@
import * as cache from '@actions/cache'; import {
import * as exec from '@actions/exec'; afterEach,
beforeAll,
beforeEach,
describe,
expect,
it,
jest
} from '@jest/globals';
import {getNuGetFolderPath, isCacheFeatureAvailable} from '../src/cache-utils'; jest.unstable_mockModule('@actions/cache', () => ({
isFeatureAvailable: jest.fn()
}));
jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
debug: jest.fn()
}));
jest.unstable_mockModule('@actions/exec', () => ({
getExecOutput: jest.fn()
}));
jest.mock('@actions/cache'); const cache = await import('@actions/cache');
jest.mock('@actions/core'); const exec = await import('@actions/exec');
jest.mock('@actions/exec'); const {getNuGetFolderPath, isCacheFeatureAvailable} =
await import('../src/cache-utils.js');
describe('cache-utils tests', () => { describe('cache-utils tests', () => {
describe('getNuGetFolderPath()', () => { describe('getNuGetFolderPath()', () => {
@@ -104,9 +122,15 @@ Options:
url => { url => {
// Save & Restore env // Save & Restore env
let serverUrlEnv: string | undefined; let serverUrlEnv: string | undefined;
beforeAll(() => (serverUrlEnv = process.env['GITHUB_SERVER_URL'])); beforeAll(() => {
beforeEach(() => (process.env['GITHUB_SERVER_URL'] = url)); serverUrlEnv = process.env['GITHUB_SERVER_URL'];
afterEach(() => (process.env['GITHUB_SERVER_URL'] = serverUrlEnv)); });
beforeEach(() => {
process.env['GITHUB_SERVER_URL'] = url;
});
afterEach(() => {
process.env['GITHUB_SERVER_URL'] = serverUrlEnv;
});
it('returns true when cache.isFeatureAvailable() === true', () => { it('returns true when cache.isFeatureAvailable() === true', () => {
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true); jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);

View File

@@ -6,8 +6,8 @@ $dotnetPaths = @{
foreach ($srcPath in $dotnetPaths[$args[0]]) { foreach ($srcPath in $dotnetPaths[$args[0]]) {
if (Test-Path $srcPath) { if (Test-Path $srcPath) {
Write-Host "Move $srcPath path" $dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName()) Write-Host "Moving $srcPath to $dstPath"
Move-Item -Path $srcPath -Destination $dstPath Move-Item -Path $srcPath -Destination $dstPath
} }
} }

View File

@@ -1,45 +1,97 @@
import cscFile from '../.github/csc.json'; import {describe, expect, test} from '@jest/globals';
import cscFile from '../.github/csc.json' with {type: 'json'};
describe('csc tests', () => { describe('csc tests', () => {
test('regular expression in csc.json is valid', async () => { const regexPattern = cscFile['problemMatcher'][0]['pattern'][0]['regexp'];
const regexPattern = cscFile['problemMatcher'][0]['pattern'][0]['regexp']; const regexResultsMap = cscFile['problemMatcher'][0]['pattern'][0];
const regexResultsMap = cscFile['problemMatcher'][0]['pattern'][0]; const regex = new RegExp(regexPattern);
const regex = new RegExp(regexPattern); const testCases: Array<{input: string; results: Record<string, string>}> = [
{
const stringsToMatch = [ input:
'Program.cs(10,79): error CS1002: ; expected [/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj]', 'Program.cs(10,79): error CS1002: ; expected [/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj]',
"S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop]" results: {
];
// Expected results are calculated according to the csc matcher located in csc.json file
const expectedResults = [
{
file: 'Program.cs', file: 'Program.cs',
line: '10', line: '10',
column: '79',
severity: 'error', severity: 'error',
code: 'CS1002', code: 'CS1002',
message: '; expected', message: '; expected',
fromPath: fromPath:
'/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj' '/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj'
}, }
{ },
{
input:
"S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop]",
results: {
file: 'S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs', file: 'S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs',
line: '33', line: '33',
column: '7',
severity: 'error', severity: 'error',
code: 'CS1003', code: 'CS1003',
message: "Syntax error, ',' expected", message: "Syntax error, ',' expected",
fromPath: fromPath:
'S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop' 'S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop'
} }
]; },
{
// `dotnet format` style error
input:
'C:\\actions-runner\\_work\\Some\\Folder\\SomeFile.cs(222,8): error WHITESPACE: Fix whitespace formatting. Delete 1 characters. [C:\\actions-runner\\_work\\Some\\Folder\\SomeProject.csproj]',
results: {
file: 'C:\\actions-runner\\_work\\Some\\Folder\\SomeFile.cs',
line: '222',
column: '8',
severity: 'error',
code: 'WHITESPACE',
message: 'Fix whitespace formatting. Delete 1 characters.',
fromPath: 'C:\\actions-runner\\_work\\Some\\Folder\\SomeProject.csproj'
}
},
{
// CSC error with whitespace prefix
input:
' /Volumes/Code/ghe_actions-2.301.1/Some/Folder/SomeFile.cs(10,8): error CS1014: A get or set accessor expected [/Volumes/Code/ghe_actions-2.301.1/Some/Folder/SomeProject.csproj]',
results: {
file: '/Volumes/Code/ghe_actions-2.301.1/Some/Folder/SomeFile.cs',
line: '10',
column: '8',
severity: 'error',
code: 'CS1014',
message: 'A get or set accessor expected',
fromPath:
'/Volumes/Code/ghe_actions-2.301.1/Some/Folder/SomeProject.csproj'
}
},
{
// CSC error with MSBuild prefix
input:
' 20>C:\\actions-runner\\_work\\Some\\Folder\\SomeFile.cs(8,2): error CS1014: A get or set accessor expected [C:\\actions-runner\\_work\\Some\\Folder\\SomeProject.csproj]',
results: {
file: 'C:\\actions-runner\\_work\\Some\\Folder\\SomeFile.cs',
line: '8',
column: '2',
severity: 'error',
code: 'CS1014',
message: 'A get or set accessor expected',
fromPath: 'C:\\actions-runner\\_work\\Some\\Folder\\SomeProject.csproj'
}
}
];
stringsToMatch.map((string, index) => { test.each(testCases)(
const matchedResultsArray = string.match(regex); 'regex matches and parses: $input',
for (const propName in expectedResults[index]) { ({input, results}: {input: string; results: Record<string, string>}) => {
const propertyIndex = regexResultsMap[propName]; const matchedResultsArray = input.match(regex);
const expectedPropValue = expectedResults[index][propName]; expect(matchedResultsArray).not.toBeNull();
for (const propName in results) {
const propertyIndex = (regexResultsMap as any)[propName];
const expectedPropValue = results[propName];
const matchedPropValue = matchedResultsArray![propertyIndex]; const matchedPropValue = matchedResultsArray![propertyIndex];
expect(matchedPropValue).toEqual(expectedPropValue); expect(matchedPropValue).toEqual(expectedPropValue);
} }
}); },
}, 10000); 10000
);
}); });

View File

@@ -1,7 +1,11 @@
import {describe, expect, it} from '@jest/globals';
import path from 'path'; import path from 'path';
import fs from 'fs'; import fs from 'fs';
import {fileURLToPath} from 'url';
import * as hc from '@actions/http-client'; import * as hc from '@actions/http-client';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const HTTP_CLIENT_OPTIONS = {allowRetries: true, maxRetries: 10} as const; const HTTP_CLIENT_OPTIONS = {allowRetries: true, maxRetries: 10} as const;
const TEST_TIMEOUT = 30000; const TEST_TIMEOUT = 30000;

View File

@@ -1,15 +1,68 @@
import {
afterAll,
afterEach,
beforeAll,
beforeEach,
describe,
expect,
it,
jest
} from '@jest/globals';
import each from 'jest-each'; import each from 'jest-each';
import semver from 'semver'; import semver from 'semver';
import fs from 'fs';
import fspromises from 'fs/promises'; import fspromises from 'fs/promises';
import os from 'os'; import os from 'os';
import * as exec from '@actions/exec'; import path from 'path';
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as installer from '../src/installer';
import {IS_WINDOWS} from '../src/utils'; jest.unstable_mockModule('@actions/exec', () => ({
import {QualityOptions} from '../src/setup-dotnet'; getExecOutput: jest.fn()
}));
jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
debug: jest.fn(),
setOutput: jest.fn(),
exportVariable: jest.fn((name: string, val: string) => {
process.env[name] = val;
}),
addPath: jest.fn((p: string) => {
process.env['PATH'] = `${p}${path.delimiter}${process.env['PATH']}`;
})
}));
jest.unstable_mockModule('@actions/io', () => ({
which: jest.fn()
}));
jest.unstable_mockModule('fs', () => {
const actual = jest.requireActual('fs') as typeof import('fs');
const chmodSync = jest.fn();
const readdirSync = jest.fn();
const existsSync = jest.fn(() => true);
const statSync = jest.fn(() => ({isFile: () => true}));
const accessSync = jest.fn();
return {
...actual,
chmodSync,
readdirSync,
existsSync,
statSync,
accessSync,
default: {
...actual,
chmodSync,
readdirSync,
existsSync,
statSync,
accessSync
}
};
});
const exec = await import('@actions/exec');
const core = await import('@actions/core');
const io = await import('@actions/io');
const fs = await import('fs');
const installer = await import('../src/installer.js');
const {IS_WINDOWS} = await import('../src/utils.js');
describe('installer tests', () => { describe('installer tests', () => {
const env = process.env; const env = process.env;
@@ -17,14 +70,24 @@ describe('installer tests', () => {
beforeEach(() => { beforeEach(() => {
jest.resetModules(); jest.resetModules();
process.env = {...env}; process.env = {...env};
(core.exportVariable as jest.Mock).mockImplementation(
(...args: unknown[]) => {
const [name, val] = args as [string, string];
process.env[name] = val;
}
);
(core.addPath as jest.Mock).mockImplementation((...args: unknown[]) => {
const [p] = args as [string];
process.env['PATH'] = `${p}${path.delimiter}${process.env['PATH']}`;
});
}); });
describe('DotnetCoreInstaller tests', () => { describe('DotnetCoreInstaller tests', () => {
const getExecOutputSpy = jest.spyOn(exec, 'getExecOutput'); const getExecOutputSpy = exec.getExecOutput as jest.Mock;
const warningSpy = jest.spyOn(core, 'warning'); const warningSpy = core.warning as jest.Mock;
const whichSpy = jest.spyOn(io, 'which'); const whichSpy = io.which as jest.Mock;
const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying'); const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying');
const chmodSyncSpy = jest.spyOn(fs, 'chmodSync'); const chmodSyncSpy = fs.chmodSync as jest.Mock;
const readdirSpy = jest.spyOn(fspromises, 'readdir'); const readdirSpy = jest.spyOn(fspromises, 'readdir');
describe('installDotnet() tests', () => { describe('installDotnet() tests', () => {
@@ -40,7 +103,7 @@ describe('installer tests', () => {
it('should throw the error in case of non-zero exit code of the installation script. The error message should contain logs.', async () => { it('should throw the error in case of non-zero exit code of the installation script. The error message should contain logs.', async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const errorMessage = 'fictitious error message!'; const errorMessage = 'fictitious error message!';
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -62,7 +125,7 @@ describe('installer tests', () => {
it('should return version of .NET SDK after installation complete', async () => { it('should return version of .NET SDK after installation complete', async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
@@ -84,7 +147,7 @@ describe('installer tests', () => {
it(`should supply 'version' argument to the installation script if supplied version is in A.B.C syntax`, async () => { it(`should supply 'version' argument to the installation script if supplied version is in A.B.C syntax`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -122,7 +185,7 @@ describe('installer tests', () => {
it(`should warn if the 'quality' input is set and the supplied version is in A.B.C syntax`, async () => { it(`should warn if the 'quality' input is set and the supplied version is in A.B.C syntax`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
@@ -147,7 +210,7 @@ describe('installer tests', () => {
it(`should warn if the 'quality' input is set and version isn't in A.B.C syntax but major tag is lower then 6`, async () => { it(`should warn if the 'quality' input is set and version isn't in A.B.C syntax but major tag is lower then 6`, async () => {
const inputVersion = '3.1'; const inputVersion = '3.1';
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -174,7 +237,7 @@ describe('installer tests', () => {
each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X']).test( each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X']).test(
`should supply 'quality' argument to the installation script if quality input is set and version (%s) is not in A.B.C syntax`, `should supply 'quality' argument to the installation script if quality input is set and version (%s) is not in A.B.C syntax`,
async inputVersion => { async inputVersion => {
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga';
const exitCode = 0; const exitCode = 0;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -214,7 +277,7 @@ describe('installer tests', () => {
each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X']).test( each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X']).test(
`should supply 'channel' argument to the installation script if version (%s) isn't in A.B.C syntax`, `should supply 'channel' argument to the installation script if version (%s) isn't in A.B.C syntax`,
async inputVersion => { async inputVersion => {
const inputQuality = '' as QualityOptions; const inputQuality = '';
const exitCode = 0; const exitCode = 0;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -255,7 +318,7 @@ describe('installer tests', () => {
it(`should supply '-ProxyAddress' argument to the installation script if env.variable 'https_proxy' is set`, async () => { it(`should supply '-ProxyAddress' argument to the installation script if env.variable 'https_proxy' is set`, async () => {
process.env['https_proxy'] = 'https://proxy.com'; process.env['https_proxy'] = 'https://proxy.com';
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -293,7 +356,7 @@ describe('installer tests', () => {
it(`should supply '-ProxyBypassList' argument to the installation script if env.variable 'no_proxy' is set`, async () => { it(`should supply '-ProxyBypassList' argument to the installation script if env.variable 'no_proxy' is set`, async () => {
process.env['no_proxy'] = 'first.url,second.url'; process.env['no_proxy'] = 'first.url,second.url';
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -331,7 +394,7 @@ describe('installer tests', () => {
it(`should supply 'architecture' argument to the installation script when architecture is provided`, async () => { it(`should supply 'architecture' argument to the installation script when architecture is provided`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const inputArchitecture = 'x64'; const inputArchitecture = 'x64';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
@@ -365,7 +428,7 @@ describe('installer tests', () => {
it(`should NOT supply 'architecture' argument when architecture is not provided`, async () => { it(`should NOT supply 'architecture' argument when architecture is not provided`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -395,7 +458,7 @@ describe('installer tests', () => {
it(`should supply 'install-dir' with arch subdirectory for cross-arch install`, async () => { it(`should supply 'install-dir' with arch subdirectory for cross-arch install`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const inputArchitecture = 'x64'; const inputArchitecture = 'x64';
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
@@ -436,7 +499,7 @@ describe('installer tests', () => {
it(`should NOT supply 'install-dir' when architecture matches runner's native arch`, async () => { it(`should NOT supply 'install-dir' when architecture matches runner's native arch`, async () => {
const inputVersion = '10.0.101'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '';
const nativeArch = os.arch().toLowerCase(); const nativeArch = os.arch().toLowerCase();
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
@@ -467,6 +530,696 @@ describe('installer tests', () => {
}); });
}); });
describe('check-latest: false (local SDK reuse) tests', () => {
const readdirSyncSpy = fs.readdirSync as unknown as jest.Mock;
const statSyncSpy = fs.statSync as unknown as jest.Mock;
const accessSyncSpy = fs.accessSync as unknown as jest.Mock;
const asFile = {isFile: () => true};
const muxerName = IS_WINDOWS ? 'dotnet.exe' : 'dotnet';
const isMuxer = (target: unknown) => String(target).endsWith(muxerName);
const throwEnoent = () => {
throw new Error('ENOENT');
};
const makeDirents = (names: string[]): any =>
names.map(name => ({
name,
isDirectory: () => true,
isSymbolicLink: () => false
}));
const makeSymlinks = (names: string[]): any =>
names.map(name => ({
name,
isDirectory: () => false,
isSymbolicLink: () => true
}));
beforeEach(() => {
getExecOutputSpy.mockClear();
getExecOutputSpy.mockImplementation(() =>
Promise.resolve({
exitCode: 0,
stdout: 'Fictitious dotnet version 1.2.3 is installed',
stderr: ''
})
);
statSyncSpy.mockReturnValue(asFile);
accessSyncSpy.mockImplementation(() => undefined);
});
afterEach(() => {
readdirSyncSpy.mockReset();
statSyncSpy.mockReset();
accessSyncSpy.mockReset();
});
interface LocalReuseCase {
name: string;
version: string;
quality?: string;
dotnetChannel?: string;
minimumVersion?: string;
installed: string[];
expected: string | null;
}
const localReuseCases: LocalReuseCase[] = [
{
name: 'reuses a locally installed pinned SDK and skips all install scripts',
version: '8.0.422',
installed: ['8.0.100', '8.0.422'],
expected: '8.0.422'
},
{
name: 'falls back to online install when no local SDK matches the pinned request',
version: '8.0.422',
installed: ['8.0.100'],
expected: null
},
{
name: 'reuses the highest matching patch for a floating A.B.x request',
version: '8.0.x',
installed: ['8.0.100', '8.0.412', '8.0.205'],
expected: '8.0.412'
},
{
name: 'matches the correct feature band for an A.B.Cxx request',
version: '8.0.1xx',
installed: ['8.0.100', '8.0.105', '8.0.203'],
expected: '8.0.105'
},
{
name: 'picks the highest installed SDK for a channel-less latest request',
version: 'latest',
installed: ['8.0.412', '9.0.101'],
expected: '9.0.101'
},
{
name: 'ignores prerelease SDKs when quality is not preview/daily',
version: '8.0.x',
installed: ['8.0.100-preview.1', '8.0.100'],
expected: '8.0.100'
},
{
name: 'reuses the highest installed SDK for a major-only request',
version: '8',
installed: ['8.0.100', '8.0.412', '8.0.205'],
expected: '8.0.412'
},
{
name: 'reuses a prerelease SDK when quality is preview',
version: '8.0.x',
quality: 'preview',
installed: ['8.0.100-preview.1', '8.0.100-preview.2'],
expected: '8.0.100-preview.2'
},
{
name: 'falls back to online install when no local SDK matches a floating request',
version: '9.0.x',
installed: ['8.0.412'],
expected: null
},
{
name: 'installs online for a latest request with an LTS channel',
version: 'latest',
dotnetChannel: 'LTS',
installed: ['8.0.412', '9.0.101'],
expected: null
},
{
name: 'reuses the SDK of the requested channel for a latest request',
version: 'latest',
dotnetChannel: '8.0',
installed: ['8.0.412', '9.0.101'],
expected: '8.0.412'
},
{
name: 'installs online for a wildcard request instead of guessing',
version: 'x',
installed: ['8.0.412', '9.0.101'],
expected: null
},
{
name: 'does not reuse a local SDK below the global.json minimum version',
version: '8.0',
minimumVersion: '8.0.400',
installed: ['8.0.100', '8.0.205'],
expected: null
},
{
name: 'reuses a local SDK at or above the global.json minimum version',
version: '8.0',
minimumVersion: '8.0.400',
installed: ['8.0.100', '8.0.412'],
expected: '8.0.412'
},
{
name: 'installs online when quality is preview but only GA SDKs are local',
version: '8.0.x',
quality: 'preview',
installed: ['8.0.412'],
expected: null
},
{
name: 'ignores the quality input for majors below 6 when matching locally',
version: '3.1',
quality: 'preview',
installed: ['3.1.426', '3.1.500-preview.1'],
expected: '3.1.426'
}
];
each(localReuseCases).it(
'$name',
async ({
version,
quality = '',
dotnetChannel,
minimumVersion,
installed,
expected
}: LocalReuseCase) => {
readdirSyncSpy.mockReturnValue(makeDirents(installed));
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const installedVersion = await new installer.DotnetCoreInstaller(
version,
quality as any,
undefined,
dotnetChannel,
false,
minimumVersion
).installDotnet();
if (expected === null) {
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
} else {
expect(installedVersion).toBe(expected);
expect(getExecOutputSpy).not.toHaveBeenCalled();
}
}
);
it('rejects an A.B.Cxx request below .NET 5 instead of reusing a local SDK', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['3.1.100']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
'3.1.1xx',
'',
undefined,
undefined,
false
);
await expect(dotnetInstaller.installDotnet()).rejects.toThrow(
`The 'dotnet-version' was supplied in invalid format: 3.1.1xx! The A.B.Cxx syntax is available since the .NET 5.0 release.`
);
expect(getExecOutputSpy).not.toHaveBeenCalled();
});
each(['preview', 'daily'] as const).it(
"reuses the highest local prerelease SDK for a channel-less latest request with '%s' quality",
async quality => {
readdirSyncSpy.mockReturnValue(
makeDirents(['8.0.412', '9.0.100-preview.1', '9.0.100-preview.2'])
);
const dotnetInstaller = new installer.DotnetCoreInstaller(
'latest',
quality,
undefined,
undefined,
false
);
const installedVersion = await dotnetInstaller.installDotnet();
expect(installedVersion).toBe('9.0.100-preview.2');
expect(getExecOutputSpy).not.toHaveBeenCalled();
}
);
it('does NOT reuse a local SDK for a cross-architecture request', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const archSpy = jest.spyOn(os, 'arch').mockReturnValue('arm64');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
'x64',
undefined,
false
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
archSpy.mockRestore();
});
it('installs online when check-latest defaults to true even if SDK is local', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.422']));
maxSatisfyingSpy.mockImplementation(() => '8.0.422');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.422',
''
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
});
it('installs online when the dotnet muxer is missing', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
statSyncSpy.mockImplementation((target: string) => {
if (isMuxer(target)) {
throwEnoent();
}
return asFile;
});
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
undefined,
undefined,
false
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
});
const itOnPosix = IS_WINDOWS ? it.skip : it;
itOnPosix(
'installs online when the dotnet muxer is not executable',
async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
accessSyncSpy.mockImplementation((target: string) => {
if (isMuxer(target)) {
throw new Error('EACCES');
}
});
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
undefined,
undefined,
false
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
}
);
it('installs online when the dotnet muxer path is a directory', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
statSyncSpy.mockImplementation((target: string) =>
isMuxer(target) ? {isFile: () => false} : asFile
);
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
undefined,
undefined,
false
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
});
it('reuses an SDK exposed as a symbolic link', async () => {
readdirSyncSpy.mockReturnValue(makeSymlinks(['8.0.412']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
undefined,
undefined,
false
);
const installedVersion = await dotnetInstaller.installDotnet();
expect(installedVersion).toBe('8.0.412');
expect(getExecOutputSpy).not.toHaveBeenCalled();
});
it('matches the online channel mapping for legacy major-only requests', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['3.0.103', '3.1.426']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
'3',
'',
undefined,
undefined,
false
);
const installedVersion = await dotnetInstaller.installDotnet();
expect(installedVersion).toBe('3.1.426');
expect(getExecOutputSpy).not.toHaveBeenCalled();
});
each(['8.0.X', '8.0.x', '8.0.*', '8.0']).it(
'reuses a local SDK for the floating request %s',
async (version: string) => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.100', '8.0.412']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
version,
'',
undefined,
undefined,
false
);
const installedVersion = await dotnetInstaller.installDotnet();
expect(installedVersion).toBe('8.0.412');
expect(getExecOutputSpy).not.toHaveBeenCalled();
}
);
each(['8.X', '8.x', '8.*', '8']).it(
'reuses a local SDK for the major-only request %s',
async (version: string) => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.100', '8.0.412']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
version,
'',
undefined,
undefined,
false
);
const installedVersion = await dotnetInstaller.installDotnet();
expect(installedVersion).toBe('8.0.412');
expect(getExecOutputSpy).not.toHaveBeenCalled();
}
);
it('does not reuse a local SDK for an uppercase feature band request', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.105']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.1XX',
'',
undefined,
undefined,
false
);
await expect(dotnetInstaller.installDotnet()).rejects.toThrow(
`The 'dotnet-version' was supplied in invalid format: 8.0.1XX!`
);
});
each(['08.0.x', '8.00.x', '08']).it(
'does not reuse a local SDK for the invalid request %s',
async (version: string) => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
const dotnetInstaller = new installer.DotnetCoreInstaller(
version,
'',
undefined,
undefined,
false
);
await expect(dotnetInstaller.installDotnet()).rejects.toThrow(
`The 'dotnet-version' was supplied in invalid format: ${version}!`
);
}
);
it('ignores an sdk folder that does not contain an SDK', async () => {
readdirSyncSpy.mockReturnValue(makeDirents(['8.0.412']));
statSyncSpy.mockImplementation((target: string) => {
if (String(target).includes('dotnet.dll')) {
throwEnoent();
}
return asFile;
});
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const dotnetInstaller = new installer.DotnetCoreInstaller(
'8.0.x',
'',
undefined,
undefined,
false
);
await dotnetInstaller.installDotnet();
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
});
describe('global.json rollForward tests', () => {
interface RollForwardCase {
name: string;
version?: string;
quality?: string;
minimumVersion?: string;
rollForward?: string;
installed: string[];
expected: string | null;
}
const rollForwardCases: RollForwardCase[] = [
{
name: 'latestMajor reuses the highest local SDK across majors',
minimumVersion: '8.0.100',
rollForward: 'latestMajor',
installed: ['8.0.412', '9.0.101'],
expected: '9.0.101'
},
{
name: 'latestMajor ignores local SDKs below the declared version',
minimumVersion: '8.0.412',
rollForward: 'latestMajor',
installed: ['8.0.100', '7.0.400'],
expected: null
},
{
name: 'latestMajor keeps requiring GA builds when quality is preview',
quality: 'preview',
minimumVersion: '8.0.100',
rollForward: 'latestMajor',
installed: ['9.0.200-preview.1'],
expected: null
},
{
name: 'latestMinor reuses a higher local minor of the same major',
version: '8',
minimumVersion: '8.1.100',
rollForward: 'latestMinor',
installed: ['8.1.200', '8.2.300'],
expected: '8.2.300'
},
{
name: 'latestMinor does not cross into another major',
version: '8',
minimumVersion: '8.1.100',
rollForward: 'latestMinor',
installed: ['9.0.101'],
expected: null
},
{
name: 'latestMinor ignores local SDKs below the declared version',
version: '8',
minimumVersion: '8.1.100',
rollForward: 'latestMinor',
installed: ['8.0.412'],
expected: null
},
{
name: 'latestFeature takes the highest band of the declared major.minor',
version: '8.0',
minimumVersion: '8.0.100',
rollForward: 'latestFeature',
installed: ['8.0.105', '8.0.400'],
expected: '8.0.400'
},
{
name: 'latestPatch stays inside the declared feature band',
version: '8.0.2xx',
minimumVersion: '8.0.200',
rollForward: 'latestPatch',
installed: ['8.0.205', '8.0.412'],
expected: '8.0.205'
},
{
name: 'latestPatch takes the highest patch even when the declared version is installed',
version: '8.0.1xx',
minimumVersion: '8.0.100',
rollForward: 'latestPatch',
installed: ['8.0.100', '8.0.105'],
expected: '8.0.105'
},
{
name: 'patch prefers the exact declared version',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'patch',
installed: ['8.0.100', '8.0.105'],
expected: '8.0.100'
},
{
name: 'patch stays inside the declared feature band',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'patch',
installed: ['8.0.105', '8.0.200'],
expected: '8.0.105'
},
{
name: 'feature prefers the declared band over a higher band',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'feature',
installed: ['8.0.105', '8.0.400'],
expected: '8.0.105'
},
{
name: 'feature rolls to the next higher band, not the highest',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'feature',
installed: ['8.0.200', '8.0.300', '8.0.400'],
expected: '8.0.200'
},
{
name: 'feature takes the latest patch of the selected band',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'feature',
installed: ['8.0.201', '8.0.205', '8.0.400'],
expected: '8.0.205'
},
{
name: 'feature does not cross into another minor',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'feature',
installed: ['8.1.100'],
expected: null
},
{
name: 'minor prefers a higher band of the declared minor over a higher minor',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'minor',
installed: ['8.0.400', '8.1.100'],
expected: '8.0.400'
},
{
name: 'minor rolls to the next higher minor, not the highest',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'minor',
installed: ['8.1.100', '8.2.100'],
expected: '8.1.100'
},
{
name: 'major prefers the declared major over a higher major',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'major',
installed: ['8.0.400', '9.0.100'],
expected: '8.0.400'
},
{
name: 'major rolls to the next higher major, not the highest',
version: '8.0.100',
minimumVersion: '8.0.100',
rollForward: 'major',
installed: ['9.0.100', '10.0.100'],
expected: '9.0.100'
},
{
name: 'non-latest policies ignore dotnet-quality, as the online path does',
version: '8.0.100',
quality: 'preview',
minimumVersion: '8.0.100',
rollForward: 'patch',
installed: ['8.0.105'],
expected: '8.0.105'
},
{
name: 'non-latest policies never prefer a prerelease over a GA build',
version: '8.0.100',
quality: 'preview',
minimumVersion: '8.0.100',
rollForward: 'major',
installed: ['8.0.100', '9.0.100-rc.2'],
expected: '8.0.100'
},
{
name: 'roll-forward policies never select below the declared version',
version: '8.0.200',
minimumVersion: '8.0.200',
rollForward: 'major',
installed: ['8.0.100'],
expected: null
},
{
name: 'disable requires the exact declared version',
version: '8.0.100',
installed: ['8.0.200'],
expected: null
},
{
name: 'installs online for an empty version without a rollForward floor',
installed: ['8.0.412'],
expected: null
}
];
each(rollForwardCases).it(
'$name',
async ({
version = '',
quality = '',
minimumVersion,
rollForward,
installed,
expected
}: RollForwardCase) => {
readdirSyncSpy.mockReturnValue(makeDirents(installed));
maxSatisfyingSpy.mockImplementation(() => '8.0.412');
const installedVersion = await new installer.DotnetCoreInstaller(
version,
quality as any,
undefined,
undefined,
false,
minimumVersion,
rollForward
).installDotnet();
if (expected === null) {
expect(getExecOutputSpy).toHaveBeenCalledTimes(2);
} else {
expect(installedVersion).toBe(expected);
expect(getExecOutputSpy).not.toHaveBeenCalled();
}
}
);
});
});
describe('addToPath() tests', () => { describe('addToPath() tests', () => {
it(`should export DOTNET_ROOT env.var with value from DOTNET_INSTALL_DIR env.var`, async () => { it(`should export DOTNET_ROOT env.var with value from DOTNET_INSTALL_DIR env.var`, async () => {
process.env['DOTNET_INSTALL_DIR'] = 'fictitious/dotnet/install/dir'; process.env['DOTNET_INSTALL_DIR'] = 'fictitious/dotnet/install/dir';

View File

@@ -0,0 +1,232 @@
import {afterEach, beforeEach, describe, expect, it, jest} from '@jest/globals';
jest.unstable_mockModule('@actions/http-client', () => ({
HttpClient: jest.fn()
}));
jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
debug: jest.fn()
}));
const hc = await import('@actions/http-client');
const core = await import('@actions/core');
const {DotnetVersionResolver} = await import('../src/installer.js');
describe('DotnetVersionResolver with latest', () => {
let getJsonMock: jest.Mock<(...args: any[]) => Promise<any>>;
let warningSpy: jest.Mock;
beforeEach(() => {
getJsonMock = jest.fn<(...args: any[]) => Promise<any>>();
(hc.HttpClient as jest.Mock).mockImplementation(() => {
return {
getJson: getJsonMock
};
});
warningSpy = core.warning as jest.Mock;
warningSpy.mockImplementation(() => {});
});
afterEach(() => {
jest.clearAllMocks();
jest.restoreAllMocks();
});
const mockReleases = {
'releases-index': [
{
'channel-version': '10.0',
'support-phase': 'preview',
'release-type': 'lts'
},
{
'channel-version': '9.0',
'support-phase': 'active',
'release-type': 'sts'
},
{
'channel-version': '8.0',
'support-phase': 'active',
'release-type': 'lts'
},
{
'channel-version': '7.0',
'support-phase': 'eol',
'release-type': 'sts'
}
]
};
it('should resolve "latest" to highest stable version by default', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('9.0');
expect(version.type.toLowerCase()).toContain('channel');
expect(version.qualityFlag).toBe(true);
});
it('should resolve "LATEST" (uppercase) to highest stable version', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('LATEST');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('9.0');
expect(version.type.toLowerCase()).toContain('channel');
expect(version.qualityFlag).toBe(true);
});
it('should resolve "latest" to highest preview version if quality is preview', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', 'preview');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('10.0');
});
it('should resolve "latest" with channel filter LTS', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', '', 'LTS');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('8.0');
});
it('should resolve "latest" with channel filter STS', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', '', 'STS');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('9.0');
});
it('should resolve "latest" with channel filter STS and preview quality', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', 'preview', 'STS');
const version = await resolver.createDotnetVersion();
// preview quality includes all support-phases; STS filter → 9.0 (active, sts)
expect(version.value).toBe('9.0');
});
it('should warn if channel is provided but version is not latest', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('8.0', '', 'LTS');
await resolver.createDotnetVersion();
expect(warningSpy).toHaveBeenCalledWith(
`The 'dotnet-channel' input is only supported when 'dotnet-version' is set to 'latest'.`
);
});
it('should throw when releases-index API returns empty active releases', async () => {
const emptyReleases = {
'releases-index': [
{
'channel-version': '7.0',
'support-phase': 'eol',
'release-type': 'sts'
}
]
};
getJsonMock.mockResolvedValue({result: emptyReleases});
const resolver = new DotnetVersionResolver('latest');
await expect(resolver.createDotnetVersion()).rejects.toThrow(
/Could not find any active releases/
);
});
it('should throw when releases-index response has unexpected format', async () => {
getJsonMock.mockResolvedValue({result: {}});
const resolver = new DotnetVersionResolver('latest');
await expect(resolver.createDotnetVersion()).rejects.toThrow(
/Unexpected response format/
);
});
it('should throw when releases-index response is null', async () => {
getJsonMock.mockResolvedValue({result: null});
const resolver = new DotnetVersionResolver('latest');
await expect(resolver.createDotnetVersion()).rejects.toThrow(
/Unexpected response format/
);
});
it('should resolve "latest" with ga quality same as default (no previews)', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', 'ga');
const version = await resolver.createDotnetVersion();
// ga should behave like no quality — skip preview (10.0), pick 9.0
expect(version.value).toBe('9.0');
});
it('should resolve "latest" with LTS channel and daily quality', async () => {
getJsonMock.mockResolvedValue({result: mockReleases});
const resolver = new DotnetVersionResolver('latest', 'daily', 'LTS');
const version = await resolver.createDotnetVersion();
// daily allows previews, LTS filter applies — 10.0 (preview, lts) is the highest LTS
expect(version.value).toBe('10.0');
expect(version.qualityFlag).toBe(true);
});
it('should resolve "latest" with A.B channel directly without API call', async () => {
const resolver = new DotnetVersionResolver('latest', '', '8.0');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('8.0');
expect(version.type.toLowerCase()).toContain('channel');
expect(version.qualityFlag).toBe(true);
// Should NOT call the API
expect(getJsonMock).not.toHaveBeenCalled();
});
it('should resolve "latest" with A.B.Cxx channel directly without API call', async () => {
const resolver = new DotnetVersionResolver('latest', '', '8.0.1xx');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('8.0.1xx');
expect(version.type.toLowerCase()).toContain('channel');
expect(version.qualityFlag).toBe(true);
// Should NOT call the API
expect(getJsonMock).not.toHaveBeenCalled();
});
it('should resolve "latest" with A.B channel for older version with qualityFlag false', async () => {
const resolver = new DotnetVersionResolver('latest', '', '3.1');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('3.1');
expect(version.type.toLowerCase()).toContain('channel');
// major 3 < 6 → qualityFlag false
expect(version.qualityFlag).toBe(false);
expect(getJsonMock).not.toHaveBeenCalled();
});
it('should resolve "latest" with A.B.Cxx channel and quality', async () => {
const resolver = new DotnetVersionResolver('latest', 'ga', '8.0.2xx');
const version = await resolver.createDotnetVersion();
expect(version.value).toBe('8.0.2xx');
expect(version.qualityFlag).toBe(true);
expect(getJsonMock).not.toHaveBeenCalled();
});
});

View File

@@ -1,26 +1,72 @@
import * as core from '@actions/core'; import {
import fs from 'fs'; afterEach,
beforeEach,
describe,
expect,
it,
jest,
test
} from '@jest/globals';
import semver from 'semver'; import semver from 'semver';
import * as auth from '../src/authutil';
import os from 'os'; import os from 'os';
import * as setup from '../src/setup-dotnet';
import {DotnetCoreInstaller, DotnetInstallDir} from '../src/installer'; jest.unstable_mockModule('@actions/core', () => ({
import * as cacheUtils from '../src/cache-utils'; getInput: jest.fn(),
import * as cacheRestore from '../src/cache-restore'; getMultilineInput: jest.fn(),
getBooleanInput: jest.fn(),
setFailed: jest.fn(),
warning: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
setOutput: jest.fn(),
addPath: jest.fn(),
exportVariable: jest.fn()
}));
jest.unstable_mockModule('fs', () => {
const actual = jest.requireActual('fs') as typeof import('fs');
const existsSync = jest.fn(actual.existsSync);
const readFileSync = jest.fn(actual.readFileSync);
return {
...actual,
existsSync,
readFileSync,
default: {...actual, existsSync, readFileSync}
};
});
jest.unstable_mockModule('../src/authutil', () => ({
configAuthentication: jest.fn()
}));
jest.unstable_mockModule('../src/cache-utils', () => ({
isCacheFeatureAvailable: jest.fn(),
getNuGetFolderPath: jest.fn()
}));
jest.unstable_mockModule('../src/cache-restore', () => ({
restoreCache: jest.fn()
}));
const core = await import('@actions/core');
const fs = await import('fs');
const auth = await import('../src/authutil.js');
const cacheUtils = await import('../src/cache-utils.js');
const cacheRestore = await import('../src/cache-restore.js');
const setup = await import('../src/setup-dotnet.js');
const {DotnetCoreInstaller, DotnetInstallDir} =
await import('../src/installer.js');
describe('setup-dotnet tests', () => { describe('setup-dotnet tests', () => {
const inputs = {} as any; const inputs = {} as any;
const getInputSpy = jest.spyOn(core, 'getInput'); const getInputSpy = core.getInput as jest.Mock;
const getMultilineInputSpy = jest.spyOn(core, 'getMultilineInput'); const getMultilineInputSpy = core.getMultilineInput as jest.Mock;
const getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput'); const getBooleanInputSpy = core.getBooleanInput as jest.Mock;
const setFailedSpy = jest.spyOn(core, 'setFailed'); const setFailedSpy = core.setFailed as jest.Mock;
const warningSpy = jest.spyOn(core, 'warning'); const warningSpy = core.warning as jest.Mock;
const debugSpy = jest.spyOn(core, 'debug'); const debugSpy = core.debug as jest.Mock;
const infoSpy = jest.spyOn(core, 'info'); const infoSpy = core.info as jest.Mock;
const setOutputSpy = jest.spyOn(core, 'setOutput'); const setOutputSpy = core.setOutput as jest.Mock;
const existsSyncSpy = jest.spyOn(fs, 'existsSync'); const existsSyncSpy = fs.existsSync as jest.Mock;
const readFileSyncSpy = fs.readFileSync as jest.Mock;
const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying'); const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying');
@@ -29,12 +75,10 @@ describe('setup-dotnet tests', () => {
'installDotnet' 'installDotnet'
); );
const isCacheFeatureAvailableSpy = jest.spyOn( const isCacheFeatureAvailableSpy =
cacheUtils, cacheUtils.isCacheFeatureAvailable as jest.Mock;
'isCacheFeatureAvailable' const restoreCacheSpy = cacheRestore.restoreCache as jest.Mock;
); const configAuthenticationSpy = auth.configAuthentication as jest.Mock;
const restoreCacheSpy = jest.spyOn(cacheRestore, 'restoreCache');
const configAuthenticationSpy = jest.spyOn(auth, 'configAuthentication');
const addToPathOriginal = DotnetInstallDir.addToPath; const addToPathOriginal = DotnetInstallDir.addToPath;
describe('run() tests', () => { describe('run() tests', () => {
@@ -42,11 +86,17 @@ describe('setup-dotnet tests', () => {
DotnetInstallDir.addToPath = jest.fn(); DotnetInstallDir.addToPath = jest.fn();
getMultilineInputSpy.mockImplementation(input => inputs[input as string]); getMultilineInputSpy.mockImplementation(input => inputs[input as string]);
getInputSpy.mockImplementation(input => inputs[input as string]); getInputSpy.mockImplementation(input => inputs[input as string]);
getBooleanInputSpy.mockImplementation(input => inputs[input as string]); getBooleanInputSpy.mockImplementation(input => {
const value = inputs[input as string];
return typeof value === 'string'
? value.toLowerCase() === 'true'
: !!value;
});
}); });
afterEach(() => { afterEach(() => {
DotnetInstallDir.addToPath = addToPathOriginal; DotnetInstallDir.addToPath = addToPathOriginal;
delete process.env['DOTNET_CHECK_LATEST'];
jest.clearAllMocks(); jest.clearAllMocks();
jest.resetAllMocks(); jest.resetAllMocks();
}); });
@@ -84,7 +134,7 @@ describe('setup-dotnet tests', () => {
inputs['dotnet-version'] = ['10.0']; inputs['dotnet-version'] = ['10.0'];
inputs['dotnet-quality'] = 'fictitiousQuality'; inputs['dotnet-quality'] = 'fictitiousQuality';
const expectedErrorMessage = `Value '${inputs['dotnet-quality']}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`; const expectedErrorMessage = `Value '${inputs['dotnet-quality']}' is not supported for the 'dotnet-quality' option. Supported values are: daily, preview, ga.`;
await setup.run(); await setup.run();
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage); expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
@@ -246,6 +296,77 @@ describe('setup-dotnet tests', () => {
expect(DotnetInstallDir.addToPath).toHaveBeenCalledTimes(1); expect(DotnetInstallDir.addToPath).toHaveBeenCalledTimes(1);
}); });
it("should read the 'check-latest' input and pass it to DotnetCoreInstaller", async () => {
inputs['dotnet-version'] = ['10.0.101'];
inputs['dotnet-quality'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
let capturedCheckLatest: boolean | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedCheckLatest = this.checkLatest;
return Promise.resolve('');
});
await setup.run();
expect(getBooleanInputSpy).toHaveBeenCalledWith('check-latest');
expect(installDotnetSpy).toHaveBeenCalledTimes(1);
expect(capturedCheckLatest).toBe(false);
});
describe("'check-latest' resolution", () => {
const captureCheckLatest = async () => {
inputs['dotnet-version'] = ['10.0.101'];
inputs['dotnet-quality'] = '';
inputs['architecture'] = '';
let capturedCheckLatest: boolean | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedCheckLatest = this.checkLatest;
return Promise.resolve('');
});
await setup.run();
return capturedCheckLatest;
};
it('defaults to true when neither the input nor the environment variable is set', async () => {
inputs['check-latest'] = '';
expect(await captureCheckLatest()).toBe(true);
expect(getBooleanInputSpy).not.toHaveBeenCalledWith('check-latest');
});
it.each(['false', 'FALSE', 'False'])(
"reads 'check-latest' from the DOTNET_CHECK_LATEST environment variable ('%s')",
async envValue => {
inputs['check-latest'] = '';
process.env['DOTNET_CHECK_LATEST'] = envValue;
expect(await captureCheckLatest()).toBe(false);
}
);
it('lets an explicit input win over the environment variable', async () => {
inputs['check-latest'] = 'true';
process.env['DOTNET_CHECK_LATEST'] = 'false';
expect(await captureCheckLatest()).toBe(true);
});
it('warns and falls back to true when the environment variable is not a boolean', async () => {
inputs['check-latest'] = '';
process.env['DOTNET_CHECK_LATEST'] = 'yes';
expect(await captureCheckLatest()).toBe(true);
expect(warningSpy).toHaveBeenCalledWith(
`Value 'yes' is not supported for the DOTNET_CHECK_LATEST environment variable. Supported values are: true, false. The 'check-latest' option falls back to 'true'.`
);
expect(setFailedSpy).not.toHaveBeenCalled();
});
});
it('should fail the action if unsupported architecture is provided', async () => { it('should fail the action if unsupported architecture is provided', async () => {
inputs['dotnet-version'] = ['10.0.101']; inputs['dotnet-version'] = ['10.0.101'];
inputs['dotnet-quality'] = ''; inputs['dotnet-quality'] = '';
@@ -256,5 +377,331 @@ describe('setup-dotnet tests', () => {
await setup.run(); await setup.run();
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage); expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
}); });
it('should fail the action if unsupported dotnet-channel value is provided with latest', async () => {
inputs['dotnet-version'] = ['latest'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = 'invalid';
inputs['architecture'] = '';
const expectedErrorMessage = `Value 'invalid' is not supported for the 'dotnet-channel' option. Supported values are: LTS, STS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx).`;
await setup.run();
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
});
it('should warn but not fail if unsupported dotnet-channel value is provided with a specific version', async () => {
inputs['dotnet-version'] = ['8.0.x'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = 'invalid';
inputs['architecture'] = '';
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
await setup.run();
expect(setFailedSpy).not.toHaveBeenCalled();
expect(warningSpy).toHaveBeenCalledWith(
`Value 'invalid' is not supported for the 'dotnet-channel' option and will be ignored because 'dotnet-version' is not set to 'latest'. Supported values are: LTS, STS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx).`
);
});
it('should pass valid dotnet-channel value through without error', async () => {
inputs['dotnet-version'] = ['latest'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = 'LTS';
inputs['architecture'] = '';
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
await setup.run();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('should pass A.B channel value through without error when used with latest', async () => {
inputs['dotnet-version'] = ['latest'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '8.0';
inputs['architecture'] = '';
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
await setup.run();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('should pass A.B.Cxx channel value through without error when used with latest', async () => {
inputs['dotnet-version'] = ['latest'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '8.0.1xx';
inputs['architecture'] = '';
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
await setup.run();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('should fail with A.B.Cxx channel if major version is below 5', async () => {
inputs['dotnet-version'] = ['latest'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '3.1.1xx';
inputs['architecture'] = '';
const expectedErrorMessage = `Value '3.1.1xx' is not supported for the 'dotnet-channel' option. Supported values are: LTS, STS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx).`;
await setup.run();
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
});
it('should warn and not fail if valid dotnet-channel is provided with a non-latest version', async () => {
inputs['dotnet-version'] = ['8.0.x'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = 'LTS';
inputs['architecture'] = '';
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
await setup.run();
expect(setFailedSpy).not.toHaveBeenCalled();
expect(warningSpy).toHaveBeenCalledWith(
`The 'dotnet-channel' input is only supported when 'dotnet-version' is set to 'latest'.`
);
});
it('should pass the global.json rollForward minimum version to DotnetCoreInstaller', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({
sdk: {version: '8.0.400', rollForward: 'latestFeature'}
})
);
let capturedVersion: string | undefined;
let capturedMinimumVersion: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedVersion = this.version;
capturedMinimumVersion = this.minimumVersion;
return Promise.resolve('8.0.412');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedVersion).toBe('8.0');
expect(capturedMinimumVersion).toBe('8.0.400');
});
it('should pass non-latest rollForward policies to DotnetCoreInstaller', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.100', rollForward: 'feature'}})
);
let capturedVersion: string | undefined;
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedVersion = this.version;
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.200');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedVersion).toBe('8.0.100');
expect(capturedMinimumVersion).toBe('8.0.100');
expect(capturedRollForward).toBe('feature');
});
it('should default an omitted rollForward to patch', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.100'}})
);
let capturedVersion: string | undefined;
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedVersion = this.version;
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.100');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedVersion).toBe('8.0.100');
expect(capturedMinimumVersion).toBe('8.0.100');
expect(capturedRollForward).toBe('patch');
});
it('should not default to patch for a prerelease sdk version', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.100-preview.1'}})
);
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.100-preview.1');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedMinimumVersion).toBeUndefined();
expect(capturedRollForward).toBeUndefined();
});
it('should not default to patch for a version that is not a full SDK version', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.0'}})
);
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.0');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedMinimumVersion).toBeUndefined();
expect(capturedRollForward).toBeUndefined();
});
it('should not roll forward a version pinned by the dotnet-version input', async () => {
inputs['dotnet-version'] = ['8.0.100'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.100'}})
);
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.100');
});
await setup.run();
inputs['global-json-file'] = '';
expect(installDotnetSpy).toHaveBeenCalledTimes(1);
expect(capturedMinimumVersion).toBeUndefined();
expect(capturedRollForward).toBeUndefined();
});
it('should keep the global.json floor when a floating dotnet-version matches', async () => {
inputs['dotnet-version'] = ['8.0'];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({
sdk: {version: '8.0.400', rollForward: 'latestFeature'}
})
);
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.400');
});
await setup.run();
inputs['global-json-file'] = '';
expect(installDotnetSpy).toHaveBeenCalledTimes(1);
expect(capturedMinimumVersion).toBe('8.0.400');
expect(capturedRollForward).toBe('latestFeature');
});
it('should not set a rollForward policy for disable', async () => {
inputs['dotnet-version'] = [];
inputs['dotnet-quality'] = '';
inputs['dotnet-channel'] = '';
inputs['architecture'] = '';
inputs['check-latest'] = 'false';
inputs['global-json-file'] = 'global.json';
existsSyncSpy.mockReturnValue(true);
readFileSyncSpy.mockReturnValue(
JSON.stringify({sdk: {version: '8.0.100', rollForward: 'disable'}})
);
let capturedMinimumVersion: string | undefined;
let capturedRollForward: string | undefined;
installDotnetSpy.mockImplementation(function (this: any) {
capturedMinimumVersion = this.minimumVersion;
capturedRollForward = this.rollForward;
return Promise.resolve('8.0.100');
});
await setup.run();
inputs['global-json-file'] = '';
expect(capturedMinimumVersion).toBeUndefined();
expect(capturedRollForward).toBeUndefined();
});
}); });
}); });

View File

@@ -74,6 +74,7 @@ $targetFrameworkVersionMap = @{
"8.0" = "net8.0"; "8.0" = "net8.0";
"9.0" = "net9.0"; "9.0" = "net9.0";
"10.0" = "net10.0"; "10.0" = "net10.0";
"11.0" = "net11.0";
} }
foreach ($version in $Versions) foreach ($version in $Versions)

View File

@@ -6,17 +6,26 @@ branding:
color: green color: green
inputs: inputs:
dotnet-version: dotnet-version:
description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx' description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx, latest'
required: false
dotnet-quality: dotnet-quality:
description: 'Optional quality of the build. The possible values are: daily, signed, validated, preview, ga.' description: 'Optional quality of the build. The possible values are: daily, preview, ga.'
required: false
dotnet-channel:
description: 'Optional channel for the installation. The possible values are: STS, LTS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx, available since 5.0). To be used with "dotnet-version: latest".'
required: false
global-json-file: global-json-file:
description: 'Optional global.json location, if your global.json isn''t located in the root of the repo.' description: 'Optional global.json location, if your global.json isn''t located in the root of the repo.'
required: false
source-url: source-url:
description: 'Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword' description: 'Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword'
required: false
owner: owner:
description: 'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url' description: 'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url'
required: false
config-file: config-file:
description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.' description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.'
required: false
cache: cache:
description: 'Optional input to enable caching of the NuGet global-packages folder' description: 'Optional input to enable caching of the NuGet global-packages folder'
required: false required: false
@@ -30,6 +39,9 @@ inputs:
architecture: architecture:
description: 'Optional architecture for the .NET install. Supported values: x64, x86, arm64, amd64, arm, s390x, ppc64le, riscv64. If not set, the installer auto-detects the current system architecture.' description: 'Optional architecture for the .NET install. Supported values: x64, x86, arm64, amd64, arm, s390x, ppc64le, riscv64. If not set, the installer auto-detects the current system architecture.'
required: false required: false
check-latest:
description: 'Optional, defaults to true. When false, a locally installed SDK that satisfies the requested version is reused without any network calls, otherwise the latest matching version is installed online. Cross-architecture requests always install online. Falls back to the DOTNET_CHECK_LATEST environment variable when this input is not set.'
required: false
outputs: outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate if a cache was hit.' description: 'A boolean value to indicate if a cache was hit.'
@@ -39,4 +51,4 @@ runs:
using: 'node24' using: 'node24'
main: 'dist/setup/index.js' main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js' post: 'dist/cache-save/index.js'
post-if: success() post-if: success()

116089
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

3
dist/cache-save/package.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

155349
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

3
dist/setup/package.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

74
eslint.config.mjs Normal file
View File

@@ -0,0 +1,74 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import jest from 'eslint-plugin-jest';
import n from 'eslint-plugin-n';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
export default [
{
ignores: ['**/*', '!src/**', '!__tests__/**']
},
js.configs.recommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
...globals.es2015
}
},
plugins: {
'@typescript-eslint': tsPlugin,
n
},
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
yoda: 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'no-undef': 'off',
'no-useless-assignment': 'off',
'n/no-extraneous-import': 'error'
}
},
{
files: ['**/*{test,spec}.ts'],
plugins: {jest},
languageOptions: {
globals: {
...globals.jest
}
},
rules: {
...jest.configs['flat/recommended'].rules,
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off'
}
},
prettier
];

View File

@@ -94,9 +94,9 @@
Determines timeout duration in seconds for downloading of the SDK file Determines timeout duration in seconds for downloading of the SDK file
Default: 1200 seconds (20 minutes) Default: 1200 seconds (20 minutes)
.PARAMETER KeepZip .PARAMETER KeepZip
If set, downloaded file is kept If set, downloaded archive file is kept. Applies to both .zip and .tar.gz formats.
.PARAMETER ZipPath .PARAMETER ZipPath
Use that path to store installer, generated by default Use that path to store the downloaded archive, generated by default. Applies to both .zip and .tar.gz formats.
.EXAMPLE .EXAMPLE
dotnet-install.ps1 -Version 7.0.401 dotnet-install.ps1 -Version 7.0.401
Installs the .NET SDK version 7.0.401 Installs the .NET SDK version 7.0.401
@@ -341,6 +341,36 @@ function Get-NormalizedProduct([string]$Runtime) {
} }
} }
function Test-TarAvailable {
if ($env:DOTNET_INSTALL_SKIP_TAR -eq "1") {
Say-Verbose "Skipping tar detection due to DOTNET_INSTALL_SKIP_TAR environment variable."
return $false
}
$tarCommand = Get-Command -Name "tar" -ErrorAction SilentlyContinue
return $null -ne $tarCommand
}
function Get-FileExtension-For-Version([string]$VersionOrChannel) {
if (-not $script:TarAvailable) {
return ".zip"
}
if ($VersionOrChannel -match '^(\d+)\.') {
$majorVersion = [int]$Matches[1]
if ($majorVersion -ge 11) {
# Windows tarballs are only available starting with 11.0 preview 3
if ($VersionOrChannel -match 'preview\.(\d+)') {
$previewNum = [int]$Matches[1]
if ($majorVersion -eq 11 -and $previewNum -lt 3) {
Say-Verbose "Version '$VersionOrChannel' predates tar.gz availability; using zip."
return ".zip"
}
}
Say-Verbose "Using tar.gz archive format for version/channel '$VersionOrChannel'."
return ".tar.gz"
}
}
return ".zip"
}
# The version text returned from the feeds is a 1-line or 2-line string: # The version text returned from the feeds is a 1-line or 2-line string:
# For the SDK and the dotnet runtime (2 lines): # For the SDK and the dotnet runtime (2 lines):
@@ -594,24 +624,27 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string
# If anything fails in this lookup it will default to $SpecificVersion # If anything fails in this lookup it will default to $SpecificVersion
$SpecificProductVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion $SpecificProductVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion
# For .NET 11.0+, tar.gz is the preferred archive format on Windows
$ext = Get-FileExtension-For-Version $SpecificVersion
if ($Runtime -eq "dotnet") { if ($Runtime -eq "dotnet") {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificProductVersion-win-$CLIArchitecture$ext"
} }
elseif ($Runtime -eq "aspnetcore") { elseif ($Runtime -eq "aspnetcore") {
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture$ext"
} }
elseif ($Runtime -eq "windowsdesktop") { elseif ($Runtime -eq "windowsdesktop") {
# The windows desktop runtime is part of the core runtime layout prior to 5.0 # The windows desktop runtime is part of the core runtime layout prior to 5.0
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture$ext"
if ($SpecificVersion -match '^(\d+)\.(.*)$') { if ($SpecificVersion -match '^(\d+)\.(.*)$') {
$majorVersion = [int]$Matches[1] $majorVersion = [int]$Matches[1]
if ($majorVersion -ge 5) { if ($majorVersion -ge 5) {
$PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture$ext"
} }
} }
} }
elseif (-not $Runtime) { elseif (-not $Runtime) {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture$ext"
} }
else { else {
throw "Invalid value for `$Runtime" throw "Invalid value for `$Runtime"
@@ -877,6 +910,80 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
} }
} }
function Extract-Dotnet-Package-Tar([string]$TarPath, [string]$OutPath) {
Say-Invocation $MyInvocation
New-Item -ItemType Directory -Force -Path $OutPath | Out-Null
# Build an exclude list of versioned directories that already exist locally.
# This matches the zip extraction behavior: if shared/Microsoft.NETCore.App/11.0.0/
# already exists, we skip all files under that version to avoid overwriting a
# previously installed version.
$excludeArgs = @()
$versionRegex = '.*/\d+\.\d+[^/]+/'
# Read the tarball's file listing to discover versioned directory prefixes
$tarListing = & tar -tzf $TarPath 2>$null
$versionedDirs = @{}
foreach ($entry in $tarListing) {
$normalizedEntry = $entry.Replace('\', '/')
$match = [regex]::Match($normalizedEntry, $versionRegex)
if ($match.Success) {
$versionedPrefix = $normalizedEntry.Substring(0, $match.Index + $match.Length)
if (-not $versionedDirs.ContainsKey($versionedPrefix)) {
$localDir = Join-Path -Path $OutPath -ChildPath $versionedPrefix
$versionedDirs[$versionedPrefix] = (Test-Path $localDir -PathType Container)
}
}
}
foreach ($dir in $versionedDirs.GetEnumerator()) {
if ($dir.Value) {
# This versioned directory already exists - exclude it from extraction
$pattern = $dir.Key + '*'
$excludeArgs += '--exclude'
$excludeArgs += $pattern
Say-Verbose "Excluding pre-existing versioned directory: $($dir.Key)"
}
}
# Handle non-versioned file override logic.
# If OverrideNonVersionedFiles is false, exclude non-versioned files that already exist.
if (-not $OverrideNonVersionedFiles) {
foreach ($entry in $tarListing) {
$normalizedEntry = $entry.Replace('\', '/')
# Skip directory entries (end with /)
if ($normalizedEntry.EndsWith('/')) { continue }
$match = [regex]::Match($normalizedEntry, $versionRegex)
if (-not $match.Success) {
# Non-versioned file - exclude if it already exists locally
$localPath = Join-Path -Path $OutPath -ChildPath $normalizedEntry
if (Test-Path $localPath) {
$excludeArgs += '--exclude'
$excludeArgs += $normalizedEntry
Say-Verbose "Excluding pre-existing non-versioned file: $normalizedEntry"
}
}
}
}
try {
# Extract directly to install root, preserving hard links
$tarOutput = & tar -xzf $TarPath -C $OutPath @excludeArgs 2>&1
if ($LASTEXITCODE -ne 0) {
$tarOutputText = ($tarOutput | Out-String).Trim()
if ([string]::IsNullOrWhiteSpace($tarOutputText)) {
throw "Tar extraction failed with exit code $LASTEXITCODE."
}
throw "Tar extraction failed with exit code $LASTEXITCODE. tar output: $tarOutputText"
}
}
catch {
Say-Error "Failed to extract tar package. Exception: $_"
throw
}
}
function DownloadFile($Source, [string]$OutPath) { function DownloadFile($Source, [string]$OutPath) {
if ($Source -notlike "http*") { if ($Source -notlike "http*") {
# Using System.IO.Path.GetFullPath to get the current directory # Using System.IO.Path.GetFullPath to get the current directory
@@ -991,7 +1098,7 @@ function PrintDryRunOutput($Invocation, $DownloadLinks) {
} }
} }
function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) { function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture, [string]$FileExtension = ".zip") {
Say-Invocation $MyInvocation Say-Invocation $MyInvocation
#quality is not supported for LTS or STS channel #quality is not supported for LTS or STS channel
@@ -1010,7 +1117,7 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
if (-not [string]::IsNullOrEmpty($Quality)) { if (-not [string]::IsNullOrEmpty($Quality)) {
$akaMsLink += "/$Quality" $akaMsLink += "/$Quality"
} }
$akaMsLink += "/$Product-win-$Architecture.zip" $akaMsLink += "/$Product-win-$Architecture$FileExtension"
Say-Verbose "Constructed aka.ms link: '$akaMsLink'." Say-Verbose "Constructed aka.ms link: '$akaMsLink'."
$akaMsDownloadLink = $null $akaMsDownloadLink = $null
@@ -1062,7 +1169,23 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
} }
function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) { function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) {
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture
# When tar is available, try .tar.gz first via aka.ms, then fall back to .zip.
# This handles symbolic channels (STS/LTS) and numeric channels where tar.gz
# may not yet be available (e.g. pre-11.0 versions).
$extensionsToTry = @(".zip")
if ($script:TarAvailable) {
$extensionsToTry = @(".tar.gz", ".zip")
}
$AkaMsDownloadLink = $null
foreach ($ext in $extensionsToTry) {
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture -FileExtension $ext
if (-not [string]::IsNullOrEmpty($AkaMsDownloadLink)) {
break
}
Say-Verbose "aka.ms link resolution with '$ext' extension failed, trying next format."
}
if ([string]::IsNullOrEmpty($AkaMsDownloadLink)) { if ([string]::IsNullOrEmpty($AkaMsDownloadLink)) {
if (-not [string]::IsNullOrEmpty($NormalizedQuality)) { if (-not [string]::IsNullOrEmpty($NormalizedQuality)) {
@@ -1191,6 +1314,8 @@ Measure-Action "Product discovery" {
$script:NormalizedProduct = Get-NormalizedProduct $Runtime $script:NormalizedProduct = Get-NormalizedProduct $Runtime
Say-Verbose "Normalized product: '$NormalizedProduct'" Say-Verbose "Normalized product: '$NormalizedProduct'"
$script:FeedCredential = ValidateFeedCredential $FeedCredential $script:FeedCredential = ValidateFeedCredential $FeedCredential
$script:TarAvailable = Test-TarAvailable
Say-Verbose "Tar available: '$TarAvailable'"
} }
$InstallRoot = Resolve-Installation-Path $InstallDir $InstallRoot = Resolve-Installation-Path $InstallDir
@@ -1319,7 +1444,12 @@ if (-not $DownloadSucceeded) {
} }
Say "Extracting the archive." Say "Extracting the archive."
Measure-Action "Package extraction" { Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot } if ($DownloadedLink.downloadLink.EndsWith(".tar.gz")) {
Measure-Action "Package extraction" { Extract-Dotnet-Package-Tar -TarPath $ZipPath -OutPath $InstallRoot }
}
else {
Measure-Action "Package extraction" { Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot }
}
# Check if the SDK version is installed; if not, fail the installation. # Check if the SDK version is installed; if not, fail the installation.
$isAssetInstalled = $false $isAssetInstalled = $false
@@ -1355,219 +1485,215 @@ Say "Installed version is $($DownloadedLink.effectiveVersion)"
Say "Installation finished" Say "Installation finished"
# SIG # Begin signature block # SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # MIIncQYJKoZIhvcNAQcCoIInYjCCJ14CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLC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w0DksPmV
# duo5SyK9h9w++hMtMIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh
# c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD
# b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw
# MTACEzMAAAIDux5cADhsdMoAAQAAAgMwIgQgwIRXpw5w7cRbWSfOFZ15Z2Nf90Hi
# Ms/hZSpx+kv4aHcwDQYJKoZIhvcNAQELBQAEggIAM+zwgqPLhBOAumqVnUO/YRh7
# sePgzUWqveSw/J01TAD8JVXufiGmu4neLrGFki/Nz8ytun2DhJP/3xDRu39y/9Pb
# t2qKabzaoASwH95fTjHLYEp0PhqkEZ1hkaaYjVC3TAG0LgU2mrvkEjL3doD5MXu8
# WWQGcnB0Wera/3POf4ylyQbUUnzo/Pl9qUbjPVW/JouzzDzijObLcYp7IDgIDxGL
# sVJqMgzP1ZWBWsjjx4J0YiYORUnIVKWKPXt/0O3X9VO3zDfOnWRLF8mJj+ybEnqa
# Wd8LxLJnCxpmTAjtELLgC46UB0N4GHR0+ymSba35Ciz4Kzc+7R9E1Ajy1yd2rmGR
# M2u/eAV8MvKybIzgTd9Lukk9KJ5lvzV52CuYyzHOzYgcNt/mFgvM6gfMAef3CeN0
# EU7ECvTEYqno7krSRi6+HD+R14+7EwXbiR0E+KAB2Ppgj7GqHWKeL/Owyv0A1oEa
# 4ocdqMApLcY908U7IzNu5qo7PPas/RBsB9J52++fyZ/9RyP31IYKu8/5xI5Ef7aH
# XIopbEpuMHpHeuWlYWlfkULa5tjk4iPVCTRVsgn7IimLY/wgVOLL4ueOzZZ6aNws
# Q37w/ocvXIH/qXUllulfh5vINVYqXK3d+l0QT8LCMIxXpJSSgtcFcPJG6aSdOFRQ
# r6EOj+C9DH5MueMd9SY=
# SIG # End signature block # SIG # End signature block

View File

@@ -1003,12 +1003,12 @@ copy_files_or_dirs_from_list() {
cat | uniq | while read -r file_path; do cat | uniq | while read -r file_path; do
local path="$(remove_beginning_slash "${file_path#$root_path}")" local path="$(remove_beginning_slash "${file_path#$root_path}")"
local target="$out_path/$path" local target="$out_path/$path"
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ] || [ -L "$target" ])); then
mkdir -p "$out_path/$(dirname "$path")" mkdir -p "$out_path/$(dirname "$path")"
if [ -d "$target" ]; then if [ -d "$target" ] || [ -L "$target" ]; then
rm -rf "$target" rm -rf "$target"
fi fi
cp -R $override_switch "$root_path/$path" "$target" cp -RP $override_switch "$root_path/$path" "$target"
fi fi
done done
} }
@@ -1053,8 +1053,8 @@ extract_dotnet_package() {
tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false find "$temp_out_path" \( -type f -o -type l \) | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" find "$temp_out_path" \( -type f -o -type l \) | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
validate_remote_local_file_sizes "$zip_path" "$remote_file_size" validate_remote_local_file_sizes "$zip_path" "$remote_file_size"

View File

@@ -1,11 +0,0 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
}

28
jest.config.ts Normal file
View File

@@ -0,0 +1,28 @@
import type {JestConfigWithTsJest} from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
clearMocks: true,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
diagnostics: {
ignoreCodes: [151002]
}
}
]
},
transformIgnorePatterns: ['node_modules/(?!(@actions)/)'],
verbose: true
};
export default jestConfig;

5769
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
{ {
"name": "setup-dotnet", "name": "setup-dotnet",
"version": "5.0.1", "version": "6.0.0",
"type": "module",
"private": true, "private": true,
"description": "setup dotnet action", "description": "setup dotnet action",
"main": "dist/setup/index.js", "main": "dist/setup/index.js",
@@ -9,12 +10,12 @@
}, },
"scripts": { "scripts": {
"build": "ncc build -o dist/setup src/setup-dotnet.ts && ncc build -o dist/cache-save src/cache-save.ts", "build": "ncc build -o dist/setup src/setup-dotnet.ts && ncc build -o dist/cache-save src/cache-save.ts",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", "format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", "format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", "lint": "eslint \"**/*.ts\"",
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix", "lint:fix": "eslint \"**/*.ts\" --fix",
"prepare": "husky install", "prepare": "husky install",
"test": "jest --coverage --config ./jest.config.js", "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
"update-installers": "nwget https://dot.net/v1/dotnet-install.ps1 -O externals/install-dotnet.ps1 && nwget https://dot.net/v1/dotnet-install.sh -O externals/install-dotnet.sh" "update-installers": "nwget https://dot.net/v1/dotnet-install.ps1 -O externals/install-dotnet.ps1 && nwget https://dot.net/v1/dotnet-install.sh -O externals/install-dotnet.sh"
}, },
"repository": { "repository": {
@@ -29,38 +30,37 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^5.0.5", "@actions/cache": "^6.2.0",
"@actions/core": "^2.0.3", "@actions/core": "^3.0.1",
"@actions/exec": "^2.0.0", "@actions/exec": "^3.0.0",
"@actions/github": "^6.0.0", "@actions/github": "^9.1.1",
"@actions/glob": "^0.5.1", "@actions/glob": "^0.7.0",
"@actions/http-client": "^3.0.2", "@actions/http-client": "^4.0.1",
"@actions/io": "^2.0.0", "@actions/io": "^3.0.2",
"fast-xml-parser": "^5.5.11", "fast-xml-parser": "^5.9.3",
"json5": "^2.2.3", "json5": "^2.2.3",
"semver": "^7.6.0" "semver": "^7.8.5"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.12", "@eslint/js": "^10.0.1",
"@types/node": "^24.1.0", "@jest/globals": "^30.4.1",
"@types/semver": "^7.5.8", "@types/node": "^24.13.2",
"@typescript-eslint/eslint-plugin": "^8.0.0", "@types/semver": "^7.7.0",
"@typescript-eslint/parser": "^8.0.0", "@typescript-eslint/eslint-plugin": "^8.62.0",
"@vercel/ncc": "^0.38.1", "@typescript-eslint/parser": "^8.62.0",
"eslint": "^8.57.0", "@vercel/ncc": "^0.44.0",
"eslint-config-prettier": "^10.1.5", "eslint": "^10.11.0",
"eslint-plugin-jest": "^29.0.1", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-jest": "^29.16.6",
"eslint-plugin-n": "^18.1.0",
"globals": "^17.7.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"jest": "^29.7.0", "jest": "^30.4.2",
"jest-circus": "^29.7.0", "jest-circus": "^30.4.2",
"jest-each": "^29.7.0", "jest-each": "^30.0.0",
"prettier": "^3.2.5", "prettier": "^3.8.4",
"ts-jest": "^29.1.2", "ts-jest": "^29.4.11",
"typescript": "^5.9.2", "typescript": "^6.0.3",
"wget-improved": "^3.2.1" "wget-improved": "^3.2.1"
},
"jest": {
"testEnvironment": "node"
} }
} }

View File

@@ -4,8 +4,8 @@ import * as cache from '@actions/cache';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as glob from '@actions/glob'; import * as glob from '@actions/glob';
import {getNuGetFolderPath} from './cache-utils'; import {getNuGetFolderPath} from './cache-utils.js';
import {lockFilePatterns, State, Outputs} from './constants'; import {lockFilePatterns, State, Outputs} from './constants.js';
export const restoreCache = async (cacheDependencyPath?: string) => { export const restoreCache = async (cacheDependencyPath?: string) => {
const lockFilePath = cacheDependencyPath || (await findLockFile()); const lockFilePath = cacheDependencyPath || (await findLockFile());

View File

@@ -1,8 +1,8 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as cache from '@actions/cache'; import * as cache from '@actions/cache';
import fs from 'node:fs'; import fs from 'node:fs';
import {getNuGetFolderPath} from './cache-utils'; import {getNuGetFolderPath} from './cache-utils.js';
import {State} from './constants'; import {State} from './constants.js';
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in // Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to // @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
@@ -47,7 +47,11 @@ const cachePackages = async () => {
} }
const cacheId = await cache.saveCache([cachePath], primaryKey); const cacheId = await cache.saveCache([cachePath], primaryKey);
if (cacheId == -1) { if (cacheId === -1) {
// saveCache returns -1 without throwing when the cache was not saved, e.g.
// a reserve collision or a read-only token (fork PR). @actions/cache has
// already logged the reason at the appropriate severity, so just trace it.
core.debug(`Cache was not saved for the key: ${primaryKey}`);
return; return;
} }

View File

@@ -2,7 +2,7 @@ import * as cache from '@actions/cache';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
import {cliCommand} from './constants'; import {cliCommand} from './constants.js';
type NuGetFolderName = type NuGetFolderName =
| 'http-cache' | 'http-cache'

View File

@@ -3,12 +3,19 @@ import * as core from '@actions/core';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
import * as io from '@actions/io'; import * as io from '@actions/io';
import * as hc from '@actions/http-client'; import * as hc from '@actions/http-client';
import {chmodSync} from 'fs'; import {
accessSync,
chmodSync,
constants as fsConstants,
readdirSync,
statSync
} from 'fs';
import path from 'path'; import path from 'path';
import {fileURLToPath} from 'url';
import os from 'os'; import os from 'os';
import semver from 'semver'; import semver from 'semver';
import {IS_WINDOWS, PLATFORM} from './utils'; import {IS_WINDOWS, PLATFORM} from './utils.js';
import {QualityOptions} from './setup-dotnet'; import type {QualityOptions} from './setup-dotnet.js';
export interface DotnetVersion { export interface DotnetVersion {
type: string; type: string;
@@ -16,21 +23,90 @@ export interface DotnetVersion {
qualityFlag: boolean; qualityFlag: boolean;
} }
interface ReleaseIndexEntry {
'channel-version': string;
'support-phase': string;
'release-type': string;
}
interface ReleaseIndexResponse {
'releases-index': ReleaseIndexEntry[];
}
const QUALITY_INPUT_MINIMAL_MAJOR_TAG = 6; const QUALITY_INPUT_MINIMAL_MAJOR_TAG = 6;
const LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG = 5; const LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG = 5;
function channelForMajor(major: string): string {
// Starting with .NET 5, the minor version is always zero.
// Hardcode the earlier versions because they will not get new releases.
switch (major) {
case '1':
return '1.1';
case '2':
return '2.2';
case '3':
return '3.1';
default:
return `${major}.0`;
}
}
export class DotnetVersionResolver { export class DotnetVersionResolver {
private inputVersion: string; private inputVersion: string;
private resolvedArgument: DotnetVersion; private resolvedArgument: DotnetVersion;
constructor(version: string) { constructor(
version: string,
private quality: QualityOptions = '',
private dotnetChannel?: string
) {
this.inputVersion = version.trim(); this.inputVersion = version.trim();
this.resolvedArgument = {type: '', value: '', qualityFlag: false}; this.resolvedArgument = {type: '', value: '', qualityFlag: false};
} }
private isVersionChannel(channel: string): boolean {
// A.B format (e.g., 3.1, 8.0)
if (/^\d+\.\d+$/.test(channel)) return true;
// A.B.Cxx format (e.g., 8.0.1xx) is supported only for .NET 5.0+
const latestPatchMatch = channel.match(/^(\d+)\.\d+\.\d{1}xx$/);
if (latestPatchMatch) {
const major = Number(latestPatchMatch[1]);
return (
!Number.isNaN(major) && major >= LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG
);
}
return false;
}
private async resolveVersionInput(): Promise<void> { private async resolveVersionInput(): Promise<void> {
if (this.inputVersion.toLowerCase() === 'latest') {
const channel = this.dotnetChannel || '';
if (this.isVersionChannel(channel)) {
// A.B or A.B.Cxx channels are passed directly to the install script
this.resolvedArgument.value = channel;
} else {
// LTS, STS, or empty — resolve via releases index API
this.resolvedArgument.value = await this.getLatestVersion(channel);
}
this.resolvedArgument.type = 'channel';
const latestChannelMajorTag = Number(
this.resolvedArgument.value.split('.')[0]
);
this.resolvedArgument.qualityFlag =
!Number.isNaN(latestChannelMajorTag) &&
latestChannelMajorTag >= QUALITY_INPUT_MINIMAL_MAJOR_TAG;
return;
}
if (this.dotnetChannel) {
core.warning(
`The 'dotnet-channel' input is only supported when 'dotnet-version' is set to 'latest'.`
);
}
if (!semver.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) { if (!semver.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) {
throw new Error( throw new Error(
`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx` `The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx, latest`
); );
} }
if (semver.valid(this.inputVersion)) { if (semver.valid(this.inputVersion)) {
@@ -72,7 +148,7 @@ export class DotnetVersionResolver {
} else if (this.isNumericTag(major) && this.isNumericTag(minor)) { } else if (this.isNumericTag(major) && this.isNumericTag(minor)) {
this.resolvedArgument.value = `${major}.${minor}`; this.resolvedArgument.value = `${major}.${minor}`;
} else if (this.isNumericTag(major)) { } else if (this.isNumericTag(major)) {
this.resolvedArgument.value = await this.getLatestByMajorTag(major); this.resolvedArgument.value = channelForMajor(major);
} else { } else {
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script. // If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script.
this.resolvedArgument.value = 'LTS'; this.resolvedArgument.value = 'LTS';
@@ -96,31 +172,62 @@ export class DotnetVersionResolver {
return this.resolvedArgument; return this.resolvedArgument;
} }
private async getLatestByMajorTag(majorTag: string): Promise<string> { private async getLatestVersion(channelFilter: string): Promise<string> {
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], { const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
allowRetries: true, allowRetries: true,
maxRetries: 3 maxRetries: 3
}); });
const response = await httpClient.getJson<any>( const response = await httpClient.getJson<ReleaseIndexResponse>(
DotnetVersionResolver.DotnetCoreIndexUrl DotnetVersionResolver.DotnetCoreIndexUrl
); );
const result = response.result || {}; const result = response.result;
const releasesInfo: any[] = result['releases-index']; const rawReleasesInfo = result?.['releases-index'];
const releaseInfo = releasesInfo.find(info => { if (!Array.isArray(rawReleasesInfo)) {
const sdkParts: string[] = info['channel-version'].split('.'); throw new Error('Unexpected response format from .NET releases index.');
return sdkParts[0] === majorTag; }
});
if (!releaseInfo) { let releasesInfo = rawReleasesInfo;
throw new Error(
`Could not find info for version with major tag: "${majorTag}" at ${DotnetVersionResolver.DotnetCoreIndexUrl}` // Filter out EOL versions
releasesInfo = releasesInfo.filter(info => info['support-phase'] !== 'eol');
// Filter out preview versions if quality is not 'preview' or 'daily'
// If quality is not specified, we assume strict stability (GA only)
const normalizedQuality = (this.quality || '').toLowerCase();
if (!['preview', 'daily'].includes(normalizedQuality)) {
releasesInfo = releasesInfo.filter(
info => info['support-phase'] !== 'preview'
); );
} }
return releaseInfo['channel-version']; // Apply channel filter (LTS/STS)
if (channelFilter) {
const type = channelFilter.toLowerCase();
releasesInfo = releasesInfo.filter(info => info['release-type'] === type);
}
releasesInfo.sort((a, b) => {
const partsA = a['channel-version'].split('.').map(Number);
const partsB = b['channel-version'].split('.').map(Number);
for (let i = 0; i < Math.max(partsA.length, partsB.length); i++) {
const diff = (partsB[i] || 0) - (partsA[i] || 0);
if (diff !== 0) return diff;
}
return 0;
});
if (releasesInfo.length === 0) {
throw new Error(
`Could not find any active releases matching channel '${
channelFilter || 'any'
}'`
);
}
return releasesInfo[0]['channel-version'];
} }
static DotnetCoreIndexUrl = static DotnetCoreIndexUrl =
@@ -134,7 +241,13 @@ export class DotnetInstallScript {
constructor() { constructor() {
this.escapedScript = path this.escapedScript = path
.join(__dirname, '..', '..', 'externals', this.scriptName) .join(
path.dirname(fileURLToPath(import.meta.url)),
'..',
'..',
'externals',
this.scriptName
)
.replace(/'/g, "''"); .replace(/'/g, "''");
if (IS_WINDOWS) { if (IS_WINDOWS) {
@@ -271,7 +384,32 @@ export function normalizeArch(arch: string): string {
} }
} }
function isFile(filePath: string): boolean {
try {
return statSync(filePath).isFile();
} catch {
return false;
}
}
function isExecutableFile(filePath: string): boolean {
if (!isFile(filePath)) {
return false;
}
if (IS_WINDOWS) {
return true;
}
try {
accessSync(filePath, fsConstants.X_OK);
return true;
} catch {
return false;
}
}
export class DotnetCoreInstaller { export class DotnetCoreInstaller {
private static readonly FeatureBandSyntax = /^(\d+)\.(\d+)\.(\d)xx$/;
static { static {
DotnetInstallDir.setEnvironmentVariable(); DotnetInstallDir.setEnvironmentVariable();
} }
@@ -279,23 +417,307 @@ export class DotnetCoreInstaller {
constructor( constructor(
private version: string, private version: string,
private quality: QualityOptions, private quality: QualityOptions,
private architecture?: string private architecture?: string,
) {} private dotnetChannel?: string,
private checkLatest: boolean = true,
private minimumVersion?: string,
private rollForward?: string
) {
this.version = version.trim();
}
private getInstalledSdkVersions(): string[] {
const sdkDir = path.join(DotnetInstallDir.dirPath, 'sdk');
try {
const versions = readdirSync(sdkDir, {withFileTypes: true})
.filter(entry => entry.isDirectory() || entry.isSymbolicLink())
.map(entry => entry.name)
.filter(name => semver.valid(name) !== null)
.filter(name => isFile(path.join(sdkDir, name, 'dotnet.dll')));
core.debug(
`Locally installed .NET SDKs in '${sdkDir}': ${
versions.join(', ') || '<none>'
}`
);
return versions;
} catch {
core.debug(`Unable to read the SDK directory '${sdkDir}'.`);
return [];
}
}
private hasDotnetMuxer(): boolean {
return isExecutableFile(
path.join(DotnetInstallDir.dirPath, IS_WINDOWS ? 'dotnet.exe' : 'dotnet')
);
}
private qualityApplies(): boolean {
if (this.version.toLowerCase() === 'latest') {
const major = (this.dotnetChannel || '').trim().match(/^(\d+)/)?.[1];
return major ? Number(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG : true;
}
if (semver.valid(this.version)) {
return false;
}
const major = this.version.match(/^(\d+)/)?.[1];
return major ? Number(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG : false;
}
private findByScope(
candidates: string[],
major: string,
minor: string,
band?: string
): string | null {
return (
candidates.find(version => {
const parsed = semver.parse(version);
return (
parsed &&
parsed.major === Number(major) &&
parsed.minor === Number(minor) &&
(band === undefined ||
Math.floor(parsed.patch / 100) === Number(band))
);
}) ?? null
);
}
private static isInRollForwardScope(
version: string,
policy: string,
declared: semver.SemVer
): boolean {
const parsed = semver.parse(version);
if (!parsed) {
return false;
}
switch (policy) {
case 'patch':
case 'latestPatch':
return (
parsed.major === declared.major &&
parsed.minor === declared.minor &&
Math.floor(parsed.patch / 100) === Math.floor(declared.patch / 100)
);
case 'feature':
case 'latestFeature':
return (
parsed.major === declared.major && parsed.minor === declared.minor
);
case 'minor':
case 'latestMinor':
return parsed.major === declared.major;
case 'major':
case 'latestMajor':
return true;
default:
return false;
}
}
private static highestVersion(versions: string[]): string {
return versions.reduce((best, version) =>
semver.gt(version, best) ? version : best
);
}
private static nearestBandVersion(versions: string[]): string {
return versions.reduce((best, version) => {
const delta =
semver.major(version) - semver.major(best) ||
semver.minor(version) - semver.minor(best) ||
Math.floor(semver.patch(version) / 100) -
Math.floor(semver.patch(best) / 100);
return delta < 0 || (delta === 0 && semver.gt(version, best))
? version
: best;
});
}
private findByRollForward(
candidates: string[],
policy: string,
declaredVersion: string
): string | null {
const declared = semver.parse(declaredVersion);
if (!declared) {
return null;
}
const scoped = candidates.filter(version =>
DotnetCoreInstaller.isInRollForwardScope(version, policy, declared)
);
if (!scoped.length) {
return null;
}
switch (policy) {
case 'patch':
return (
scoped.find(version => semver.eq(version, declared)) ??
DotnetCoreInstaller.highestVersion(scoped)
);
case 'feature':
case 'minor':
case 'major':
return DotnetCoreInstaller.nearestBandVersion(scoped);
default:
return DotnetCoreInstaller.highestVersion(scoped);
}
}
private filterByQuality(allowed: string[]): string[] {
const wantsPrerelease =
['preview', 'daily'].includes((this.quality || '').toLowerCase()) &&
this.qualityApplies();
return allowed
.filter(version =>
wantsPrerelease
? semver.prerelease(version) !== null
: semver.prerelease(version) === null
)
.sort(semver.rcompare);
}
private findLocalSdkVersion(): string | null {
const installed = this.getInstalledSdkVersions();
if (!installed.length) {
return null;
}
if (!this.hasDotnetMuxer()) {
core.debug(
`The 'dotnet' executable was not found in '${DotnetInstallDir.dirPath}'. Locally installed SDKs are ignored.`
);
return null;
}
const minimumVersion = this.minimumVersion;
const allowed = minimumVersion
? installed.filter(version => semver.gte(version, minimumVersion))
: installed;
if (!allowed.length) {
core.debug(
`No locally installed .NET SDK satisfies the global.json minimum version '${minimumVersion}'.`
);
return null;
}
if (this.rollForward && minimumVersion) {
return this.findByRollForward(
this.filterByQuality(allowed),
this.rollForward,
minimumVersion
);
}
if (semver.valid(this.version)) {
return allowed.find(version => version === this.version) ?? null;
}
if (
this.version.toLowerCase() !== 'latest' &&
!DotnetCoreInstaller.FeatureBandSyntax.test(this.version) &&
!semver.validRange(this.version)
) {
core.debug(
`The requested version '${this.version}' is not a valid version spec. Locally installed SDKs are ignored.`
);
return null;
}
const candidates = this.filterByQuality(allowed);
if (!candidates.length) {
return null;
}
const input = this.version.toLowerCase();
if (input === 'latest') {
const channel = (this.dotnetChannel || '').trim();
if (!channel) {
return candidates[0];
}
const channelMinor = channel.match(/^(\d+)\.(\d+)$/);
if (channelMinor) {
return this.findByScope(candidates, channelMinor[1], channelMinor[2]);
}
const channelBand = channel.match(/^(\d+)\.(\d+)\.(\d)xx$/);
if (channelBand) {
return this.findByScope(
candidates,
channelBand[1],
channelBand[2],
channelBand[3]
);
}
return null;
}
const bandMatch = this.version.match(DotnetCoreInstaller.FeatureBandSyntax);
if (bandMatch) {
if (Number(bandMatch[1]) < LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG) {
return null;
}
return this.findByScope(
candidates,
bandMatch[1],
bandMatch[2],
bandMatch[3]
);
}
const minorMatch = this.version.match(/^(\d+)\.(\d+)(?:\.[xX*])?$/);
if (minorMatch) {
return this.findByScope(candidates, minorMatch[1], minorMatch[2]);
}
const majorMatch = this.version.match(/^(\d+)(?:\.[xX*])?$/);
if (majorMatch) {
const [major, minor] = channelForMajor(majorMatch[1]).split('.');
return this.findByScope(candidates, major, minor);
}
return null;
}
public async installDotnet(): Promise<string | null> { public async installDotnet(): Promise<string | null> {
const versionResolver = new DotnetVersionResolver(this.version); const isCrossArch =
!!this.architecture &&
normalizeArch(this.architecture) !== normalizeArch(os.arch());
if (!this.checkLatest && !isCrossArch) {
const localVersion = this.findLocalSdkVersion();
if (localVersion) {
core.info(
`'check-latest' is false and a locally installed .NET SDK (${localVersion}) satisfies the '${this.version}' request. Skipping download.`
);
return localVersion;
}
core.info(
`'check-latest' is false but no locally installed .NET SDK satisfies the '${this.version}' request. Falling back to online installation.`
);
}
const versionResolver = new DotnetVersionResolver(
this.version,
this.quality,
this.dotnetChannel
);
const dotnetVersion = await versionResolver.createDotnetVersion(); const dotnetVersion = await versionResolver.createDotnetVersion();
const architectureArguments = const architectureArguments = isCrossArch
this.architecture && ? [
normalizeArch(this.architecture) !== normalizeArch(os.arch()) IS_WINDOWS ? '-InstallDir' : '--install-dir',
? [ IS_WINDOWS
IS_WINDOWS ? '-InstallDir' : '--install-dir', ? `"${path.join(DotnetInstallDir.dirPath, this.architecture!)}"`
IS_WINDOWS : path.join(DotnetInstallDir.dirPath, this.architecture!)
? `"${path.join(DotnetInstallDir.dirPath, this.architecture)}"` ]
: path.join(DotnetInstallDir.dirPath, this.architecture) : [];
]
: [];
/** /**
* Install dotnet runtime first in order to get * Install dotnet runtime first in order to get
* the latest stable version of dotnet CLI * the latest stable version of dotnet CLI

View File

@@ -4,24 +4,19 @@ import {
DotnetCoreInstaller, DotnetCoreInstaller,
DotnetInstallDir, DotnetInstallDir,
normalizeArch normalizeArch
} from './installer'; } from './installer.js';
import * as fs from 'fs'; import * as fs from 'fs';
import path from 'path'; import path from 'path';
import {fileURLToPath} from 'url';
import semver from 'semver'; import semver from 'semver';
import os from 'os'; import os from 'os';
import * as auth from './authutil'; import * as auth from './authutil.js';
import {isCacheFeatureAvailable} from './cache-utils'; import {isCacheFeatureAvailable} from './cache-utils.js';
import {restoreCache} from './cache-restore'; import {restoreCache} from './cache-restore.js';
import {Outputs} from './constants'; import {Outputs} from './constants.js';
import JSON5 from 'json5'; import JSON5 from 'json5';
const qualityOptions = [ const qualityOptions = ['daily', 'preview', 'ga'] as const;
'daily',
'signed',
'validated',
'preview',
'ga'
] as const;
const supportedArchitectures = [ const supportedArchitectures = [
'x64', 'x64',
'x86', 'x86',
@@ -34,7 +29,20 @@ const supportedArchitectures = [
] as const; ] as const;
type SupportedArchitecture = (typeof supportedArchitectures)[number]; type SupportedArchitecture = (typeof supportedArchitectures)[number];
export type QualityOptions = (typeof qualityOptions)[number]; export type QualityOptions = (typeof qualityOptions)[number] | '';
const CHECK_LATEST_ENV_VAR = 'DOTNET_CHECK_LATEST';
function isValidChannel(channel: string): boolean {
const upper = channel.toUpperCase();
if (upper === 'LTS' || upper === 'STS') return true;
// A.B format (e.g., 3.1, 8.0)
if (/^\d+\.\d+$/.test(channel)) return true;
// A.B.Cxx format (e.g., 8.0.1xx) - available since 5.0
const match = channel.match(/^(?<major>\d+)\.\d+\.\d{1}xx$/);
if (match && parseInt(match.groups!.major) >= 5) return true;
return false;
}
export async function run() { export async function run() {
try { try {
@@ -48,8 +56,46 @@ export async function run() {
// Proxy, auth, (etc) are still set up, even if no version is identified // Proxy, auth, (etc) are still set up, even if no version is identified
// //
const versions = core.getMultilineInput('dotnet-version'); const versions = core.getMultilineInput('dotnet-version');
const explicitVersions = new Set(versions);
const globalJsonConstraints = new Map<
string,
{minimumVersion: string; rollForward?: string}
>();
const addVersionFromGlobalJson = (globalJsonPath: string) => {
const {version, minimumVersion, rollForward} =
getVersionFromGlobalJson(globalJsonPath);
versions.push(version);
const isRedundantExplicitPin =
explicitVersions.has(version) && version === minimumVersion;
if (minimumVersion && !isRedundantExplicitPin) {
globalJsonConstraints.set(version, {minimumVersion, rollForward});
}
};
const installedDotnetVersions: (string | null)[] = []; const installedDotnetVersions: (string | null)[] = [];
const architecture = getArchitectureInput(); const architecture = getArchitectureInput();
const checkLatest = getCheckLatestInput();
let dotnetChannel = core.getInput('dotnet-channel');
const isLatestRequested = versions.some(
version => version && version.toLowerCase() === 'latest'
);
if (dotnetChannel && !isValidChannel(dotnetChannel)) {
if (isLatestRequested) {
throw new Error(
`Value '${dotnetChannel}' is not supported for the 'dotnet-channel' option. Supported values are: LTS, STS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx).`
);
} else {
core.warning(
`Value '${dotnetChannel}' is not supported for the 'dotnet-channel' option and will be ignored because 'dotnet-version' is not set to 'latest'. Supported values are: LTS, STS, A.B (e.g. 8.0), A.B.Cxx (e.g. 8.0.1xx).`
);
dotnetChannel = '';
}
} else if (dotnetChannel && !isLatestRequested) {
core.warning(
`The 'dotnet-channel' input is only supported when 'dotnet-version' is set to 'latest'.`
);
dotnetChannel = '';
}
const globalJsonFileInput = core.getInput('global-json-file'); const globalJsonFileInput = core.getInput('global-json-file');
if (globalJsonFileInput) { if (globalJsonFileInput) {
@@ -59,7 +105,7 @@ export async function run() {
`The specified global.json file '${globalJsonFileInput}' does not exist` `The specified global.json file '${globalJsonFileInput}' does not exist`
); );
} }
versions.push(getVersionFromGlobalJson(globalJsonPath)); addVersionFromGlobalJson(globalJsonPath);
} }
if (!versions.length) { if (!versions.length) {
@@ -67,7 +113,7 @@ export async function run() {
core.debug('No version found, trying to find version from global.json'); core.debug('No version found, trying to find version from global.json');
const globalJsonPath = path.join(process.cwd(), 'global.json'); const globalJsonPath = path.join(process.cwd(), 'global.json');
if (fs.existsSync(globalJsonPath)) { if (fs.existsSync(globalJsonPath)) {
versions.push(getVersionFromGlobalJson(globalJsonPath)); addVersionFromGlobalJson(globalJsonPath);
} else { } else {
core.info( core.info(
`The global.json wasn't found in the root directory. No .NET version will be installed.` `The global.json wasn't found in the root directory. No .NET version will be installed.`
@@ -80,17 +126,24 @@ export async function run() {
if (quality && !qualityOptions.includes(quality)) { if (quality && !qualityOptions.includes(quality)) {
throw new Error( throw new Error(
`Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.` `Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, preview, ga.`
); );
} }
let dotnetInstaller: DotnetCoreInstaller; let dotnetInstaller: DotnetCoreInstaller;
const uniqueVersions = new Set<string>(versions); const uniqueVersions = new Set<string>(
versions.map(v => (v.toLowerCase() === 'latest' ? 'latest' : v))
);
for (const version of uniqueVersions) { for (const version of uniqueVersions) {
const constraint = globalJsonConstraints.get(version);
dotnetInstaller = new DotnetCoreInstaller( dotnetInstaller = new DotnetCoreInstaller(
version, version,
quality, quality,
architecture architecture,
version.toLowerCase() === 'latest' ? dotnetChannel : undefined,
checkLatest,
constraint?.minimumVersion,
constraint?.rollForward
); );
const installedVersion = await dotnetInstaller.installDotnet(); const installedVersion = await dotnetInstaller.installDotnet();
installedDotnetVersions.push(installedVersion); installedDotnetVersions.push(installedVersion);
@@ -122,7 +175,8 @@ export async function run() {
await exec.exec('dotnet', ['workload', 'install', ...workloads]); await exec.exec('dotnet', ['workload', 'install', ...workloads]);
} catch (err) { } catch (err) {
throw new Error( throw new Error(
`Failed to install workloads [${workloads.join(', ')}]: ${err}` `Failed to install workloads [${workloads.join(', ')}]: ${err}`,
{cause: err}
); );
} }
} }
@@ -142,7 +196,12 @@ export async function run() {
await restoreCache(cacheDependencyPath); await restoreCache(cacheDependencyPath);
} }
const matchersPath = path.join(__dirname, '..', '..', '.github'); const matchersPath = path.join(
path.dirname(fileURLToPath(import.meta.url)),
'..',
'..',
'.github'
);
core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
@@ -163,8 +222,51 @@ function getArchitectureInput(): SupportedArchitecture | '' {
); );
} }
function getVersionFromGlobalJson(globalJsonPath: string): string { function getCheckLatestInput(): boolean {
if ((core.getInput('check-latest') || '').trim()) {
return core.getBooleanInput('check-latest');
}
const rawEnvValue = (process.env[CHECK_LATEST_ENV_VAR] || '').trim();
if (rawEnvValue) {
const envValue = rawEnvValue.toLowerCase();
if (envValue === 'true' || envValue === 'false') {
core.debug(
`The 'check-latest' option is set to '${envValue}' by the ${CHECK_LATEST_ENV_VAR} environment variable.`
);
return envValue === 'true';
}
core.warning(
`Value '${rawEnvValue}' is not supported for the ${CHECK_LATEST_ENV_VAR} environment variable. Supported values are: true, false. The 'check-latest' option falls back to 'true'.`
);
}
return true;
}
interface GlobalJsonVersion {
version: string;
minimumVersion?: string;
rollForward?: string;
}
const ROLL_FORWARD_POLICIES = [
'patch',
'feature',
'minor',
'major',
'latestPatch',
'latestFeature',
'latestMinor',
'latestMajor'
];
const versionPattern = /^\d+\.\d+\.[1-9]\d{2,}$/;
function getVersionFromGlobalJson(globalJsonPath: string): GlobalJsonVersion {
let version = ''; let version = '';
let minimumVersion: string | undefined;
let rollForwardPolicy: string | undefined;
const globalJson = JSON5.parse( const globalJson = JSON5.parse(
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649 // .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
fs.readFileSync(globalJsonPath, {encoding: 'utf8'}).trim(), fs.readFileSync(globalJsonPath, {encoding: 'utf8'}).trim(),
@@ -177,12 +279,50 @@ function getVersionFromGlobalJson(globalJsonPath: string): string {
if (globalJson.sdk && globalJson.sdk.version) { if (globalJson.sdk && globalJson.sdk.version) {
version = globalJson.sdk.version; version = globalJson.sdk.version;
const rollForward = globalJson.sdk.rollForward; const rollForward = globalJson.sdk.rollForward;
if (rollForward && rollForward === 'latestFeature') { if (rollForward && !semver.prerelease(version)) {
const [major, minor] = version.split('.'); if (!versionPattern.test(version)) {
version = `${major}.${minor}`; throw new Error(
`Version '${version}' is not valid for the 'sdk.version' value in global.json. ` +
`When 'rollForward' is specified, a full SDK version is required. ` +
`See: https://learn.microsoft.com/en-us/dotnet/core/tools/global-json`
);
}
const [major, minor, featurePatch] = version.split('.');
const feature = featurePatch.substring(0, 1);
switch (rollForward) {
case 'latestMajor':
version = '';
break;
case 'latestMinor':
version = `${major}`;
break;
case 'latestFeature':
version = `${major}.${minor}`;
break;
case 'latestPatch':
version = `${major}.${minor}.${feature}xx`;
break;
}
if (ROLL_FORWARD_POLICIES.includes(rollForward)) {
minimumVersion = globalJson.sdk.version;
rollForwardPolicy = rollForward;
}
} else if (
!rollForward &&
!semver.prerelease(version) &&
versionPattern.test(version)
) {
minimumVersion = version;
rollForwardPolicy = 'patch';
} }
} }
return version; return {version, minimumVersion, rollForward: rollForwardPolicy};
} }
function outputInstalledVersion( function outputInstalledVersion(

Some files were not shown because too many files have changed in this diff Show More