Skip to content

Add new entrypoints to webcomponentsjs for the 'platform' polyfills. #385

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

Merged
merged 8 commits into from
Oct 6, 2020

Conversation

bicknellr
Copy link
Collaborator

@bicknellr bicknellr commented Oct 3, 2020

Fixes #386.

I think the names for these bundles need some bikeshedding. Having these file names in the package is probably going to be very confusing for consumers:

bundles/webcomponents-js.js
bundles/webcomponents-dom.js
src/entrypoints/webcomponents-js-index.js
src/entrypoints/webcomponents-dom-index.js

pf is used in the other bundle names for 'platform' but now that they're split into two, we need some new separate name for each. js and dom were just the most obvious, but clearly aren't helpful if you're just looking around at the files in this package.

@bicknellr bicknellr changed the title Add a new entrypoint to webcomponentsjs that contains only the platform polyfills. Add new entrypoints to webcomponentsjs for the 'platform' polyfills. Oct 3, 2020
@bicknellr bicknellr marked this pull request as ready for review October 6, 2020 00:14
Copy link
Contributor

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

Looks fine, I don't have an opinion about the names.

Can you remind me why we need to make these entrypoints for lit next (or update PR description)? I don't remember the discussion.

@bicknellr
Copy link
Collaborator Author

Shady DOM and the custom elements polyfill both use the @webcomponents/webcomponents-platform package in some of their tests but we no longer have @webcomponents/webcomponents-platform as a distinct package in our source after merging all of the polyfill repos, so we can't update them (without recreating the package). These entrypoints will give us a place to put the newer polyfills that we're adding for Lit (append, remove, etc.) so that we can use them without importing the entire webcomponentsjs bundle in the tests.

@kevinpschaaf
Copy link
Collaborator

bundles/webcomponents-es6.js (to disambiguate from webcomponents.js) and
bundles/webcomponents-dom.js

?

@kevinpschaaf
Copy link
Collaborator

Or
bundles/webcomponents-es6-shims.js
bundles/webcomponents-dom-shims.js

@bicknellr
Copy link
Collaborator Author

I think I might just go with the pf_ prefixing thing mentioned in chat since IDK if these are going to be strictly ES6.

Just using 'js' and 'dom' for these bundles is confusing, especially considering
that this would add file with these names to the package:

  - `bundle/webcomponents-js.js`
  - `bundle/webcomponents-dom.js`
  - `src/entrypoints/webcomponents-js-index.js`
  - `src/entrypoints/webcomponents-dom-index.js`
@bicknellr
Copy link
Collaborator Author

Ok, updated, anyone opposed?

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.

Add entrypoints for 'platform' polyfills.
4 participants