fetch.default

This commit is contained in:
Tom Hu
2022-04-04 17:10:55 -04:00
parent 351baf62fa
commit d4729eeb39
7 changed files with 1626 additions and 1257 deletions

View File

@@ -1,5 +1,5 @@
import * as core from '@actions/core';
import fetch from 'node-fetch';
import * as fetch from 'node-fetch';
const versionInfo = async (platform: string, version?: string) => {
if (version) {
@@ -7,7 +7,7 @@ const versionInfo = async (platform: string, version?: string) => {
}
try {
const metadataRes = await fetch( `https://uploader.codecov.io/${platform}/latest`, {
const metadataRes = await fetch.default( `https://uploader.codecov.io/${platform}/latest`, {
headers: {'Accept': 'application/json'},
});
const metadata = await metadataRes.json();