tinyhttp v2 - Hello ESM, goodbye CJS
tinyhttp finally drops all CommonJS outputs and becomes pure ESM. Node.js 10 became EOL so this means all LTS versions starting v12 support the framework. All of the middlewares are also pure ESM now.
Core
- BREAKING: move to pure ESM
- fix: Unable to set url prefix for the application (#249)
- remove
freshnessTesting
property because it makes no sense - router: align RegexParams types to regexpram
- fix: console.error triggering in tests
- don't report error if it is not an Error class instance
- set proper headers for HEAD requests
- fix: ETag caching not working (#272)
- send: set 304 status on fresh request
- fix: req.path computed improperly (#290)
- fix: router mount order (#292)
- fix(send): res.sendFile method forcibly overwrites the HTTP status code with 200
Wares
- cors: set default allowed headers to content-type (#257)
- fix(logger): statusEmoji import in logger (#271)
- deprecate @tinyhttp/session, @tinyhttp/pug
- move bot-detector, cookie-parser, jwt, logger, favicon, markdown to separate repos
- ip-filter, rate-limit: remove type dependency on tinyhttp in wares
Other
- cli: add project name as package.json name (#264)
Docs
- fix typo in couchdb/README.md (#251)
- fix broken benchmarks link (#300)
- rate-limit: Correct status code typo (#303)
- move website to a separate repo
Examples
- add turbo-http, neo4j (#269), malibu (#281), swagger (#283) examples
- use ts-node/esm loader for ts example
- remove aws, babel, next-custom-server, dev-server examples bc of incompatibility with ESM
- examples cleanup & deps bump
thanks to @wasd845, @tbhmens, @fabiospampinato, @sbencoding, @e965, @n1ru4l, @paolotiu, @eltociear, @sonnyp, @aral, @wakeupmh, @aldy505, @massivefermion for helping with the project! ❤️❤️❤️