Added previous version to payload.

This commit is contained in:
Mike Cao 2022-03-18 22:52:42 -07:00
parent f9f3a5bcab
commit 46174f652c

View File

@ -23,6 +23,7 @@ async function sendTelemetry(action) {
const { default: isDocker } = await import('is-docker');
const { default: fetch } = await import('node-fetch');
const upgrade = json.version !== undefined && json.version !== pkg.version;
const payload = {
action,
@ -33,7 +34,8 @@ async function sendTelemetry(action) {
os: `${os.type()} (${os.version()})`,
docker: isDocker(),
ci: isCI,
upgrade: json.version !== undefined && json.version !== pkg.version,
prev: json.version,
upgrade,
};
await retry(