Skip to content

Conversation

@ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Oct 2, 2025

Updating some imports to clean up the code

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

This introduces a tree-shaking performance issue by importing the entire
date-fns library (~65KB minified) instead of only the specific functions
needed (formatDistanceToNow, fromUnixTime, parseISO).

Impact: Increases bundle size significantly as the entire date-fns library
will be included even though only 3 functions are used.

Before (optimized):
import { formatDistanceToNow, fromUnixTime, parseISO } from 'date-fns'

After (poor tree-shaking):
import * as dateFns from 'date-fns'
@ajay-sentry ajay-sentry closed this Oct 2, 2025
@ajay-sentry ajay-sentry reopened this Oct 2, 2025
@sentry
Copy link

sentry bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (8816d1e) to head (ff52473).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3939   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files         828      828           
  Lines       15099    15101    +2     
  Branches     4326     4320    -6     
=======================================
+ Hits        14891    14893    +2     
  Misses        200      200           
  Partials        8        8           
Files with missing lines Coverage Δ
src/shared/utils/dates.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.13% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 99.12% <100.00%> (+<0.01%) ⬆️
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8816d1e...ff52473. Read the comment docs.

@ajay-sentry ajay-sentry changed the title [test]: FE Perf 1 [test]: FE Perf 1 TS Oct 2, 2025
@codecov-staging
Copy link

Bundle Report

Bundle size has no change ✅

@sentry
Copy link

sentry bot commented Oct 2, 2025

Bundle Report

Bundle size has no change ✅

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Oct 2, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
ff52473 Thu, 02 Oct 2025 21:17:04 GMT Expired Expired
ff52473 Thu, 02 Oct 2025 21:17:15 GMT Cloud Enterprise

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3939   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files         828      828           
  Lines       15099    15101    +2     
  Branches     4326     4320    -6     
=======================================
+ Hits        14891    14893    +2     
  Misses        200      200           
  Partials        8        8           
Files with missing lines Coverage Δ
src/shared/utils/dates.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.13% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 99.12% <100.00%> (+<0.01%) ⬆️
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8816d1e...ff52473. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (8816d1e) to head (ff52473).

@@            Coverage Diff             @@
##             main    #3939      +/-   ##
==========================================
+ Coverage   96.54%   98.62%   +2.07%     
==========================================
  Files         828      828              
  Lines       15099    15101       +2     
  Branches     4318     4320       +2     
==========================================
+ Hits        14578    14893     +315     
+ Misses        466      200     -266     
+ Partials       55        8      -47     
Files with missing lines Coverage Δ
src/shared/utils/dates.ts 100.00% <100.00%> (ø)

... and 43 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.13% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 99.12% <100.00%> (+1.81%) ⬆️
UI 99.01% <ø> (+20.18%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8816d1e...ff52473. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ajay-sentry ajay-sentry changed the title [test]: FE Perf 1 TS [test]: FE1 Oct 2, 2025
@ajay-sentry ajay-sentry changed the title [test]: FE1 [FE1]: Import update Oct 3, 2025
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.

3 participants