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

Add strict partial bundles #5413

Merged
merged 2 commits into from
Jan 19, 2021
Merged

Add strict partial bundles #5413

merged 2 commits into from
Jan 19, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 15, 2021

This includes everything (all the trace types) not depending on function constructors in respect to #897.
Unlike other partial bundles, calendars would also be included in these bundles.

cc: #5395

@plotly/plotly_js

 - does not depend on function constructors
@archmoj archmoj added this to the NEXT milestone Jan 15, 2021
tasks/stats.js Outdated
@@ -136,6 +136,8 @@ function getMainBundleInfo() {
'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.',
'',
'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.',
'',
'Starting in `v2.0.0`, the strict partial bundle includes everything except the traces that require function constructor.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nicolaskruchten Do we want to add something like "Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues such as inline CSS that we may not be able to include in the main bundle."

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, SGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexcjohnson
Good call.
Done in c0a3d92.

@nicolaskruchten
Copy link
Contributor

Does this PR include the lock-down test that fails if function constructors slip into the strict bundle?

@archmoj
Copy link
Contributor Author

archmoj commented Jan 19, 2021

Does this PR include the lock-down test that fails if function constructors slip into the strict bundle?

Yes it does. Whatever .js file we add in dist/ folder is tested unless we explicitly exclude it here.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@archmoj archmoj merged commit 83f105d into master Jan 19, 2021
@archmoj archmoj deleted the add-strict-bundle branch January 19, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants