* Minor updates only
* Added explicit radix parameter (10) to all Number.parseInt() calls throughout the codebase (new lint rule)
* Updated several @ts-ignore comments to @ts-expect-error for better TypeScript practices (new lint rule)
* Removed unnecessary @ts-ignore comments in some mode files (ditto)
* Used "none return" based arrow functions for some map stuff
* Replaced a `map()` call that didn't return anything to a for() loop
* Fixed up some cypress stuff, noting work for the future
- latest biome, and fix its configuration
- fixes "static" content to be globally configured too (instead of
per-line)
- fixes issues:
- imports fixed up
- `Date.now()` vs `+new Date()`
- some unused things `_` prefixed
After discussion with the team, turned off the unused parameter warning.
## Summary
- Add DynamoDB support to Google URL shortener to check in preference to goo.gl itself (which will be going away)
- Update ShortLinkResolver to accept AWS properties and use DynamoDB table `goo-gl-links`
- First check DynamoDB for fragment lookup before falling back to Google URL shortener (for now)
- Refactor resolve method to use async/await instead of raw promises for better readability
- Add awsProps to ServerDependencies and pass through component hierarchy
- Configure googleLinksDynamoTable property in AWS config files (defaults to empty)
## Implementation Details
- When `googleLinksDynamoTable` property is configured, `ShortLinkResolver` creates a DynamoDB client
- DynamoDB table uses `fragment` as the key and stores `expanded_url`
- Maintains backwards compatibility by falling back to Google URL (for now) shortener if DynamoDB is not configured or lookup fails
- Google URL shortener fallback will be removed in August 2025 when the service shuts down
## Test plan
- [x] All existing tests pass
- [x] TypeScript compilation succeeds
- [x] Linting passes
- [x] Updated tests to accommodate new awsProps parameter
- [x] Verify fallback to Google URL shortener when DynamoDB not
configured
- [x] Manual testing
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Fix production CDN loading issues where URLs like
`https://static.ce-cdn.net//vendor.v57...css` (double slash) were being
generated when the `staticUrl` config has a trailing slash.
## Root Cause
PR #7681 refactored static asset handling and replaced
`urljoin(staticRoot, path)` with `${staticRoot}/${path}` string
interpolation, losing URL normalization that `urljoin` provides.
## Changes
- Replace string interpolation with `urljoin()` in
`createDefaultPugRequireHandler()`
- Add comprehensive tests covering all trailing slash scenarios
- Maintain full backward compatibility with existing configurations
## Test plan
- [x] All existing tests pass
- [x] Added 4 new test cases for static URL handling with various slash
scenarios
- [x] Verified TypeScript compilation and linting
- [x] Tested production CDN scenario where
`staticUrl=https://static.ce-cdn.net/`
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
This PR significantly improves maintainability by breaking up the 880+ line monolithic app.ts file into smaller, focused modules with proper testing. The code is now organized into dedicated modules under the lib/app/ directory, making the codebase more maintainable and testable.
## Key changes
- Extract functionality into modules under lib/app/ directory:
- Command-line handling (cli.ts)
- Configuration loading (config.ts)
- Web server setup and middleware (server.ts)
- Core application initialization (main.ts)
- URL handlers, routing, rendering, and controllers
- Add comprehensive unit tests for all new modules
- Make compilationQueue non-optional in the compilation environment
- Improve separation of concerns with dedicated interfaces
- Ensure backward compatibility with existing functionality
- Maintain cross-platform compatibility (Windows/Linux)
## Benefits
- Improved code organization and modularity
- Enhanced testability with proper unit tests
- Better separation of concerns
- Reduced complexity in individual files
- Easier maintenance and future development
This refactoring is a significant step toward a more maintainable codebase while preserving all existing functionality.