• v2.0.2 1de7322757

    v2.0.2
    All checks were successful
    Test / test (push) Successful in 14s
    Stable

    michael released this 2026-11-10 14:25:24 +00:00 | 1 commits to main since this release

    What's Changed

    • Lock file maintenance by @renovate-bot in #8
    • Update dev dependencies by @renovate-bot in #9
    • Add manually triggered release workflow by @michael in #10

    Full Changelog: https://code.thms.uk/michael/link-shortener/compare/v2.0.1...v2.0.2

    Downloads
  • v2.0.1 0cee842ed6

    v2.0.1
    All checks were successful
    Test / test (push) Successful in 13s
    Publish / publish (push) Successful in 13s
    Stable

    michael released this 2026-10-26 07:24:39 +00:00 | 8 commits to main since this release

    What's Changed

    • Add Renovate by @michael in !3
    • Update actions/checkout action to v7 by @renovate-bot !5
    • Update actions/setup-node action to v7 by @renovate-bot !6
    • Update dev dependencies by @renovate-bot in !7
    Downloads
  • v2.0.0 5b2c7e2554

    v2.0.0
    All checks were successful
    Publish / publish (push) Successful in 13s
    Stable

    michael released this 2026-10-09 09:25:03 +00:00 | 19 commits to main since this release

    Breaking changes

    • The package is now named @michael.thms.uk/link-shortener and is installed from the Forgejo package registry instead of directly from the Git repository. To upgrade, add the registry to your .npmrc:
    @michael.thms.uk:registry=https://code.thms.uk/api/packages/michael/npm/
    

    then switch packages:

    npm uninstall link-shortener
    npm install @michael.thms.uk/link-shortener
    

    and update your imports:

    - import { createShortener } from "link-shortener";
    + import { createShortener } from "@michael.thms.uk/link-shortener";
    

    The API and redirect behaviour are unchanged.

    New

    • Ships compiled JavaScript with type declarations, instead of TypeScript source. It no longer needs a bundler or a runtime that handles .ts files.
    • Node.js support. Node can now import the package directly. The README shows a small node:http adapter.
    • Deno support, with setup and usage instructions in the README.
    • The Shortener type is exported, so it can be imported by name.

    Internal

    • Releases are published automatically by CI when a version tag is pushed, after the typecheck, lint, format check and tests pass.
    Downloads
  • v1.0.1 a6c4ec2b40

    v1.0.1
    All checks were successful
    Test / test (push) Successful in 14s
    Stable

    michael released this 2026-10-08 20:51:22 +00:00 | 24 commits to main since this release

    Downloads
  • v1.0.0 e2ad754f51

    v1.0.0
    All checks were successful
    Test / test (push) Successful in 12s
    Stable

    michael released this 2026-10-08 12:35:46 +00:00 | 27 commits to main since this release

    A tiny, dependency-free redirect handler built on the standard Request / Response APIs. Runs on Cloudflare Workers, Bun, and other Fetch-API runtimes.

    Features

    • Map slugs to absolute URLs and get back a fetch(request) handler
    • Optional root redirect for /
    • Configurable redirect status: 301, 302 (default), 307 or 308
    • Query strings passed through to the target by default, or stripped with stripQueryParams
    • Optional trailing-slash matching (acceptTrailingSlash)
    • URL-decoded, case-sensitive slug matching, including non-ASCII slugs
    • Built-in 404 page, or supply your own HTML with notFoundPage
    • Invalid targets are skipped with a console.error at startup instead of crashing at request time

    Install

    npm install git+https://code.thms.uk/michael/link-shortener.git#v1.0.0
    

    See the README for usage and all options.

    Downloads