Releases: lukeed/polka
v1.0.0-next.28
Patches
-
Removes
node:
prefix from all CommonJS modules (#215).
You will get these files via arequire
statement.The ESM version of each package still has the
node:
prefix. You will only get this version if you are usingimport
syntax.
Thenode:
prefix was added in 16.x and back-ported to 14.18 (docs), so ensure you're on at least one of those versions. While native ESM was technically added in 12.x, it's been end-of-life (including security) for ~3 years and its version of "ESM" is significantly broken/different than today's ESM... 12.x was the first (experimental) ESM release.
Chores
- Add new build script to generate CommonJS modules w/
node:
prefix removed: 5ee202f, 228253c - Include
build
step in CI for size logging: 05dae70
Full Changelog: v1.0.0-next.27...v1.0.0-next.28
v1.0.0-next.27
Features
- Support Deno runtime by adding
node:
import prefixes (#212): e34ad69
Thank you @benmccann~!
Chores
What's Changed
- Bump GitHub Actions image versions (#213): 9656b12
Thank you @benmccann
Full Changelog: v1.0.0-next.26...v1.0.0-next.27
v1.0.0-next.26
Patches
- (compression): Use
RegExp.exec
instead ofRegExp.match
for performance (#210): 822c80a
Thank you @bluwy~!
Chores
- (
compression
): README typo (#206): cc89f8e
Thank you @karlhorky~!
Full Changelog: v1.0.0-next.25...v1.0.0-next.26
v1.0.0-next.25
NEW
- Add
@polka/compression
package! (#148): a2105e0, 7745eb4
A lightweightcompression
replacement, with opt-in Brotli support.
Thank you @developit! 🙌
Chores
- Add a licenses.dev badge to README files: 5ff616a
This service recursively analyzes entire dependency graphs to ensure that a package (or your project) is using permissive licenses. For example, here's a results table forpolka@next
and a largerastro
example.
Full Changelog: v1.0.0-next.24...v1.0.0-next.25
v1.0.0-next.24
Features
- Support TypeScript
node16
/nodenext
/bundler
module resolutions support (#192, #200):
Thank you @didinele and @benmccann~!
Patches
-
(
polka
) Upgrade to[email protected]
which improved optional wildcard pattern support: 862b08e
See[email protected]
release notes for more information. -
(
@polka/send
) Apply custom response headers for piped stream (#198): 1568db3
Thank you @aral
Full Changelog: v1.0.0-next.22...v1.0.0-next.24
v1.0.0-next.22
v1.0.0-next.21
Breaking
- (
polka
) Removecode
property support fornext()
errors: f95a5b4
Previously any errors or custom error-objects could use thecode
property to set the response status code. However, this could pose a problem with nativeError
types that set an error code (eg,"ENOENT"
) which is an invalid status code.
Now you must use thestatus
property, which was always supported, but took a backseat tocode
's existence. Express also supports thestatus
property.next({ -- code: 422, ++ status: 422, message: 'Invalid content', });
Chores
- (
@polka/url
) Accomodate an updated error message in test expectant: d30d448
v1.0.0-next.20
v1.0.0-next.17
Patches
- (
@polka/url
): EnsuretoDecode
value is considered duringreq._parsedUrl
cache match: f64b4bb
For example, if youparse
a URL without decoding it, that previous result should not be reused if you callparse
again w/toDecode
set totrue
this time. Should be true for the reverse situation too.
v1.0.0-next.16
Breaking
-
No longer automatically decodes
req.url
andreq.path
values anymore (#172): 6ef32a6, 363e1f6
Previously, these properties had already passed throughdecodeURIComponent
, which could affect Polka's own routing (#142) or external middleware that always expectedreq.path
and/orreq.url
to remain percent-encoded.However, all
req.params
values are still decoded!This change aligns Polka with the default Express decoding behavior.