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: only include direct deps in compositions #857

Merged
merged 3 commits into from
Jun 15, 2022
Merged

fix: only include direct deps in compositions #857

merged 3 commits into from
Jun 15, 2022

Conversation

tivac
Copy link
Owner

@tivac tivac commented Jun 15, 2022

Description

Only compose from direct dependencies, not the entire chain

Motivation and Context

Because of how the @modular-css/css-in-js package works the deps already contain all of their deps, so by concatenating all of the deps of the selector you actually end up with duplicated classes in the output and it looks a real mess.

How Has This Been Tested?

Added a test & snapshot

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Because of how the css-in-js package works the deps already contain all of *their* deps, so by concatenating all of the deps of the selector you actually end up with duplicated classes in the output and it looks a real mess.
@ghost
Copy link

ghost commented Jun 15, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@netlify
Copy link

netlify bot commented Jun 15, 2022

Deploy Preview for m-css ready!

Name Link
🔨 Latest commit 086703b
🔍 Latest deploy log https://app.netlify.com/sites/m-css/deploys/62aa31bfd30c6a000932f110
😎 Deploy Preview https://deploy-preview-857--m-css.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #857 (086703b) into main (8dc538b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #857      +/-   ##
==========================================
- Coverage   99.58%   99.58%   -0.01%     
==========================================
  Files          37       37              
  Lines        1437     1436       -1     
  Branches      231      231              
==========================================
- Hits         1431     1430       -1     
  Misses          6        6              
Impacted Files Coverage Δ
packages/css-to-js/css-to-js.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@tivac tivac merged commit 58f65c4 into main Jun 15, 2022
@tivac tivac deleted the direct-deps branch June 15, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant