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: proper asset attribution #554

Merged
merged 9 commits into from Jan 25, 2019

Conversation

Projects
None yet
1 participant
@tivac
Copy link
Owner

commented Jan 25, 2019

Description

Changes how assets are associated with bundle entries to split apart dynamic vs static. Also updates @modular-css/rollup-rewriter to only use the dynamic assets.

Motivation and Context

Assets being attached to the bundle object were being conflated, leading to over-inclusion when using @modular-css/rollup-rewriter. Now it only handles the dynamic assets and leaves static assets up to the consumer.

How Has This Been Tested?

Tests, and running against a large rollup project with tons of chunks.

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.

tivac added some commits Jan 24, 2019

feat: split out usage into dynamic vs static
BREAKING CHANGE:

Bundles will now have a `assets` and `dynamciAssets` array on them, and the metadata file will now contain an `assets` and `dynamicAssets` keys on them as well.
wip: flag nodes as their type
Then use that to create `assets` and `dynamicAssets` correctly.
test: update tests to use it.each
Also updated snapshot and specimens
WIP: don't include dependencies
TODO: Totally breaks rewrite so I'll need to figure out what happened there later.
@codecov

This comment has been minimized.

Copy link

commented Jan 25, 2019

Codecov Report

Merging #554 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #554      +/-   ##
==========================================
+ Coverage   98.94%   99.03%   +0.09%     
==========================================
  Files          46       46              
  Lines        1041     1039       -2     
  Branches      160      163       +3     
==========================================
- Hits         1030     1029       -1     
+ Misses         11       10       -1
Impacted Files Coverage Δ
packages/rollup/rollup.js 100% <100%> (+0.81%) ⬆️
packages/rollup-rewriter/rewriter.js 100% <100%> (ø) ⬆️

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 14b232b...dfe044d. Read the comment docs.

@tivac tivac merged commit 16fc758 into master Jan 25, 2019

4 checks passed

codecov/patch 100% of diff hit (target 98.94%)
Details
codecov/project 99.03% (+0.09%) compared to 14b232b
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tivac tivac deleted the dynamic-vs-static branch Jan 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.