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

spautz / react-hibernate / 10893842371

16 Sep 2024 11:48PM CUT coverage: 90.476% (-0.7%) from 91.176%
10893842371

push

github

web-flow
build(deps): bump express from 4.19.2 to 4.21.0 (#65)

Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

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

21 of 23 branches covered (91.3%)

Branch coverage included in aggregate %.

74 of 82 relevant lines covered (90.24%)

14.07 hits per line

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

100.0
/packages/react-pauseable-containers/src/PauseableContextContainer.tsx
1
import propTypes from 'prop-types';
1✔
2
import React, { Context, useContext, useRef } from 'react';
1✔
3

4
import { PauseableContainerProps } from './types';
5

6
export interface PauseableContextContainerProps extends PauseableContainerProps {
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
  Context: Context<any>;
9
}
10

11
const PauseableContextContainer: React.FC<PauseableContextContainerProps> = (props) => {
1✔
12
  const { children, Context, shouldUpdate } = props;
4✔
13

14
  const currentValue = useContext(Context);
4✔
15
  const lastAllowedValueRef = useRef(currentValue);
4✔
16
  if (shouldUpdate) {
4✔
17
    lastAllowedValueRef.current = currentValue;
2✔
18
  }
19

20
  return <Context.Provider value={lastAllowedValueRef.current}>{children}</Context.Provider>;
4✔
21
};
22

23
PauseableContextContainer.propTypes = {
1✔
24
  // @TODO: Trying to replicate the Consumer/Producer shape in propTypes doesn't play nice with InferProps
25
  Context: propTypes.any.isRequired,
26
  children: propTypes.node.isRequired,
27
  shouldUpdate: propTypes.bool.isRequired,
28
};
29

30
export { PauseableContextContainer };
1✔
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

© 2025 Coveralls, Inc