Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/renovate-a89c9df.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@scaleway/eslint-config-react': patch
---

Updated dependency `typescript` to `5.5.2`.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"read-pkg": "9.0.1",
"shx": "0.3.4",
"tstyche": "2.0.0",
"typescript": "5.4.5",
"typescript": "5.5.2",
"vite": "5.3.2",
"vitest": "1.6.0",
"vitest-localstorage-mock": "0.1.2",
Expand Down
9 changes: 7 additions & 2 deletions packages/use-dataloader/src/__tests__/dataloader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ describe('Dataloader class', () => {
expect(instance.getData()).toBe(undefined)
expect(notify).toBeCalledTimes(0)

// don't await as we will cancel this instance before
instance.load().catch(() => null)

expect(method).toBeCalledTimes(1)
instance.cancel()
expect(notify).toBeCalledTimes(0)

expect(instance.getData()).toBe(undefined)
instance.clearData()
})
Expand Down Expand Up @@ -153,11 +155,14 @@ describe('Dataloader class', () => {
notifyChanges,
})

instance.load().catch(undefined)
expect(notifyChanges).toBeCalledTimes(0)

await instance.load().catch(undefined)
expect(notifyChanges).toBeCalledTimes(1)

instance.cancel()
await waitForExpect(() => expect(instance.status).toBe(StatusEnum.IDLE))
expect(notifyChanges).toBeCalledTimes(1)
expect(notifyChanges).toBeCalledTimes(2)
})

test('should create instance with error and cancel', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/use-dataloader/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const marshalQueryKey = (queryKey: KeyType) =>
return subKey.toISOString()
}

return subKey?.toString()
return subKey.toString()
})
.join('.')
: queryKey.toString()
2 changes: 1 addition & 1 deletion packages/use-i18n/src/usei18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const I18nContextProvider = ({

const trad: Record<string, string> = {
...result.defaultLocale.default,
...result[currentLocale]?.default,
...result[currentLocale].default,
}

setTranslations(prevState => ({
Expand Down
39 changes: 23 additions & 16 deletions pnpm-lock.yaml

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