Skip to content

Commit fd249cd

Browse files
authored
Update dependencies, fix info group displaying 0s (#30)
* Update dependencies, fix info group displaying 0s * Remove postcss reference * Add Postcss back * Bump version
1 parent ff9038b commit fd249cd

File tree

9 files changed

+2196
-1218
lines changed

9 files changed

+2196
-1218
lines changed

.storybook/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,10 @@ const config: StorybookConfig = {
2424
core: {
2525
disableTelemetry: true,
2626
},
27+
refs: {
28+
"@chakra-ui/react": {
29+
disable: true,
30+
}
31+
}
2732
};
2833
export default config;

package.json

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,72 +60,77 @@
6060
]
6161
},
6262
"peerDependencies": {
63-
"@chakra-ui/react": "^2.3.6",
64-
"@emotion/react": "^11.10.4",
65-
"@emotion/styled": "^11.10.4",
63+
"@chakra-ui/react": "^2.10.9",
64+
"@emotion/react": "^11.14.0",
65+
"@emotion/styled": "^11.14.1",
6666
"framer-motion": "^11.11.4",
67-
"react": "^18.2.0",
68-
"react-dom": "^18.2.0"
67+
"react": "^19.2.0 || ^18.0.0",
68+
"react-dom": "^19.2.0 || ^18.0.0"
6969
},
7070
"devDependencies": {
71-
"@babel/core": "^7.28.3",
71+
"@babel/core": "^7.28.5",
7272
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
7373
"@babel/plugin-syntax-import-assertions": "^7.27.1",
74-
"@babel/preset-env": "^7.28.3",
74+
"@babel/preset-env": "^7.28.5",
7575
"@babel/preset-react": "^7.27.1",
7676
"@babel/preset-typescript": "^7.27.1",
7777
"@chakra-ui/react": "^2.10.9",
78-
"@chakra-ui/storybook-addon": "^5.2.7",
78+
"@chakra-ui/storybook-addon": "5.2.5",
7979
"@emotion/react": "^11.14.0",
8080
"@emotion/styled": "^11.14.1",
81-
"@rollup/plugin-commonjs": "^28.0.6",
81+
"@rollup/plugin-commonjs": "^28.0.9",
8282
"@rollup/plugin-image": "^3.0.3",
83-
"@rollup/plugin-node-resolve": "^16.0.1",
84-
"@rollup/plugin-typescript": "^12.1.4",
83+
"@rollup/plugin-node-resolve": "^16.0.3",
84+
"@rollup/plugin-typescript": "^12.3.0",
8585
"@storybook/addon-actions": "^8.6.14",
8686
"@storybook/addon-essentials": "^8.6.14",
8787
"@storybook/addon-interactions": "^8.6.14",
8888
"@storybook/addon-links": "^8.6.14",
8989
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
9090
"@storybook/blocks": "^8.6.14",
91+
"@storybook/components": "^8.6.14",
92+
"@storybook/manager-api": "^8.6.14",
9193
"@storybook/node-logger": "^8.6.14",
94+
"@storybook/preview-api": "^8.6.14",
9295
"@storybook/react": "^8.6.14",
9396
"@storybook/react-webpack5": "^8.6.14",
9497
"@storybook/testing-library": "^0.2.2",
98+
"@storybook/types": "^8.6.14",
9599
"@svgr/webpack": "^8.1.0",
96-
"@testing-library/jest-dom": "^6.8.0",
97-
"@testing-library/react": "^14.3.1",
100+
"@testing-library/dom": "^10.4.1",
101+
"@testing-library/jest-dom": "^6.9.1",
102+
"@testing-library/react": "^16.3.0",
98103
"@testing-library/user-event": "^14.6.1",
99-
"@types/jest": "^29.5.14",
100-
"@types/node": "^22.18.0",
101-
"@types/react-dom": "^19.1.9",
102-
"babel-jest": "^29.7.0",
104+
"@types/jest": "^30.0.0",
105+
"@types/node": "^22.18.13",
106+
"@types/react-dom": "^18.3.1",
107+
"babel-jest": "^30.2.0",
103108
"babel-loader": "^9.2.1",
104109
"babel-plugin-named-asset-import": "^0.3.8",
105110
"babel-preset-react-app": "^10.1.0",
106-
"browserslist": "^4.25.4",
111+
"browserslist": "^4.27.0",
107112
"eslint": "^8.57.1",
108113
"eslint-config-react-app": "^7.0.1",
109114
"eslint-webpack-plugin": "^4.2.0",
110115
"framer-motion": "^11.18.2",
111-
"jest": "^29.7.0",
112-
"jest-environment-jsdom": "^29.7.0",
113-
"jest-resolve": "^29.7.0",
116+
"jest": "^30.2.0",
117+
"jest-environment-jsdom": "^30.2.0",
118+
"jest-resolve": "^30.2.0",
114119
"msw": "2.4.11",
115120
"prettier": "^3.6.2",
116-
"react": "^19.1.1",
117-
"react-dom": "^19.1.1",
118-
"resolve": "^1.22.10",
119-
"rollup": "^4.50.0",
121+
"react": "^18.3.1",
122+
"react-dom": "^18.3.1",
123+
"resolve": "^1.22.11",
124+
"rollup": "^4.52.5",
120125
"rollup-plugin-dts": "^6.2.3",
121126
"rollup-plugin-peer-deps-external": "^2.2.4",
122127
"rollup-plugin-postcss": "^4.0.2",
123128
"storybook": "^8.6.14",
124-
"ts-jest": "^29.4.1",
129+
"ts-jest": "^29.4.5",
125130
"ts-node": "^10.9.2",
126-
"typescript": "^5.9.2",
131+
"typescript": "^5.9.3",
127132
"undici": "^5.29.0",
128-
"webpack": "^5.101.3"
133+
"webpack": "^5.102.1"
129134
},
130135
"jest": {
131136
"clearMocks": true,

rollup.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const config = [
2323
commonjs(),
2424
typescript({
2525
exclude: ["**/*.stories.*", "**/*.test.*"],
26+
compilerOptions: {
27+
outDir: 'dist',
28+
}
2629
}),
2730
postcss({
2831
extensions: [".css"],
@@ -46,6 +49,9 @@ const config = [
4649
commonjs(),
4750
typescript({
4851
exclude: ["**/*.stories.*", "**/*.test.*"],
52+
compilerOptions: {
53+
outDir: 'dist',
54+
}
4955
}),
5056
postcss({
5157
extensions: [".css"],

src/stories/control/User.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("User", () => {
2323

2424
fireEvent.click(loginButton);
2525

26-
expect(loginCallback).toBeCalled();
26+
expect(loginCallback).toHaveBeenCalled();
2727
});
2828

2929
it("should fire logout callback when button is clicked", () => {
@@ -35,7 +35,7 @@ describe("User", () => {
3535

3636
fireEvent.click(logoutButton);
3737

38-
expect(logoutCallback).toBeCalled();
38+
expect(logoutCallback).toHaveBeenCalled();
3939
});
4040

4141
it("should display name and FedID", () => {

src/stories/navigation/Flipper.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("Flipper", () => {
104104
const input = screen.getByLabelText("Previous Page");
105105
fireEvent.click(input);
106106

107-
expect(mockCallback).toBeCalledWith(111);
107+
expect(mockCallback).toHaveBeenCalledWith(111);
108108
});
109109

110110
it("should call callback when page changes (debounced)", async () => {
@@ -114,7 +114,7 @@ describe("Flipper", () => {
114114
const input = screen.getByLabelText("Previous Page");
115115
fireEvent.click(input);
116116

117-
await waitFor(() => expect(mockCallback).toBeCalledWith(111));
117+
await waitFor(() => expect(mockCallback).toHaveBeenCalledWith(111));
118118
});
119119

120120
it("should not change page if page is controlled externally", () => {
@@ -124,7 +124,7 @@ describe("Flipper", () => {
124124
const input = screen.getByLabelText("Previous Page");
125125
fireEvent.click(input);
126126

127-
expect(mockCallback).toBeCalledWith(111);
127+
expect(mockCallback).toHaveBeenCalledWith(111);
128128
expect(screen.getByLabelText("Current Page")).not.toHaveAttribute("value", "111");
129129
});
130130
});

src/stories/visualisation/Image.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("Image", () => {
3434
fireEvent.click(title);
3535

3636
await waitFor(() => {
37-
expect(onClick).toBeCalled();
37+
expect(onClick).toHaveBeenCalled();
3838
});
3939
});
4040

src/stories/visualisation/InfoGroup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export const InfoGroup = ({ info, height = "100%", cols = 2 }: InfoProps) => (
2626
bg='diamond.100'
2727
>
2828
<Text variant='infoGroupText' as='b'>{`${box.label}: `}</Text>
29-
<Text aria-label={`${box.label} Value`} variant='infoGroupText'>{`${
30-
box.value || "?"
31-
}`}</Text>
29+
<Text aria-label={`${box.label} Value`} variant='infoGroupText'>{
30+
box.value ?? "?"
31+
}</Text>
3232
</Box>
3333
</GridItem>
3434
))}

src/stories/visualisation/Table.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ describe("GenericListing", () => {
5959
);
6060

6161
fireEvent.click(screen.getByRole("cell", { name: /value4/i }));
62-
expect(callbackMock).toBeCalledWith({ key1: "value4", key2: "value5", key3: "value6" }, 1);
62+
expect(callbackMock).toHaveBeenCalledWith({ key1: "value4", key2: "value5", key3: "value6" }, 1);
6363
});
6464
});

0 commit comments

Comments
 (0)