Open
Conversation
NullVoxPopuli
commented
Feb 6, 2026
| /** | ||
| * @private | ||
| * | ||
| * RFC: https://github.com/emberjs/rfcs/pull/1070 |
Contributor
Author
There was a problem hiding this comment.
all of this copied from babel-plugin-ember-template-compilation
perhaps in a future release babel-plugin-ember-template-compilation could import this file (or remove the list entirely if we do this right)
Contributor
Estimated Asset SizesDiff --- main/out.txt 2026-02-17 19:37:18.000000000 +0000
+++ pr/./pr-22261364053/out.txt 2026-02-21 17:47:12.000000000 +0000
@@ -1,13 +1,13 @@
╔═══════╤═══════════╤═══════════╗
║ │ Min │ Gzip ║
╟───────┼───────────┼───────────╢
-║ Total │ 351.99 KB │ 203.84 KB ║
+║ Total │ 352.52 KB │ 204.49 KB ║
╚═══════╧═══════════╧═══════════╝
╔══════════════════════╤═══════════╤═══════════╗
║ @ember/* │ Min │ Gzip ║
╟──────────────────────┼───────────┼───────────╢
-║ Total │ 313.39 KB │ 181.91 KB ║
+║ Total │ 313.93 KB │ 182.55 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals │ 36.65 KB │ 26.22 KB ║
║ application │ 13.23 KB │ 8.05 KB ║
@@ -30,7 +30,7 @@
║ service │ 1 KB │ 845 B ║
║ template │ 654 B │ 541 B ║
║ template-compilation │ 429 B │ 366 B ║
-║ template-compiler │ 123.08 KB │ 59.45 KB ║
+║ template-compiler │ 123.62 KB │ 60.09 KB ║
║ template-factory │ 370 B │ 374 B ║
║ test │ 923 B │ 627 B ║
║ utils │ 4.11 KB │ 3.6 KB ║Details
|
3a5609a to
f783445
Compare
4e55c60 to
a02d1a7
Compare
…e allowed globals can be accessed
a02d1a7 to
a61c6f9
Compare
ef4
reviewed
Feb 20, 2026
| options.lexicalScope = (variable: string) => variable in scope; | ||
| options.lexicalScope = (variable: string) => { | ||
| if (ALLOWED_GLOBALS.has(variable)) { | ||
| return variable in globalThis; |
Contributor
There was a problem hiding this comment.
I think we should remove this, skipping over the user's real scope means their own local choices don't take priority over the globals.
Contributor
Author
There was a problem hiding this comment.
confirm this isn't needed - tyty
Removed check for ALLOWED_GLOBALS in lexicalScope function.
NullVoxPopuli
commented
Feb 21, 2026
| this.prototype[`@test Can use ${globalName}`] = async function () { | ||
| await this.renderComponentModule(() => { | ||
| return template(`{{if ${globalName} "exists"}}`, { | ||
| scope: () => ({}), |
Contributor
Author
There was a problem hiding this comment.
a fatal flaw found here, prompted by @ef4's question in the explricit scope lexicalScope check -- this scope bag is empty! it should include the global 🙈
Update test to pass global variables into scope for explicit runtime template compiler tests.
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Fix trailing whitespace in runtime template compiler test
Simplify lexicalScope function by removing global check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
all of the allowed globals from RFC 1070 were not working with
template().This PR Fixes