-
Notifications
You must be signed in to change notification settings - Fork 49
feat: update cacheControl type to support function #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
enson0131
wants to merge
8
commits into
koajs:master
Choose a base branch
from
enson0131:feat/enson-cache-control
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added static cache middleware for Koa. - Introduced TypeScript support for the package. - Implemented comprehensive configuration for package management. - **Infrastructure** - Updated GitHub Actions workflows for CI/CD. - Added ESLint configuration. - Updated project build and testing configurations. - **Documentation** - Refreshed README with new badges and installation instructions. - Updated package description and licensing. - **Maintenance** - Upgraded Node.js engine support to version 18.19.0+. - Migrated package to `@eggjs/koa-static-cache`. - Removed legacy Travis CI configuration. - Added new TypeScript configuration file. - Removed unnecessary files and configurations, streamlining the project structure. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
[skip ci] ## [6.0.0](eggjs/koa-static-cache@v5.1.4...v6.0.0) (2025-01-12) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added static cache middleware for Koa. - Introduced TypeScript support for the package. - Implemented comprehensive configuration for package management. - **Infrastructure** - Updated GitHub Actions workflows for CI/CD. - Added ESLint configuration. - Updated project build and testing configurations. - **Documentation** - Refreshed README with new badges and installation instructions. - Updated package description and licensing. - **Maintenance** - Upgraded Node.js engine support to version 18.19.0+. - Migrated package to `@eggjs/koa-static-cache`. - Removed legacy Travis CI configuration. - Added new TypeScript configuration file. - Removed unnecessary files and configurations, streamlining the project structure. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * support cjs and esm both by tshy ([eggjs#1](eggjs#1)) ([b0524d9](eggjs@b0524d9))
closes eggjs#2 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated various dependencies to their latest stable versions, ensuring improved consistency and maintainability. - **Bug Fixes** - Enhanced the compression process by adding a validation step to prevent potential runtime issues during file processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
[skip ci] ## [6.1.0](eggjs/koa-static-cache@v6.0.0...v6.1.0) (2025-03-12) ### Features * use @eggjs/compressible ([eggjs#3](eggjs#3)) ([5b68e18](eggjs@5b68e18))
…handling - Changed `cacheControl` in `FileMeta` and `Options` interfaces to accept a function that returns a string based on the file path. - Enhanced the logic for setting `maxAge` to prevent overwriting when it is explicitly set to 0.
- Refactored the logic for setting `maxAge` to ensure it correctly defaults to 0 when both `obj.maxAge` and `options.maxAge` are undefined, preventing unintended overwrites.
not sure why there are many conflicts, can you fix please? also is there a summary of what you are trying to fix? thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist