Skip to content

Commit 1c31136

Browse files
authored
Merge pull request #1551 from blockful/feat/update-next-16
feat: update to next 16
2 parents 4cbbe8c + 6ec031c commit 1c31136

File tree

7 files changed

+2310
-1790
lines changed

7 files changed

+2310
-1790
lines changed

apps/dashboard/.storybook/main.ts

Lines changed: 19 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,40 @@
11
import type { StorybookConfig } from "@storybook/nextjs";
22

3-
import { join, dirname } from "path";
3+
import { dirname } from "path";
44
import { resolve } from "path";
5+
import { fileURLToPath } from "url";
56
import dotenv from "dotenv";
67

8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
711
dotenv.config({
812
path: resolve(__dirname, "../.env.local"),
913
});
1014

11-
/**
12-
* This function is used to resolve the absolute path of a package.
13-
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
14-
*/
15-
function getAbsolutePath(value: string): any {
16-
return dirname(require.resolve(join(value, "package.json")));
17-
}
1815
const config: StorybookConfig = {
1916
stories: [
2017
"../stories/**/*.mdx",
2118
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)",
2219
"../shared/**/*.stories.@(js|jsx|mjs|ts|tsx)",
2320
],
2421
addons: [
25-
getAbsolutePath("@storybook/addon-onboarding"),
26-
getAbsolutePath("@chromatic-com/storybook"),
27-
getAbsolutePath("@storybook/addon-vitest"),
28-
getAbsolutePath("@storybook/addon-designs"),
22+
"@storybook/addon-onboarding",
23+
"@chromatic-com/storybook",
24+
"@storybook/addon-vitest",
25+
"@storybook/addon-designs",
2926
],
30-
framework: getAbsolutePath("@storybook/nextjs"),
27+
framework: {
28+
name: "@storybook/nextjs",
29+
options: {},
30+
},
3131
staticDirs: ["../public"],
3232

33-
webpackFinal: async (config) => {
34-
// Fix for Next.js 15 compatibility with Storybook
35-
// Disable persistent caching to avoid webpack hook issues
36-
config.cache = false;
37-
38-
// Disable infrastructureLogging errors
39-
if (config.infrastructureLogging) {
40-
config.infrastructureLogging.level = "error";
41-
}
42-
43-
// Fix circular dependency issues in production builds
44-
config.optimization = {
45-
...config.optimization,
46-
moduleIds: "named",
47-
chunkIds: "named",
48-
mangleExports: false,
49-
minimize: false,
50-
};
51-
52-
// Inject Figma env variables into browser bundle for Storybook addon-designs
53-
const webpack = require("webpack");
54-
config.plugins = config.plugins || [];
55-
56-
const figmaEnvVars: Record<string, string> = {};
57-
58-
if (process.env.FIGMA_TOKEN) {
59-
figmaEnvVars["process.env.FIGMA_TOKEN"] = JSON.stringify(
60-
process.env.FIGMA_TOKEN
61-
);
62-
} else {
63-
console.warn("⚠️ FIGMA_TOKEN not found");
64-
}
65-
66-
if (process.env.FIGMA_FILE_URL) {
67-
figmaEnvVars["process.env.FIGMA_FILE_URL"] = JSON.stringify(
68-
process.env.FIGMA_FILE_URL
69-
);
70-
} else {
71-
console.warn("⚠️ FIGMA_FILE_URL not found");
72-
}
73-
74-
if (Object.keys(figmaEnvVars).length > 0) {
75-
config.plugins.push(new webpack.DefinePlugin(figmaEnvVars));
76-
}
77-
78-
return config;
79-
},
33+
env: (config) => ({
34+
...config,
35+
FIGMA_TOKEN: process.env.FIGMA_TOKEN || "",
36+
FIGMA_FILE_URL: process.env.FIGMA_FILE_URL || "",
37+
}),
8038
};
39+
8140
export default config;
Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
import { addons } from "@storybook/manager-api";
2-
import { create } from "@storybook/theming";
1+
import { addons } from "storybook/manager-api";
2+
import { create } from "storybook/theming";
33

44
addons.setConfig({
5-
theme: create({
6-
base: "dark",
7-
8-
// Branding
9-
brandTitle: "Orbit UI",
10-
brandUrl: "/",
11-
brandImage: "./images/orbit-ui-logo.png",
12-
brandTarget: "_self",
13-
14-
// UI colors
15-
colorPrimary: "#27272A", // Primary color
16-
colorSecondary: "#EC762E", // Secondary color (used for highlights)
17-
18-
// Backgrounds
19-
appBg: "#18181B", // Main background
20-
appContentBg: "#18181B", // Content area background
21-
appBorderColor: "#27272A", // Border color
22-
appBorderRadius: 0, // Border radius
23-
24-
// Toolbar (top bar)
25-
barTextColor: "#FAFAFA", // Toolbar text color
26-
barSelectedColor: "#EC762E", // Selected item color
27-
barBg: "#18181B", // Toolbar background
28-
29-
// Text colors
30-
textColor: "#A1A1AA", // Primary text
31-
textInverseColor: "#18181B", // Inverse text
32-
textMutedColor: "#52525B", // Muted text
33-
34-
// Typography
35-
fontBase: '"Roboto Mono", sans-serif',
36-
fontCode: '"Roboto Mono", monospace',
37-
}),
38-
});
5+
theme: create({
6+
base: "dark",
7+
8+
// Branding
9+
brandTitle: "Orbit UI",
10+
brandUrl: "/",
11+
brandImage: "./images/orbit-ui-logo.png",
12+
brandTarget: "_self",
13+
14+
// UI colors
15+
colorPrimary: "#27272A", // Primary color
16+
colorSecondary: "#EC762E", // Secondary color (used for highlights)
17+
18+
// Backgrounds
19+
appBg: "#18181B", // Main background
20+
appContentBg: "#18181B", // Content area background
21+
appBorderColor: "#27272A", // Border color
22+
appBorderRadius: 0, // Border radius
23+
24+
// Toolbar (top bar)
25+
barTextColor: "#FAFAFA", // Toolbar text color
26+
barSelectedColor: "#EC762E", // Selected item color
27+
barBg: "#18181B", // Toolbar background
28+
29+
// Text colors
30+
textColor: "#A1A1AA", // Primary text
31+
textInverseColor: "#18181B", // Inverse text
32+
textMutedColor: "#52525B", // Muted text
33+
34+
// Typography
35+
fontBase: '"Roboto Mono", sans-serif',
36+
fontCode: '"Roboto Mono", monospace',
37+
}),
38+
});

apps/dashboard/package.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
"lottie-react": "^2.4.1",
4242
"lucide-react": "^0.511.0",
4343
"markdown-to-jsx": "^7.7.13",
44-
"next": "15.5.9",
44+
"next": "16.1.3",
4545
"nuqs": "^2.8.4",
46-
"react": "19.1.0",
46+
"react": "19.2.3",
4747
"react-blockies": "^1.4.1",
4848
"react-csv": "^2.2.2",
49-
"react-dom": "19.1.0",
49+
"react-dom": "19.2.3",
5050
"react-hook-form": "^7.69.0",
5151
"react-hot-toast": "^2.6.0",
5252
"react-intersection-observer": "^9.16",
@@ -64,34 +64,38 @@
6464
"devDependencies": {
6565
"@chromatic-com/storybook": "^4.1.1",
6666
"@storybook/addon-designs": "^11.1.0",
67-
"@storybook/addon-onboarding": "^9.1.10",
68-
"@storybook/addon-vitest": "9.1.10",
69-
"@storybook/manager-api": "^8.6.14",
70-
"@storybook/nextjs": "^9.1.10",
71-
"@storybook/react": "^9.1.10",
72-
"@storybook/theming": "^8.6.14",
67+
"@storybook/addon-onboarding": "^10.2.0",
68+
"@storybook/addon-vitest": "^10.2.0",
69+
"@storybook/nextjs": "^10.2.0",
70+
"@storybook/react": "^10.2.0",
7371
"@tailwindcss/postcss": "^4.1.7",
7472
"@types/jest": "^29.5.14",
7573
"@types/lodash": "^4.17.16",
7674
"@types/node": "^20",
77-
"@types/react": "19.1.4",
75+
"@types/react": "19.2.8",
7876
"@types/react-blockies": "^1.4.4",
7977
"@types/react-csv": "^1.1.10",
80-
"@types/react-dom": "19.1.5",
78+
"@types/react-dom": "19.2.3",
8179
"dotenv": "^16.6.1",
82-
"eslint": "^8",
83-
"eslint-config-next": "15.3.2",
84-
"eslint-plugin-storybook": "^9.1.10",
80+
"eslint": "^9",
81+
"eslint-config-next": "16.1.3",
82+
"eslint-plugin-storybook": "^10.2.0",
8583
"jest": "^29.7.0",
8684
"playwright": "^1.52.0",
8785
"postcss": "^8",
8886
"prettier": "^3.4.2",
8987
"prettier-plugin-tailwindcss": "^0.6.11",
90-
"storybook": "^9.1.10",
88+
"storybook": "^10.2.0",
9189
"tailwindcss": "^4.1.7",
9290
"ts-jest": "^29.2.6",
9391
"tw-animate-css": "^1.3.0",
9492
"typescript": "^5",
9593
"vitest": "^3.2.1"
94+
},
95+
"pnpm": {
96+
"overrides": {
97+
"@types/react": "19.2.8",
98+
"@types/react-dom": "19.2.3"
99+
}
96100
}
97101
}

apps/dashboard/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"moduleResolution": "bundler",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"jsx": "preserve",
14+
"jsx": "react-jsx",
1515
"incremental": true,
1616
"plugins": [
1717
{

eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export default [
2+
{
3+
ignores: [
4+
"apps/api-gateway/**",
5+
"node_modules/**",
6+
"dist/**",
7+
"build/**",
8+
".next/**",
9+
"out/**",
10+
"coverage/**",
11+
"*.config.js",
12+
"*.config.ts",
13+
"*.config.mjs",
14+
"packages/graphql-client/generated.ts",
15+
"packages/graphql-client/types.ts",
16+
"apps/api-gateway/schema.graphql",
17+
"storybook-static/**",
18+
".storybook/**",
19+
],
20+
},
21+
];

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
"@commitlint/cli": "^19.5.0",
3131
"@commitlint/config-conventional": "^19.5.0",
3232
"@types/node": "^20.16.5",
33-
"@typescript-eslint/eslint-plugin": "^6.21.0",
34-
"@typescript-eslint/parser": "^6.21.0",
33+
"@typescript-eslint/eslint-plugin": "^8",
34+
"@typescript-eslint/parser": "^8",
3535
"dotenv-cli": "^7.4.4",
36-
"eslint": "^8.57.0",
36+
"eslint": "^9",
3737
"eslint-config-prettier": "^9.1.0",
3838
"eslint-plugin-prettier": "^5.2.1",
3939
"husky": "^9.1.6",

0 commit comments

Comments
 (0)