secondsky/claude-skills / plugins/dependency-upgrade/skills/dependency-upgrade
dependency-upgrade
UnverifiedSecure dependency upgrades with supply chain protection, cooldowns, and staged rollout. Use when upgrading deps, configuring security policies, or preventing supply chain attacks.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.5 KB |
| references/compatibility-matrix.md | markdown | 3.6 KB |
| references/cooldown-config-guide.md | markdown | 5.2 KB |
| references/package-manager-security.md | markdown | 5.2 KB |
| references/secrets-and-containers.md | markdown | 3.3 KB |
| references/socket-cli-guide.md | markdown | 12.0 KB |
| references/staged-upgrades.md | markdown | 4.5 KB |
| references/supply-chain-security.md | markdown | 10.4 KB |
| references/testing-strategy.md | markdown | 4.1 KB |
| scripts/generate-dependency-upgrades.shexecutable | script | 14 B |
| templates/bunfig-security.tmpl | other | 727 B |
| templates/dependabot-security.tmpl | other | 1.0 KB |
| templates/devcontainer-security.tmpl | other | 639 B |
| templates/npmrc-security.tmpl | other | 851 B |
| templates/pnpm-workspace-security.tmpl | other | 1.6 KB |
| templates/renovate-security.tmpl | other | 1.1 KB |
| templates/socket-fix-ci.tmpl | other | 1.3 KB |
| templates/socket-scan-ci.tmpl | other | 900 B |
| templates/yarnrc-security.tmpl | other | 762 B |
references/testing-strategy.md
View on GitHub# Testing Strategy for Dependency Upgrades
Comprehensive testing approaches to validate dependency upgrades at every level.
## Testing Pyramid
```
E2E Tests
/ \
Integration Tests
/ \
Unit Tests
/ \
Static Analysis (tsc, lint)
```
Run from bottom to top after each upgrade.
## Level 1: Static Analysis
```bash
# TypeScript type-check (fastest feedback)
bunx tsc --noEmit
# Lint
bun run lint
# Check bundle (size impact)
bun run build
```
## Level 2: Unit Tests
```bash
# Run all unit tests
bun test
# Watch mode during upgrade
bun test --watch
# Specific test file
bun test src/components/Button.test.tsx
```
After upgrading, check for:
- Type errors from API changes
- Assertion failures from behavior changes
- Missing exports from package restructuring
## Level 3: Integration Tests
```javascript
describe('Dependency Compatibility', () => {
it('should have matching React versions', () => {
const reactVersion = require('react/package.json').version;
const reactDomVersion = require('react-dom/package.json').version;
expect(reactVersion).toBe(reactDomVersion);
});
it('should render without crashing', () => {
const { container } = render(<App />);
expect(container).toBeTruthy();
});
it('should handle navigation', () => {
render(<App />);
fireEvent.click(screen.getByText('Navigate'));
expect(screen.getByText('New Page')).toBeInTheDocument();
});
});
```
## Level 4: Visual Regression Tests
```javascript
describe('Visual Regression', () => {
it('should match snapshot', () => {
const { container } = render(<Component />);
expect(container.firstChild).toMatchSnapshot();
});
it('should match visual baseline', () => {
render(<Dashboard />);
// Compare screenshot against baseline
cy.compareSnapshot('dashboard');
});
});
```
After UI library upgrades, always check:
- Snapshot diffs
- Color/font changes
- Layout shifts
- Responsive breakpoints
## Level 5: E2E Tests
```javascript
// cypress/e2e/app.cy.js
describe('E2E Smoke Tests', () => {
it('should load the app', () => {
cy.visit('/');
cy.get('[data-testid="app"]').should('exist');
});
it('should complete auth flow', () => {
cy.visit('/login');
cy.get('input[name="email"]').type('user@example.com');
cy.get('button[type="submit"]').click();
cy.url().should('include', '/dashboard');
});
it('should handle API errors gracefully', () => {
cy.intercept('GET', '/api/data', { statusCode: 500 });
cy.visit('/dashboard');
cy.get('[data-testid="error-message"]').should('be.visible');
});
});
```
## Bundle Analysis
```bash
# Compare bundle sizes before and after upgrade
bun run build
# Analyze bundle composition
bunx bundle-analyzer dist/index.js
# Check for unexpected bundle size increases
# Before upgrade: note the bundle size
# After upgrade: compare and investigate increases > 5%
```
## Performance Testing
```bash
# Run Lighthouse CI
bunx @lhci/cli autorun
# Check Core Web Vitals
# - LCP: Largest Contentful Paint
# - FID: First Input Delay
# - CLS: Cumulative Layout Shift
```
## Upgrade Test Matrix
| Test Type | When to Run | Failure Indicates |
|-----------|-------------|-------------------|
| Type-check | After every package | Breaking API changes |
| Unit tests | After every package | Behavior changes |
| Integration | After framework upgrades | Compatibility issues |
| Visual regression | After UI library upgrades | Visual breaking changes |
| E2E | After major upgrades | User flow breakage |
| Bundle analysis | After any upgrade | Size regression |
| Performance | After major upgrades | Performance regression |
## CI Integration
```yaml
# .github/workflows/upgrade-validation.yml
name: Upgrade Validation
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bunx tsc --noEmit
- run: bun run lint
- run: bun test
- run: bun run build
- run: bun run test:e2e
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |