-
released this
2026-10-09 09:25:03 +00:00 | 4 commits to main since this releaseBreaking changes
- The package is now named
@michael.thms.uk/link-shortenerand 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-shortenerand 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
.tsfiles. - Node.js support. Node can now import the package directly. The README shows a small
node:httpadapter. - Deno support, with setup and usage instructions in the README.
- The
Shortenertype 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
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- The package is now named
-
released this
2026-10-08 20:51:22 +00:00 | 9 commits to main since this releaseDownloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
released this
2026-10-08 12:35:46 +00:00 | 12 commits to main since this releaseA tiny, dependency-free redirect handler built on the standard
Request/ResponseAPIs. 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),307or308 - 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.errorat startup instead of crashing at request time
Install
npm install git+https://code.thms.uk/michael/link-shortener.git#v1.0.0See the README for usage and all options.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Map slugs to absolute URLs and get back a