-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(app.vue, nuxt.config.ts, package.json): display build version in UI and automate version generation #4
Conversation
… UI and automate version generation Add a build version display to the app's UI to provide users with information about the current build. Introduce a new script to automatically generate a build version based on the current date and time, ensuring each build is uniquely identifiable. The build version is read from a JSON file and injected into the Nuxt runtime config, making it accessible in the application. This change enhances transparency and traceability of deployed versions, aiding in debugging and user support.
Reviewer's Guide by SourceryThis PR implements a build version display feature by adding a version number to the UI, generating it automatically during the build process, and making it accessible through Nuxt's runtime configuration. The implementation uses a combination of a new script to generate timestamps, configuration changes to expose the version, and UI modifications to display it. Sequence Diagram for Build Version GenerationsequenceDiagram
participant Developer
participant Script as generate-build-version.js
participant FileSystem
Developer->>Script: Run generate-version script
Script->>FileSystem: Write build-version.json with timestamp
Script->>Developer: Log generated version
Class Diagram for Updated Nuxt ConfigurationclassDiagram
class NuxtConfig {
+String compatibilityDate
+Boolean devtools
+RuntimeConfig runtimeConfig
}
class RuntimeConfig {
+PublicConfig public
}
class PublicConfig {
+String buildVersion
}
NuxtConfig --> RuntimeConfig
RuntimeConfig --> PublicConfig
note for PublicConfig "Contains the build version accessible in the app"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Hey @mauvehed - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using semantic versioning (e.g., MAJOR.MINOR.PATCH) combined with a build number or git commit hash instead of timestamps for more meaningful version tracking and to avoid potential collisions with multiple builds in the same second.
- There appears to be a duplicate div with id="app". Consider merging the build version display into the existing root div structure to avoid potential styling or structural issues.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Add a build version display to the app's UI to provide users with information about the current build. Introduce a new script to automatically generate a build version based on the current date and time, ensuring each build is uniquely identifiable. The build version is read from a JSON file and injected into the Nuxt runtime config, making it accessible in the application. This change enhances transparency and traceability of deployed versions, aiding in debugging and user support.
Summary by Sourcery
Display the build version in the UI and automate its generation by adding a script that creates a version based on the current date and time. Integrate this version into the Nuxt runtime config and update the build process to include version generation, enhancing transparency and traceability of deployed versions.
New Features:
Enhancements:
Build: