Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
fix(deps): bump flag-icons from 5.0.3 to 6.0.0 (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Jan 1, 2022
1 parent 54808b3 commit b5a5260
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
14 changes: 7 additions & 7 deletions __tests__/components/Flag.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ describe('components/Flag.vue', () => {

describe('class', () => {
test.each([
['ja', 'flag-icon-ja'],
['US', 'flag-icon-us'],
['foo', 'flag-icon-foo']
['ja', 'fi-ja'],
['US', 'fi-us'],
['foo', 'fi-foo']
])('{ iso: "%s" } has "%s" class', async (iso, expectedClass) => {
wrapper.setProps({ iso })
await wrapper.vm.$nextTick()
expect(wrapper.find('span').classes()).toContain(expectedClass)
})
test('{ squared: true } has "flag-icon-squared" class', async () => {
test('{ squared: true } has "fis" class', async () => {
wrapper.setProps({ squared: true })
await wrapper.vm.$nextTick()
expect(wrapper.find('span').classes()).toContain('flag-icon-squared')
expect(wrapper.find('span').classes()).toContain('fis')
})
test('{ squared: false } does not have "flag-icon-squared" class', async () => {
test('{ squared: false } does not have "fis" class', async () => {
wrapper.setProps({ squared: false })
await wrapper.vm.$nextTick()
expect(wrapper.find('span').classes()).not.toContain('flag-icon-squared')
expect(wrapper.find('span').classes()).not.toContain('fis')
})
})

Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/__snapshots__/Navbar.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ exports[`components/Navbar.vue renders correctly 1`] = `
tabindex="0"
>
<span
class="flag-icon flag-icon-us"
class="fi fi-us"
title="us"
/>
 English
Expand All @@ -67,7 +67,7 @@ exports[`components/Navbar.vue renders correctly 1`] = `
class="navbar-item"
>
<span
class="flag-icon flag-icon-jp"
class="fi fi-jp"
title="jp"
/>
Expand Down
8 changes: 3 additions & 5 deletions components/Flag.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<span class="flag-icon" :class="flagIconClass" :title="flagTitle" />
<span class="fi" :class="flagIconClass" :title="flagTitle" />
</template>

<script lang="ts">
Expand All @@ -15,10 +15,8 @@ export default defineComponent({
setup(props) {
// Computed
const flagIconClass = computed(() => [
{
'flag-icon-squared': props.squared
},
`flag-icon-${props.iso.toLowerCase()}`
{ fis: props.squared },
`fi-${props.iso.toLowerCase()}`
])
const flagTitle = computed(() => props.title || props.iso)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@nuxtjs/composition-api": "^0.31.0",
"@nuxtjs/i18n": "^7.2.0",
"@nuxtjs/pwa": "^3.3.5",
"flag-icons": "^5.0.3",
"flag-icons": "^6.0.0",
"nuxt": "^2.15.8",
"nuxt-buefy": "^0.4.13",
"nuxt-typed-vuex": "^0.2.0"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5000,10 +5000,10 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"

flag-icons@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/flag-icons/-/flag-icons-5.0.3.tgz#bb217fb02df0cfd781a54645f33a1ed6d85c2343"
integrity sha512-3lP0dI99oMlxFpFFra/GxcSWxWQylIev7Fd0uRDZGut3LN54TFmwOs5fH51ldwfH2bWSRuJfmmWfGq3YAb91rA==
flag-icons@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/flag-icons/-/flag-icons-6.0.0.tgz#0ff45fca76ca7bf96297dbb8ef4f25d445584284"
integrity sha512-DHibS8eGjwGehRReqZRuIhtVp9qt2XIqBUBY3sX1U+dkVjbKVPjfidkQ0LFDA5dtds9seGooEl8XxlUCN1A4tA==

flat-cache@^3.0.4:
version "3.0.4"
Expand Down

0 comments on commit b5a5260

Please sign in to comment.