Skip to content

Commit 0d76a21

Browse files
Refactor the project structure and update dependencies for improved compatibility
1 parent f945ebc commit 0d76a21

File tree

21 files changed

+3522
-12565
lines changed

21 files changed

+3522
-12565
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ yarn-error.log*
2727
.serverless
2828
.env
2929
.vscode
30+
storybook-static
31+
tsconfig.tsbuildinfo
32+
debug-storybook.log

.storybook/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ import type { StorybookConfig } from '@storybook/nextjs'
22

33
const config: StorybookConfig = {
44
stories: ['../stories/**/*.stories.js', '../stories/**/*.stories.tsx'],
5-
addons: ['@storybook/addon-essentials'],
5+
addons: ['@storybook/addon-docs'],
6+
67
framework: {
78
name: '@storybook/nextjs',
89
options: {},
9-
},
10-
docs: {
11-
autodocs: 'tag',
12-
},
10+
}
1311
}
1412
export default config

.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from 'styled-components'
2-
import type { Preview, Decorator } from '@storybook/react'
2+
import type { Preview, Decorator } from '@storybook/nextjs'
33

44
import { ThemeProvider } from '@/contexts'
55
import '../src/app/global.css'

bun.lock

Lines changed: 3380 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next-env.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
experimental: {
4-
appDir: true,
5-
},
63
compiler: {
74
styledComponents: true,
85
},
6+
webpack: (config, { dev, isServer }) => {
7+
if (dev) {
8+
config.cache = { type: 'memory' }
9+
}
10+
return config
11+
},
912
}
1013

1114
module.exports = nextConfig

package.json

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,47 @@
33
"version": "0.2.0",
44
"license": "MIT",
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "next dev --turbo",
77
"build": "next build",
88
"start": "next start",
99
"tsc": "tsc",
1010
"lint": "next lint",
1111
"format": "prettier --write ./src",
1212
"storybook": "storybook dev -p 6006",
13-
"test": "jest --verbose --coverage --silent",
13+
"test": "jest --coverage --silent",
1414
"build-storybook": "storybook build"
1515
},
1616
"dependencies": {
1717
"lodash-es": "^4.17.21",
18-
"next": "^13.2.4",
19-
"polished": "^4.2.2",
20-
"react": "^18.2.0",
21-
"react-dom": "^18.2.0",
18+
"next": "^15.5.2",
19+
"polished": "^4.3.1",
20+
"react": "^19.1.1",
21+
"react-dom": "^19.1.1",
2222
"react-feather": "^2.0.10",
23-
"recharts": "2.5.0",
24-
"styled-components": "^6.0.0-beta.12"
23+
"recharts": "3.1.2",
24+
"styled-components": "^6.1.19"
2525
},
2626
"devDependencies": {
2727
"@react-mock/fetch": "^0.3.0",
28-
"@storybook/addon-essentials": "^7.0.0-beta.62",
29-
"@storybook/addon-storyshots": "^7.0.0-beta.62",
30-
"@storybook/addons": "^7.0.0-beta.62",
31-
"@storybook/nextjs": "7.0.0-beta.62",
32-
"@storybook/react": "^7.0.0-beta.62",
33-
"@storybook/theming": "^7.0.0-beta.62",
34-
"@testing-library/jest-dom": "^5.16.5",
35-
"@testing-library/react": "^14.0.0",
36-
"@types/jest": "^29.5.0",
37-
"@types/lodash-es": "^4.17.7",
38-
"@types/node": "18.15.7",
39-
"@types/react": "18.0.29",
40-
"@types/react-dom": "18.0.11",
41-
"@typescript-eslint/eslint-plugin": "^5.56.0",
42-
"@typescript-eslint/parser": "^5.56.0",
43-
"autoprefixer": "^10.4.14",
44-
"eslint": "8.36.0",
45-
"eslint-config-next": "^13.2.4",
46-
"eslint-config-prettier": "^8.8.0",
47-
"jest": "^29.5.0",
48-
"jest-environment-jsdom": "^29.5.0",
49-
"next-transpile-modules": "^9.0.0",
50-
"postcss": "^8.4.21",
51-
"prettier": "^2.8.7",
52-
"react-test-renderer": "^18.2.0",
53-
"storybook": "7.0.0-beta.61",
54-
"tailwindcss": "^3.2.7",
55-
"typescript": "5.0.2"
56-
},
57-
"engines": {
58-
"node": ">=18.x"
28+
"@storybook/nextjs": "9.1.3",
29+
"@tailwindcss/postcss": "^4.1.12",
30+
"@testing-library/jest-dom": "^6.8.0",
31+
"@testing-library/react": "^16.3.0",
32+
"@types/jest": "^30.0.0",
33+
"@types/lodash-es": "^4.17.12",
34+
"@types/node": "24.3.0",
35+
"@types/react": "19.1.11",
36+
"@types/react-dom": "19.1.8",
37+
"eslint": "9.34.0",
38+
"eslint-config-next": "^15.5.2",
39+
"eslint-config-prettier": "^10.1.8",
40+
"jest": "^30.1.1",
41+
"jest-environment-jsdom": "^30.1.1",
42+
"next-transpile-modules": "^10.0.1",
43+
"prettier": "^3.6.2",
44+
"storybook": "9.1.3",
45+
"tailwindcss": "^4.1.12",
46+
"typescript": "5.9.2",
47+
"@storybook/addon-docs": "9.1.3"
5948
}
6049
}

postcss.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

postcss.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const config = {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
},
5+
}
6+
export default config

setupJest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@testing-library/jest-dom/extend-expect'
1+
import '@testing-library/jest-dom'
22

33
class ResizeObserver {
44
observe() {
@@ -11,4 +11,5 @@ class ResizeObserver {
1111
// do nothing
1212
}
1313
}
14+
// @ts-ignore
1415
window.ResizeObserver = ResizeObserver

0 commit comments

Comments
 (0)