Skip to content

Commit

Permalink
chore: upgrade pnpm and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
khmm12 committed Sep 24, 2024
1 parent 6c709d0 commit b214b9c
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 240 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"focus-trap": "^7.6.0",
"polished": "^4.3.1",
"remeda": "^2.14.0",
"solid-js": "1.8.22",
"solid-js": "1.8.23",
"solid-transition-group": "^0.2.3",
"type-fest": "^4.26.1",
"valibot": "^0.42.1"
Expand All @@ -43,13 +43,13 @@
"@testing-library/user-event": "^14.5.2",
"@tsconfig/node20": "^20.1.4",
"@types/chrome": "^0.0.271",
"@types/node": "^20.16.5",
"@types/node": "^20.16.6",
"@vitest/coverage-v8": "^2.1.1",
"autoprefixer": "^10.4.20",
"browserslist": "^4.23.3",
"browserslist-to-esbuild": "^2.1.1",
"eslint": "8.57.0",
"eslint-config-love": "^66.0.0",
"eslint-config-love": "^71.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
Expand All @@ -61,15 +61,15 @@
"prettier": "^3.3.3",
"solid-devtools": "^0.30.1",
"typescript": "~5.5.4",
"typescript-eslint": "^8.6.0",
"vite": "^5.4.6",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.7",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-html": "^3.2.2",
"vite-plugin-solid": "2.10.2",
"vite-plugin-static-copy": "^1.0.6",
"vitest": "^2.1.1"
},
"packageManager": "pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c",
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b",
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
Expand Down
442 changes: 221 additions & 221 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/components/TimeMilestones/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('getDayMilestone', () => {
['18:00', 0.75],
['23:59', 0.99],
])('at %s equals to %f', (time, expected) => {
const [hours, minutes, seconds = 0] = time.split(':').map(Number)
const [hours = 0, minutes = 0, seconds = 0] = time.split(':').map(Number)
const currentDateTime = R.pipe(new Date(), D.setHours(hours), D.setMinutes(minutes), D.setSeconds(seconds))

expect(getDayMilestone(currentDateTime)).toBe(expected)
Expand All @@ -23,7 +23,7 @@ describe('getMonthMilestone', () => {
[16, '00:00', 0.5],
[30, '23:59', 0.99],
])('on %s at %s equals %f', (day, time, expected) => {
const [hours, minutes, seconds = 0] = time.split(':').map(Number)
const [hours = 0, minutes = 0, seconds = 0] = time.split(':').map(Number)
const currentDateTime = R.pipe(
new Date(),
D.setMonth(10),
Expand All @@ -43,7 +43,7 @@ describe('getWeekMilestone', () => {
[4, '13:00', 0.5],
[7, '23:59', 0.99],
])('on %s day at %s equals %f', (dayOfWeek, time, expected) => {
const [hours, minutes, seconds = 0] = time.split(':').map(Number)
const [hours = 0, minutes = 0, seconds = 0] = time.split(':').map(Number)
const currentDateTime = R.pipe(
new Date(),
D.startOfWeek,
Expand All @@ -63,7 +63,7 @@ describe('getYearMilestone', () => {
[7, 2, '23:59', 0.5],
[12, 31, '23:59', 0.99],
])('in %d month %dst day at %s equals %f', (month, day, time, expected) => {
const [hours, minutes, seconds = 0] = time.split(':').map(Number)
const [hours = 0, minutes = 0, seconds = 0] = time.split(':').map(Number)
const currentDateTime = R.pipe(
new Date(),
D.setMonth(month - 1),
Expand Down
13 changes: 6 additions & 7 deletions src/utils/get-current-locale.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ afterEach(() => {

describe('getCurrentLocale', () => {
it('returns chrome.i18n.getUILanguage() when available', () => {
if (globalThis.chrome == null) {
globalThis.chrome = null as never
vi.spyOn(globalThis, 'chrome', 'get').mockReturnValue({
// @ts-expect-error: mock
i18n: { getUILanguage: vi.fn() },
})
}
globalThis.chrome = null as never
vi.spyOn(globalThis, 'chrome', 'get').mockReturnValue({
// @ts-expect-error: mock
i18n: { getUILanguage: vi.fn() },
})

const getUILanguage = vi.fn().mockReturnValue('en-US')
// @ts-expect-error: mock
vi.spyOn(chrome.i18n, 'getUILanguage', 'get').mockReturnValue(getUILanguage)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-current-locale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chrome from '@/utils/chrome'

export default function getCurrentLocale(): string {
return chrome()?.i18n?.getUILanguage() ?? navigator.language
return chrome()?.i18n.getUILanguage() ?? navigator.language
}
2 changes: 1 addition & 1 deletion src/utils/storage/adapters/memory-storage-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IStorageAdapter, Subscriber, Unsubscribe } from '../types'

export default class MemoryStorageAdapter implements IStorageAdapter {
protected value: unknown | null = null
protected value: unknown = null

read(): unknown {
return this.value
Expand Down
1 change: 1 addition & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"target": "esnext",
"verbatimModuleSyntax": true,
"paths": {
Expand Down

0 comments on commit b214b9c

Please sign in to comment.