Skip to content

Commit 03f6252

Browse files
authored
Merge branch 'main' into fix/docs-page-improvements
2 parents 3cf4362 + 516808b commit 03f6252

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

app/components/Compare/FacetBarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
131131
csv: false,
132132
altCopy: true,
133133
},
134-
buttonTitle: {
134+
buttonTitles: {
135135
img: $t('package.trends.download_file', { fileType: 'PNG' }),
136136
svg: $t('package.trends.download_file', { fileType: 'SVG' }),
137137
altCopy: $t('package.trends.copy_alt.button_label'),

nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default defineNuxtConfig({
104104
isr: {
105105
expiration: 60 * 60 /* one hour */,
106106
passQuery: true,
107-
allowQuery: ['color', 'labelColor', 'label', 'name', 'style'],
107+
allowQuery: ['color', 'labelColor', 'label', 'name', 'style', 'value'],
108108
},
109109
},
110110
'/api/registry/image-proxy': {

test/e2e/badge.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ test.describe('badge API', () => {
172172
expect(body).toContain(customLabel)
173173
})
174174

175+
test('custom value parameter is applied to SVG', async ({ page, baseURL }) => {
176+
const customValue = 'custom-value-123'
177+
const url = toLocalUrl(
178+
baseURL,
179+
`/api/registry/badge/version/nuxt?value=${encodeURIComponent(customValue)}`,
180+
)
181+
const { body } = await fetchBadge(page, url)
182+
183+
expect(body).toContain(customValue)
184+
})
185+
175186
test('style=default keeps current badge renderer', async ({ page, baseURL }) => {
176187
const url = toLocalUrl(baseURL, '/api/registry/badge/version/nuxt?style=default')
177188
const { body } = await fetchBadge(page, url)

0 commit comments

Comments
 (0)