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: don't auto import experimental bento components #1234

Merged
merged 2 commits into from
May 19, 2021

Conversation

sebastianbenz
Copy link
Collaborator

@sebastianbenz sebastianbenz commented May 18, 2021

Fixes #1221

@sebastianbenz sebastianbenz force-pushed the fix-experimental-ext branch 6 times, most recently from e6c04c3 to bd730b5 Compare May 19, 2021 13:06
Use the bento component info published here
https://amp.dev/static/bento-components.json to determine which version
of a component to auto import.

Fixes #1221
let bentoComponentInfo = await config.cache.get('bento-component-info');
if (!bentoComponentInfo) {
bentoComponentInfo = await fetchBentoComponentInfo_(config);
config.cache.set('bento-component-info', bentoComponentInfo);
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we have any concern about a cache error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, made this handle errors with a single warning

Copy link
Collaborator

@patrickkettner patrickkettner left a comment

Choose a reason for hiding this comment

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

one question, otherwise lgtm

@sebastianbenz sebastianbenz merged commit 9c95180 into main May 19, 2021
@sebastianbenz sebastianbenz deleted the fix-experimental-ext branch May 19, 2021 16:33
@sebastianbenz sebastianbenz changed the title Fix experimental ext Fix: don't auto import experimental bento components May 19, 2021
sebastianbenz added a commit that referenced this pull request May 19, 2021
* Don't auto import experimental bento components

Use the bento component info published here
https://amp.dev/static/bento-components.json to determine which version
of a component to auto import.

Fixes #1221

* handle cache failures
sebastianbenz added a commit that referenced this pull request Jun 1, 2021
Don't auto import experimental bento components. Pull in latest component prod version from the amphtml repository.

Fixes #1221
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.

Optimizer: amp-timeago uses incorrect script version
2 participants