Files
kits/packages/langkit/package.json
CatoandClaude dabd10d66d langkit 0.2.0: remember the choice, hreflang, unused messages, a switcher that fits a phone (#19)
- rememberLocale (+ switchLocaleHref, localeCookie, isSafeNextPath): the route
  that remembers a reader's language in an app with no language in its URL;
  relative 303, checked next, Secure over HTTPS (sbb-fundbuero's lessons)
- alternateLanguages: hreflang alternates for Next metadata
- langkit check --code <dirs> [--fail-unused]: messages no code appears to ask
  for; measured on eight apps, hand-traced samples were dead messages
- fix: with nineteen languages the switcher widened a 390px page to 1081px
  inside sitekit's masthead; now it scrolls inside itself. Checked in a real
  browser at 320/390/1280px
- first public version: private removed, 0.2.0 (0.1.0 was never published)


Claude-Session: https://claude.ai/code/session_019MDtmsTRGc34xnG6koVuAY

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 07:41:24 +01:00

100 lines
2.7 KiB
JSON

{
"name": "@bitbaum/langkit",
"version": "0.2.0",
"description": "One way to be multilingual across the fleet: the language list with fallbacks and regional spelling variants (Swiss German as a transform, not a second translation), how a page picks its language, typed ICU messages that work in server components, a missing-key check for every app's verify, and a language switcher that sits in sitekit's header. Built on use-intl, the engine under next-intl.",
"license": "MIT",
"author": "Mao Nakamoto",
"homepage": "https://github.com/bitbaum/kits/tree/main/packages/langkit#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/bitbaum/kits.git",
"directory": "packages/langkit"
},
"bugs": {
"url": "https://github.com/bitbaum/kits/issues"
},
"keywords": [
"i18n",
"icu-messageformat",
"next-intl",
"locale",
"swiss-german",
"language-switcher"
],
"type": "module",
"sideEffects": [
"*.css"
],
"packageManager": "pnpm@11.25.0",
"engines": {
"node": ">=20"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"bin": {
"langkit": "./bin/langkit.js"
},
"files": [
"dist",
"bin",
"styles.css"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./check": {
"types": "./dist/check.d.ts",
"default": "./dist/check.js"
},
"./migrate": {
"types": "./dist/migrate.d.ts",
"default": "./dist/migrate.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"default": "./dist/react/index.js"
},
"./styles.css": "./styles.css"
},
"scripts": {
"build": "tsc -p tsconfig.json",
"lint": "eslint .",
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p test/types/tsconfig.json",
"test": "node --test test/*.test.js",
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
"prepare": "pnpm run build",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
"@formatjs/icu-messageformat-parser": "^3.5.23",
"use-intl": "^4.15.1"
},
"peerDependencies": {
"react": ">=18"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
},
"devDependencies": {
"@bitbaum/sitekit": "workspace:^",
"@eslint/js": "^10.0.1",
"@types/node": "^26.4.1",
"@types/react": "^19.0.0",
"eslint": "^10.9.1",
"globals": "^17.12.0",
"playwright": "^1.64.1",
"prettier": "3.10.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.69.0"
}
}