diff --git a/.changeset/auth-session-request-memo.md b/.changeset/auth-session-request-memo.md deleted file mode 100644 index 1c40ba0..0000000 --- a/.changeset/auth-session-request-memo.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@ingram-tech/nk-auth": patch ---- - -`createAuthHelpers`: memoize the validated session read per request with React `cache()`. A render fanning out many `getUser()` / `requireUser()` calls now validates the session against the database once per request instead of once per call (measured 9 → 1 on a financica page). Caveat: mutating the session mid-request and re-reading it through the helpers returns the pre-mutation snapshot; read `auth.api.getSession` directly in that case. diff --git a/.changeset/pool-defer-missing-url.md b/.changeset/pool-defer-missing-url.md deleted file mode 100644 index 1da2c2a..0000000 --- a/.changeset/pool-defer-missing-url.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@ingram-tech/nk-db": patch ---- - -`createPool` no longer throws when no connection string is configured — it -returns a pool that constructs cleanly and defers the "set DATABASE_URL" error -to first use. Constructing the pool happens at module load in every app's -`lib/db`, so importing that module (and therefore `next build` collecting page -data, a unit test, or a CLI tool that never queries) must stay side-effect-free; -a hard throw at construction broke DB-less builds. A process that then runs a -real query without a URL still fails fast and legibly — the env is fixed at -process start, so this is never a transient miss. The deferred rejection is -async (a macrotask, like real connection I/O) so Next.js partial prerendering -sees a pending promise and postpones the segment, instead of a synchronous -render error. A present-but-invalid `DATABASE_URL` still throws eagerly. diff --git a/.changeset/robots-guard-next-assets.md b/.changeset/robots-guard-next-assets.md deleted file mode 100644 index 55eee59..0000000 --- a/.changeset/robots-guard-next-assets.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@ingram-tech/nk-seo": patch ---- - -`createRobots` now throws if a `disallow` entry would block `/_next`. Crawlers -must fetch the JS/CSS under `/_next` to render pages, so disallowing it silently -degrades indexing — Next.js does not block it by default and neither should a -site. The guard is a prefix check (`/_next`, `/_next/`, `_next/static`, …); an -unrelated prefix like `/_preview` is unaffected. diff --git a/packages/nk-auth/CHANGELOG.md b/packages/nk-auth/CHANGELOG.md index b0d21ae..23553f9 100644 --- a/packages/nk-auth/CHANGELOG.md +++ b/packages/nk-auth/CHANGELOG.md @@ -1,5 +1,13 @@ # @ingram-tech/nk-auth +## 0.12.1 + +### Patch Changes + +- e6454f3: `createAuthHelpers`: memoize the validated session read per request with React `cache()`. A render fanning out many `getUser()` / `requireUser()` calls now validates the session against the database once per request instead of once per call (measured 9 → 1 on a financica page). Caveat: mutating the session mid-request and re-reading it through the helpers returns the pre-mutation snapshot; read `auth.api.getSession` directly in that case. +- Updated dependencies [af5209d] + - @ingram-tech/nk-db@1.3.1 + ## 0.12.0 ### Minor Changes diff --git a/packages/nk-auth/package.json b/packages/nk-auth/package.json index 531840d..657d948 100644 --- a/packages/nk-auth/package.json +++ b/packages/nk-auth/package.json @@ -1,6 +1,6 @@ { "name": "@ingram-tech/nk-auth", - "version": "0.12.0", + "version": "0.12.1", "description": "The Ingram Better Auth foundation: composable presets (org, dual-shape JWT, active-org hooks, pg pool) for Next.js sites.", "license": "MIT", "type": "module", diff --git a/packages/nk-db/CHANGELOG.md b/packages/nk-db/CHANGELOG.md index e59e66e..38899f6 100644 --- a/packages/nk-db/CHANGELOG.md +++ b/packages/nk-db/CHANGELOG.md @@ -1,5 +1,21 @@ # @ingram-tech/nk-db +## 1.3.1 + +### Patch Changes + +- af5209d: `createPool` no longer throws when no connection string is configured — it + returns a pool that constructs cleanly and defers the "set DATABASE_URL" error + to first use. Constructing the pool happens at module load in every app's + `lib/db`, so importing that module (and therefore `next build` collecting page + data, a unit test, or a CLI tool that never queries) must stay side-effect-free; + a hard throw at construction broke DB-less builds. A process that then runs a + real query without a URL still fails fast and legibly — the env is fixed at + process start, so this is never a transient miss. The deferred rejection is + async (a macrotask, like real connection I/O) so Next.js partial prerendering + sees a pending promise and postpones the segment, instead of a synchronous + render error. A present-but-invalid `DATABASE_URL` still throws eagerly. + ## 1.3.0 ### Minor Changes diff --git a/packages/nk-db/package.json b/packages/nk-db/package.json index 9aef053..011015b 100644 --- a/packages/nk-db/package.json +++ b/packages/nk-db/package.json @@ -1,6 +1,6 @@ { "name": "@ingram-tech/nk-db", - "version": "1.3.0", + "version": "1.3.1", "description": "The Ingram Postgres data layer: one TLS-aware pg pool, raw-SQL helpers, Drizzle wiring, and a PGlite (no-Docker) dev/test harness for Next.js sites.", "license": "MIT", "type": "module", diff --git a/packages/nk-seo/CHANGELOG.md b/packages/nk-seo/CHANGELOG.md index 9cf9c51..a70ee35 100644 --- a/packages/nk-seo/CHANGELOG.md +++ b/packages/nk-seo/CHANGELOG.md @@ -1,5 +1,15 @@ # @ingram-tech/nk-seo +## 0.6.1 + +### Patch Changes + +- 246e91d: `createRobots` now throws if a `disallow` entry would block `/_next`. Crawlers + must fetch the JS/CSS under `/_next` to render pages, so disallowing it silently + degrades indexing — Next.js does not block it by default and neither should a + site. The guard is a prefix check (`/_next`, `/_next/`, `_next/static`, …); an + unrelated prefix like `/_preview` is unaffected. + ## 0.6.0 ### Minor Changes diff --git a/packages/nk-seo/package.json b/packages/nk-seo/package.json index 3089329..0edd553 100644 --- a/packages/nk-seo/package.json +++ b/packages/nk-seo/package.json @@ -1,6 +1,6 @@ { "name": "@ingram-tech/nk-seo", - "version": "0.6.0", + "version": "0.6.1", "description": "SEO primitives for Next.js sites: typed schema.org JSON-LD builders, a tag, a Metadata factory (canonical + OG + Twitter), and configurable hreflang alternates.", "license": "MIT", "type": "module",