Skip to content

Releases: tinyhttp/tinyhttp

@tinyhttp/[email protected]

11 Sep 13:58
fc1c1b2
Compare
Choose a tag to compare

What's Changed

Misc

  • remove vite from build step
  • bump dev deps
  • enable strict mode in TypeScript settings

New Contributors

Full Changelog: https://github.com/tinyhttp/tinyhttp/compare/@tinyhttp/[email protected]...@tinyhttp/[email protected]

@tinyhttp/[email protected]

30 Jul 09:33
68df0ef
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/tinyhttp/tinyhttp/compare/@tinyhttp/[email protected]...@tinyhttp/[email protected]

@tinyhttp/[email protected]

22 Jul 14:20
44f9861
Compare
Choose a tag to compare

@tinyhttp/[email protected]

22 Jul 14:20
44f9861
Compare
Choose a tag to compare

@tinyhttp/[email protected]

26 Jun 12:38
Compare
Choose a tag to compare

Fixed res.json hanging if number or boolean was passed (initial work in #426).

thanks to @JTBrinkmann for contributing the fix.

@tinyhttp/[email protected]

28 Oct 11:53
Compare
Choose a tag to compare

What's Changed

  • test: increased coverage for content-disposition, jsonp and type-is by @aarontravass in #411
  • fix: subapps mount regardless if path has leading slash or not by @aarontravass in #419
  • fix: correctly update req.url on routes and mws by @adhusson in #420

New Contributors

Full Changelog: https://github.com/tinyhttp/tinyhttp/compare/@tinyhttp/[email protected]...@tinyhttp/[email protected]

v2.2: New (old) view engine

28 Sep 22:38
Compare
Choose a tag to compare

v.2.2

Features

new View engine

by @talentlessguy in #401

View engine was ported from express for cases like multiple view engines and custom View processing. See docs for more info.

App doesn't require a first argument as engine options in a generic anymore. Instead pass engine options to app.engine and res.render.

Example:

import { App } from '@tinyhttp/app'
import { renderFile, type EtaConfig } from 'eta'
import type { PartialConfig } from 'eta/dist/types/config'

const app = new App()

app.engine('eta', eta.renderFile)

app.use((_, res) => void res.render<PartialConfig>('index.eta', { name: 'Eta' }))

app.listen(3000, () => console.log(`Listening on http://localhost:3000`))

new type: AppConstructor

A constructor type for @tinyhttp/app has been moved into a type for more convenience:

import type { AppConstructor } from '@tinyhttp/app'

new App method: app.disabled

Returns if a setting is disabled:

app.disabled('networkExtensions') // true

Bug Fixes

Improvements

  • Cut down total deps of @tinyhttp/app from 25 to 23.
  • Install size of @tinyhttp/app decreased from 692KB to 540KB (22% smaller) by switching from es-mime-types to mime@beta
  • app.set, app.enable and app.disable now have stricter types
  • app.engine supports extensions with and without a dot
  • app.render, res.render and app.engine support passing template engine options as a generic
  • a few es- modules owned by @talentlessguy are moved to the tinyhttp organization to avoid lock-in and make it easier to maintain

New examples

Full Changelog: https://github.com/tinyhttp/tinyhttp/compare/@tinyhttp/[email protected]...@tinyhttp/[email protected]

@tinyhttp/[email protected]

13 Aug 13:23
Compare
Choose a tag to compare

@tinyhttp/[email protected]

@tinyhttp/[email protected]

08 May 10:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/tinyhttp/tinyhttp/compare/@tinyhttp/[email protected]...@tinyhttp/[email protected]