Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .changeset/locale-cluster-shape.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/nk-dev-cold-type-check.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/nk-blog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @ingram-tech/nk-blog

## 0.1.7

### Patch Changes

- Updated dependencies [c9307ad]
- @ingram-tech/nk-seo@0.9.0

## 0.1.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nk-blog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ingram-tech/nk-blog",
"version": "0.1.6",
"version": "0.1.7",
"description": "File-based blog foundation for Next.js sites: frontmatter schema, build-time reader, limited-MDX rendering, a typed component contract with unstyled defaults, GitHub read/publish, and RSS.",
"license": "MIT",
"type": "module",
Expand Down
13 changes: 13 additions & 0 deletions packages/nk-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @ingram-tech/nk-dev

## 0.13.0

### Minor Changes

- c9307ad: `nk type-check` starts cold when the dependency tree moved: a `*.tsbuildinfo`
older than `bun.lock` / `package.json` is dropped before the run, because
`tsc --incremental` does not reliably re-check a program after a dependency's
`.d.ts` changes and a green result against the stale cache means nothing.
`--cold` drops the cache unconditionally. `nk doctor` now flags a `"prettier"`
key in `package.json` and `.prettierrc*` files alongside `.prettierignore`
(all `--fix`able), and warns when a site has no `ci` script or one that skips
`nk check` / `nk type-check`.

## 0.12.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nk-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ingram-tech/nk-dev",
"version": "0.12.2",
"version": "0.13.0",
"description": "The nextkit dev toolchain in one package: the `nk` CLI plus shared oxlint/oxfmt, TypeScript, and Vitest config, the format-on-commit hook, and the AI agent guide. `nk init` scaffolds a site to use it.",
"license": "MIT",
"type": "module",
Expand Down
44 changes: 44 additions & 0 deletions packages/nk-i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @ingram-tech/nk-i18n

## 0.5.0

### Minor Changes

- c9307ad: Fix the locale cluster shape, and give middleware one way to be written.

**Breaking, deliberately.** `prefixDefaultLocale` is removed and nothing
replaces it: the cluster's shape is no longer configurable. Whichever strategy
you pick, every locale gets its own address (the default included) and the bare
path belongs to no locale — it negotiates, and it is `x-default`.

Previously the prefix strategy made the bare path the default locale's URL, so
`localeFromUrl` returned `defaultLocale` for it. That is the URL signal, which
outranks the cookie, so a visitor who chose French snapped back to English on
the first bare internal link — and every site that starts with a cookie switcher
has bare internal links. The two shapes now excluded (bare path IS the default
locale, bare path redirects on perceived language) are the two that go wrong;
offering either as an option is how a fleet drifts.

- **`localeProxy(routing, request)`** is the whole middleware side: forwards the
pathname and locale headers, rewrites `/fr/about` → `/about` so the app keeps
one route tree, remembers an explicit choice in the cookie, never redirects.
Middleware that does more passes `requestHeaders` in and keeps editing the
response. Replaces `forwardUrlLocale` and the strip/rewrite/cookie/consolidate
code every prefix site was hand-writing.
- **`forwardRequestContext`** sets nk-seo's `x-pathname` and the locale header
together, so the two conventions can't be wired separately and one forgotten.
- **`defineLocaleRouting` is generic over the locale union.** `isLocale` is a
type guard, `resolve` / `localeFromUrl` / `createLocaleResolver` return `L`.
Sites stop writing their own guards and casts.
- **`hrefLangTags` and `cookieName` move onto routing.** A site with regional
tags no longer builds a second config object, which was exactly the drift this
package exists to prevent. `routing.htmlLang(locale)` gives the `<html lang>`
value, and `hreflangConfigFor` passes the tags through.
- **`routing.stripLocale(pathname)`** exposes the app-facing path.

nk-seo's `HreflangConfig` drops `defaultLocale` and `prefixDefaultLocale`;
`x-default` is always the bare path now, so neither is needed.

Migration: delete `prefixDefaultLocale`, replace `forwardUrlLocale` +
manual `x-pathname` with `localeProxy`, drop any local `isLocale` guard and
`as Locale` cast. Prefix sites gain `/en/…` as a real address — verify with
`assertHreflangCluster` from `@ingram-tech/nk-seo/verify`.

## 0.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nk-i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ingram-tech/nk-i18n",
"version": "0.4.1",
"version": "0.5.0",
"description": "Type-safe, English-as-key i18n for Ingram Next.js sites — ICU translator, scopes, locale config, Accept-Language negotiation, and locale URL routing.",
"license": "MIT",
"type": "module",
Expand Down
44 changes: 44 additions & 0 deletions packages/nk-seo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @ingram-tech/nk-seo

## 0.9.0

### Minor Changes

- c9307ad: Fix the locale cluster shape, and give middleware one way to be written.

**Breaking, deliberately.** `prefixDefaultLocale` is removed and nothing
replaces it: the cluster's shape is no longer configurable. Whichever strategy
you pick, every locale gets its own address (the default included) and the bare
path belongs to no locale — it negotiates, and it is `x-default`.

Previously the prefix strategy made the bare path the default locale's URL, so
`localeFromUrl` returned `defaultLocale` for it. That is the URL signal, which
outranks the cookie, so a visitor who chose French snapped back to English on
the first bare internal link — and every site that starts with a cookie switcher
has bare internal links. The two shapes now excluded (bare path IS the default
locale, bare path redirects on perceived language) are the two that go wrong;
offering either as an option is how a fleet drifts.

- **`localeProxy(routing, request)`** is the whole middleware side: forwards the
pathname and locale headers, rewrites `/fr/about` → `/about` so the app keeps
one route tree, remembers an explicit choice in the cookie, never redirects.
Middleware that does more passes `requestHeaders` in and keeps editing the
response. Replaces `forwardUrlLocale` and the strip/rewrite/cookie/consolidate
code every prefix site was hand-writing.
- **`forwardRequestContext`** sets nk-seo's `x-pathname` and the locale header
together, so the two conventions can't be wired separately and one forgotten.
- **`defineLocaleRouting` is generic over the locale union.** `isLocale` is a
type guard, `resolve` / `localeFromUrl` / `createLocaleResolver` return `L`.
Sites stop writing their own guards and casts.
- **`hrefLangTags` and `cookieName` move onto routing.** A site with regional
tags no longer builds a second config object, which was exactly the drift this
package exists to prevent. `routing.htmlLang(locale)` gives the `<html lang>`
value, and `hreflangConfigFor` passes the tags through.
- **`routing.stripLocale(pathname)`** exposes the app-facing path.

nk-seo's `HreflangConfig` drops `defaultLocale` and `prefixDefaultLocale`;
`x-default` is always the bare path now, so neither is needed.

Migration: delete `prefixDefaultLocale`, replace `forwardUrlLocale` +
manual `x-pathname` with `localeProxy`, drop any local `isLocale` guard and
`as Locale` cast. Prefix sites gain `/en/…` as a real address — verify with
`assertHreflangCluster` from `@ingram-tech/nk-seo/verify`.

## 0.8.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nk-seo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ingram-tech/nk-seo",
"version": "0.8.1",
"version": "0.9.0",
"description": "SEO primitives for Next.js sites: typed schema.org JSON-LD builders, a <JsonLd> tag, a Metadata factory (canonical + OG + Twitter), and configurable hreflang alternates.",
"license": "MIT",
"type": "module",
Expand Down