Skip to content

Commit 495987d

Browse files
authored
Use uuid library instead of web crypto API (#402)
1 parent 87b7106 commit 495987d

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
### Changed
1414
- Render a more test case-centric report ([#396](https://github.com/cucumber/react-components/pull/396))
1515

16+
### Fixed
17+
- Use uuid library instead of web crypto API ([#402](https://github.com/cucumber/react-components/pull/402))
18+
1619
### Removed
1720
- BREAKING CHANGE: Remove defunct scenario/step components `<ExamplesTable/>`, `<GherkinStep/>`, `<GherkinSteps/>`, `<HookStep/>`, `<HookSteps/>`, `<StepItem/>` and their corresponding `CustomRenderingSupport` properties ([#396](https://github.com/cucumber/react-components/pull/396))
1821
- BREAKING CHANGE: Remove defunct `<UriProvider/>` component and underlying context ([#396](https://github.com/cucumber/react-components/pull/396))

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"rehype-sanitize": "4.0.0",
4949
"remark-breaks": "2.0.2",
5050
"remark-gfm": "1.0.0",
51-
"use-debounce": "^10.0.0"
51+
"use-debounce": "^10.0.0",
52+
"uuid": "9.0.0"
5253
},
5354
"peerDependencies": {
5455
"react": "~18",

src/components/app/DocumentAccordion.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ import {
99
AccordionItemHeading,
1010
AccordionItemPanel,
1111
} from 'react-accessible-accordion'
12+
import { v4 as uuidv4 } from 'uuid'
1213

1314
import { StatusIcon } from '../gherkin/index.js'
1415
import styles from './DocumentAccordion.module.scss'
1516

1617
const idByUri = new Map<string, string>()
1718
function getIdByUri(uri: string): string {
1819
if (!idByUri.has(uri)) {
19-
idByUri.set(uri, crypto.randomUUID())
20+
idByUri.set(uri, uuidv4())
2021
}
2122
return idByUri.get(uri) as string
2223
}

0 commit comments

Comments
 (0)