Skip to content

Commit

Permalink
Merge pull request #4411 from traPtitech/dependabot/npm_and_yarn/pret…
Browse files Browse the repository at this point in the history
…tier-3.3.3

build(deps-dev): bump prettier from 2.8.8 to 3.3.3
  • Loading branch information
nokhnaton authored Nov 4, 2024
2 parents c384a17 + 0ec5237 commit 4a6d99e
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 53 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
Expand Down
28 changes: 22 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"patch-package": "^8.0.0",
"pinia": "^2.2.5",
"postcss": "^8.4.39",
"prettier": "^2.7.1",
"prettier": "^3.3.3",
"rollup-plugin-brotli": "^3.1.0",
"sass": "^1.80.5",
"start-server-and-test": "^2.0.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
hasChild && !isOpened
? 'チャンネルツリーを展開'
: hasChild && isOpened
? 'チャンネルツリーを閉じる'
: undefined
? 'チャンネルツリーを閉じる'
: undefined
"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ const useChannelNotificationState = (props: { channelId: ChannelId }) => {
return s1 && !s2
? -1
: !s1 && s2
? 1
: compareStringInsensitive(u1.name, u2.name)
? 1
: compareStringInsensitive(u1.name, u2.name)
})
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/TabContentTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const useSettingsTitle = () => {
return isSettingsRouteName(name) ? name : undefined
})
const title = computed(() =>
name.value ? navigationRouteNameTitleMap[name.value] ?? '' : ''
name.value ? (navigationRouteNameTitleMap[name.value] ?? '') : ''
)
return { title }
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/ShareTarget/ShareTargetMessageInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
ref="textareaRef"
:class="$style.input"
:value="state.text"
@input="event => state.text = (event.target as HTMLTextAreaElement).value"
@input="
event =>
(state.text = (event.target as HTMLTextAreaElement).value)
"
/>
</div>
<div :class="$style.controls">
Expand Down
10 changes: 8 additions & 2 deletions src/components/UI/AudioPlayer/AudioPlayerVolumeSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ $afterVolumeSliderWidth: 48px;
}
}
.volumeSlider {
transition: width ease 0.3s, margin ease 0.3s, opacity ease 0.25s;
transition:
width ease 0.3s,
margin ease 0.3s,
opacity ease 0.25s;
width: 0;
opacity: 0;
margin: auto 0;
.volume[data-keep-expanded='true'] &,
.volume:hover & {
transition: width ease 0.3s, margin ease 0.3s, opacity ease 0.25s;
transition:
width ease 0.3s,
margin ease 0.3s,
opacity ease 0.25s;
width: $afterVolumeSliderWidth;
opacity: 1;
margin: auto 8px;
Expand Down
4 changes: 2 additions & 2 deletions src/composables/mainView/useSwipeDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const useSwipeDetector = (isEnabled: Ref<boolean>) => {
state.swipeDirection = !isHorizontalScroll
? 'none'
: diffX > 0
? 'right'
: 'left'
? 'right'
: 'left'
}

const touchmoveHandler = (e: Readonly<TouchEvent>) => {
Expand Down
4 changes: 2 additions & 2 deletions src/composables/subscription/useChannelSubscriptionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const useChannelSubscriptionState = (channelId: Ref<ChannelId>) => {
currentChannelSubscription.value === ChannelSubscribeLevel.notified
? ChannelSubscribeLevel.none
: currentChannelSubscription.value === ChannelSubscribeLevel.subscribed
? ChannelSubscribeLevel.notified
: ChannelSubscribeLevel.subscribed
? ChannelSubscribeLevel.notified
: ChannelSubscribeLevel.subscribed
changeSubscriptionLevel(level)
}
return {
Expand Down
36 changes: 21 additions & 15 deletions src/lib/basic/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,34 @@
* @param key Recordのキーにしたいオブジェクトのキー
*/
export const reduceToRecord = <T>(array: readonly T[], key: keyof T) =>
array.reduce((acc, cur) => {
const ck = cur[key]
if (typeof ck !== 'string') return acc
return Object.assign(acc, { [ck]: cur })
}, {} as Record<string, T>)
array.reduce(
(acc, cur) => {
const ck = cur[key]
if (typeof ck !== 'string') return acc
return Object.assign(acc, { [ck]: cur })
},
{} as Record<string, T>
)

/**
* オブジェクトの配列から重複を許す特定のキーを用いたRecordを生成する
* @param array 対象オブジェクトの配列
* @param key Recordのキーにしたいオブジェクトのキー
*/
export const reduceToRecordOfArray = <T>(array: readonly T[], key: keyof T) =>
array.reduce((acc, cur) => {
const ck = cur[key]
if (typeof ck !== 'string') return acc
if (Object.prototype.hasOwnProperty.call(acc, ck)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
acc[ck]!.push(cur)
return acc
}
return Object.assign(acc, { [ck]: [cur] })
}, {} as Record<string, T[]>)
array.reduce(
(acc, cur) => {
const ck = cur[key]
if (typeof ck !== 'string') return acc
if (Object.prototype.hasOwnProperty.call(acc, ck)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
acc[ck]!.push(cur)
return acc
}
return Object.assign(acc, { [ck]: [cur] })
},
{} as Record<string, T[]>
)

export const formatSnakeKeysToCamelShallow = (
obj: Record<string, unknown>
Expand Down
17 changes: 8 additions & 9 deletions src/lib/markdown/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ type SizeEffectsCustom = (typeof sizeEffects)[number]
// https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
type IsSame<T, S> = [T] extends [S] ? ([S] extends [T] ? true : false) : false

type AnimeEffects = IsSame<
AnimeEffectsOriginal,
AnimeEffectsCustom
> extends true
? AnimeEffectsCustom
: never
type SizeEffects = IsSame<SizeEffectsOriginal, SizeEffectsCustom> extends true
? SizeEffectsCustom
: never
type AnimeEffects =
IsSame<AnimeEffectsOriginal, AnimeEffectsCustom> extends true
? AnimeEffectsCustom
: never
type SizeEffects =
IsSame<SizeEffectsOriginal, SizeEffectsCustom> extends true
? SizeEffectsCustom
: never

// 一致しなかったらneverになって型エラーが出る
export const animeEffectSet = new Set<AnimeEffects>(animeEffects)
Expand Down
9 changes: 6 additions & 3 deletions src/lib/notification/updateToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export const setupUpdateToast = (
})

// 1時間毎にアップデートをチェックする
setInterval(() => {
registration.update()
}, 1000 * 60 * 60)
setInterval(
() => {
registration.update()
},
1000 * 60 * 60
)
}
5 changes: 2 additions & 3 deletions src/store/domain/stampCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ const useStampCategoryPinia = defineStore('domain/stampCategory', () => {
toRaw(stampsStore.stampsMap.value)
)
traQStampCategory.value = traQStampsToStampCategory(traQStampMap)
unicodeStampCategories.value = await categorizeUnicodeStamps(
unicodeStampMap
)
unicodeStampCategories.value =
await categorizeUnicodeStamps(unicodeStampMap)
}

constructStampCategories()
Expand Down
4 changes: 2 additions & 2 deletions src/types/global-components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

declare module 'vue' {
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
RouterLink: (typeof import('vue-router'))['RouterLink']
RouterView: (typeof import('vue-router'))['RouterView']
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/Settings/ThemeTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<!-- eslint-disable vue/valid-v-model -->
<!-- TODO: 自動適用じゃなくてバリデーションしてから適用するようにする -->
<form-input
v-model="(val[name as keyof typeof val] as string)"
v-model="val[name as keyof typeof val] as string"
use-change-event
on-secondary
:class="$style.input"
Expand Down

0 comments on commit 4a6d99e

Please sign in to comment.