Skip to content

Commit 5477e46

Browse files
committed
Upgrade packages.
1 parent 278c12b commit 5477e46

24 files changed

Lines changed: 3525 additions & 5367 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: checkout
2121
uses: actions/checkout@v4
2222

23-
- uses: actions/setup-node@v3
23+
- uses: actions/setup-node@v4
2424
with:
25-
node-version: "20.18.3"
25+
node-version: "22"
2626
cache: "yarn"
2727

2828
- name: Get yarn cache directory path

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

.storybook/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
const path = require("path")
1+
import path from "path"
2+
import { fileURLToPath } from "url"
3+
4+
const __filename = fileURLToPath(import.meta.url)
5+
const __dirname = path.dirname(__filename)
26

37
const config = {
48
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
@@ -57,7 +61,6 @@ const config = {
5761
utils: path.resolve(__dirname, "../utils/"),
5862
}
5963

60-
// Workaround to make storybook serve raw svg, not static path
6164
config.module.rules = config.module.rules.map(data => {
6265
if (/svg\|/.test(String(data.test)))
6366
data.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/

babel.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = {
99
plugins: [
1010
["styled-components", { ssr: !isTest, displayName: !isTest }],
1111
"@babel/plugin-transform-spread",
12-
"@babel/plugin-proposal-object-rest-spread",
1312
[
1413
"module-resolver",
1514
{

eslint.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const globals = require("globals")
2-
const pluginJs = require("@eslint/js")
3-
const pluginReact = require("eslint-plugin-react")
4-
const storybook = require("eslint-plugin-storybook")
1+
import globals from "globals"
2+
import pluginJs from "@eslint/js"
3+
import pluginReact from "eslint-plugin-react"
4+
import storybook from "eslint-plugin-storybook"
55

6-
module.exports = [
6+
export default [
77
{ files: ["**/*.{js,mjs,cjs,jsx}"] },
88
{
99
languageOptions: {
@@ -28,7 +28,6 @@ module.exports = [
2828
},
2929
{
3030
ignores: [
31-
// Ignore dotfiles
3231
".*.js",
3332
"node_modules/",
3433
"dist/",

jest/setup.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
import React from "react"
2+
3+
globalThis.React = React
4+
15
class ResizeObserver {
2-
observe() {}
6+
constructor(callback) {
7+
this.callback = callback
8+
}
9+
observe(element) {
10+
queueMicrotask(() => {
11+
this.callback([
12+
{
13+
target: element,
14+
contentRect: { width: 500, height: 500 },
15+
borderBoxSize: [{ inlineSize: 500, blockSize: 500 }],
16+
contentBoxSize: [{ inlineSize: 500, blockSize: 500 }],
17+
},
18+
])
19+
})
20+
}
321
unobserve() {}
422
disconnect() {}
523
}

jest/setupForEach.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,16 @@ Element.prototype.getBoundingClientRect = jest.fn(() => {
1818
right: 0,
1919
}
2020
})
21+
22+
Object.defineProperties(Element.prototype, {
23+
scrollHeight: { get: () => 500, configurable: true },
24+
scrollWidth: { get: () => 500, configurable: true },
25+
clientHeight: { get: () => 500, configurable: true },
26+
clientWidth: { get: () => 500, configurable: true },
27+
offsetHeight: { get: () => 500, configurable: true },
28+
offsetWidth: { get: () => 500, configurable: true },
29+
offsetTop: { get: () => 0, configurable: true },
30+
offsetLeft: { get: () => 0, configurable: true },
31+
scrollTop: { get: () => 0, set: () => {}, configurable: true },
32+
scrollLeft: { get: () => 0, set: () => {}, configurable: true },
33+
})

package.json

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@
4141
"@dnd-kit/core": "^6.3.1",
4242
"@dnd-kit/modifiers": "^9.0.0",
4343
"@dnd-kit/sortable": "^10.0.0",
44-
"@elastic/react-search-ui": "^1.23.0",
45-
"@elastic/search-ui-site-search-connector": "^1.23.0",
46-
"@prismicio/client": "7.17.2",
47-
"@storybook/test": "^8.6.12",
44+
"@elastic/react-search-ui": "^1.24.2",
45+
"@elastic/search-ui-site-search-connector": "^1.24.2",
46+
"@prismicio/client": "^7.21.6",
47+
"@storybook/test": "^8.6.17",
4848
"@styled-system/css": "^5.1.5",
4949
"@tanstack/react-table": "^8.21.3",
50-
"@tanstack/react-virtual": "3.13.6",
51-
"axios": "^1.8.4",
50+
"@tanstack/react-virtual": "^3.13.18",
51+
"axios": "^1.13.5",
5252
"polished": "^4.3.1",
5353
"react-portal": "^4.3.0",
54-
"react-select": "^5.10.1",
54+
"react-select": "^5.10.2",
5555
"styled-system": "^5.1.5",
56-
"throttle-debounce": "5.0.2",
56+
"throttle-debounce": "^5.0.2",
5757
"use-context-selector": "^2.0.0"
5858
},
5959
"peerDependencies": {
@@ -63,56 +63,55 @@
6363
"styled-components": ">=5.3.9"
6464
},
6565
"devDependencies": {
66-
"@babel/cli": "^7.27.0",
67-
"@babel/core": "^7.26.10",
68-
"@babel/eslint-parser": "^7.27.0",
69-
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
70-
"@babel/plugin-transform-modules-umd": "^7.25.9",
71-
"@babel/plugin-transform-runtime": "^7.26.10",
72-
"@babel/preset-env": "^7.26.9",
73-
"@babel/preset-react": "^7.26.3",
74-
"@storybook/addon-essentials": "^8.6.12",
75-
"@storybook/addon-interactions": "^8.6.12",
76-
"@storybook/addon-links": "^8.6.12",
66+
"@babel/cli": "^7.28.6",
67+
"@babel/core": "^7.29.0",
68+
"@babel/eslint-parser": "^7.28.6",
69+
"@babel/plugin-transform-modules-umd": "^7.27.1",
70+
"@babel/plugin-transform-runtime": "^7.29.0",
71+
"@babel/preset-env": "^7.29.0",
72+
"@babel/preset-react": "^7.28.5",
73+
"@storybook/addon-essentials": "^8.6.17",
74+
"@storybook/addon-interactions": "^8.6.17",
75+
"@storybook/addon-links": "^8.6.17",
7776
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
78-
"@storybook/blocks": "^8.6.12",
79-
"@storybook/react": "^8.6.12",
80-
"@storybook/react-webpack5": "^8.6.12",
81-
"@testing-library/jest-dom": "^6.6.3",
82-
"@testing-library/react": "^16.3.0",
77+
"@storybook/blocks": "^8.6.17",
78+
"@storybook/react": "^8.6.17",
79+
"@storybook/react-webpack5": "^8.6.17",
80+
"@testing-library/jest-dom": "^6.9.1",
81+
"@testing-library/react": "^16.3.2",
8382
"@testing-library/user-event": "^14.6.1",
8483
"babel-loader": "^10.0.0",
8584
"babel-plugin-module-resolver": "^5.0.2",
8685
"babel-plugin-styled-components": "^2.1.4",
8786
"clean-webpack-plugin": "^4.0.0",
8887
"copyfiles": "^2.4.1",
89-
"eslint": "^9.25.1",
88+
"eslint": "^10.0.0",
9089
"eslint-plugin-react": "^7.37.5",
91-
"eslint-plugin-react-hooks": "^5.2.0",
90+
"eslint-plugin-react-hooks": "^7.0.0",
9291
"eslint-plugin-storybook": "^0.12.0",
93-
"globals": "^16.0.0",
92+
"globals": "^17.3.0",
9493
"html-loader": "^5.1.0",
9594
"identity-obj-proxy": "^3.0.0",
9695
"install-peers-cli": "^2.2.0",
97-
"jest": "^29.7.0",
98-
"jest-environment-jsdom": "^29.7.0",
99-
"jest-styled-components": "^7.1.1",
100-
"jsdom": "26.1.0",
101-
"lodash": "^4.17.21",
102-
"markdown-loader": "8.0.0",
103-
"prettier": "^3.5.3",
96+
"jest": "^30.2.0",
97+
"jest-environment-jsdom": "^30.2.0",
98+
"jest-styled-components": "^7.2.0",
99+
"jsdom": "^28.1.0",
100+
"lodash": "^4.17.23",
101+
"markdown-loader": "^8.0.0",
102+
"prettier": "^3.8.1",
104103
"prop-types": "^15.8.1",
105104
"raw-loader": "^4.0.2",
106-
"react": "^19.1.0",
107-
"react-dom": "^19.1.0",
108-
"rimraf": "^6.0.1",
109-
"sass-loader": "^16.0.5",
110-
"storybook": "^8.6.12",
111-
"styled-components": "^6.1.17",
105+
"react": "^19.2.4",
106+
"react-dom": "^19.2.4",
107+
"rimraf": "^6.1.3",
108+
"sass-loader": "^16.0.7",
109+
"storybook": "^8.6.17",
110+
"styled-components": "^6.3.10",
112111
"svg-sprite-loader": "^6.0.11",
113112
"svgo-loader": "^4.0.0",
114113
"url-loader": "^4.1.1",
115-
"webpack": "^5.99.6",
114+
"webpack": "^5.105.2",
116115
"webpack-cli": "^6.0.1"
117116
}
118117
}

src/components/animation/index.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ it("provides render props", () => {
4141
)
4242

4343
expect(queryByText("myContent")).toBeInTheDocument()
44-
expect(spy).toBeCalledTimes(1)
44+
expect(spy).toHaveBeenCalledTimes(1)
4545
expect(props.transition).toBe("entered")
4646
})
4747

@@ -61,6 +61,6 @@ it("renders in a wrapper", () => {
6161
</Animation>
6262
)
6363

64-
expect(spy).toBeCalledTimes(1)
65-
expect(wrapperSpy).toBeCalledTimes(1)
64+
expect(spy).toHaveBeenCalledTimes(1)
65+
expect(wrapperSpy).toHaveBeenCalledTimes(1)
6666
})

src/components/button/__snapshots__/button.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`Borderless Button renders 1`] = `
44
.c0.c0 {

0 commit comments

Comments
 (0)