@zimezone/z-command 1.0.1 → 1.1.1

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.
Files changed (217) hide show
  1. package/README.md +57 -38
  2. package/dist/cli.js +14 -2
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/init.d.ts +1 -7
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +101 -23
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts +11 -0
  9. package/dist/commands/update.d.ts.map +1 -0
  10. package/dist/commands/update.js +88 -0
  11. package/dist/commands/update.js.map +1 -0
  12. package/dist/platforms.d.ts +21 -0
  13. package/dist/platforms.d.ts.map +1 -0
  14. package/dist/platforms.js +137 -0
  15. package/dist/platforms.js.map +1 -0
  16. package/dist/types.d.ts +44 -0
  17. package/dist/types.d.ts.map +1 -0
  18. package/dist/types.js +6 -0
  19. package/dist/types.js.map +1 -0
  20. package/package.json +13 -5
  21. package/templates/agents/api-documenter.agent.md +161 -0
  22. package/templates/agents/architect-review.agent.md +146 -0
  23. package/templates/agents/arm-cortex-expert.agent.md +288 -0
  24. package/templates/agents/backend-architect.agent.md +309 -0
  25. package/templates/agents/backend-security-coder.agent.md +152 -0
  26. package/templates/agents/bash-pro.agent.md +285 -0
  27. package/templates/agents/c-pro.agent.md +35 -0
  28. package/templates/agents/c4-code.agent.md +320 -0
  29. package/templates/agents/c4-component.agent.md +227 -0
  30. package/templates/agents/c4-container.agent.md +248 -0
  31. package/templates/agents/c4-context.agent.md +235 -0
  32. package/templates/agents/conductor-validator.agent.md +245 -0
  33. package/templates/agents/csharp-pro.agent.md +38 -0
  34. package/templates/agents/customer-support.agent.md +148 -0
  35. package/templates/agents/database-admin.agent.md +142 -0
  36. package/templates/agents/database-architect.agent.md +238 -0
  37. package/templates/agents/database-optimizer.agent.md +144 -0
  38. package/templates/agents/debugger.agent.md +30 -0
  39. package/templates/agents/deployment-engineer.agent.md +0 -0
  40. package/templates/agents/devops-troubleshooter.agent.md +138 -0
  41. package/templates/agents/django-pro.agent.md +159 -0
  42. package/templates/agents/docs-architect.agent.md +77 -0
  43. package/templates/agents/dotnet-architect.agent.md +175 -0
  44. package/templates/agents/dx-optimizer.agent.md +63 -0
  45. package/templates/agents/elixir-pro.agent.md +38 -0
  46. package/templates/agents/error-detective.agent.md +32 -0
  47. package/templates/agents/event-sourcing-architect.agent.md +42 -0
  48. package/templates/agents/fastapi-pro.agent.md +171 -0
  49. package/templates/agents/firmware-analyst.agent.md +330 -0
  50. package/templates/agents/frontend-security-coder.agent.md +149 -0
  51. package/templates/agents/haskell-pro.agent.md +37 -0
  52. package/templates/agents/hr-pro.agent.md +105 -0
  53. package/templates/agents/incident-responder.agent.md +190 -0
  54. package/templates/agents/ios-developer.agent.md +198 -0
  55. package/templates/agents/java-pro.agent.md +156 -0
  56. package/templates/agents/javascript-pro.agent.md +35 -0
  57. package/templates/agents/julia-pro.agent.md +187 -0
  58. package/templates/agents/legal-advisor.agent.md +49 -0
  59. package/templates/agents/malware-analyst.agent.md +272 -0
  60. package/templates/agents/mermaid-expert.agent.md +39 -0
  61. package/templates/agents/minecraft-bukkit-pro.agent.md +104 -0
  62. package/templates/agents/mobile-security-coder.agent.md +163 -0
  63. package/templates/agents/monorepo-architect.agent.md +44 -0
  64. package/templates/agents/observability-engineer.agent.md +228 -0
  65. package/templates/agents/performance-engineer.agent.md +167 -0
  66. package/templates/agents/php-pro.agent.md +43 -0
  67. package/templates/agents/posix-shell-pro.agent.md +284 -0
  68. package/templates/agents/quant-analyst.agent.md +32 -0
  69. package/templates/agents/reference-builder.agent.md +167 -0
  70. package/templates/agents/reverse-engineer.agent.md +202 -0
  71. package/templates/agents/risk-manager.agent.md +41 -0
  72. package/templates/agents/ruby-pro.agent.md +35 -0
  73. package/templates/agents/rust-pro.agent.md +156 -0
  74. package/templates/agents/sales-automator.agent.md +35 -0
  75. package/templates/agents/scala-pro.agent.md +60 -0
  76. package/templates/agents/search-specialist.agent.md +59 -0
  77. package/templates/agents/security-auditor.agent.md +138 -0
  78. package/templates/agents/seo-authority-builder.agent.md +116 -0
  79. package/templates/agents/seo-cannibalization-detector.agent.md +103 -0
  80. package/templates/agents/seo-content-auditor.agent.md +63 -0
  81. package/templates/agents/seo-content-planner.agent.md +88 -0
  82. package/templates/agents/seo-content-refresher.agent.md +98 -0
  83. package/templates/agents/seo-content-writer.agent.md +76 -0
  84. package/templates/agents/seo-keyword-strategist.agent.md +75 -0
  85. package/templates/agents/seo-meta-optimizer.agent.md +72 -0
  86. package/templates/agents/seo-snippet-hunter.agent.md +94 -0
  87. package/templates/agents/seo-structure-architect.agent.md +88 -0
  88. package/templates/agents/service-mesh-expert.agent.md +41 -0
  89. package/templates/agents/sql-pro.agent.md +146 -0
  90. package/templates/agents/tdd-orchestrator.agent.md +183 -0
  91. package/templates/agents/temporal-python-pro.agent.md +349 -0
  92. package/templates/agents/terraform-specialist.agent.md +137 -0
  93. package/templates/agents/test-automator.agent.md +203 -0
  94. package/templates/agents/threat-modeling-expert.agent.md +44 -0
  95. package/templates/agents/tutorial-engineer.agent.md +118 -0
  96. package/templates/agents/ui-ux-designer.agent.md +188 -0
  97. package/templates/agents/ui-visual-validator.agent.md +192 -0
  98. package/templates/agents/vector-database-engineer.agent.md +43 -0
  99. package/templates/skills/angular-migration/SKILL.md +410 -0
  100. package/templates/skills/api-design-principles/SKILL.md +528 -0
  101. package/templates/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  102. package/templates/skills/api-design-principles/assets/rest-api-template.py +182 -0
  103. package/templates/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  104. package/templates/skills/api-design-principles/references/rest-best-practices.md +408 -0
  105. package/templates/skills/architecture-decision-records/SKILL.md +428 -0
  106. package/templates/skills/architecture-patterns/SKILL.md +494 -0
  107. package/templates/skills/async-python-patterns/SKILL.md +694 -0
  108. package/templates/skills/auth-implementation-patterns/SKILL.md +634 -0
  109. package/templates/skills/changelog-automation/SKILL.md +552 -0
  110. package/templates/skills/code-review-excellence/SKILL.md +520 -0
  111. package/templates/skills/competitive-landscape/SKILL.md +479 -0
  112. package/templates/skills/context-driven-development/SKILL.md +385 -0
  113. package/templates/skills/cost-optimization/SKILL.md +274 -0
  114. package/templates/skills/cqrs-implementation/SKILL.md +554 -0
  115. package/templates/skills/data-quality-frameworks/SKILL.md +587 -0
  116. package/templates/skills/data-storytelling/SKILL.md +453 -0
  117. package/templates/skills/database-migration/SKILL.md +424 -0
  118. package/templates/skills/dbt-transformation-patterns/SKILL.md +561 -0
  119. package/templates/skills/debugging-strategies/SKILL.md +527 -0
  120. package/templates/skills/defi-protocol-templates/SKILL.md +454 -0
  121. package/templates/skills/dependency-upgrade/SKILL.md +409 -0
  122. package/templates/skills/deployment-pipeline-design/SKILL.md +359 -0
  123. package/templates/skills/distributed-tracing/SKILL.md +438 -0
  124. package/templates/skills/dotnet-backend-patterns/SKILL.md +815 -0
  125. package/templates/skills/dotnet-backend-patterns/assets/repository-template.cs +523 -0
  126. package/templates/skills/dotnet-backend-patterns/assets/service-template.cs +336 -0
  127. package/templates/skills/dotnet-backend-patterns/references/dapper-patterns.md +544 -0
  128. package/templates/skills/dotnet-backend-patterns/references/ef-core-best-practices.md +355 -0
  129. package/templates/skills/e2e-testing-patterns/SKILL.md +547 -0
  130. package/templates/skills/employment-contract-templates/SKILL.md +507 -0
  131. package/templates/skills/error-handling-patterns/SKILL.md +636 -0
  132. package/templates/skills/event-store-design/SKILL.md +437 -0
  133. package/templates/skills/fastapi-templates/SKILL.md +567 -0
  134. package/templates/skills/git-advanced-workflows/SKILL.md +400 -0
  135. package/templates/skills/github-actions-templates/SKILL.md +333 -0
  136. package/templates/skills/go-concurrency-patterns/SKILL.md +655 -0
  137. package/templates/skills/grafana-dashboards/SKILL.md +369 -0
  138. package/templates/skills/helm-chart-scaffolding/SKILL.md +544 -0
  139. package/templates/skills/helm-chart-scaffolding/assets/Chart.yaml.template +42 -0
  140. package/templates/skills/helm-chart-scaffolding/assets/values.yaml.template +185 -0
  141. package/templates/skills/helm-chart-scaffolding/references/chart-structure.md +500 -0
  142. package/templates/skills/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
  143. package/templates/skills/javascript-testing-patterns/SKILL.md +1025 -0
  144. package/templates/skills/langchain-architecture/SKILL.md +338 -0
  145. package/templates/skills/llm-evaluation/SKILL.md +471 -0
  146. package/templates/skills/microservices-patterns/SKILL.md +595 -0
  147. package/templates/skills/modern-javascript-patterns/SKILL.md +911 -0
  148. package/templates/skills/monorepo-management/SKILL.md +622 -0
  149. package/templates/skills/nextjs-app-router-patterns/SKILL.md +544 -0
  150. package/templates/skills/nodejs-backend-patterns/SKILL.md +1020 -0
  151. package/templates/skills/nx-workspace-patterns/SKILL.md +452 -0
  152. package/templates/skills/openapi-spec-generation/SKILL.md +1028 -0
  153. package/templates/skills/paypal-integration/SKILL.md +467 -0
  154. package/templates/skills/pci-compliance/SKILL.md +466 -0
  155. package/templates/skills/postgresql/SKILL.md +204 -0
  156. package/templates/skills/projection-patterns/SKILL.md +490 -0
  157. package/templates/skills/prometheus-configuration/SKILL.md +392 -0
  158. package/templates/skills/prompt-engineering-patterns/SKILL.md +201 -0
  159. package/templates/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
  160. package/templates/skills/prompt-engineering-patterns/assets/prompt-template-library.md +246 -0
  161. package/templates/skills/prompt-engineering-patterns/references/chain-of-thought.md +399 -0
  162. package/templates/skills/prompt-engineering-patterns/references/few-shot-learning.md +369 -0
  163. package/templates/skills/prompt-engineering-patterns/references/prompt-optimization.md +414 -0
  164. package/templates/skills/prompt-engineering-patterns/references/prompt-templates.md +470 -0
  165. package/templates/skills/prompt-engineering-patterns/references/system-prompts.md +189 -0
  166. package/templates/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
  167. package/templates/skills/python-packaging/SKILL.md +870 -0
  168. package/templates/skills/python-performance-optimization/SKILL.md +869 -0
  169. package/templates/skills/python-testing-patterns/SKILL.md +907 -0
  170. package/templates/skills/rag-implementation/SKILL.md +403 -0
  171. package/templates/skills/react-modernization/SKILL.md +513 -0
  172. package/templates/skills/react-native-architecture/SKILL.md +671 -0
  173. package/templates/skills/react-state-management/SKILL.md +429 -0
  174. package/templates/skills/risk-metrics-calculation/SKILL.md +555 -0
  175. package/templates/skills/rust-async-patterns/SKILL.md +517 -0
  176. package/templates/skills/secrets-management/SKILL.md +346 -0
  177. package/templates/skills/security-requirement-extraction/SKILL.md +677 -0
  178. package/templates/skills/shellcheck-configuration/SKILL.md +454 -0
  179. package/templates/skills/similarity-search-patterns/SKILL.md +558 -0
  180. package/templates/skills/slo-implementation/SKILL.md +329 -0
  181. package/templates/skills/sql-optimization-patterns/SKILL.md +493 -0
  182. package/templates/skills/stripe-integration/SKILL.md +442 -0
  183. package/templates/skills/tailwind-design-system/SKILL.md +666 -0
  184. package/templates/skills/temporal-python-testing/SKILL.md +158 -0
  185. package/templates/skills/temporal-python-testing/resources/integration-testing.md +455 -0
  186. package/templates/skills/temporal-python-testing/resources/local-setup.md +553 -0
  187. package/templates/skills/temporal-python-testing/resources/replay-testing.md +462 -0
  188. package/templates/skills/temporal-python-testing/resources/unit-testing.md +328 -0
  189. package/templates/skills/terraform-module-library/SKILL.md +249 -0
  190. package/templates/skills/terraform-module-library/references/aws-modules.md +63 -0
  191. package/templates/skills/threat-mitigation-mapping/SKILL.md +745 -0
  192. package/templates/skills/track-management/SKILL.md +593 -0
  193. package/templates/skills/typescript-advanced-types/SKILL.md +717 -0
  194. package/templates/skills/ui-ux-pro-max/SKILL.md +352 -0
  195. package/templates/skills/ui-ux-pro-max/data/charts.csv +26 -0
  196. package/templates/skills/ui-ux-pro-max/data/colors.csv +97 -0
  197. package/templates/skills/ui-ux-pro-max/data/icons.csv +101 -0
  198. package/templates/skills/ui-ux-pro-max/data/landing.csv +31 -0
  199. package/templates/skills/ui-ux-pro-max/data/products.csv +97 -0
  200. package/templates/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  201. package/templates/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  202. package/templates/skills/ui-ux-pro-max/data/styles.csv +59 -0
  203. package/templates/skills/ui-ux-pro-max/data/typography.csv +58 -0
  204. package/templates/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  205. package/templates/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  206. package/templates/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  207. package/templates/skills/ui-ux-pro-max/scripts/core.py +258 -0
  208. package/templates/skills/ui-ux-pro-max/scripts/design_system.py +547 -0
  209. package/templates/skills/ui-ux-pro-max/scripts/search.py +76 -0
  210. package/templates/skills/uv-package-manager/SKILL.md +831 -0
  211. package/templates/skills/vector-index-tuning/SKILL.md +521 -0
  212. package/templates/skills/wcag-audit-patterns/SKILL.md +555 -0
  213. package/templates/skills/workflow-orchestration-patterns/SKILL.md +316 -0
  214. package/templates/skills/workflow-patterns/SKILL.md +623 -0
  215. package/templates/agents/game-developer.agent.md +0 -57
  216. package/templates/agents/kubernetes-specialist.agent.md +0 -56
  217. package/templates/agents/market-researcher.agent.md +0 -47
@@ -0,0 +1,409 @@
1
+ ---
2
+ name: dependency-upgrade
3
+ description: Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
4
+ ---
5
+
6
+ # Dependency Upgrade
7
+
8
+ Master major dependency version upgrades, compatibility analysis, staged upgrade strategies, and comprehensive testing approaches.
9
+
10
+ ## When to Use This Skill
11
+
12
+ - Upgrading major framework versions
13
+ - Updating security-vulnerable dependencies
14
+ - Modernizing legacy dependencies
15
+ - Resolving dependency conflicts
16
+ - Planning incremental upgrade paths
17
+ - Testing compatibility matrices
18
+ - Automating dependency updates
19
+
20
+ ## Semantic Versioning Review
21
+
22
+ ```
23
+ MAJOR.MINOR.PATCH (e.g., 2.3.1)
24
+
25
+ MAJOR: Breaking changes
26
+ MINOR: New features, backward compatible
27
+ PATCH: Bug fixes, backward compatible
28
+
29
+ ^2.3.1 = >=2.3.1 <3.0.0 (minor updates)
30
+ ~2.3.1 = >=2.3.1 <2.4.0 (patch updates)
31
+ 2.3.1 = exact version
32
+ ```
33
+
34
+ ## Dependency Analysis
35
+
36
+ ### Audit Dependencies
37
+ ```bash
38
+ # npm
39
+ npm outdated
40
+ npm audit
41
+ npm audit fix
42
+
43
+ # yarn
44
+ yarn outdated
45
+ yarn audit
46
+
47
+ # Check for major updates
48
+ npx npm-check-updates
49
+ npx npm-check-updates -u # Update package.json
50
+ ```
51
+
52
+ ### Analyze Dependency Tree
53
+ ```bash
54
+ # See why a package is installed
55
+ npm ls package-name
56
+ yarn why package-name
57
+
58
+ # Find duplicate packages
59
+ npm dedupe
60
+ yarn dedupe
61
+
62
+ # Visualize dependencies
63
+ npx madge --image graph.png src/
64
+ ```
65
+
66
+ ## Compatibility Matrix
67
+
68
+ ```javascript
69
+ // compatibility-matrix.js
70
+ const compatibilityMatrix = {
71
+ 'react': {
72
+ '16.x': {
73
+ 'react-dom': '^16.0.0',
74
+ 'react-router-dom': '^5.0.0',
75
+ '@testing-library/react': '^11.0.0'
76
+ },
77
+ '17.x': {
78
+ 'react-dom': '^17.0.0',
79
+ 'react-router-dom': '^5.0.0 || ^6.0.0',
80
+ '@testing-library/react': '^12.0.0'
81
+ },
82
+ '18.x': {
83
+ 'react-dom': '^18.0.0',
84
+ 'react-router-dom': '^6.0.0',
85
+ '@testing-library/react': '^13.0.0'
86
+ }
87
+ }
88
+ };
89
+
90
+ function checkCompatibility(packages) {
91
+ // Validate package versions against matrix
92
+ }
93
+ ```
94
+
95
+ ## Staged Upgrade Strategy
96
+
97
+ ### Phase 1: Planning
98
+ ```bash
99
+ # 1. Identify current versions
100
+ npm list --depth=0
101
+
102
+ # 2. Check for breaking changes
103
+ # Read CHANGELOG.md and MIGRATION.md
104
+
105
+ # 3. Create upgrade plan
106
+ echo "Upgrade order:
107
+ 1. TypeScript
108
+ 2. React
109
+ 3. React Router
110
+ 4. Testing libraries
111
+ 5. Build tools" > UPGRADE_PLAN.md
112
+ ```
113
+
114
+ ### Phase 2: Incremental Updates
115
+ ```bash
116
+ # Don't upgrade everything at once!
117
+
118
+ # Step 1: Update TypeScript
119
+ npm install typescript@latest
120
+
121
+ # Test
122
+ npm run test
123
+ npm run build
124
+
125
+ # Step 2: Update React (one major version at a time)
126
+ npm install react@17 react-dom@17
127
+
128
+ # Test again
129
+ npm run test
130
+
131
+ # Step 3: Continue with other packages
132
+ npm install react-router-dom@6
133
+
134
+ # And so on...
135
+ ```
136
+
137
+ ### Phase 3: Validation
138
+ ```javascript
139
+ // tests/compatibility.test.js
140
+ describe('Dependency Compatibility', () => {
141
+ it('should have compatible React versions', () => {
142
+ const reactVersion = require('react/package.json').version;
143
+ const reactDomVersion = require('react-dom/package.json').version;
144
+
145
+ expect(reactVersion).toBe(reactDomVersion);
146
+ });
147
+
148
+ it('should not have peer dependency warnings', () => {
149
+ // Run npm ls and check for warnings
150
+ });
151
+ });
152
+ ```
153
+
154
+ ## Breaking Change Handling
155
+
156
+ ### Identifying Breaking Changes
157
+ ```bash
158
+ # Use changelog parsers
159
+ npx changelog-parser react 16.0.0 17.0.0
160
+
161
+ # Or manually check
162
+ curl https://raw.githubusercontent.com/facebook/react/main/CHANGELOG.md
163
+ ```
164
+
165
+ ### Codemod for Automated Fixes
166
+ ```bash
167
+ # React upgrade codemods
168
+ npx react-codeshift <transform> <path>
169
+
170
+ # Example: Update lifecycle methods
171
+ npx react-codeshift \
172
+ --parser tsx \
173
+ --transform react-codeshift/transforms/rename-unsafe-lifecycles.js \
174
+ src/
175
+ ```
176
+
177
+ ### Custom Migration Script
178
+ ```javascript
179
+ // migration-script.js
180
+ const fs = require('fs');
181
+ const glob = require('glob');
182
+
183
+ glob('src/**/*.tsx', (err, files) => {
184
+ files.forEach(file => {
185
+ let content = fs.readFileSync(file, 'utf8');
186
+
187
+ // Replace old API with new API
188
+ content = content.replace(
189
+ /componentWillMount/g,
190
+ 'UNSAFE_componentWillMount'
191
+ );
192
+
193
+ // Update imports
194
+ content = content.replace(
195
+ /import { Component } from 'react'/g,
196
+ "import React, { Component } from 'react'"
197
+ );
198
+
199
+ fs.writeFileSync(file, content);
200
+ });
201
+ });
202
+ ```
203
+
204
+ ## Testing Strategy
205
+
206
+ ### Unit Tests
207
+ ```javascript
208
+ // Ensure tests pass before and after upgrade
209
+ npm run test
210
+
211
+ // Update test utilities if needed
212
+ npm install @testing-library/react@latest
213
+ ```
214
+
215
+ ### Integration Tests
216
+ ```javascript
217
+ // tests/integration/app.test.js
218
+ describe('App Integration', () => {
219
+ it('should render without crashing', () => {
220
+ render(<App />);
221
+ });
222
+
223
+ it('should handle navigation', () => {
224
+ const { getByText } = render(<App />);
225
+ fireEvent.click(getByText('Navigate'));
226
+ expect(screen.getByText('New Page')).toBeInTheDocument();
227
+ });
228
+ });
229
+ ```
230
+
231
+ ### Visual Regression Tests
232
+ ```javascript
233
+ // visual-regression.test.js
234
+ describe('Visual Regression', () => {
235
+ it('should match snapshot', () => {
236
+ const { container } = render(<App />);
237
+ expect(container.firstChild).toMatchSnapshot();
238
+ });
239
+ });
240
+ ```
241
+
242
+ ### E2E Tests
243
+ ```javascript
244
+ // cypress/e2e/app.cy.js
245
+ describe('E2E Tests', () => {
246
+ it('should complete user flow', () => {
247
+ cy.visit('/');
248
+ cy.get('[data-testid="login"]').click();
249
+ cy.get('input[name="email"]').type('user@example.com');
250
+ cy.get('button[type="submit"]').click();
251
+ cy.url().should('include', '/dashboard');
252
+ });
253
+ });
254
+ ```
255
+
256
+ ## Automated Dependency Updates
257
+
258
+ ### Renovate Configuration
259
+ ```json
260
+ // renovate.json
261
+ {
262
+ "extends": ["config:base"],
263
+ "packageRules": [
264
+ {
265
+ "matchUpdateTypes": ["minor", "patch"],
266
+ "automerge": true
267
+ },
268
+ {
269
+ "matchUpdateTypes": ["major"],
270
+ "automerge": false,
271
+ "labels": ["major-update"]
272
+ }
273
+ ],
274
+ "schedule": ["before 3am on Monday"],
275
+ "timezone": "America/New_York"
276
+ }
277
+ ```
278
+
279
+ ### Dependabot Configuration
280
+ ```yaml
281
+ # .github/dependabot.yml
282
+ version: 2
283
+ updates:
284
+ - package-ecosystem: "npm"
285
+ directory: "/"
286
+ schedule:
287
+ interval: "weekly"
288
+ open-pull-requests-limit: 5
289
+ reviewers:
290
+ - "team-leads"
291
+ commit-message:
292
+ prefix: "chore"
293
+ include: "scope"
294
+ ```
295
+
296
+ ## Rollback Plan
297
+
298
+ ```javascript
299
+ // rollback.sh
300
+ #!/bin/bash
301
+
302
+ # Save current state
303
+ git stash
304
+ git checkout -b upgrade-branch
305
+
306
+ # Attempt upgrade
307
+ npm install package@latest
308
+
309
+ # Run tests
310
+ if npm run test; then
311
+ echo "Upgrade successful"
312
+ git add package.json package-lock.json
313
+ git commit -m "chore: upgrade package"
314
+ else
315
+ echo "Upgrade failed, rolling back"
316
+ git checkout main
317
+ git branch -D upgrade-branch
318
+ npm install # Restore from package-lock.json
319
+ fi
320
+ ```
321
+
322
+ ## Common Upgrade Patterns
323
+
324
+ ### Lock File Management
325
+ ```bash
326
+ # npm
327
+ npm install --package-lock-only # Update lock file only
328
+ npm ci # Clean install from lock file
329
+
330
+ # yarn
331
+ yarn install --frozen-lockfile # CI mode
332
+ yarn upgrade-interactive # Interactive upgrades
333
+ ```
334
+
335
+ ### Peer Dependency Resolution
336
+ ```bash
337
+ # npm 7+: strict peer dependencies
338
+ npm install --legacy-peer-deps # Ignore peer deps
339
+
340
+ # npm 8+: override peer dependencies
341
+ npm install --force
342
+ ```
343
+
344
+ ### Workspace Upgrades
345
+ ```bash
346
+ # Update all workspace packages
347
+ npm install --workspaces
348
+
349
+ # Update specific workspace
350
+ npm install package@latest --workspace=packages/app
351
+ ```
352
+
353
+ ## Resources
354
+
355
+ - **references/semver.md**: Semantic versioning guide
356
+ - **references/compatibility-matrix.md**: Common compatibility issues
357
+ - **references/staged-upgrades.md**: Incremental upgrade strategies
358
+ - **references/testing-strategy.md**: Comprehensive testing approaches
359
+ - **assets/upgrade-checklist.md**: Step-by-step checklist
360
+ - **assets/compatibility-matrix.csv**: Version compatibility table
361
+ - **scripts/audit-dependencies.sh**: Dependency audit script
362
+
363
+ ## Best Practices
364
+
365
+ 1. **Read Changelogs**: Understand what changed
366
+ 2. **Upgrade Incrementally**: One major version at a time
367
+ 3. **Test Thoroughly**: Unit, integration, E2E tests
368
+ 4. **Check Peer Dependencies**: Resolve conflicts early
369
+ 5. **Use Lock Files**: Ensure reproducible installs
370
+ 6. **Automate Updates**: Use Renovate or Dependabot
371
+ 7. **Monitor**: Watch for runtime errors post-upgrade
372
+ 8. **Document**: Keep upgrade notes
373
+
374
+ ## Upgrade Checklist
375
+
376
+ ```markdown
377
+ Pre-Upgrade:
378
+ - [ ] Review current dependency versions
379
+ - [ ] Read changelogs for breaking changes
380
+ - [ ] Create feature branch
381
+ - [ ] Backup current state (git tag)
382
+ - [ ] Run full test suite (baseline)
383
+
384
+ During Upgrade:
385
+ - [ ] Upgrade one dependency at a time
386
+ - [ ] Update peer dependencies
387
+ - [ ] Fix TypeScript errors
388
+ - [ ] Update tests if needed
389
+ - [ ] Run test suite after each upgrade
390
+ - [ ] Check bundle size impact
391
+
392
+ Post-Upgrade:
393
+ - [ ] Full regression testing
394
+ - [ ] Performance testing
395
+ - [ ] Update documentation
396
+ - [ ] Deploy to staging
397
+ - [ ] Monitor for errors
398
+ - [ ] Deploy to production
399
+ ```
400
+
401
+ ## Common Pitfalls
402
+
403
+ - Upgrading all dependencies at once
404
+ - Not testing after each upgrade
405
+ - Ignoring peer dependency warnings
406
+ - Forgetting to update lock file
407
+ - Not reading breaking change notes
408
+ - Skipping major versions
409
+ - Not having rollback plan