Upgrade Node to v20 (#484)

* Node Version upgrade to 20

* 4.0.0

* Action Files upgrade to 20

* Updated version for outdated

* Update Format check

* Auth Test file update
This commit is contained in:
HarithaVattikuti 2023-12-04 19:47:27 +05:30 committed by GitHub
parent 2216f56ae1
commit 4d6c8fcf3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 63121 additions and 23075 deletions

View File

@ -15,3 +15,5 @@ jobs:
call-basic-validation:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20'

View File

@ -15,3 +15,5 @@ jobs:
call-check-dist:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '20'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@fastify/busboy.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@octokit/types.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,184 +1,184 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
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"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSourceCredentials>
<GPR>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</GPR>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json\\"/>
<add key="defaultPushSource" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json"/>
</config>
<packageSourceCredentials>
<AzureArtifacts>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</AzureArtifacts>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSourceCredentials>
<GPR>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</GPR>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSources>
<add key=\\"Source\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="Source" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</packageSources>
<packageSourceCredentials>
<Source>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</Source>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSources>
<add key=\\"Source\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="Source" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</packageSources>
<packageSourceCredentials>
<Source>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</Source>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json\\"/>
<add key="defaultPushSource" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json"/>
</config>
<packageSourceCredentials>
<AzureArtifacts>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</AzureArtifacts>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSourceCredentials>
<GPR>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</GPR>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com"/>
</config>
<packageSourceCredentials>
<GPR-GitHub>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</GPR-GitHub>
<GPR-Actions>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</GPR-Actions>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/otherorg/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/otherorg/index.json"/>
</config>
<packageSources>
<add key=\\"Source\\" value=\\"https://nuget.pkg.github.com/otherorg/index.json\\"/>
<add key="Source" value="https://nuget.pkg.github.com/otherorg/index.json"/>
</packageSources>
<packageSourceCredentials>
<Source>
<add key=\\"Username\\" value=\\"otherorg\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="otherorg"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</Source>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and token for other source 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json\\"/>
<add key="defaultPushSource" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json"/>
</config>
<packageSources>
<add key=\\"Source\\" value=\\"https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json\\"/>
<add key="Source" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json"/>
</packageSources>
<packageSourceCredentials>
<Source>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</Source>
</packageSourceCredentials>
</configuration>"
`;
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
"<?xml version=\\"1.0\\"?>
"<?xml version="1.0"?>
<configuration>
<config>
<add key=\\"defaultPushSource\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="defaultPushSource" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</config>
<packageSources>
<add key=\\"Source\\" value=\\"https://nuget.pkg.github.com/OwnerName/index.json\\"/>
<add key="Source" value="https://nuget.pkg.github.com/OwnerName/index.json"/>
</packageSources>
<packageSourceCredentials>
<Source>
<add key=\\"Username\\" value=\\"OwnerName\\"/>
<add key=\\"ClearTextPassword\\" value=\\"TEST_FAKE_AUTH_TOKEN\\"/>
<add key="Username" value="OwnerName"/>
<add key="ClearTextPassword" value="TEST_FAKE_AUTH_TOKEN"/>
</Source>
</packageSourceCredentials>
</configuration>"

View File

@ -30,7 +30,7 @@ outputs:
dotnet-version:
description: 'Contains the installed by action .NET SDK version for reuse.'
runs:
using: 'node16'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()

30868
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

45337
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -423,8 +423,13 @@ get_normalized_os() {
echo "$osname"
return 0
;;
macos)
osname='osx'
echo "$osname"
return 0
;;
*)
say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues."
say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, macos, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues."
return 1
;;
esac

9837
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "setup-dotnet",
"version": "3.0.2",
"version": "4.0.0",
"private": true,
"description": "setup dotnet action",
"main": "dist/setup/index.js",
@ -29,32 +29,32 @@
"@actions/cache": "^3.0.0",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^1.1.0",
"@actions/glob": "^0.3.0",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.4.0",
"@actions/http-client": "^2.0.1",
"@actions/io": "^1.0.2",
"fast-xml-parser": "^4.2.4",
"json5": "^2.2.3",
"semver": "^6.3.1"
"semver": "^7.5.4"
},
"devDependencies": {
"@types/jest": "^27.5.2",
"@types/node": "^16.11.25",
"@types/semver": "^6.2.2",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.34.0",
"@types/jest": "^29.5.10",
"@types/node": "^20.9.4",
"@types/semver": "^7.5.6",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-node": "^11.1.0",
"husky": "^8.0.1",
"jest": "^27.5.1",
"jest-circus": "^27.5.1",
"jest-each": "^27.5.1",
"prettier": "^2.8.4",
"ts-jest": "^27.0.5",
"typescript": "^4.8.4",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"jest-each": "^29.7.0",
"prettier": "^3.1.0",
"ts-jest": "^29.1.1",
"typescript": "^5.3.2",
"wget-improved": "^3.2.1"
},
"jest": {

View File

@ -253,7 +253,10 @@ export class DotnetCoreInstaller {
DotnetInstallDir.setEnvironmentVariable();
}
constructor(private version: string, private quality: QualityOptions) {}
constructor(
private version: string,
private quality: QualityOptions
) {}
public async installDotnet(): Promise<string | null> {
const versionResolver = new DotnetVersionResolver(this.version);