Skip to content

Commit

Permalink
fix(deps): Use vitest ^2.1.1 to avoid jest not defined error
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Nov 1, 2024
1 parent cf6ada0 commit 2ff4741
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.6.3",
"vanilla-jsoneditor": "^0.23.8",
"vitest": "^2.1.4",
"vitest": "^2.1.1",
"vitest-canvas-mock": "^0.3.3",
"vitest-fetch-mock": "^0.2.2",
"web-vitals": "^3.5.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/locale/LocaleWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default ({ componentName, defaultLocale }: LocaleWrapperInput) =>
};

return (
// @ts-ignore
<BaseComponent
ref={forwardedRef}
theme={{
Expand All @@ -47,6 +48,7 @@ export default ({ componentName, defaultLocale }: LocaleWrapperInput) =>
// 高阶组件需要转发ref
// 参考: https://zh-hans.reactjs.org/docs/forwarding-refs.html#forwarding-refs-in-higher-order-components
const ForwardComponent = React.forwardRef<typeof BaseComponent, BaseProps>(
// @ts-ignore
(props: BaseProps, ref) => <Hoc {...(props as BaseProps)} forwardedRef={ref} />
);

Expand Down
93 changes: 47 additions & 46 deletions pnpm-lock.yaml

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

0 comments on commit 2ff4741

Please sign in to comment.