Version Packages - #45
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@ingram-tech/nk-dev@0.13.0
Minor Changes
nk type-checkstarts cold when the dependency tree moved: a*.tsbuildinfoolder than
bun.lock/package.jsonis dropped before the run, becausetsc --incrementaldoes not reliably re-check a program after a dependency's.d.tschanges and a green result against the stale cache means nothing.--colddrops the cache unconditionally.nk doctornow flags a"prettier"key in
package.jsonand.prettierrc*files alongside.prettierignore(all
--fixable), and warns when a site has nociscript or one that skipsnk check/nk type-check.@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.
prefixDefaultLocaleis removed and nothingreplaces 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
localeFromUrlreturneddefaultLocalefor it. That is the URL signal, whichoutranks 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 thepathname and locale headers, rewrites
/fr/about→/aboutso the app keepsone route tree, remembers an explicit choice in the cookie, never redirects.
Middleware that does more passes
requestHeadersin and keeps editing theresponse. Replaces
forwardUrlLocaleand the strip/rewrite/cookie/consolidatecode every prefix site was hand-writing.
forwardRequestContextsets nk-seo'sx-pathnameand the locale headertogether, so the two conventions can't be wired separately and one forgotten.
defineLocaleRoutingis generic over the locale union.isLocaleis atype guard,
resolve/localeFromUrl/createLocaleResolverreturnL.Sites stop writing their own guards and casts.
hrefLangTagsandcookieNamemove onto routing. A site with regionaltags 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
hreflangConfigForpasses the tags through.routing.stripLocale(pathname)exposes the app-facing path.nk-seo's
HreflangConfigdropsdefaultLocaleandprefixDefaultLocale;x-defaultis always the bare path now, so neither is needed.Migration: delete
prefixDefaultLocale, replaceforwardUrlLocale+manual
x-pathnamewithlocaleProxy, drop any localisLocaleguard andas Localecast. Prefix sites gain/en/…as a real address — verify withassertHreflangClusterfrom@ingram-tech/nk-seo/verify.@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.
prefixDefaultLocaleis removed and nothingreplaces 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
localeFromUrlreturneddefaultLocalefor it. That is the URL signal, whichoutranks 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 thepathname and locale headers, rewrites
/fr/about→/aboutso the app keepsone route tree, remembers an explicit choice in the cookie, never redirects.
Middleware that does more passes
requestHeadersin and keeps editing theresponse. Replaces
forwardUrlLocaleand the strip/rewrite/cookie/consolidatecode every prefix site was hand-writing.
forwardRequestContextsets nk-seo'sx-pathnameand the locale headertogether, so the two conventions can't be wired separately and one forgotten.
defineLocaleRoutingis generic over the locale union.isLocaleis atype guard,
resolve/localeFromUrl/createLocaleResolverreturnL.Sites stop writing their own guards and casts.
hrefLangTagsandcookieNamemove onto routing. A site with regionaltags 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
hreflangConfigForpasses the tags through.routing.stripLocale(pathname)exposes the app-facing path.nk-seo's
HreflangConfigdropsdefaultLocaleandprefixDefaultLocale;x-defaultis always the bare path now, so neither is needed.Migration: delete
prefixDefaultLocale, replaceforwardUrlLocale+manual
x-pathnamewithlocaleProxy, drop any localisLocaleguard andas Localecast. Prefix sites gain/en/…as a real address — verify withassertHreflangClusterfrom@ingram-tech/nk-seo/verify.@ingram-tech/nk-blog@0.1.7
Patch Changes