Skip to content
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

Merged

Conversation

nicholas-codecov
Copy link
Collaborator

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.

Copy link

@codecov codecov bot left a 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,
Copy link

@codecov codecov bot Jun 3, 2024

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,
Copy link

@codecov codecov bot Jun 3, 2024

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?

@@ -5,7 +5,6 @@
[
"@codecov/nuxt-plugin",
{
dryRun: true,
enableBundleAnalysis: true,
bundleName: "@codecov/example-nuxt-app",
uploadToken: process.env.VITE_UPLOAD_TOKEN,
Copy link

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-notifications
Copy link

codecov-notifications bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Components Coverage Δ
Plugin core 97.68% <ø> (?)
Rollup plugin 10.37% <ø> (?)
Vite plugin 10.52% <ø> (?)
Webpack plugin 26.04% <ø> (?)

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.75%. Comparing base (d74a176) to head (2970916).

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
Plugin core 97.68% <ø> (ø)
Rollup plugin 10.37% <ø> (ø)
Vite plugin 10.52% <ø> (ø)
Webpack plugin 26.04% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@codecov codecov bot left a 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 }}
Copy link

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 }}
Copy link

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,
Copy link

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,
Copy link

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.

Copy link

codecov bot commented Jun 3, 2024

Bundle Report

Changes will increase total bundle size by 2.37MB ⬆️

Bundle name Size Change
@codecov/example-next-app-edge-server-array-push 354 bytes 0 bytes
@codecov/rollup-plugin-cjs 2.96kB 0 bytes
@codecov/example-next-app-client-array-push 907.85kB 0 bytes
@codecov/example-sveltekit-app-client-esm 714.6kB 714.6kB ⬆️
@codecov/rollup-plugin-esm 1.32kB 0 bytes
@codecov/nuxt-plugin-esm 855 bytes 0 bytes
@codecov/vite-plugin-cjs 2.96kB 0 bytes
@codecov/example-nuxt-app-server-esm 347.95kB 347.95kB ⬆️
@codecov/bundler-plugin-core-cjs 42.09kB 0 bytes
@codecov/vite-plugin-esm 1.26kB 0 bytes
@codecov/bundler-plugin-core-esm 7.32kB 0 bytes
@codecov/example-sveltekit-app-server-esm 974.58kB 974.58kB ⬆️
@codecov/example-next-app-server-cjs 342.32kB 0 bytes
@codecov/example-rollup-app-iife 95.45kB 95.45kB ⬆️
@codecov/example-webpack-app-array-push 71.19kB 0 bytes
@codecov/example-vite-app-esm 150.61kB 0 bytes
@codecov/sveltekit-plugin-cjs 1.32kB 0 bytes
@codecov/webpack-plugin-cjs 3.59kB 0 bytes
@codecov/sveltekit-plugin-esm 909 bytes 0 bytes
@codecov/webpack-plugin-esm 1.44kB 0 bytes
@codecov/nuxt-plugin-cjs 1.4kB 0 bytes
@codecov/example-nuxt-app-client-esm 237.66kB 237.66kB ⬆️

Copy link

@spalmurray-codecov spalmurray-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nicholas-codecov nicholas-codecov merged commit eec8353 into main Jun 3, 2024
37 checks passed
@nicholas-codecov nicholas-codecov deleted the build-actually-upload-nuxt-and-sveltekit-stats branch June 3, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants