mirror of
https://gitea.com/actions/setup-node.git
synced 2025-12-14 12:41:33 +08:00
optimize code
This commit is contained in:
@@ -131,14 +131,6 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
return `https://nodejs.org/dist`;
|
||||
}
|
||||
|
||||
protected async getNodejsVersions(): Promise<INodeVersion[]> {
|
||||
const initialUrl = this.getDistributionUrl();
|
||||
const dataUrl = `${initialUrl}/index.json`;
|
||||
|
||||
let response = await this.httpClient.getJson<INodeVersion[]>(dataUrl);
|
||||
return response.result || [];
|
||||
}
|
||||
|
||||
private getManifest(): Promise<tc.IToolRelease[]> {
|
||||
core.debug('Getting manifest from actions/node-versions@main');
|
||||
return tc.getManifestFromRepo(
|
||||
|
||||
Reference in New Issue
Block a user