Releases: stacktape/stacktape
3.2.7
3.2.6
🚀 Major improvements
Automatic Optional Field Detection
Config validation now automatically treats properties with @default values as optional:
- Pre-processing JSON schema - Before dereferencing, marks properties not in the
requiredarray with a special marker - Post-processing Zod schema - Converts marked properties to
.optional()in the generated Zod schema - No more manual maintenance - Previously, optional fields were hardcoded in a list; now they're automatically detected from the schema
Improved TypeScript Type Generation
Completely rewrote the npm export type generation for better correctness:
- Props type aliases - Added proper type aliases for discriminated union properties (e.g.,
HttpApiIntegrationProps→HttpApiIntegration['properties']) - Direct type mappings - Added aliases for types without type/properties structure (e.g.,
ContainerEfsMountProps→ContainerEfsMount) - Missing type placeholders - Added placeholder definitions for types not reachable from schema root
- Inline essential declarations - Generate essential class/type declarations inline instead of extracting from compiled TS (avoids duplication issues)
⚡ Improvements
Removed legacy AJV validation code (~560 lines) - now fully using Zod validator
3.2.5
🐛 Bug Fixes
Edge Lambda Function Runtime Fix
Fixed Node.js runtime compatibility issues with edge Lambda functions (Lambda@Edge):
- Force CJS output - Edge functions are now packaged with CommonJS instead of ESM, as Lambda@Edge doesn't support ESM with top-level await
⚡ Improvements
Better Zod Validation Error Messages
Significantly improved error messages for union type validation errors:
- Smart union member matching - When a config has a
typefield, the validator now finds the matching union member and shows its specific errors instead of generic "doesn't match any shape" - Nested union errors - Properly handles nested discriminated unions (e.g., WAF rules with invalid types)
- Contextual hints - Shows "Did you mean?" suggestions for invalid types at any nesting level
- Property-level errors - Extracts and displays specific missing/invalid property errors from the correct union branch
Removed Strict Discriminated Union Conversion
Reverted the automatic conversion of unions to discriminated unions in Zod schema generation:
- Backwards compatibility - Regular
z.unionis more lenient thanz.discriminatedUnion, matching the previous AJV validator behavior - Custom types support - Configs with custom/extended types (e.g., WAF custom rules) no longer fail validation
🧪 Testing
- Added
edge-function-cdntest stack demonstrating edge function with hosting bucket
3.2.4
3.2.3
3.2.2
3.2.1
🚀 Major improvements
New Zod-Based Config Validation
Completely rewrote the configuration validation system using Zod schemas:
- Better error messages - Validation errors now show exact line numbers, code snippets, and "did you mean?" suggestions using Levenshtein distance
- Discriminated union support - Proper error messages for typed resources (no more confusing "does not match any of the allowed shapes")
- Auto-generated Zod schemas - JSON Schema is now automatically converted to Zod with intelligent post-processing for discriminated unions, record syntax fixes, and default value corrections
Documentation Overhaul
Complete restructure of the Getting Started documentation:
- New Quick Start guide - Get from zero to deployed in 5 minutes
- Consolidated Configuration guide - TypeScript and YAML configuration in one place with better examples
- New Development Mode guide - Comprehensive docs for local development with
stacktape dev - Simplified Deployment guide - All deployment methods (CLI, Console, GitOps, CI/CD) in one page
- Removed 8 fragmented pages, replaced with 4 focused guides
Docs Code Block Improvements
Enhanced code examples in documentation:
- YAML to TypeScript converter - Code blocks can now show both YAML and TypeScript equivalents side-by-side
- Improved tab switcher - Animated sliding indicator for code block tabs
- Better syntax highlighting - Resource types, directives, and packaging types properly highlighted
⚡ Improvements
- Improve ES bundler with better split bundler support
- Rename SDK types to Plain types for clarity (
sdk.d.ts→plain.d.ts)
3.2.0
🚀 Major improvements
Complete Dev Mode Overhaul
Drastically improved local development experience with the dev command:
- Run everything locally - Containers, Lambda functions, hosting buckets (SPAs), and Next.js apps all run in parallel with hot-reload
- Local database emulation - Postgres, MySQL, Redis, DynamoDB, and OpenSearch run locally via Docker with persistent data
- Hybrid local/remote - Choose which resources run locally and which use deployed AWS infrastructure
- Lambda tunneling - Connect deployed Lambda functions to your local databases during development
- Interactive resource picker - Select exactly which workloads and databases to include in your dev session
- New Dev TUI - Real-time terminal UI showing status of all resources, rebuild progress, and logs
Split Bundler with Lambda Layers
New intelligent bundler for Lambda functions:
- Bundles multiple Lambda entrypoints together using Bun's code splitting
- Automatically generates shared Lambda Layers for common code/dependencies
- Significantly reduces deployment package sizes for stacks with multiple functions
New Configuration Options
- hosting-buckets: Add
buildanddevproperties for frontend build configuration - nextjs-web: Add
dev.commandproperty for custom dev server commands - relational-databases, redis-clusters, dynamo-db-tables: Add
dev.remoteproperty to use deployed resources instead of local emulation
⚡ Improvements
- Add Lambda provisioned concurrency failure monitoring with log fetching
- Improve non-TTY (CI) output rendering
- Update install scripts for all platforms
- Refactor CLI configuration for better maintainability
🔧 Breaking changes
- SDK removed: The programmatic SDK export has been removed. Use the CLI directly or via
npx stacktape