diff --git a/packages/next/telemetry/events/version.ts b/packages/next/telemetry/events/version.ts index da0c7e55aee3c88..c7928e2cda71153 100644 --- a/packages/next/telemetry/events/version.ts +++ b/packages/next/telemetry/events/version.ts @@ -23,6 +23,7 @@ type EventCliSessionStarted = { imageDomainsCount: number | null imageSizes: string | null imageLoader: string | null + imageFormats: string | null trailingSlashEnabled: boolean reactStrictMode: boolean webpackVersion: number | null @@ -66,6 +67,7 @@ export function eventCliSession( | 'imageDomainsCount' | 'imageSizes' | 'imageLoader' + | 'imageFormats' | 'trailingSlashEnabled' | 'reactStrictMode' > @@ -97,6 +99,7 @@ export function eventCliSession( imageDomainsCount: images?.domains ? images.domains.length : null, imageSizes: images?.imageSizes ? images.imageSizes.join(',') : null, imageLoader: images?.loader, + imageFormats: images?.formats ? images.formats.join(',') : null, trailingSlashEnabled: !!nextConfig?.trailingSlash, reactStrictMode: !!nextConfig?.reactStrictMode, webpackVersion: event.webpackVersion || null, diff --git a/test/integration/telemetry/next.config.i18n-images b/test/integration/telemetry/next.config.i18n-images index 000e75dfc4bbe9d..0af3a77e421ad40 100644 --- a/test/integration/telemetry/next.config.i18n-images +++ b/test/integration/telemetry/next.config.i18n-images @@ -1,6 +1,7 @@ module.exports = phase => { return { images: { + formats: ['image/avif', 'image/webp'], imageSizes: [64, 128, 256, 512, 1024], domains: ['example.com'], }, diff --git a/test/integration/telemetry/test/index.test.js b/test/integration/telemetry/test/index.test.js index 9a2d3624427ab7c..b210f3a1cfad56a 100644 --- a/test/integration/telemetry/test/index.test.js +++ b/test/integration/telemetry/test/index.test.js @@ -485,6 +485,7 @@ describe('Telemetry CLI', () => { expect(event1).toMatch(/"localeDetectionEnabled": true/) expect(event1).toMatch(/"imageDomainsCount": 1/) expect(event1).toMatch(/"imageSizes": "64,128,256,512,1024"/) + expect(event1).toMatch(/"imageFormats": "image\/avif,image\/webp"/) expect(event1).toMatch(/"trailingSlashEnabled": false/) expect(event1).toMatch(/"reactStrictMode": false/)