Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/upgrade-all-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ladle/react": patch
---

Upgrade all dependencies to their latest major and minor versions, including Babel 8, Koa 3, commander 15, globby 16, chokidar 5, open 11, react-hotkeys-hook 5, react-inspector 9, vitest 4 and msw. Internal adjustments were made for the Babel 8 API changes (named `@babel/types` exports, default-on parser plugins, stricter identifier validation).

The minimum supported Node.js version is now 22.12.0 (Node.js 20 has reached end-of-life).
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [22.x]
node-version: [22.x, 24.x]
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v4
with:
version: 9.15.1

- name: Setup Node.js environment
uses: actions/setup-node@v4
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ jobs:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: 9.15.1

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22.11
node-version: 24.x
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.9.0
v24.18.0
9 changes: 9 additions & 0 deletions css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Ambient declarations so `tsc` accepts CSS imports that are handled by the
// bundler (Vite) at runtime. TypeScript 6 reports unresolved side-effect
// imports (TS2882), so a bare `import "./styles.css"` needs a module shim.
declare module "*.css";

declare module "*.module.css" {
const classes: { readonly [key: string]: string };
export default classes;
}
12 changes: 6 additions & 6 deletions e2e/addons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"axe-playwright": "^2.0.3",
"cross-env": "^7.0.3",
"query-string": "^9.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"axe-playwright": "^2.2.2",
"cross-env": "^10.1.0",
"query-string": "^9.4.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
10 changes: 5 additions & 5 deletions e2e/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"@vitejs/plugin-react": "^6.0.2",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"@vitejs/plugin-react": "^6.0.3",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
16 changes: 8 additions & 8 deletions e2e/baseweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"autoprefixer": "^10.4.20",
"baseui": "^14.0.0",
"cross-env": "^7.0.3",
"postcss": "^8.4.49",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@playwright/test": "^1.61.1",
"autoprefixer": "^10.5.2",
"baseui": "^18.1.0",
"cross-env": "^10.1.0",
"postcss": "^8.5.15",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"styletron-engine-monolithic": "^1.0.0",
"styletron-react": "^6.1.1",
"tailwindcss": "^3.4.17"
"tailwindcss": "^4.3.1"
}
}
8 changes: 4 additions & 4 deletions e2e/config-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
8 changes: 4 additions & 4 deletions e2e/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
5 changes: 2 additions & 3 deletions e2e/css/.ladle/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@source "../src/**/*.{ts,tsx}";

h1 {
background: yellow;
Expand Down
15 changes: 8 additions & 7 deletions e2e/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"postcss": "^8.4.49",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwindcss": "^3.4.17"
"@playwright/test": "^1.61.1",
"@tailwindcss/postcss": "^4.3.1",
"autoprefixer": "^10.5.2",
"cross-env": "^10.1.0",
"postcss": "^8.5.15",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"tailwindcss": "^4.3.1"
}
}
2 changes: 1 addition & 1 deletion e2e/css/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
"@tailwindcss/postcss": {},
autoprefixer: {},
},
};
6 changes: 0 additions & 6 deletions e2e/css/tailwind.config.js

This file was deleted.

8 changes: 4 additions & 4 deletions e2e/decorators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
16 changes: 8 additions & 8 deletions e2e/msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"autoprefixer": "^10.4.20",
"baseui": "^14.0.0",
"cross-env": "^7.0.3",
"postcss": "^8.4.49",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@playwright/test": "^1.61.1",
"autoprefixer": "^10.5.2",
"baseui": "^18.1.0",
"cross-env": "^10.1.0",
"postcss": "^8.5.15",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"styletron-engine-monolithic": "^1.0.0",
"styletron-react": "^6.1.1",
"tailwindcss": "^3.4.17"
"tailwindcss": "^4.3.1"
}
}
2 changes: 1 addition & 1 deletion e2e/playwright-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"test": "echo 'no test'"
},
"dependencies": {
"@playwright/test": "^1.49.1"
"@playwright/test": "^1.61.1"
}
}
14 changes: 7 additions & 7 deletions e2e/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"@types/sync-fetch": "^0.4.3",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-server-and-test": "^2.0.9",
"sync-fetch": "0.6.0-2"
"@playwright/test": "^1.61.1",
"@types/sync-fetch": "^0.4.4",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"start-server-and-test": "^3.0.11",
"sync-fetch": "0.6.0"
}
}
8 changes: 4 additions & 4 deletions e2e/programmatic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
8 changes: 4 additions & 4 deletions e2e/provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
"@ladle/playwright-config": "workspace:*",
"@ladle/react": "workspace:*",
"@playwright/test": "^1.49.1",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@playwright/test": "^1.61.1",
"cross-env": "^10.1.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export default tseslint.config(
},
settings: {
react: {
version: "detect",
// Pinned instead of "detect": eslint-plugin-react 7.37.5's version
// auto-detection still calls the `context.getFilename()` API that
// ESLint 10 removed, which crashes the lint run.
version: "19.0",
},
},
},
Expand Down
48 changes: 19 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Vojtech Miksu <vojtech@miksu.cz>",
"license": "MIT",
"private": true,
"packageManager": "pnpm@9.15.1",
"packageManager": "pnpm@11.9.0",
"scripts": {
"lint": "eslint \"./{packages,e2e}/*/{lib,src,tests}/**/*.{ts,tsx}\" --max-warnings=0",
"test": "turbo run test --concurrency=1",
Expand Down Expand Up @@ -34,37 +34,27 @@
"e2e/msw"
],
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.11",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@eslint/js": "^9.17.0",
"@playwright/test": "^1.49.1",
"@types/eslint__js": "^8.42.3",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"eslint": "^9.17.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.14.0",
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.0",
"@commitlint/cli": "^21.1.0",
"@commitlint/config-conventional": "^21.1.0",
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.61.1",
"@types/eslint__js": "^9.14.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"eslint": "^10.6.0",
"eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-react": "^7.37.5",
"globals": "^17.7.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"prettier": "^3.4.2",
"turbo": "^2.3.3",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1"
"lint-staged": "^17.0.8",
"prettier": "^3.9.1",
"turbo": "^2.10.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.62.0"
},
"engines": {
"node": ">=22.12.0"
},
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
"@types/react": "19",
"react": "19",
"react-dom": "19",
"typescript": "5"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@ladle/react": "workspace:*",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}
7 changes: 1 addition & 6 deletions packages/ladle/lib/app/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ export const Meta = (props: any) => props.children;
export const Description = (props: any) => props.children;

type ReactNodeWithoutObject =
| React.ReactElement
| string
| number
| boolean
| null
| undefined;
React.ReactElement | string | number | boolean | null | undefined;

export { useLadleContext, ActionType, ThemeState, ModeState };
export type { StoryDecorator };
Expand Down
2 changes: 1 addition & 1 deletion packages/ladle/lib/app/src/addons/control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const Control = ({
);
}
if (globalState.control[controlKey].type === ControlType.Complex) {
let stringValue = "";
let stringValue: string;
try {
stringValue = JSON.stringify(globalState.control[controlKey].value);
} catch (e) {
Expand Down
Loading
Loading