Commit 08a45a4
authored
feat(all): migrate to yarn berry (#73)
* chore: migrate from pnpm to yarn berry
- Update packageManager to yarn@4.9.1 in all package.json files
- Add workspaces field to root package.json (replaces pnpm-workspace.yaml)
- Rename root package to @kubit-ui-web/monorepo to avoid workspace name conflict
- Set root package as private: true
- Replace all pnpm script references with yarn equivalents
- Create .yarnrc.yml with nodeLinker: node-modules
- Update .gitignore for Yarn Berry artifacts
- Migrate all 5 GitHub workflows to use Corepack + Yarn caching
- Update README.md and CONTRIBUTING.md documentation
- Remove pnpm-lock.yaml and pnpm-workspace.yaml
- Add yarn.lock
* chore: optimize yarn berry monorepo configuration
- Fix vercel.json: still had pnpm commands (build, dev, install)
- Replace npx with yarn exec in design-system scripts (bv-build, bernova)
- Add enableTelemetry: false to .yarnrc.yml
- Add dependenciesMeta to root package.json (migrates pnpm-workspace.yaml
ignoredBuiltDependencies for bernova and unrs-resolver)
* feat(monorepo): add yarn berry constraints, focus, and foreach support
- Create yarn.config.cjs with 5 workspace consistency rules:
1. Shared deps must use same version range across workspaces
2. All sub-workspaces must declare packageManager and engines.node
3. Public packages must have publishConfig
4. Workspace cross-references must use workspace:* protocol
5. No package should depend on itself
- Auto-fix 4 version drifts caught by constraints:
- @rslib/core: ^0.19.6 → ^0.20.0 (design-system)
- @types/node: ^25.3.3 → ^25.5.0 (design-system, storybook)
- html-validate: ^10.11.0 → ^10.11.1 (storybook)
- Add constraints check to both PR validation workflows + reports
- Add convenience scripts: constraints, constraints:fix, focus:*,
foreach:clean, info:workspaces
- Update README.md Scripts Reference with new commands
- Update CONTRIBUTING.md with Constraints and Focused Development docs
* fix(design-system): break cyclic dependency with react-components
Remove optional peerDependency on @kubit-ui-web/react-components from
design-system. Yarn Berry resolves workspace:* peerDeps as hard links
in node_modules, creating a bidirectional cycle that Turbo 2.x rejects:
components → design-system (devDependency)
design-system → components (peerDependency, optional)
The peerDep was already optional: true, so design-system functions
without it. Consumers install both packages per README instructions.
* fix(tsconfig): add root node_modules/@types to typeRoots for Yarn Berry hoisting
Yarn Berry hoists all dependencies to the root node_modules/. The
typeRoots in sub-package tsconfigs only referenced their own
node_modules/@types which is empty after hoisting, causing TS2688:
Cannot find type definition file for 'node'.
Add ../../node_modules/@types to typeRoots in both components and
design-system tsconfigs.
* fix: resolve TS2688 and recursive turbo invocations under Yarn Berry
- Add ../../node_modules to typeRoots in components and design-system
tsconfigs. Scoped type packages like @testing-library/jest-dom are not
under @types/ so they need the full root node_modules path, not just
../../node_modules/@types.
- Remove //#build root task from turbo.json. With Yarn Berry the root
package IS a workspace, so Turbo tried to execute the root build
script (which calls turbo run build) as a pipeline task, creating
infinite recursion. Without //#build, Turbo only runs build in
workspace packages and the root script acts as a convenience wrapper.
* chore: switch .yarnrc.yml to public npm registry
Open source repo should use the public registry (registry.npmjs.org)
in the committed config. Developers with JFrog access can override
locally via skip-worktree.
* fix(vercel): pin Node range and enable Corepack for Yarn Berry
- engines.node: '>=22.0.0' → '>=22.0.0 <25.0.0' to prevent Vercel
from auto-upgrading to Node 24.x
- installCommand: prepend 'corepack enable' so Vercel activates Yarn
Berry (4.9.1) from packageManager field instead of falling back to
Yarn Classic 1.22.19
* fix(vercel): pin Node range and enable Corepack for Yarn Berry
- engines.node: '>=22.0.0' → '>=22.0.0 <25.0.0' to prevent Vercel
from auto-upgrading to Node 24.x
- installCommand: prepend 'corepack enable' so Vercel activates Yarn
Berry (4.9.1) from packageManager field instead of falling back to
Yarn Classic 1.22.191 parent e74d6c7 commit 08a45a4
21 files changed
Lines changed: 13424 additions & 13246 deletions
File tree
- .github/workflows
- packages
- components
- design-system
- storybook
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
| |||
228 | 243 | | |
229 | 244 | | |
230 | 245 | | |
231 | | - | |
| 246 | + | |
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
| |||
237 | 252 | | |
238 | 253 | | |
239 | 254 | | |
240 | | - | |
| 255 | + | |
241 | 256 | | |
242 | 257 | | |
243 | 258 | | |
| |||
246 | 261 | | |
247 | 262 | | |
248 | 263 | | |
249 | | - | |
| 264 | + | |
250 | 265 | | |
251 | 266 | | |
252 | 267 | | |
| |||
255 | 270 | | |
256 | 271 | | |
257 | 272 | | |
258 | | - | |
| 273 | + | |
259 | 274 | | |
260 | 275 | | |
261 | 276 | | |
| |||
264 | 279 | | |
265 | 280 | | |
266 | 281 | | |
267 | | - | |
| 282 | + | |
268 | 283 | | |
269 | 284 | | |
270 | 285 | | |
| |||
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
| 326 | + | |
311 | 327 | | |
312 | 328 | | |
313 | 329 | | |
| |||
325 | 341 | | |
326 | 342 | | |
327 | 343 | | |
328 | | - | |
| 344 | + | |
329 | 345 | | |
330 | 346 | | |
331 | 347 | | |
| |||
350 | 366 | | |
351 | 367 | | |
352 | 368 | | |
| 369 | + | |
353 | 370 | | |
354 | 371 | | |
355 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
| |||
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
107 | | - | |
| 122 | + | |
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
| |||
117 | 132 | | |
118 | 133 | | |
119 | 134 | | |
120 | | - | |
| 135 | + | |
121 | 136 | | |
122 | 137 | | |
123 | 138 | | |
| |||
130 | 145 | | |
131 | 146 | | |
132 | 147 | | |
133 | | - | |
| 148 | + | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
| |||
143 | 158 | | |
144 | 159 | | |
145 | 160 | | |
146 | | - | |
| 161 | + | |
147 | 162 | | |
148 | 163 | | |
149 | 164 | | |
| |||
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
| 200 | + | |
185 | 201 | | |
186 | 202 | | |
187 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | | - | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | | - | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
223 | | - | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| |||
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
292 | | - | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
0 commit comments