Releases: nitrojs/nitro
v2.9.2
🩹 Fixes
- database: CamelCase the connector name (#2228)
- Respect
imports.autoImport: false
(#2226) - server-assets: Mark
yaml
,json
,json5
andcsv
as text (#2229) - import-meta: Import
process
fromnode:process
for node compatible builds (deno) (#2225)
📖 Documentation
- deploy: Add link to zero config providers (#2206)
- fetch: Fix typo (#2209)
- Fix typo (#2211)
- Fix typo (#2205)
- Remove lagon (#2204)
- Update url for experimental database feature (#2210)
- providers: Improve formatting & use new
undocs
components (#2202) - Improve cache page (674089b3)
❤️ Contributors
- Pooya Parsa (@pi0)
- Divy Srivastava (@littledivy)
- Alexander Lichter [email protected]
- Daniel Roe (@danielroe)
- Sébastien Chopin (@Atinux)
- Christian Preston (@cpreston321)
- Phan Khắc Đạo [email protected]
- Maxime Pauvert (@maximepvrt)
- Jeff Galbraith (@hawkeye64)
- Rajeev R Sharma [email protected]
- Julien Vanelian (@JulienVanelian)
- Gangan (@shinGangan)
v2.9.1
🩹 Fixes
- Dev:
remoteAddress
might be undefined forx-forwarded-for
(#2198) - Disable scheduled tasks in testing environment (#2200)
📖 Documentation
🤖 CI
- Skip
cloudflare-pages
test for windows (#2199)
❤️ Contributors
- Pooya Parsa [email protected]
- Roman Nuritdinov (@Ky6uk)
- Stefan [email protected]
- Shoshana Connack
- manniL
v2.9.0
🎉 Released live from Vue.js Amsterdam
⭐ What is new?
🏃♂️ Nitro Tasks
All changes
🚀 Enhancements
- prerender: Support function/RegExp for
prerender.ignore
(#1966) - CLI: Show meta framework name on server build success (#1955)
- Presets: Add zeabur preset (#1942)
- Experimental nitro tasks (#1929)
- Add types:extend hook (#1715)
- Allow oveeridng nested runtime config with env (#1831)
- wasm: Universal support with esm import syntax (#2017)
- wasm: Migrate to unjs/unwasm (#2037)
- zeabur: Support zeaburStatic and auto detect preset (#2014)
- runtime-config: Experimental env expansion support (#2043)
- Support binary server assets (#2107)
- Experimental websocket support (#2170)
- dev: Expose upgrade handler (5374429f)
- Experimental database layer (#1351)
- Experimental scheduled tasks (#2179)
- cache: Support async shouldBypassCache and shouldInvalidateCache (#2181)
- prerender: Add total prerender time (#2130)
- Presets: Add koyeb preset (#1248)
- providers: Support alwaysdata hosting provider (#1790)
- routeRules: Allow wildcard redirects (#1976)
🩹 Fixes
- rollup: Avoid preserving relative externals (#1972)
- wasm: Directly generate chunk exports (#2003)
- iis-node: Correctly escape backslashes for port fix (#2020)
- deno-deploy: Shim
x-forwarded-for
andx-forwarded-proto
headers (#2026) - Add
baseURL
to openapi generated url (#2049) - dev: Correctly set
x-forwarded-*
headers (29ddd948) - azure: Add
18
and20
to supported node versions (#2077) - azure: Pass body to the context as-is (#2079)
- dev: Only mock consola in production (#2110)
- Default to bundler module resolution (#2120)
- Handle optional
routeHandler.route
in rollup chunk (#2152) - File extension stripping in
writeTypes
function (#2139) - cache: Detect malformed data read from storage (#2161)
- cacheEventHandler: Provide event.fetch and event.$fetch (#2066)
- module: Resolve modules with jiti directly (#2030)
💅 Refactors
- Include framework name in more build packages (#1973)
- cloudflare: Remove
--local
from perview commands (#1979) - cloudflare: Remove unused import (#1980)
- rollup: Improve generated chunk names (#2004)
- Use name exports in presets entry (1abfc3e5)
- Reimplement WASM plugin (#2031)
- Various improvements around tasks api (#2175)
- tasks: Stablize api (#2178)
- github-pages: Add
--dotfiles
to deploy command hint (#2158)
📖 Documentation
- routing: Update request filtering to match the type of getRequestURL (#1977)
- config: Fix
setResponseHeader
example params (#2027) - netlify: Add note to make sure publish dist is set to dist (#2035)
- cloudflare: Various updates, cleanups and fixes (#1981)
- presets: Deprecate
lagon
(17f922aa) - Update the routing page (#2085)
- Update the cache page (#2087)
- Close code-group in cache section (#2093)
- routing: Escape filename paths and prepend routes folder (#2097)
- storage: Fix unstorage links (#2101)
- routing: Fix typo for getRouterParam (#2098)
- Update the storage page (#2086)
- Add object syntax for event handler (#2091)
- Update the configuration page (#2083)
- Update the assets page (#2088)
- Create a page on built-in fetch (#2089)
- Add warning about azure functions stability (#2092)
- cloudflare: Update deployment guide (#2074)
- Fix icon of fetch page (#2115)
- Update getting started page (#2082)
- Fix links to /guide/auto-imports (#2131)
- Fix typo in defineCachedFunction example (#2133)
- Clarify difference between dir and baseURL (#2144)
- Migrate to undocs (#2163)
- index: Fix utils link (#2172)
- websocket: Fix typo (#2173)
- Fix typo (3017e6e2)
- vercel: Add monorepo info (#2183)
- Fix typo (#2182)
- cloudflare: Add local bindings usage (#2135)
- Fix link to h3 utils (#2184)
- deploy: Add platform.sh (#1630)
📦 Build
- Better dist chunk names (#2005)
✅ Tests
- cloudflare: Migrate to
miniflare
v3 (#2018) - Enable azure tests behind a flag (#2076)
- Enable binary response test for all presets (#2078)
- Avoid prerendering
icon.png
(cb220f7e)
🤖 CI
- Fix nightly release job condition (#1975)
❤️ Contributors
- Julien Huang [email protected]
- Jasper Zonneveld
- M4dz (@m4dz)
- Dominik Opyd [email protected]
- Justin Ellingwood [email protected]
- Connor Pearson [email protected]
- Alexander Lichter (@manniL)
- David De Sloovere
- Dario Piotrowicz (@dario-piotrowicz)
- Balázs Németh
- Mehmet [email protected]
- Markthree (@markthree)
- Arkadiusz Sygulski [email protected]
- Jamaluddin Rumi [email protected]
- Pooya Parsa (@pi0)
- McPizza [email protected]
- Shoshana Connack
- Anthony Fu [email protected]
- Jackson Tenclay
- Rihan (@RihanArfan)
- Remonke
- Daniel Roe (@danielroe)
- Estéban (@Barbapapazes)
- Gerard Wilkinson [email protected]
- Tobias Lebeitsuk
- Alexander (@cany748)
- Kasper Kronborg [email protected]
- Gustavo Alfredo Marín Sáez [email protected]
- Alexandr
- Yuanlin Lin [email protected]
- Mcremer-able [email protected]
- Jasonleong [email protected]
- METO (@metowolf)
- Michael Brevard [email protected]
- Bobbie Goede [email protected]
- Becem (@becem-gharbi)
- Mukund Shah
- Ayo Ayco (@ayoayco)
v2.8.1
🩹 Fixes
- dev: Conditionally access worker address for build info (#1947)
- Force use wasm import strategy for windows (e73b849f)
- netlify-lambda: Handle base64 encoded body (#1940)
- cloudflare: Wasm support with dynamic chunks (#1957)
- prerenderer: Write responses with json signature to original path (#1963)
📖 Documentation
- cache: Make default value
swr: true
more clear (#1949)
🏡 Chore
✅ Tests
❤️ Contributors
- Pooya Parsa (@pi0)
- Becem [email protected]
- Mick Lawitzke (@MickL)
v2.8.0
🌟 What is new?
🚀 Zero config deployment to AWS Amplify Hosting
We have been closely working with the AWS Amplify team to bring you a zero-config experience AWS deployment and it is ready today! Read more in the deployment guide.
🔥 Code splitting enabled for Cloudflare Pages and Modules
Code-splitting support is now enabled for Cloudflare Pages and Modules presets making startup-time even faster by leveraging lazy chunks. (read more: (#1905))
🍣 Rollup v4 with native SWC-based parser
We've upgraded Nitro to the latest Rollup v4, powered native SWC-based parser for even faster builds (rollup/rollup#5073) 🔥
Normally, you won't need any specific changes in your project. You can also ignore warnings about compatibility with rollup-plugin-visualizer
. If you're adding a custom Rollup plugin or using Vite v4, you might encounter type issues due to duplicate dependencies. You can either use the resolutions
field in your package.json
or simply ignore this warning until Nuxt upgrades to Vite v5 (soon!).
🧩 Modules support to extend Nitro core
With this release, we have introduced a new advanced feature to extend the Nitro builder core. (more documentation will be available soon)
Example: modules/test.ts
(server/modules/test.ts
for Nuxt projects)
import type { NitroModule } from "nitropack";
export default <NitroModule>{
name: "my-nitro-module",
async setup(nitro) {
console.log("Running custom nitro module...");
await nitro.updateConfig({
routeRules: {
"/**": { swr: true },
},
});
},
};
⚡️ H3 v1.9
h3 v1.9.0 comes with new getValidatedRouterParams
and getRequestFingerprint
utilities, decode
options for getRouterParam
and auto-completion for headers in your IDE!
🔥 More coming soon
There are more exciting features including tasks, db layer, and WebSocket API planned for the next minor releases. Stay tuned!
Changelog
🚀 Enhancements
- Support modules to extend nitro builder (#1789)
- Support
inline
mode forserveStatic
(#1864) - Add experimental
winterjs
preset (#1863) - Allow setting preset using
SERVER_PRESET
environment variable (#1870) - cloudflare-pages, Cloudflare-module: Enable code splitting by default (#1905)
- Support
framework
config (#1843) - Add AWS Amplify Hosting preset (#1912)
- Upgrade to Rollup v4 (#1927)
- Improve
nitro.json
build info (#1930) - aws-amplify: Support static builds (#1933)
- Add
defineNitroErrorHandler
type helper (#1923)
🩹 Fixes
- cloudflare-pages: Filter out overlapping public assets dirs (#1859)
- scanner: Allow having HTTP method as part of the route name (#1895)
- Generate route types with resolve path and stripped extension (#1897)
- Scan dirs for unimport on initialization (#1908)
- aws-amplify: Register and auto detect (0f38eb6f)
- prerender: Decode generated routes (#1914)
- Disabled public asset handler name is
null
(b7a6a1a6) - prerender: Decode URIs in headers (#1932)
- error: Respect accept:
text/html
request header (#1921) - prerender: Filter encoded links starting with
#
(#1936)
💅 Refactors
📖 Documentation
- deploy: Split runtimes from providers (#1865)
- routing: Add note about middleware returns (#1884)
- Update edge links to nightly (#1902)
- deploy: Add deno to runtime list (#1899)
- cloudflare: Update wrangler link (#1913)
- aws-amplify: Add custom
amplify.yml
(f412af16) - amplify: Remove cache from config (7bbb723e)
- Hide winterjs due to instability (048c8ff0)
- Add jsdoc for
cache.maxAge
(#1878)
🌊 Types
- Export
SerializeTuple
andSerializeObject
types (#1907)
❤️ Contributors
- Pooya Parsa (@pi0)
- Siegerts [email protected]
- Passionate-bram
- Daniel Roe [email protected]
- Neil Richter (@noook)
- Xin Du (Clark) [email protected]
- Anthony Fu [email protected]
- Dario Piotrowicz (@dario-piotrowicz)
- Kalwabed Rizki
- Thunfisch987
- Oof2win2 [email protected]
- Markthree (@markthree)
- Estéban (@Barbapapazes)
v2.7.2
🩹 Fixes
- cloudflare-pages: Filter out overlapping public assets dirs (#1859)
❤️ Contributors
- Daniel Roe [email protected]
v2.7.1
🩹 Fixes
- Recursively simplify returned objects (#1847)
- cache: Fix
etag
andlast-modified
values (#1855) - cache: Invalidate wrongly cached handler entities (#1857)
❤️ Contributors
- Pooya Parsa (@pi0)
- Daniel Roe [email protected]
v2.7.0
🚀 Enhancements
- vercel: Support
bypassToken
for on-demand static reganaration (#1723) - prerender: Support
retry
andretryDelay
(#1534) - Allow disabling compressed size calculation (#1756)
🔥 Performance
- Use native fetch for node >= 18 to reduce %40 of bundle size! (#1724)
🩹 Fixes
- Sort dependencies in
.output/package.json
(#1708) - Add
application/javascript
mime type in lambda utils (#1737) - renderer: Allow all h3 handled body types (#1755)
- dev: Safe error message override (#1712)
- azure: Fix cookie format normalization (#1753)
- Exclude undefined from hook types (#1769)
- iis-node: Pass
PORT
asNITRO_UNIX_SOCKET
(#1783) - aws-lambda: Handle
event.isBase64Encoded
(#1779) - cache: Allow overriding integrity (#1791)
- cache: Write SWR and update errors to the console (#1794)
- cache: Only return validated stale value (#1795)
- cache: Only invalidate if validate returns false (#1796)
- Watch plugins directory (#1800)
- cache: Allow setting multiple set-cookie headers (bad practice!) (#1838)
- prerender: Decode HTML entities in rendered links (#1824)
- storage: Validate and skip invalid mounts (#1805)
- cache: Validate
entry.value
to have value for cached handlers (84559382) - cache: Fix event handler integrity hash generation (#1820)
- cache: Set cache item before returning response on first request (#1813)
💅 Refactors
- iis: Improve preset and docs (#1784)
📖 Documentation
- Update prerender options (11a24124)
- Fix typo (#1722)
- Register error handler using
hook
instead ofhookOnce
(#1743) - Update lock file (#1750)
- Fix typo (#1759)
- Fix configuration file name of the custom preset (#1760)
- Typo in word "legacy" in Configuration docs (#1780)
- cloudflare: Add local dev section (#1772)
🏡 Chore
- Add
.devcontainer
(#1633) - Update
vitest
to1.0.0-beta
(#1776) - Use pnpm
shell-emulator
for Windows local development (#1828) - Use
nitropack-nightly
for the nightly release channel (#1841)
🤖 CI
- Run tests against Node.js 18 (#1713)
❤️ Contributors
- Pooya Parsa (@pi0)
- Yasser Lahbibi (@yassilah)
- Horu
- Michael Brevard [email protected]
- Daniel Roe [email protected]
- MiniDigger < Martin>
- Estéban (@Barbapapazes)
- Heb (@Hebilicious)
- Henrique Lopes
- McPizza [email protected]
- Michael BOUVY [email protected]
- Jeremy Graziani
- Tobias Diez [email protected]
- VALERIY SINEVICH
- Roman Zipp [email protected]
- Benjamin GAYMAY (@BenjaminGaymay)
- Alexander Lichter (@manniL)
- Farnabaz (@farnabaz)
- Nils K
- Jonas Thelemann (@dargmuesli)
- Jenjen75 [email protected]
- Sébastien Chopin (@Atinux)
v2.6.3
🩹 Fixes
- firebase: Apply region for gen2 deployments (#1657)
- cloudflare-pages: Autodetect static preset (#1659)
- Resolve output dirs relative to
rootDir
(#1666) - prerender: Allow disabling html sub-folders (#1676)
- firebase: Use correct key when importing firebase
httpsOptions
(#1663) - Await on
send()
calls (#1701) - Bun dev compatibility (#1702)
- aws-lambda,netlify-lambda: Binary body v2 and cookies v1 (#1683)
- iis: Merge
web.config
(#1658)
📖 Documentation
- render-com: Add note about node version (#1693)
- Add instructions for using Nuxt edge release channel (#1688)
- Add instructions for bun (#1672)
✅ Tests
- Update test for bun headers (#1684)
❤️ Contributors
- Gavin Hardaker (@Hardaker587)
- Heb (@Hebilicious)
- Colin McDonnell (@colinhacks)
- Pooya Parsa (@pi0)
- Luke Nelson [email protected]
- Rajeev R Sharma [email protected]
- Markthree (@markthree)
- Daniel Roe [email protected]
- Yuichi Takebe
v2.6.2
🩹 Fixes
- Use new h3 generics for
defineCachedEventHandler
(#1640) - aws-lambda, netlify: Add
isBase64Encoded
response field (#1645) - Exclude typed body from
cachedEventHandler
(#1647) - static: Send immediate empty responses for 304 handling (#1639)
🏡 Chore
- Update
listhen
to latest (62ac3065)
✅ Tests
- Add test for prerender ignored
data:
URLs (#1431)
❤️ Contributors
- Pooya Parsa (@pi0)
- Markthree (@markthree)
- Daniel Roe [email protected]
- Azcray