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

Pass all instrumented metadata into splitComponentLoaders #249

Closed
wants to merge 181 commits into from
Closed

Pass all instrumented metadata into splitComponentLoaders #249

wants to merge 181 commits into from

Conversation

micburks
Copy link
Contributor

@micburks micburks commented May 3, 2019

With fusionjs/fusion-cli#769

Pass __I18N_KEYS from instrumented promise into splitComponentLoaders. The only consumer of splitComponentLoaders right now is fusion-plugin-i18n, but if the need arises in the future this is simpler to expand upon if all metadata is passed in together.

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@0b78ae4). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #249   +/-   ##
=========================================
  Coverage          ?   78.96%           
=========================================
  Files             ?       13           
  Lines             ?      271           
  Branches          ?       58           
=========================================
  Hits              ?      214           
  Misses            ?       40           
  Partials          ?       17
Impacted Files Coverage Δ
src/async/split.js 58.69% <50%> (ø)

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 0b78ae4...937a1ae. Read the comment docs.

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@0b78ae4). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #249   +/-   ##
=========================================
  Coverage          ?   78.96%           
=========================================
  Files             ?       13           
  Lines             ?      271           
  Branches          ?       58           
=========================================
  Hits              ?      214           
  Misses            ?       40           
  Partials          ?       17
Impacted Files Coverage Δ
src/async/split.js 58.69% <50%> (ø)

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 0b78ae4...48fbcd2. Read the comment docs.

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@0b78ae4). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #249   +/-   ##
=========================================
  Coverage          ?   78.96%           
=========================================
  Files             ?       13           
  Lines             ?      271           
  Branches          ?       58           
=========================================
  Hits              ?      214           
  Misses            ?       40           
  Partials          ?       17
Impacted Files Coverage Δ
src/async/split.js 58.69% <50%> (ø)

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 0b78ae4...937a1ae. Read the comment docs.

@fusionjs-bot fusionjs-bot bot added the docs label May 3, 2019
@micburks micburks requested a review from rtsao May 8, 2019 16:47
lhorie
lhorie previously approved these changes May 8, 2019
Copy link
Member

@rtsao rtsao left a comment

Choose a reason for hiding this comment

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

This is a breaking change, right?

A bit hacky, but I wonder if a breaking change could be avoided by adding extra properties to the chunkIds array.

I think the hackiness is acceptable considering:

  1. It's not really part of our public API, we just use this in our own plugins
  2. Suspense will eliminate the need for all of this stuff anyways

@micburks
Copy link
Contributor Author

micburks commented May 8, 2019

Yes it's breaking technically, and yes we only use it in the i18n plugin. I really only made it breaking to come up with a more extensible API, but that is assuming splitComponentLoaders stays around when Suspense comes or if webpack was replaced. It can be avoided if we just pass the keys in as a second parameter, unless you consider a function signature change to be breaking because of flow.

Extra properties on the array is a bit goofy, but at the same time this is a pretty insignificant (and probably temporary) feature so I'm okay if that's the decision.

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

Successfully merging this pull request may close these issues.

None yet