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

fix(TokensClassProvider): circular dependency #8354

Merged

Conversation

SevereCloud
Copy link
Contributor

@SevereCloud SevereCloud commented Mar 10, 2025

Описание

Export "TokensClassProvider" of module "node_modules/@vkontakte/vkui/dist/cssm/lib/tokens/TokensClassProvider.js" was reexported through module "node_modules/@vkontakte/vkui/dist/cssm/lib/tokens/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "node_modules/@vkontakte/vkui/dist/cssm/components/ColorSchemeProvider/ColorSchemeProvider.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.

Воиспроизведение https://github.com/VKCOM/devicehub/tree/c3ac1c4/ui

Проверил с помощью madge, там действительно есть циклические зависимости

img

Изменения

Удаляем index.ts, для реализации инкапсуляции в отдельных модулях нужно использовать другой подход с использованием линтеров и специальных папок

Release notes

Исправления

  • Исправление предупреждения vite о циклической зависимости

@SevereCloud SevereCloud requested a review from a team as a code owner March 10, 2025 07:46
@SevereCloud SevereCloud self-assigned this Mar 10, 2025
@SevereCloud SevereCloud added this to the v7.2.0 milestone Mar 10, 2025
@github-actions github-actions bot added the ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Mar 10, 2025
Copy link
Contributor

size-limit report 📦

Path Size
JS 397.42 KB (0%)
JS (gzip) 120.6 KB (0%)
JS (brotli) 99.13 KB (0%)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.69 KB (0%)
CSS (gzip) 43.18 KB (-0.01% 🔽)
CSS (brotli) 34.48 KB (+0.11% 🔺)

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

e2e tests

Playwright Report

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.44%. Comparing base (2c74c6a) to head (24868ae).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8354      +/-   ##
==========================================
- Coverage   95.45%   95.44%   -0.01%     
==========================================
  Files         409      408       -1     
  Lines       11629    11626       -3     
  Branches     3849     3849              
==========================================
- Hits        11100    11097       -3     
  Misses        529      529              
Flag Coverage Δ
unittests 95.44% <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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

👀 Docs deployed

Commit 24868ae

@SevereCloud SevereCloud removed the ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Mar 10, 2025
Copy link
Contributor

@andrey-medvedev-vk andrey-medvedev-vk left a comment

Choose a reason for hiding this comment

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

🔥

@SevereCloud SevereCloud merged commit ed6cbb7 into master Mar 13, 2025
29 checks passed
@SevereCloud SevereCloud deleted the SevereCloud/fix/TokensClassProvider/circular-dependency branch March 13, 2025 16:32
@vkcom-publisher
Copy link
Contributor

v7.2.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants