mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-11 21:01:38 +00:00
chore(deps): move from node-fetch to undici (#1148)
* chore(deps): move from node-fetch to undici * fix: lint * test: see if this is actually running * test: skeptical * test: post-install
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as fetch from 'node-fetch';
|
||||
import {request} from 'undici';
|
||||
|
||||
const versionInfo = async (
|
||||
platform: string,
|
||||
@@ -10,10 +10,10 @@ const versionInfo = async (
|
||||
}
|
||||
|
||||
try {
|
||||
const metadataRes = await fetch.default( `https://uploader.codecov.io/${platform}/latest`, {
|
||||
const metadataRes = await request(`https://uploader.codecov.io/${platform}/latest`, {
|
||||
headers: {'Accept': 'application/json'},
|
||||
});
|
||||
const metadata = await metadataRes.json();
|
||||
const metadata = await metadataRes.body.json();
|
||||
core.info(`==> Running version ${metadata['version']}`);
|
||||
} catch (err) {
|
||||
core.info(`Could not pull latest version information: ${err}`);
|
||||
|
||||
Reference in New Issue
Block a user