Release 3.0.0
[skip ci]
3.0.0 (2025-03-12)
⚠ BREAKING CHANGES
- drop Node.js < 18.19.0 support
part of https://github.com/eggjs/egg/issues/3644
https://github.com/eggjs/egg/issues/5257
- change mime-db to 1.52.0
Summary by CodeRabbit
New Features
Rebranded the package as “@eggjs/compressible” with enhanced TypeScript support, updated module exports, and improved type definitions.
Documentation
Revised the README with new badges, installation instructions, usage examples, and contributor information.
- Updated LICENSE with a new copyright entry.
Refactor
Migrated the core compressibility functionality from JavaScript to a streamlined TypeScript implementation.
Tests
Added comprehensive tests to ensure robust handling of various MIME type inputs.
Chores
Improved development tooling and updated CI workflows for build, release, and package publishing.
Features
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
@eggjs/compressible
Compressible
Content-Type/mimechecking.Forked compressible for TypeScript and keep mime-db as same version as mime-types.
Installation
API
compressible(type)
Checks if the given
Content-Typeis compressible. Thetypeargument is expected to be a value MIME type orContent-Typestring, though no validation is performed.The MIME is looked up in the
mime-dband if there is compressible information in the database entry, that is returned. Otherwise, this module will fallback totruefor the following types:text/**/*+json*/*+text*/*+xmlIf this module is not sure if a type is specifically compressible or specifically uncompressible,
undefinedis returned.License
MIT
Contributors
Made with contributors-img.