-
Notifications
You must be signed in to change notification settings - Fork 2
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
build: Upload Nuxt and SvelteKit example stats #138
build: Upload Nuxt and SvelteKit example stats #138
Conversation
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.
Overall, it seems like there isn't too much altering of the functionality of the code but instead removal of options. As such, my primary concerns are regarding the removed 'dryRun' settings in both the nuxt and sveltekit configurations. Also, I see process.env being used to access environment variables, which is not secure for sensitive data such as tokens. This could be improved greatly with a configuration file or using a secure vault service.
@@ -5,7 +5,6 @@ export default defineNuxtConfig({ | |||
[ | |||
"@codecov/nuxt-plugin", | |||
{ | |||
dryRun: true, |
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.
The dryRun
option is removed from here. Should it be added to the environment config or is it not required anymore for the @codecov/nuxt-plugin
?
@@ -6,7 +6,6 @@ export default defineConfig({ | |||
plugins: [ | |||
sveltekit(), | |||
codecovSvelteKitPlugin({ | |||
dryRun: true, |
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.
The dryRun
option is removed from here. Should it be added to the environment config or is it not required anymore for the codecovSvelteKitPlugin
?
examples/nuxt/nuxt.config.ts
Outdated
@@ -5,7 +5,6 @@ | |||
[ | |||
"@codecov/nuxt-plugin", | |||
{ | |||
dryRun: true, | |||
enableBundleAnalysis: true, | |||
bundleName: "@codecov/example-nuxt-app", | |||
uploadToken: process.env.VITE_UPLOAD_TOKEN, |
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.
process.env is used directly to access environment variables, which is not safe for sensitive data such as tokens. I suggest either using a configuration file that can be ignored in version control, or a secure vault service to store and access sensitive data like tokens.
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files
☔ View full report in Codecov by Sentry. |
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.
CodecovAI submitted a new review for 2970916
@@ -390,8 +394,12 @@ jobs: | |||
env: | |||
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |||
NEXT_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} |
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.
For the NUXT_UPLOAD_TOKEN
, it seems like we're using the production token (CODECOV_ORG_TOKEN
) instead of the staging token (CODECOV_ORG_TOKEN_STAGING
). If this block is for a staging environment, we might need to use the staging token.
@@ -390,8 +394,12 @@ | |||
env: | |||
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |||
NEXT_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |||
NUXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |||
NUXT_API_URL: ${{ secrets.CODECOV_API_URL }} | |||
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |||
ROLLUP_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} |
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.
For the SVELTEKIT_UPLOAD_TOKEN
, it seems like we're using the production token (CODECOV_ORG_TOKEN
) instead of the staging token (CODECOV_ORG_TOKEN_STAGING
). If this block is for a staging environment, we might need to use the staging token.
enableBundleAnalysis: true, | ||
bundleName: "@codecov/example-nuxt-app", | ||
uploadToken: process.env.VITE_UPLOAD_TOKEN, | ||
apiUrl: process.env.VITE_API_URL, | ||
uploadToken: process.env.NUXT_UPLOAD_TOKEN, |
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.
Good change to avoid hardcoding the uploadToken and apiUrl. Using environment variables improves security and maintains consistency with other configurations.
bundleName: "@codecov/example-sveltekit-app", | ||
uploadToken: process.env.SVELTEKIT_UPLOAD_TOKEN, | ||
apiUrl: process.env.SVELTEKIT_API_URL, |
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.
Good change to avoid hardcoding the uploadToken. Using environment variables improves security and keeps consistency with other configurations.
Bundle ReportChanges will increase total bundle size by 2.37MB ⬆️
|
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.
lgtm
Description
Welp forgot to remove these
dryRun
settings in the Nuxt, and SvelteKit example apps, this PR just removes those and actually uploads the stats.