Skip to content

RFC#561 - {{lt}}, {{lte}}, {{gt}}, {{gte}} as keywords#21342

Merged
ef4 merged 5 commits intomainfrom
nvp/lt-lte-gt-gte-as-keyword
May 4, 2026
Merged

RFC#561 - {{lt}}, {{lte}}, {{gt}}, {{gte}} as keywords#21342
ef4 merged 5 commits intomainfrom
nvp/lt-lte-gt-gte-as-keyword

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

Supersedes #21309

Add comparison helpers and register them as built-in keywords so they no longer need to be imported in strict-mode (gjs/gts) templates.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

📊 Package size report   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
dist/dev/packages/@ember/helper/index.js 18.7 kB / 4.9 kB 11%↑20.7 kB / 4%↑5.2 kB
dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.7 kB / 533 B 48%↑4 kB / 12%↑598 B
dist/dev/packages/shared-chunks/index-BGP1rw3B.js 199.2 kB / 43.7 kB -68.3%↓63.1 kB / -71.3%↓12.6 kB
dist/dev/packages/shared-chunks/neq-BnthnWq8.js 3.2 kB / 1 kB 34%↑4.2 kB / 10%↑1.1 kB
dist/prod/packages/@ember/helper/index.js 18.6 kB / 4.9 kB 11%↑20.6 kB / 5%↑5.1 kB
dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.7 kB / 533 B 48%↑4 kB / 12%↑598 B
dist/prod/packages/shared-chunks/neq-DomVHPC_.js 2 kB / 705 B 26%↑2.6 kB / 10%↑779 B
types/stable/@ember/helper/index.d.ts 19.9 kB / 4.7 kB 13%↑22.5 kB / 5%↑4.9 kB
types/stable/@glimmer/runtime/index.d.ts 2.8 kB / 763 B 9%↑3 kB / 2%↑782 B
types/stable/@glimmer/runtime/lib/helpers/gt.d.ts 202 B / 128 B
types/stable/@glimmer/runtime/lib/helpers/gte.d.ts 214 B / 135 B
types/stable/@glimmer/runtime/lib/helpers/lt.d.ts 199 B / 129 B
types/stable/@glimmer/runtime/lib/helpers/lte.d.ts 211 B / 135 B
types/stable/index.d.ts 43 kB / 4 kB 0.6%↑43.2 kB / 0.1%↑4 kB
Total (Includes all files) 5.4 MB / 1.3 MB 0.2%↑5.4 MB / 0.1%↑1.3 MB
Tarball size 1.2 MB 0.2%↑1.2 MB

🤖 This report was automatically generated by pkg-size-action

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review April 26, 2026 17:02
@bertdeblock
Copy link
Copy Markdown
Member

Same question here as #21339 (comment).

bertdeblock
bertdeblock previously approved these changes Apr 28, 2026
NullVoxPopuli and others added 3 commits April 28, 2026 16:31
Add comparison helpers and register them as built-in keywords so they
no longer need to be imported in strict-mode (gjs/gts) templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bertdeblock
bertdeblock previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Member

@kategengler kategengler left a comment

Choose a reason for hiding this comment

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

I'm 👍 but we need to advance emberjs/rfcs#1179 to Ready for Release before landing.

*
* left < right
*/
export function lt(left: unknown, right: unknown) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lt<T>(left: T, right: T): boolean;

This would be consistent with how typescript itself treats the native < operator.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@ember/helper/index.js 18.7 kB / 4.9 kB 11%↑20.7 kB / 4%↑5.2 kB
./packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.7 kB / 533 B 48%↑4 kB / 12%↑598 B
./packages/shared-chunks/neq-{hash}.js 3.2 kB / 1 kB 34%↑4.2 kB / 10%↑1.1 kB
Total (Includes all files) 2 MB / 476.3 kB 0.2%↑2.1 MB / 0.1%↑476.8 kB

dist/prod   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@ember/helper/index.js 18.6 kB / 4.9 kB 11%↑20.6 kB / 5%↑5.1 kB
./packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.7 kB / 533 B 48%↑4 kB / 12%↑598 B
./packages/shared-chunks/neq-{hash}.js 2 kB / 705 B 26%↑2.6 kB / 10%↑779 B
Total (Includes all files) 1.9 MB / 436 kB 0.2%↑1.9 MB / 0.1%↑436.5 kB

smoke-tests/v2-app-hello-world-template/dist   No changes

File Before (Size / Brotli) After (Size / Brotli)
Total (Includes all files) 251.4 kB / 68.8 kB 251.4 kB / 68.8 kB

🤖 This report was automatically generated by wyvox/pkg-size

@ef4 ef4 merged commit 2febc52 into main May 4, 2026
38 checks passed
@ef4 ef4 deleted the nvp/lt-lte-gt-gte-as-keyword branch May 4, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants