@kreftforeningen/web-react 1.0.8 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -56
- package/package.json +10 -12
package/README.md
CHANGED
|
@@ -76,74 +76,54 @@ You can override styles using the `className` prop, extend the provided variable
|
|
|
76
76
|
|
|
77
77
|
## Daily Development
|
|
78
78
|
|
|
79
|
-
This project
|
|
79
|
+
This project uses a straightforward feature-branch workflow. Branch off `main`, do the work, and merge back into `main`. Every push to `main` runs the release workflow and publishes to npm.
|
|
80
80
|
|
|
81
81
|
### Development Workflow
|
|
82
82
|
|
|
83
|
-
1. Start from
|
|
83
|
+
1. Start from `main`
|
|
84
84
|
|
|
85
|
-
```bash
|
|
86
|
-
git checkout
|
|
87
|
-
git pull origin
|
|
88
|
-
```
|
|
85
|
+
```bash
|
|
86
|
+
git checkout main
|
|
87
|
+
git pull origin main
|
|
88
|
+
```
|
|
89
89
|
|
|
90
|
-
2. Create a branch
|
|
90
|
+
2. Create a branch for your work
|
|
91
91
|
|
|
92
|
-
```bash
|
|
93
|
-
git checkout -b feature/new-component
|
|
94
|
-
# or: git checkout -b fix/button-styling
|
|
95
|
-
```
|
|
92
|
+
```bash
|
|
93
|
+
git checkout -b feature/new-component
|
|
94
|
+
# or: git checkout -b fix/button-styling
|
|
95
|
+
```
|
|
96
96
|
|
|
97
97
|
3. Implement changes and push
|
|
98
98
|
|
|
99
|
-
```bash
|
|
100
|
-
# edit files...
|
|
101
|
-
git add .
|
|
102
|
-
git commit -m "Implement feature"
|
|
103
|
-
git push -u origin HEAD
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Open a PR: feature/fix → develop. Merge after review.
|
|
107
|
-
|
|
108
|
-
Lockfile policy:
|
|
99
|
+
```bash
|
|
100
|
+
# edit files...
|
|
101
|
+
git add .
|
|
102
|
+
git commit -m "Implement feature"
|
|
103
|
+
git push -u origin HEAD
|
|
104
|
+
```
|
|
109
105
|
|
|
110
|
-
|
|
111
|
-
- If your change updates `package.json`, do not hand-merge the lockfile in the PR; let `develop` win and regenerate on `develop` later.
|
|
106
|
+
4. Merge the branch locally (no PR workflow):
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
git
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
# Bump versions with Changesets
|
|
120
|
-
pnpm changeset
|
|
121
|
-
pnpm changeset version
|
|
122
|
-
|
|
123
|
-
# Stage the generated changelog + version bump
|
|
124
|
-
git add .changeset/ package.json CHANGELOG.md
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
5. Update lockfile only when dependencies changed
|
|
128
|
-
|
|
129
|
-
- If `package.json` dependency fields changed during `pnpm changeset version`, regenerate:
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
pnpm install --lockfile-only --ignore-scripts
|
|
133
|
-
|
|
134
|
-
git add package.json CHANGELOG.md .changeset/ pnpm-lock.yaml
|
|
135
|
-
git commit -m "chore: release vX.Y.Z"
|
|
136
|
-
git push origin develop
|
|
137
|
-
```
|
|
108
|
+
```bash
|
|
109
|
+
git checkout main
|
|
110
|
+
git pull origin main
|
|
111
|
+
git merge feature/new-component # or your branch name
|
|
112
|
+
```
|
|
138
113
|
|
|
139
|
-
|
|
140
|
-
- You can still delete/rebuild the lockfile manually if it ever becomes inconsistent, but it’s not part of the normal release flow.
|
|
114
|
+
5. Prepare the release commit on `main` (manual version bump):
|
|
141
115
|
|
|
142
|
-
|
|
116
|
+
```bash
|
|
117
|
+
git checkout main
|
|
118
|
+
git pull origin main
|
|
119
|
+
# update package.json version by hand
|
|
120
|
+
pnpm install --lockfile-only --ignore-scripts
|
|
121
|
+
git add package.json pnpm-lock.yaml
|
|
122
|
+
git commit -m "chore: release vX.Y.Z"
|
|
123
|
+
git push origin main
|
|
124
|
+
```
|
|
143
125
|
|
|
144
|
-
|
|
145
|
-
- Merge to `main` to release. GitHub Actions on `main` runs `pnpm changeset publish`—**do not run `changeset version` on `main`.**
|
|
146
|
-
- After the merge, `main` and `develop` are already in sync; no follow-up steps required.
|
|
126
|
+
6. The `Release` GitHub Action runs automatically on every push to `main` and publishes the package to npm.
|
|
147
127
|
|
|
148
128
|
Notes:
|
|
149
129
|
|
|
@@ -152,8 +132,7 @@ Notes:
|
|
|
152
132
|
|
|
153
133
|
### Branch Strategy
|
|
154
134
|
|
|
155
|
-
- **`main`** -
|
|
156
|
-
- **`develop`** - Integration branch for features
|
|
135
|
+
- **`main`** - Source of truth & release branch
|
|
157
136
|
- **`feature/*`** - Feature development branches
|
|
158
137
|
- **`fix/*`** - Bug fix branches
|
|
159
138
|
- **`docs/*`** - Documentation update branches
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kreftforeningen/web-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/kreftforeningen/web-react.git"
|
|
19
19
|
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"dev": "vite --host 0.0.0.0 --port 3003 --clearScreen false",
|
|
23
|
+
"check-types": "tsc --noEmit",
|
|
24
|
+
"lint": "eslint src/",
|
|
25
|
+
"release": "npm publish --access public --no-git-checks"
|
|
26
|
+
},
|
|
20
27
|
"dependencies": {
|
|
21
28
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
22
29
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
@@ -62,7 +69,6 @@
|
|
|
62
69
|
"vaul": "^1.1.2"
|
|
63
70
|
},
|
|
64
71
|
"devDependencies": {
|
|
65
|
-
"@changesets/cli": "^2.29.7",
|
|
66
72
|
"@eslint/js": "^9.39.1",
|
|
67
73
|
"@kreftforeningen/web-css": "^1.0.13",
|
|
68
74
|
"@types/node": "^24.10.1",
|
|
@@ -90,13 +96,5 @@
|
|
|
90
96
|
"url": "https://github.com/kreftforeningen/web-react/issues"
|
|
91
97
|
},
|
|
92
98
|
"homepage": "https://github.com/kreftforeningen/web-react#readme",
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
"dev": "vite --host 0.0.0.0 --port 3003 --clearScreen false",
|
|
96
|
-
"check-types": "tsc --noEmit",
|
|
97
|
-
"lint": "eslint src/",
|
|
98
|
-
"changeset": "changeset",
|
|
99
|
-
"version-packages": "changeset version",
|
|
100
|
-
"release": "changeset publish"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
99
|
+
"packageManager": "pnpm@10.23.0"
|
|
100
|
+
}
|