Sync AWS PRs and add coding guidelines#25
Merged
Conversation
commit: |
There was a problem hiding this comment.
Pull request overview
Ports functionality and build/test improvements from the OpenNextJS AWS repository into this monorepo, and adds contributor guidance docs for porting PRs and coding standards.
Changes:
- Preserve query parameters during i18n root-locale redirects (with trailingSlash support).
- Extend incremental cache support for Next 15+ app pages (segmentData + postponed) and add related typings/tests.
- Improve build tooling: robust Next config discovery, Next server patch to avoid pulling
sharp, and safer traced-file copying (writable perms + platform-binary filtering).
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/open-next/src/core/routing/i18n/index.ts | Updates locale redirect URL construction to preserve query params and handle trailingSlash. |
| packages/tests-unit/tests/core/routing/i18n.test.ts | Adds coverage for locale redirects preserving query params (incl. trailingSlash). |
| packages/open-next/src/adapters/cache.ts | Writes APP_PAGE cache entries including segmentData/postponed for Next 15+. |
| packages/open-next/src/types/cache.ts | Adds segmentData?: Map<string, Buffer> to APP_PAGE cache type. |
| packages/tests-unit/tests/adapters/cache.test.ts | Adds tests for APP_PAGE segmentData/postponed round-tripping. |
| packages/open-next/src/build/helper.ts | Adds findNextConfig helper to locate Next config and detect TS. |
| packages/tests-unit/tests/build/helper.test.ts | Adds unit tests for findNextConfig. |
| packages/open-next/src/build/patch/patches/patchOriginalNextConfig.ts | Uses findNextConfig for importing/compiling Next config. |
| packages/open-next/src/build/patch/patches/patchNextServer.ts | Adds AST patch rule to no-op handleNextImageRequest to avoid sharp. |
| packages/tests-unit/tests/build/patch/patches/patchNextServer.test.ts | Adds snapshot coverage for the new Next server patch rule. |
| packages/open-next/src/build/copyTracedFiles.ts | Ensures copied files are writable; filters non-Linux platform binaries; exports helper predicate. |
| packages/tests-unit/tests/build/copyTracedFiles.test.ts | Adds tests for non-Linux platform package detection. |
| packages/open-next/package.json | Updates @ast-grep/napi and AWS SDK dependencies. |
| packages/cloudflare/package.json | Updates @ast-grep/napi version. |
| AGENTS.md | Adds repository coding standards and command guidance for agents. |
| .claude/skills/port-pr/SKILL.md | Adds a documented workflow for porting PRs (skill definition). |
| .changeset/stale-schools-beam.md | Adds changeset entry for findNextConfig change. |
| .changeset/port-pr-1098.md | Adds changeset entry for the ported PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
james-elicx
approved these changes
Mar 29, 2026
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 update ports several PRs from the OpenNextJS AWS repository and introduces SKILL.md for porting guidelines and AGENTS.md for coding standards. The changes enhance functionality and maintainability across the codebase.