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

[Bugfix] Fix importing the services in SSR context #540

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

titouanmathis
Copy link
Contributor

πŸ”— Linked issue

No issue.

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Using the document and window variable in static properties meant they must be defined when a service is imported. This is fixed by always using a function to return the target of the events in a service config.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

Copy link

Export Size

@studiometa/js-toolkit

Name Size Diff
RafService 819 B +15 B (+1.87%) πŸ”Ί
UTILS 7.36 kB +8 B (+0.11%) πŸ”Ί
animate 2.87 kB +3 B (+0.10%) πŸ”Ί
ALL 17.21 kB +3 B (+0.02%) πŸ”Ί
BASE 7.63 kB +1 B (+0.01%) πŸ”Ί
SERVICES 3.38 kB -1 B (-0.03%) πŸ”½
FRAMEWORK 12.1 kB -4 B (-0.03%) πŸ”½
Base 7.56 kB -4 B (-0.05%) πŸ”½
DECORATORS 6.66 kB -5 B (-0.07%) πŸ”½
withBreakpointObserver 1.52 kB -3 B (-0.20%) πŸ”½
tween 1.48 kB -4 B (-0.27%) πŸ”½
withResponsiveOptions 2.22 kB -6 B (-0.27%) πŸ”½
withDrag 1.93 kB -6 B (-0.31%) πŸ”½
useDrag 1.79 kB -6 B (-0.33%) πŸ”½
scrollTo 2.05 kB -9 B (-0.44%) πŸ”½
DragService 1.77 kB -8 B (-0.45%) πŸ”½
useRaf 818 B -6 B (-0.73%) πŸ”½
PointerService 961 B -14 B (-1.44%) πŸ”½
withBreakpointManager 1.31 kB -28 B (-2.09%) πŸ”½
useScroll 937 B -27 B (-2.80%) πŸ”½
usePointer 968 B -30 B (-3.01%) πŸ”½
useKey 769 B -30 B (-3.75%) πŸ”½
withRelativePointer 1.1 kB -45 B (-3.92%) πŸ”½
useResize 891 B -38 B (-4.09%) πŸ”½
ResizeService 874 B -45 B (-4.90%) πŸ”½
ScrollService 910 B -55 B (-5.70%) πŸ”½
KeyService 733 B -56 B (-7.10%) πŸ”½
useLoad 482 B -40 B (-7.66%) πŸ”½
AbstractService 413 B -35 B (-7.81%) πŸ”½
LoadService 469 B -40 B (-7.86%) πŸ”½
Unchanged

@studiometa/js-toolkit

Name Size Diff
addClass 226 B -
addStyle 238 B -
boundingRectToCircle 154 B -
camelCase 401 B -
clamp 67 B -
clamp01 87 B -
collideCircleCircle 99 B -
collideCircleRect 159 B -
collidePointCircle 112 B -
collidePointRect 103 B -
collideRectRect 99 B -
createApp 448 B -
createEaseInOut 116 B -
createEaseOut 71 B -
createRange 90 B -
damp 78 B -
dashCase 376 B -
debounce 92 B -
domScheduler 296 B -
ease 435 B -
easeInCirc 68 B -
easeInCubic 59 B -
easeInExpo 80 B -
easeInOutCirc 141 B -
easeInOutCubic 130 B -
easeInOutExpo 134 B -
easeInOutQuad 128 B -
easeInOutQuart 133 B -
easeInOutQuint 152 B -
easeInOutSine 151 B -
easeInQuad 63 B -
easeInQuart 61 B -
easeInQuint 62 B -
easeInSine 77 B -
easeLinear 49 B -
easeOutCirc 115 B -
easeOutCubic 103 B -
easeOutExpo 112 B -
easeOutQuad 103 B -
easeOutQuart 100 B -
easeOutQuint 103 B -
easeOutSine 121 B -
endsWith 88 B -
getAncestorWhere 91 B -
getAncestorWhereUntil 119 B -
getClosestParent 178 B -
getComponentResolver 138 B -
getDirectChildren 194 B -
getInstanceFromElement 90 B -
getInstances 146 B -
getOffsetSizes 159 B -
hasWindow 62 B -
HELPERS 1.66 kB -
historyPush 499 B -
historyReplace 503 B -
importOnInteraction 894 B -
importOnMediaQuery 236 B -
importWhenIdle 223 B -
importWhenPrefersMotion 275 B -
importWhenVisible 916 B -
inertiaFinalValue 142 B -
isArray 70 B -
isBoolean 78 B -
isDefined 86 B -
isDev 72 B -
isDirectChild 206 B -
isEmpty 207 B -
isEmptyString 93 B -
isFunction 72 B -
isNull 72 B -
isNumber 84 B -
isObject 105 B -
isString 86 B -
keyCodes 100 B -
lerp 57 B -
loadElement 169 B -
loadIframe 189 B -
loadImage 188 B -
loadLink 186 B -
loadScript 197 B -
lowerCase 60 B -
map 71 B -
matrix 106 B -
mean 91 B -
memo 100 B -
memoize 189 B -
nextFrame 162 B -
nextMicrotask 111 B -
nextTick 134 B -
noop 39 B -
noopValue 49 B -
objectToURLSearchParams 302 B -
pascalCase 377 B -
Queue 226 B -
randomInt 80 B -
randomItem 232 B -
removeClass 222 B -
removeStyle 238 B -
round 56 B -
saveActiveElement 56 B -
SmartQueue 411 B -
snakeCase 378 B -
startsWith 87 B -
throttle 101 B -
toggleClass 225 B -
transform 321 B -
transition 916 B -
trapFocus 366 B -
untrapFocus 45 B -
upperCase 54 B -
useScheduler 290 B -
wait 79 B -
withExtraConfig 135 B -
withFreezedOptions 140 B -
withIntersectionObserver 285 B -
withLeadingCharacters 88 B -
withLeadingSlash 107 B -
withMountOnMediaQuery 336 B -
withMountWhenInView 311 B -
withMountWhenPrefersMotion 372 B -
withName 81 B -
withoutLeadingCharacters 86 B -
withoutLeadingCharactersRecursive 124 B -
withoutLeadingSlash 93 B -
withoutTrailingCharacters 98 B -
withoutTrailingCharactersRecursive 129 B -
withoutTrailingSlash 103 B -
withScrolledInView 1.88 kB -
withTrailingCharacters 96 B -
withTrailingSlash 120 B -

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 98.82%. Comparing base (f4eccd3) to head (69c8d2b).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #540      +/-   ##
===========================================
- Coverage    98.82%   98.82%   -0.01%     
===========================================
  Files          118      118              
  Lines         4078     4077       -1     
  Branches      1119     1120       +1     
===========================================
- Hits          4030     4029       -1     
  Misses          48       48              
Flag Coverage Ξ”
unittests 98.82% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@titouanmathis titouanmathis merged commit 47bfb3c into develop Nov 18, 2024
14 checks passed
@titouanmathis titouanmathis deleted the bugfix/service-server-side-usage branch November 18, 2024 11:46
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.

1 participant