-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Nextjs: Add Next v16 support #32791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Nextjs: Add Next v16 support #32791
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
abe65df
Add Next 16 support
yannbf 57db728
update parallelism count and circle ci config
yannbf 068002a
update config
yannbf 01dd0e2
Temporarily enable sandbox generation for this branch
yannbf c959373
Revert "Temporarily enable sandbox generation for this branch"
yannbf 807a540
fix story path
yannbf 521dd1d
update nextjs plugin canary
yannbf 723d702
update canary
yannbf 1ef78b6
Merge branch 'next' into yann/support-next-16
ndelangen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| executor: | ||
| class: xlarge | ||
| name: sb_playwright | ||
| parallelism: 2 | ||
| steps: | ||
| - git-shallow-clone/checkout_advanced: | ||
| clone_options: --depth 1 --verbose | ||
| - attach_workspace: | ||
| at: . | ||
| - run: | ||
| command: | | ||
| cd code | ||
| TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") | ||
| echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose | ||
| name: Run tests | ||
| - store_test_results: | ||
| path: test-results | ||
| - report-workflow-on-failure | ||
| - cancel-workflow-on-failure | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the glob pattern matches intended story files.
Line 13 uses the pattern
**/*.{stories}.{ts,tsx,js,jsx,cjs}, which appears to have an extra set of braces aroundstories. This pattern would match filenames like:Component.stories.ts✓Component.stories.tsx✓However, the typical pattern for story files would be
**/*.stories.{ts,tsx,js,jsx,cjs}(without braces aroundstories). The current pattern should still work but is unconventional.Please verify:
{stories}are necessaryYou can test the pattern with:
🏁 Script executed:
Length of output: 549
Length of output: 379
🏁 Script executed:
Length of output: 361
🌐 Web query:
💡 Result:
Short answer: No — CircleCI's globbing (used for paths/filters) follows Go's filepath.Match which supports *, ?, and [classes] but not brace expansion; a pattern like {stories} will not perform brace expansion. See CircleCI docs (patterns use Go filepath.Match). [1][2]
Sources:
[1] CircleCI configuration reference — patterns use Go's Glob/Match.
[2] Go path/filepath.Match pattern syntax (shows only '*', '?', and character classes).
Fix the glob pattern — braces are not supported by CircleCI's glob engine.
The pattern
**/*.{stories}.{ts,tsx,js,jsx,cjs}is broken. CircleCI'scircleci tests globuses Go'sfilepath.Match, which does not support brace expansion. The bash test confirmed this: the pattern with{stories}failed to match test files, while the pattern without braces aroundstoriesmatched all 5 files correctly.The pattern needs to be rewritten. Go's filepath.Match supports
*,?, and[...]character classes, but not braces. To match multiple file extensions in CircleCI, use a pattern like**/*.stories.ts**/*.stories.tsx(separate patterns) or rely on a different filtering approach (e.g., post-process withsed).Current pattern will find zero files in the CircleCI environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai provide a suggestion for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yannbf Here's the corrected code for lines 12-14:
The key change is replacing the single pattern with brace expansion:
"**/*.{stories}.{ts,tsx,js,jsx,cjs}"(doesn't work - CircleCI glob doesn't support braces)"**/*.stories.ts" "**/*.stories.tsx" "**/*.stories.js" "**/*.stories.jsx" "**/*.stories.cjs"(works - separate patterns)This passes each extension as a separate glob pattern to
circleci tests glob, which will correctly find all story files and maintain compatibility with CircleCI's test splitting feature.