Skip to content

Commit 964e625

Browse files
authored
v4.0.0 - Adds compatibility with Ladle v4 (#9)
* Upgrades all dependencies to the latest (except eslint because there are peer dependencies still requiring ^18.3.0) * Fixes AddonDialog so it uses the same pattern as the Ladle ui modal (DialogOverlay instead of just the Dialog) * Updates version to match major Ladle version (v4.0.0) * Updates GitHub action versions * Updates project to use node 20
1 parent bf7a907 commit 964e625

File tree

12 files changed

+5520
-4047
lines changed

12 files changed

+5520
-4047
lines changed

.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@
2626
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
2727
]
2828
},
29-
"ignorePatterns": [
30-
"node_modules/**/*",
31-
"dist/**/*"
32-
]
29+
"ignorePatterns": ["node_modules/**/*", "dist/**/*", "build/**/*"]
3330
}

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name: CI
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88
types: [opened, synchronize]
99
workflow_dispatch:
10-
lint_fix:
11-
description: "lint:fix"
12-
required: false
13-
type: boolean
14-
default: true
10+
inputs:
11+
lint_fix:
12+
description: "lint:fix"
13+
required: false
14+
type: boolean
15+
default: true
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.ref }}
@@ -24,12 +25,12 @@ jobs:
2425
lint:
2526
runs-on: ubuntu-latest
2627
steps:
27-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2829
- name: install pnpm
2930
run: |
3031
npm i -g pnpm
3132
pnpm -v
32-
- uses: actions/setup-node@v3
33+
- uses: actions/setup-node@v4
3334
with:
3435
cache: "pnpm"
3536
node-version-file: ".nvmrc"
@@ -40,7 +41,7 @@ jobs:
4041
- run: pnpm lint:fix
4142
if: ${{ fromJSON(env.LINT_FIX) }}
4243
- name: Commit linter fixes
43-
uses: stefanzweifel/git-auto-commit-action@v4
44+
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5
4445
if: ${{ fromJSON(env.LINT_FIX) }}
4546
with:
4647
commit_message: "automated commit: pnpm lint:fix"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ _node_modules
1313

1414
# build files
1515
dist
16+
build
1617
tsconfig.tsbuildinfo
1718

1819
# IDE configs

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.4.0
1+
v20.9.0

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
[Ladle](https://github.com/tajo/ladle) doesn't officially support third party addons yet. Now we can pretend it does!
99

10+
Confirmed to work up through `@ladle/react` version ^4.10.0.
11+
1012
- [Quick Start](#quick-start)
1113
- [Customization](#customization)
1214
- [How this package works](#how-this-package-works)

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ladle-inject-custom-addons",
3-
"version": "0.2.0",
3+
"version": "4.0.0",
44
"description": "Adds a button to the Ladle addon bar",
55
"files": [
66
"dist",
@@ -57,26 +57,26 @@
5757
"react-dom": "^18"
5858
},
5959
"devDependencies": {
60-
"@ladle/react": "^2.13.0",
61-
"@types/node": "^20.2.5",
62-
"@types/react": "^18.2.12",
63-
"@types/react-dom": "^18.2.4",
64-
"@types/styled-components": "^5.1.26",
65-
"@typescript-eslint/eslint-plugin": "^5.56.0",
66-
"@typescript-eslint/parser": "^5.56.0",
67-
"eslint": "^8.42.0",
68-
"eslint-config-prettier": "^8.8.0",
69-
"eslint-plugin-jsx-a11y": "^6.7.1",
70-
"eslint-plugin-prettier": "^4.2.1",
71-
"eslint-plugin-react": "^7.32.2",
72-
"eslint-plugin-react-hooks": "^4.6.0",
73-
"prettier": "^2.8.8",
74-
"react": "^18.2.0",
75-
"react-dom": "^18.2.0",
60+
"@ladle/react": "^4.1.0",
61+
"@types/node": "^20.14.8",
62+
"@types/react": "^18.3.3",
63+
"@types/react-dom": "^18.3.0",
64+
"@types/styled-components": "^5.1.34",
65+
"@typescript-eslint/eslint-plugin": "^7.14.1",
66+
"@typescript-eslint/parser": "^7.14.1",
67+
"eslint": "^8.56.0",
68+
"eslint-config-prettier": "^9.1.0",
69+
"eslint-plugin-jsx-a11y": "^6.9.0",
70+
"eslint-plugin-prettier": "^5.1.3",
71+
"eslint-plugin-react": "^7.34.3",
72+
"eslint-plugin-react-hooks": "^4.6.2",
73+
"prettier": "^3.3.2",
74+
"react": "^18.3.1",
75+
"react-dom": "^18.3.1",
7676
"react-feather": "^2.0.10",
77-
"styled-components": "^5.0.0",
78-
"tsup": "^6.7.0",
79-
"typescript": "^5.1.3"
77+
"styled-components": "^6.1.11",
78+
"tsup": "^8.1.0",
79+
"typescript": "^5.5.2"
8080
},
8181
"resolutions": {
8282
"styled-components": "^5"

0 commit comments

Comments
 (0)