rsnext/test/e2e
Juan Settecase e4cd547a50
feat: add support for localizations in sitemap generator (#53765)
### What?

Following up with [this
suggestion](https://github.com/vercel/next.js/discussions/53540) I went
ahead and implemented the proposal for the Next.js team to merge it if
they agree.

Things to keep in mind:
- Google has [three different
ways](https://developers.google.com/search/docs/specialty/international/localized-versions#methods-for-indicating-your-alternate-pages)
to do this. The three of them are equivalent
- Google seems to be the only search engine supporting this approach.
The rest of them should ignore it

### Why?

This is supported by
[Google](https://developers.google.com/search/docs/specialty/international/localized-versions#example_2)
to better understand the site when the same page is available in
multiple languages.

### How?

- I added a new key to the `MetadataRoute.Sitemap` type called
`alternates` which accepts just one sub key `languages` similar to the
current one in the
[Metadata](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#alternates)
object
- I updated the `resolveSitemap` method to process the new key and
generate the expected sitemap
- I updated the related tests and documentation to reflect the new
syntax

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-03-20 17:00:20 +00:00
..
404-page-router fix(turbopack): e2e/404-page-router test (#58146) 2023-11-22 19:30:26 +01:00
app-dir feat: add support for localizations in sitemap generator (#53765) 2024-03-20 17:00:20 +00:00
app-dir-legacy-edge-runtime-config fix(DX): More precise error messages for export const config deprecation (#54492) 2023-08-25 16:25:15 +00:00
basepath Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
browserslist Skip browserslistrc tests (#61294) 2024-01-29 10:51:44 +01:00
browserslist-extends
cancel-request Try to fix flakey socket hang up failures in stream cancel tests (#53318) 2023-07-28 22:59:24 +00:00
children-page fix: pages not visible in dev when named children (#54007) 2023-08-15 03:50:37 +00:00
config-promise-export
config-schema-check Polish compiling and turbopack logging (#57270) 2023-10-23 19:28:36 +00:00
conflicting-app-page-error Fix conflicting-app-page-error test for Turbopack (#62747) 2024-03-02 11:00:05 +00:00
custom-app-render Redesign nextjs logging (#54713) 2023-09-05 11:40:00 +00:00
disable-js-preload
dynamic-route-interpolation fix: support both decoded and encoded url requests of conventioned files (#56187) 2023-10-03 00:02:49 +02:00
edge-api-endpoints-can-receive-body
edge-async-local-storage
edge-can-read-request-body chore: drop form-data (#57141) 2023-10-20 19:25:42 +00:00
edge-can-use-wasm-files
edge-compiler-can-import-blob-assets feat: drop Node.js 16 (#56896) 2023-10-16 21:41:38 +00:00
edge-compiler-module-exports-preference test: rename node_modules_bak to node_modules (#62066) 2024-02-15 00:42:35 +01:00
edge-configurable-runtime Skip configurable runtime warnings tests in Turbopack (#61048) 2024-01-23 16:32:58 -08:00
edge-pages-support Revert "Ensure dynamic routes dont match _next/static unexpectedly" (#62691) 2024-02-29 08:34:11 -08:00
edge-runtime-pages-api-route Fix issue with outputFileTracingExcludes and pages/api edge runtime (#59157) 2023-12-15 16:27:03 +01:00
edge-runtime-uses-edge-light-import-specifier-for-packages test: rename node_modules_bak to node_modules (#62066) 2024-02-15 00:42:35 +01:00
esm-externals Turbopack: app externals test case improvements (#62871) 2024-03-14 07:22:40 +00:00
favicon-short-circuit Short circut 404's for /favicon.ico in development (#54747) 2023-08-30 16:15:19 +00:00
fetch-failures-have-good-stack-traces-in-edge-runtime Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
getserversideprops Revert "Ensure dynamic routes dont match _next/static unexpectedly" (#62691) 2024-02-29 08:34:11 -08:00
handle-non-hoisted-swc-helpers
hello-world
i18n-api-support
i18n-data-fetching-redirect
i18n-data-route Strip internal routing headers (#55114) 2023-09-07 22:08:53 +00:00
i18n-default-locale-redirect
i18n-disallow-multiple-locales
i18n-ignore-redirect-source-locale
i18n-ignore-rewrite-source-locale Skip i18n-ignore-rewrite-basepath-source irrelevant tests with turbopack (#57295) 2023-10-23 15:01:24 -07:00
i18n-preferred-locale-detection Migrate locale redirect handling to router-server (#62606) 2024-02-27 16:37:11 -08:00
ignore-invalid-popstateevent refactor(tests): make chain more "correct" (#51728) 2024-02-14 20:14:24 +01:00
instrumentation-hook Fix instrument bundling as client components (#60984) 2024-01-24 20:02:53 +01:00
instrumentation-hook-src add support for instrumentation (#59070) 2023-11-29 20:01:38 +01:00
link-with-api-rewrite
manual-client-base-path Update manual basePath with trailingSlash (#51726) 2023-06-23 15:36:16 -07:00
middleware-base-path
middleware-custom-matchers
middleware-custom-matchers-basepath
middleware-custom-matchers-i18n
middleware-dynamic-basepath-matcher
middleware-fetches-with-any-http-method
middleware-fetches-with-body Revert "Revert "Separate routing code from render servers (#52492)"" (#53029) 2023-07-21 14:02:52 -07:00
middleware-general refactor(tests): make chain more "correct" (#51728) 2024-02-14 20:14:24 +01:00
middleware-matcher
middleware-redirects
middleware-request-header-overrides type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
middleware-responses
middleware-rewrites Fix middleware catch-all rewrite case (#63254) 2024-03-13 14:14:04 -07:00
middleware-shallow-link
middleware-trailing-slash Revert "Revert "Update split chunk handling for edge/node" (#62313)" (#62336) 2024-02-21 11:40:29 -08:00
module-layer Update module-layer test for Turbopack (#60707) 2024-01-16 18:36:35 +00:00
multi-zone Fix instrumentation with only pages (#62622) 2024-02-28 11:38:39 +01:00
new-link-behavior refactor(tests): make chain more "correct" (#51728) 2024-02-14 20:14:24 +01:00
next-font build: Update turbopack (#63229) 2024-03-13 10:13:56 +00:00
next-head Ensure tests suites have unique names (#56085) 2023-09-27 13:55:45 +02:00
next-image-forward-ref
next-phase Fix next phase for next build (#60969) 2024-01-22 15:37:04 +01:00
next-script Skip experimental.nextScriptWorkers test for Turbopack (#56086) 2023-09-27 13:58:11 +02:00
no-eslint-warn-with-no-eslint-config
nonce-head-manager Ensure tests suites have unique names (#56085) 2023-09-27 13:55:45 +02:00
og-api
opentelemetry OTEL: add next.rsc attribute for RSC requests (#63074) 2024-03-08 21:58:00 -08:00
optimized-loading
pages-performance-mark Fix performance measures crashing the app (#54858) 2023-09-01 14:51:38 +00:00
postcss-config-cjs
prerender
prerender-native-module
proxy-request-with-middleware
react-dnd-compile Failing test for 59195 (#59210) 2023-12-04 05:13:28 +01:00
reload-scroll-backforward-restoration
repeated-forward-slashes-error
skip-trailing-slash-redirect Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
socket-io Fix unmatched WebSocket upgrade requests being closed (#57245) 2023-10-23 17:23:34 +00:00
ssr-react-context
streaming-ssr Revert "Ensure webpack build worker defaults on" (#62342) 2024-02-21 12:00:18 -08:00
styled-jsx test: rename node_modules_bak to node_modules (#62066) 2024-02-15 00:42:35 +01:00
swc-warnings Fix e2e/swc-warnings (#61265) 2024-01-27 19:51:57 +01:00
switchable-runtime Update switchable runtime snapshot for Turbopack (#63400) 2024-03-18 11:03:47 +01:00
test-template/{{ toFileName name }} chore: update test template to use nextTestSetup (#62154) 2024-02-16 17:30:54 +01:00
test-utils-tests/basic chore: update test template to use nextTestSetup (#62154) 2024-02-16 17:30:54 +01:00
testmode Disable cache in testmode (#63265) 2024-03-14 00:20:54 -07:00
third-parties Adding Google analytics to next/third-parties (#58418) 2023-12-11 18:21:32 +00:00
trailingslash-with-rewrite
transpile-packages test: rename node_modules_bak to node_modules (#62066) 2024-02-15 00:42:35 +01:00
type-module-interop Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
typescript-version-no-warning
typescript-version-warning Redesign nextjs logging (#54713) 2023-09-05 11:40:00 +00:00
undici-fetch
useselectedlayoutsegment-s-in-pages-router fix(navigation): allow useSelectedLayoutSegment(s) in Pages Router (#62584) 2024-02-29 13:14:52 +00:00
yarn-pnp/test Disable Yarn PnP tests for Turbopack (#61040) 2024-01-23 21:25:20 +01:00
basepath-trailing-slash.test.ts Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
basepath.test.ts Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
example-file.txt
example.txt chore: update test template to use nextTestSetup (#62154) 2024-02-16 17:30:54 +01:00
prerender-crawler.test.ts
prerender-native-module.test.ts server: re-land bundled runtimes (#55139) 2023-09-08 16:05:29 +00:00
prerender.test.ts Revert "Ensure dynamic routes dont match _next/static unexpectedly" (#62691) 2024-02-29 08:34:11 -08:00