All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Next.js 16 Migration - Complete update of all skills and prompts for Next.js 16
- Breaking: Route segment configs (
revalidate,dynamic,fetchCache) deprecated withcacheComponents - New
"use cache"directive for file, component, and function-level caching cacheLife()for cache duration:'seconds','minutes','hours','days','weeks','max'cacheTag()andupdateTag()for granular cache invalidationrevalidateTag()now requires cache profile as second argument
- All dynamic APIs must now be awaited:
params,searchParams,cookies(),headers(),draftMode() - Updated all code examples in skills and prompts
- Turbopack is now the default bundler in Next.js 16
- Added
turbopackFileSystemCache: trueconfiguration - New
next experimental-analyzecommand for bundle analysis - Context detector now returns
turbopackas build tool for Next.js 16+
- React Compiler for automatic memoization (eliminates manual
useMemo/useCallback) - View Transitions for smooth page transitions
- Activity component for preserved state during navigation
- Default
minimumCacheTTLchanged to 4 hours (was 60 seconds) - Default quality coerced to
[75] dangerouslyAllowLocalIPrequired for localhost image sourcesimages.domainsdeprecated, useremotePatterns
proxy.tsfile convention for Node.js runtime request proxying- Parallel routes now require explicit
default.jsfor fallback
next lintCLI removed (use ESLint directly)- AMP support removed
next/legacy/imageremovedexperimental.pprreplaced bycacheComponents: trueunstable_cachedeprecated (use"use cache")
src/templates/skills/nextjs-performance/SKILL.md- Complete rewrite for Next.js 16src/templates/prompts/nextjs-performance.prompt.md- Cache Components patternssrc/templates/prompts/_partials/performance-patterns.md- All new patternssrc/templates/prompts/optimize-lcp.prompt.md- Updated for async params, new image defaultssrc/templates/prompts/optimize-bundle.prompt.md- Turbopack and React Compilersrc/templates/prompts/detect-context.prompt.md- Next.js 16 feature detectionsrc/context/index.ts- Detect Next.js 16 features and Turbopacksrc/types/context/index.ts- Documented new feature flags
- Breaking: Route segment configs (
- Node.js 20.9+ is now required by Next.js 16 projects
- Skills and prompts now target Next.js 16 patterns by default
- For Next.js 15 projects, some patterns may need adjustment
- CLI
--versionflag - Show package version withperf-check --versionor-V
-
Renamed
src/.githubtosrc/templates- Clearer naming for distributable prompts and skills- Updated all internal references in
package.json,bin/install-prompts.js, and documentation - No breaking changes for consumers (installed paths remain
.github/prompts/and.github/skills/)
- Updated all internal references in
-
Next.js 15 performance best practices - Updated all skills and prompts with Next.js 15 patterns
- Breaking change:
fetch()is NOT cached by default (opt-in withcache: 'force-cache') - Added Partial Prerendering (PPR) configuration and usage patterns
- Added
use cachedirective for granular caching control - Added streaming metadata patterns
- Added Server Actions configuration
- Added context providers pattern (render deep, not wrapping
<html>) - Updated
nextjs-performanceskill with comprehensive Next.js 15 guidance - Updated
nextjs-tree-shakingskill withoptimizePackageImportspre-configured packages - Updated
web-performance-analysisskill with Next.js 15 considerations - Updated
performance-patterns.mdpartial with all new patterns
- Breaking change:
-
Export Pattern Analyzer (#13) - Analyze module exports for tree-shaking optimization
ExportAnalyzerclass for detecting suboptimal export patternsanalyzeExports()convenience function for quick analysis--audit-exportsCLI flag for command-line analysis- Detects default exports, barrel files, namespace re-exports
next.config.jsanalysis foroptimizePackageImportsconfiguration- Actionable recommendations with code examples and estimated impact
- New subpath export:
@silverassist/performance-toolkit/analyzer - New Copilot skill:
nextjs-tree-shakingfor AI-assisted optimization - New Copilot prompt:
audit-exports.prompt.mdfor guided analysis
-
Bundle Analyzer Integration (#9) - Integration with
@next/bundle-analyzerBundleAnalyzerRunnerclass with fluent builder patterncreateBundleAnalyzer()factory functionanalyzeBundle()convenience functionperf-bundleCLI command for standalone bundle analysis- Chunk analysis with size tracking and dependency detection
- Support for both client and server bundle analysis
- New subpath export:
@silverassist/performance-toolkit/bundle
-
GTM/GA Optimization Skill (#11) - Copilot skill for Google Tag Manager optimization
- New skill:
gtm-optimizationwith validated dynamic import patterns - Best practices for GTM/GA4 integration in Next.js
- Performance-focused loading strategies
- New skill:
- ReDoS vulnerabilities in export analyzer regex patterns
- Replaced vulnerable nested quantifiers with bounded character classes
- Uses
[^}]{1,1000}pattern to prevent catastrophic backtracking
- Expanded test coverage - Increased from 27.77% to 95.58% statements, 9.58% to 80.82% branches
- Added comprehensive tests for
report/module (utils, diagnostics, lcp, opportunities, generator) - Added tests for
context/module with mocked filesystem - Added tests for
pagespeed/utils.tsandpagespeed/insights.ts - Total: 242 tests across 10 test suites
- Added comprehensive tests for
- Improved prompt installer (
bin/install-prompts.js) - Major overhaul for better VS Code integration- Install prompts at root level (
.github/prompts/) for proper VS Code recognition - Added manifest tracking (
.perf-toolkit-manifest.json) to safely manage installed files - Safe directory names to protect user files from accidental overwrites
- Prefixed prompt files with
performance/namespace for organization
- Install prompts at root level (
- Type errors in test files - Fixed MetricValue interface usage (removed non-existent
scoreproperty) - AuditDetails type compliance - Added required
typefield to mock audit details - ProjectContext completeness - Added missing
buildToolproperty in test fixtures - Prompt partial references - Fixed relative paths in
nextjs-performance.prompt.mdandoptimize-lcp.prompt.md
-
Refactored
src/pagespeed/module - Split monolithic 814-line file into 6 focused modules:constants.ts- API URLs, timeouts, audit IDs, third-party patternsutils.ts- Formatting helpers (cache TTL, URL truncation, entity extraction)extractors.ts- Score, metric, LCP, opportunity, diagnostic extractorsinsights.ts- Detailed insights for AI agents (cache, images, JS, third-parties)client.ts- PageSpeedClient class and factory functionsindex.ts- Barrel exports for public API
-
Refactored
src/report/module - Split monolithic 959-line file into 6 focused modules:utils.ts- Formatting and severity calculation helpersdiagnostics.ts- Diagnostics table generationlcp.ts- LCP analysis and recommendationsopportunities.ts- Key opportunities with framework-specific guidancegenerator.ts- ActionableReportGenerator classindex.ts- Barrel exports for public API
-
Refactored
bin/cli.js- Applied DRY principles to 1350+ line CLI:- Added global constants for colors/emojis (SEVERITY_, IMPACT_, STATUS_, URGENCY_)
- Added helper functions:
getSeverityStyle(),getImpactStyle(),getStatusStyle() - Added print helpers:
printSectionHeader(),printSectionFooter(),printLabeledValue(), etc. - Refactored all major print functions to use shared helpers
- Standardized file headers across all TypeScript files (24 files updated):
- Replaced
@packageDocumentationwith standard JSDoc tags - Added
@modulefollowing DDD path structure (e.g.,pagespeed/client) - Added
@authorwith email - Added
@license PolyForm-Noncommercial-1.0.0 - Added
@seelink to repository (main entry point only) - Documented standards in
.github/copilot-instructions.md
- Replaced
- Reorganized
src/types/folder following Domain-Driven Design pattern with barrel exports - Split monolithic 967-line
index.tsinto 8 domain-specific modules:metrics/- Core Web Vitals, MetricValue, CategoryScorespagespeed/- PageSpeed API types (Strategy, Category, Options, Response, CrUX, Lighthouse)lighthouse/- LHCI types (Method, Options, Assertions, Config)analysis/- Results, diagnostics, opportunities, LCP elements, insightscontext/- ProjectContext, FrameworkInforeport/- ActionableReport, KeyOpportunity, NextStepcli/- CLIOptions, CLIResult, ThresholdViolationconfig/- PerformanceThresholds, ProjectConfig, ToolkitConfig
- Main
index.tsnow re-exports all domains usingexport type {}pattern - Backward compatible - existing imports continue to work
- Moved distributable Copilot prompts and skills from
.github/tosrc/templates/- Separates repository config from installable content
- Updated
bin/install-prompts.jspaths - Updated
package.jsonfiles array
- Updated
copilot-instructions.mdwith current architecture documentation
- PageSpeed Insights API Client - Full integration with Google PageSpeed Insights API v5
PageSpeedClientclass for multiple analysesanalyzeUrl()function for quick single-URL analysis- Support for mobile/desktop strategies
- All four categories: Performance, Accessibility, Best Practices, SEO
- Core Web Vitals - LCP, FCP, CLS, TBT, Speed Index, TTI
- LCP Element Detection - Identify the largest contentful paint element
- Opportunities - Performance improvement suggestions with estimated savings
- Diagnostics - Detailed diagnostic information
- LCP Timing Breakdown - TTFB, resource load delay, load duration, render delay
- Third-Party Impact Analysis - Blocking time and transfer size per vendor with category classification
- Unused JavaScript Tracking - Wasted bytes with first-party/third-party attribution
- Unused CSS Analysis - Stylesheets with coverage percentage
- Cache Policy Issues - Resources with poor or missing cache headers
- Image Optimization - Format, sizing, offscreen, and compression issues
- Legacy JavaScript Detection - Polyfills that can be removed
- Render-Blocking Resources - Scripts/styles delaying first paint
- Long Tasks Detection - Main-thread blocking tasks with URL attribution
- Total Savings Summary - Aggregate time and size savings
- LighthouseRunner class for programmatic LHCI execution
- Two execution methods:
node- Local Chrome for staging/internal URLspsi- PageSpeed API for production URLs
- Assertion configuration for CI/CD pipelines
- Upload targets: temporary-public-storage, LHCI server, filesystem
perf-checkcommand for command-line analysis- Mobile/desktop strategy options
- Verbose mode with opportunities display
--insights/-iflag - Show detailed insights in terminal format--json/-jflag - Output structured JSON for programmatic use- CI mode with threshold validation
- JSON output support
getDefaultThresholds()- Standard and strict threshold presetscreateNodeRunner()- Quick setup for staging analysiscreatePSIRunner()- Quick setup for production analysiscreateHybridRunners()- Combined staging + production setup
- Complete type definitions for all APIs
- Exported types for external use
- Strict type checking
- API key support for higher rate limits
- No credentials stored in package
Initial Release for SilverAssist performance monitoring.