mirror of
https://github.com/actions/setup-node.git
synced 2025-07-23 23:18:25 +02:00
optimize code
This commit is contained in:
parent
15798eaae7
commit
785620d55b
6 changed files with 16 additions and 92 deletions
|
@ -10,14 +10,6 @@ export default class RcBuild extends BaseDistribution {
|
|||
super(nodeInfo);
|
||||
}
|
||||
|
||||
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 || [];
|
||||
}
|
||||
|
||||
protected evaluateVersions(versions: string[]): string {
|
||||
let version = '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue