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

[BUGFIX beta] Update glimmer-vm to prevent errors for older inline precompilation #19370

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Feb 2, 2021

This updates glimmer-vm to avoid emitting the scope property on precompiled template blocks when not using strict mode (when using strict mode scope will either be null or a function).

This is specifically to work around a bug in older versions of babel-plugin-htmlbars-inline-precompile (versions from v2.0.0 through v4.0.1) where they would (incorrectly) attempt to build an ObjectExpression when a null value is found in the template precompilation result (D'oh!).

Note: those versions of babel-plugin-htmlbars-inline-precompile should still be migrated away from (they are quite old, and will definitely not work for newer features like strict mode).

Fixes #19331

@rwjblue rwjblue added the Bug label Feb 2, 2021
@rwjblue rwjblue changed the title Update glimmer-vm to prevent errors for older inline precompilation [BUGFIX beta] Update glimmer-vm to prevent errors for older inline precompilation Feb 2, 2021
@rwjblue
Copy link
Member Author

rwjblue commented Feb 2, 2021

Will need to be rebased on #19371 (will fail until that lands).

This updates glimmer-vm to avoid emitting the `scope` property on
precompiled template blocks when not using strict mode (when using
strict mode `scope` will either be `null` or a function).

This is specifically to work around a bug in older versions of
babel-plugin-htmlbars-inline-precompile (versions from v2.0.0 through
v4.0.1) where they would (incorrectly) attempt to build an
`ObjectExpression` when a `null` value is found in the template
precompilation result (D'oh!).

Note: those versions of babel-plugin-htmlbars-inline-precompile should
still be migrated away from (they are quite old, and will definitely not
work for newer features like strict mode).
@rwjblue rwjblue force-pushed the prevent-inline-compilation-errors-for-older-htmlbars-precompile branch from 1a1d33c to 9bc0b49 Compare February 2, 2021 19:00
@rwjblue
Copy link
Member Author

rwjblue commented Feb 2, 2021

Rebased to incorporate changes from #19371

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.

[Bug] Helper crashes renderer with current beta (regression)
1 participant