Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @tinyhttp/app to ~2.2.0 #6781

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 6, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@tinyhttp/app (source) ~2.1.0 -> ~2.2.0 age adoption passing confidence

Release Notes

tinyhttp/tinyhttp (@​tinyhttp/app)

v2.2.0: v2.2: New (old) view engine

Compare Source

v.2.2

Features

new View engine

by @​talentlessguy in https://github.com/tinyhttp/tinyhttp/pull/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 '@&#8203;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/[@&#8203;tinyhttp/app](https://togithub.com/tinyhttp/app)[@&#8203;2](https://togithub.com/2).1.4...[@&#8203;tinyhttp/app](https://togithub.com/tinyhttp/app)[@&#8203;2](https://togithub.com/2).2.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from waghanza as a code owner October 6, 2023 15:55
@waghanza waghanza merged commit 05a4a39 into master Oct 6, 2023
2 checks passed
@waghanza waghanza deleted the renovate/tinyhttp-app-2.x branch October 6, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants