Conversation
WalkthroughThis update introduces dependency version bumps, adds new dependency variables, and adjusts configuration files for the frontend app. It includes explicit concurrency limits for Nitro prerendering, expands color configuration, updates import aliases, and modifies template variables for dynamic package management. GraphQL codegen and test configurations are also refined. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Template as package.json.jinja
participant Context as context.py
Dev->>Context: Updates dependency version variables
Dev->>Template: Uses template variables for dependency versions
Template->>Dev: Generates package.json with correct versions
sequenceDiagram
participant NuxtConfig as nuxt.config.ts.jinja
participant Nitro as Nitro Server
NuxtConfig->>Nitro: Set prerender concurrency to 4
Nitro-->>NuxtConfig: Prerender with limited concurrency
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR restructures the project folder layout to align with the recommended Nuxt 4 directory structure by moving files into an app subfolder. It also updates various dependency versions and reduces memory usage during build processes.
- Moves GraphQL-related files to the
appdirectory structure for Nuxt 4 compatibility - Updates dependency versions for Nuxt, Playwright, and other packages
- Reduces prerender concurrency to prevent out-of-memory errors during builds
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/frontend/{% if frontend_uses_graphql %}codegen.ts{% endif %} | Updates GraphQL document and generation paths to use app/ prefix |
| template/frontend/vitest.config.ts | Adds explicit root configuration for test setup |
| template/frontend/tests/setup/globalSetup.ts | Changes import path from ~/ to ~~/ for constants |
| template/frontend/tests/e2e/index.spec.ts | Updates import paths from ~/ to ~~/ for test helpers |
| template/frontend/package.json.jinja | Updates dependency versions and removes flush-promises |
| template/frontend/nuxt.config.ts.jinja | Adds prerender concurrency limit to reduce memory usage |
| template/frontend/app/app.config.ts | Adds inputMenu configuration with min-width styling |
| extensions/context.py | Updates version numbers for various dependencies |
| .copier-answers.yml | Bumps template version from v0.0.58 to v0.0.59 |
| "eslint": "^9.22.0", | ||
| "eslint-plugin-vitest": "^0.5.4", | ||
| "flush-promises": "^1.0.2",{% endraw %}{% if frontend_uses_graphql %}{% raw %} | ||
| "eslint-plugin-vitest": "^0.5.4",{% endraw %}{% if frontend_uses_graphql %}{% raw %} |
There was a problem hiding this comment.
The removal of the 'flush-promises' dependency appears to be unrelated to the folder restructuring. This change should be documented in the PR description or handled in a separate commit to maintain clear change tracking.
There was a problem hiding this comment.
yeah, that was on purpose. we can just import it from vue-test-utils
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
template/frontend/vitest.config.ts (1)
15-15: Addingroot: "."may override Nuxt Test Utils defaults
defineVitestConfig()already injectsrootpointing at the Nuxt project root. Explicitly settingroot: "."(relative totemplate/frontend) is probably fine, but if this file is ever hoisted or symlinked the path can mis-align.Consider dropping
rootunless you hit a concrete resolution issue; otherwise add:- test: { + test: { + root: fileURLToPath(new URL('.', import.meta.url)),to lock it unambiguously to the config file’s directory.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
.copier-answers.yml(1 hunks)extensions/context.py(1 hunks)template/frontend/app/app.config.ts(1 hunks)template/frontend/nuxt.config.ts.jinja(1 hunks)template/frontend/package.json.jinja(1 hunks)template/frontend/tests/e2e/index.spec.ts(1 hunks)template/frontend/tests/setup/globalSetup.ts(1 hunks)template/frontend/vitest.config.ts(1 hunks)template/frontend/{% if frontend_uses_graphql %}codegen.ts{% endif %}(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data3.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data1.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data4.yaml)
- GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data2.yaml)
🔇 Additional comments (8)
extensions/context.py (1)
39-46: All bumped frontend dependencies are compatible
- Nuxt 3.17.7 declares dependencies on
vue@^3.5.17andvue-router@^4.5.1, which cover our^3.5.18and^4.5.1updates.@nuxt/ui@3.3.0peer-dependency ofvue-router@^4.5.0includes4.5.1.dot_env_cli_versionandplaywright_versionare correctly referenced intemplate/frontend/package.json.jinja, so they won’t drift.template/frontend/tests/e2e/index.spec.ts (1)
2-3: Alias switch~→~~can break path resolution in tests
~~resolves to NuxtrootDir, while~resolves tosrcDir. After the folder shuffle to anapp/directory, double-check that the helper paths still exist atrootDir/tests/**. Otherwise the module loader will throw at runtime.Run
pnpm vitest runlocally to confirm no “Cannot find module” errors surface.template/frontend/tests/setup/globalSetup.ts (1)
7-7: Consistent aliasing across setup filesSame alias remark as above: ensure
~~/tests/setup/constantsis reachable fromrootDir.
If those helpers actually live undersrcDir, revert to a single tilde.template/frontend/{% if frontend_uses_graphql %}codegen.ts{% endif %} (1)
5-7: LGTM! Correct path updates for Nuxt 4 structure.The GraphQL codegen paths have been properly updated to use the
app/directory structure, which aligns with Nuxt 4 requirements. Both the documents input path and generated output path are consistently moved to the new structure.template/frontend/app/app.config.ts (1)
12-16: LGTM! Clean UI configuration addition.The new
inputMenuconfiguration withmin-w-fitstyling is properly structured and follows the established pattern in the UI config. This addition enhances the styling options for input menu components without affecting existing configuration.template/frontend/nuxt.config.ts.jinja (1)
29-31: LGTM! Appropriate concurrency limit for memory management.The prerender concurrency limit of 4 is a sensible configuration to prevent memory issues during the build process. The clear comment explains the rationale, and this change aligns with the PR objective of reducing memory usage during Nitro prerendering.
template/frontend/package.json.jinja (1)
42-63: LGTM! Excellent migration to template variables for version management.The conversion from hardcoded version strings to template variables (e.g.,
{{ nuxt_version }},{{ playwright_version }},{{ typescript_version }}) significantly improves maintainability by enabling centralized version management. This follows the established pattern used elsewhere in the template and makes dependency updates much more manageable..copier-answers.yml (1)
2-2: Template tagv0.0.59exists in the upstream template repository
Confirmed bygit ls-remoteoutput (refs/tags/v0.0.59). No further action required.
Why is this change necessary?
Get ready for Nuxt 4
How does this change address the issue?
Moves things into the
appsubfolder recommended for Nuxt 4What side effects does this change have?
None
How is this change tested?
Downstream repos
Other
lowered concurrency in
pnpm run generatefor nitro prerender to use less memory and avoid out-of-memory errorsSummary by CodeRabbit
New Features
Chores