• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zooniverse / front-end-monorepo / 14625666770

23 Apr 2025 06:42PM UTC coverage: 75.582% (-0.04%) from 75.622%
14625666770

push

github

web-flow
build(deps): bump swr from 2.3.2 to 2.3.3 (#6848)

Bumps [swr](https://github.com/vercel/swr) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/v2.3.2...v2.3.3)

---
updated-dependencies:
- dependency-name: swr
  dependency-version: 2.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

11194 of 17074 branches covered (65.56%)

Branch coverage included in aggregate %.

17345 of 20685 relevant lines covered (83.85%)

386.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.13
/packages/lib-react-components/src/hooks/useTextData.js
1
import { useEffect, useState } from 'react'
1✔
2

1,332!
3
async function requestData(src) {
70!
4
  const response = await fetch(src)
7✔
5
  if (!response.ok) {
14✔
6
    const error = new Error(response.statusText)
×
7
    error.status = response.status
×
8
    throw error
7✔
9
  }
10
  const responseData = await response.text()
7✔
11
  return responseData
7✔
12
}
1✔
13

14
export default function useTextData(src) {
15
  const [error, setError] = useState(null)
7✔
16
  const [data, setData] = useState('')
7✔
17

18
  useEffect(function onSrcChange() {
7✔
19
    async function handleData() {
42!
20
      try {
21
        const rawData = await requestData(src)
7✔
22
        if (rawData) setData(rawData)
14✔
23
      } catch (error) {
24
        setError(error)
×
25
        onError(error)
7✔
26
      }
27
    }
7✔
28

29
    if (src) {
7✔
30
      handleData()
7✔
31
    }
32
  }, [src])
33

34
  const loading = !data && !error
7✔
35
  return { data, error, loading }
7✔
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc