Skip to content

Fix: don't auto import experimental bento components #1234

Merged
sebastianbenz merged 2 commits intomainfrom
fix-experimental-ext
May 19, 2021
Merged

Fix: don't auto import experimental bento components #1234
sebastianbenz merged 2 commits intomainfrom
fix-experimental-ext

Conversation

@sebastianbenz
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@sebastianbenz sebastianbenz force-pushed the fix-experimental-ext branch from bd730b5 to 3f6febe Compare May 19, 2021 13:12
Copy link
Copy Markdown
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