Skip to content

Transform Tagged Template Literals in Safari#9584

Closed
jridgewell wants to merge 1 commit intobabel:masterfrom
jridgewell:safari-template
Closed

Transform Tagged Template Literals in Safari#9584
jridgewell wants to merge 1 commit intobabel:masterfrom
jridgewell:safari-template

Conversation

@jridgewell
Copy link
Member

@jridgewell jridgewell commented Feb 25, 2019

Q                       A
Fixed Issues?
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? N/a
Documentation PR Link
Any Dependency Changes?
License MIT

Safari 12 has a bug that breaks caching of TaggedTemplateExpressions.

Ideally, we'd be able to break up the template literals feature into
two:

  1. Regular template literals
  2. Tagged template literals

We only need to transform tagged template literals. Also, Safari 9-11
don't have this issue, so we could avoid transforming in all cases if
we could specify that in the json.

Un-transformed test: https://jsbin.com/leyusas/10/edit?js,console
Transform test: https://jsbin.com/leyusas/8/edit?js,console

Safari 12 has a [bug](https://bugs.webkit.org/show_bug.cgi?id=190756) that breaks caching of `TaggedTemplateExpression`s.

Ideally, we'd be able to break up the template literals feature into
two:

1. Regular template literals
2. Tagged template literals

We only need to transform tagged template literals. Also, Safari 9-11
don't have this issue, so we avoid it if we could specify that in the
json.

Un-transformed test: https://jsbin.com/leyusas/10/edit?js,console
Transform test: https://jsbin.com/leyusas/8/edit?js,console
@nicolo-ribaudo
Copy link
Member

Since this file is auto-generated, this needs to be updated in compat-table.

@jridgewell jridgewell closed this Feb 25, 2019
@jridgewell jridgewell deleted the safari-template branch February 25, 2019 23:44
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants