Commit Graph

10 Commits

Author SHA1 Message Date
Nathan Nguyen 1551f91cbd fix(metadata): match Next dynamic route semantics (#1317)
* fix(metadata): match Next dynamic route semantics

Metadata routes diverged from Next.js in several observable cases: robots.txt emitted Sitemap before Host, dynamic metadata Response results could miss framework cache headers, TSX sitemap files were not discovered, and rendered metadata URLs treated canonical, manifest, and file-based social image routes as the same URL class.

The implementation now follows Next's metadata route extension, cache, robots, and URL resolution rules while keeping file-based social image route markers non-enumerable so resolved metadata shape does not leak internal state.

* fix(metadata): gate social image preview fallback

File-based social image routes used the preview deployment URL whenever VERCEL_URL was present outside development. That let deployment URLs override an explicit metadataBase in non-preview production environments.

Gate preview URL fallback on VERCEL_ENV=preview, add coverage for metadataBase precedence and production fallback URLs, and keep static metadata image cache headers stable in development.
2026-05-19 14:11:47 +01:00
Nathan Nguyen d862137a64 fix: support non-standard robots directives via other field (#1010) (#1047)
Adds the `other` field to `RobotsRule` type and emits non-standard per-user-agent
directives (e.g. Seznam Request-Rate, Yandex Clean-param) after Crawl-delay and before
the blank line separating user-agent blocks. Array values expand into repeated lines;
null/undefined entries are skipped.
2026-05-04 16:52:14 +01:00
Nathan Nguyen 1d7c031e30 feat(app-router): feed file metadata routes into head output (#891) 2026-04-30 19:38:32 +01:00
Divanshu Chauhan (divkix) 0b030f1c40 fix: support static metadata URL resolver (fillStaticMetadataSegment) (#946)
* fix: support static metadata URL resolver (fillStaticMetadataSegment) (#861)

Port fillStaticMetadataSegment from Next.js (commit 7873aea) to correctly
resolve URLs for static metadata files under dynamic parent segments.

- Add fillStaticMetadataSegment to compute static URLs with "-" placeholders
  for dynamic/catch-all parent segments
- Update scanMetadataFiles to normalize dynamic parents in servedUrl for
  static metadata files (e.g. blog/[slug]/opengraph-image.png → /blog/-/opengraph-image)
- Strip route groups and parallel route slots from URL paths, applying
  djb2 hash suffixes for collision avoidance
- Keep dynamic metadata files on the existing urlPrefix path for
  patternParts-based runtime matching

Ported from Next.js: test/e2e/app-dir/metadata-static-file/

* fix: address review feedback for PR #946

- Fix redundant ternary: both branches of `lastSlash === -1 ? "" : ""` returned empty string
- Extract `computeMetadataRouteSuffix` shared helper to eliminate code duplication between `scanMetadataFiles` inline IIFE and `fillStaticMetadataSegment`/`getMetadataRouteFilename`

Co-Authored-By: ask-bonk[bot] <noreply@github.com>

---------

Co-authored-by: ask-bonk[bot] <noreply@github.com>
2026-04-29 18:17:31 +01:00
Stephen Zhou c17d6941be chore: migrate to vite plus (#535)
* chore: migrate to vite plus

* Disable typeAware and typeCheck

* Update CI

* Fix CI

* Fix test

* Clean

* Run test with vp

* Try revert

* react: false In test

* Fix test

* Revert "Try revert"

This reverts commit 009da10473.

* Update

* Update

* Try revert ci changes

* revert

* Run vp migrate

* Disable typeAware and typeCheck for now

* Better resolve for test

* Use vp dev instead of vite

* Update expect

* Fix NormalizeManifestModuleId

* Try increase timeout

* Update to use vp

* Try new check

* Bring back npx vp

* Migrate CI

* Make next-intl resolvable

* Update

* Update

* Update
2026-03-15 10:50:13 +00:00
Nathan Nguyen 995d858633 Ignore @slot and _private dirs in metadata scan (#520)
* Ignore @slot and _private dirs in metadata scan

* Disambiguate metadata routes under invisible segments

* Exclude @children from metadata suffixing
2026-03-13 11:55:40 +00:00
Nathan Nguyen 7c425ef34d fix: escape XML special characters in sitemap generation (#505)
sitemapToXml() interpolated user-supplied values (URLs, video titles,
descriptions, uploader names) directly into XML without escaping. URLs
containing & (extremely common with query params) produced invalid XML
that search engines reject silently.

Add escapeXml() helper that handles all five XML special characters
(&, <, >, ", ') and apply it to every user-supplied value in the
sitemap serializer.

This intentionally diverges from Next.js's resolveSitemap() which also
raw-interpolates, producing malformed XML.
2026-03-12 18:50:31 +00:00
Jared Stowell 6ccdaac78e fix: sitemap XML namespaces, video entries, and alternate-language links (#427) 2026-03-10 23:54:56 +00:00
James Anderson 764a496ce7 add oxfmt formatter (#380)
* add oxfmt formatter: config, scripts, CI, editor setup, docs

* rebuild lockfile

* fix: add Format to required checks list, remove dead ignore pattern

* run fmt

* add format to agents.md again
2026-03-09 14:56:14 +00:00
Steve Faulkner 12fea722b6 Initial public release of vinext 2026-02-24 09:29:39 -06:00