Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions packages/@ember/canary-features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ENV } from '@ember/-internals/environment';

export const DEFAULT_FEATURES = {
// FLAG_NAME: true/false
NEW_KEYWORDS_2026_05: false,
};

/**
Expand Down Expand Up @@ -55,12 +56,14 @@ export function isEnabled(feature: string): boolean {

// Uncomment the below when features are present:

// function featureValue(value: null | boolean) {
// if (ENV.ENABLE_OPTIONAL_FEATURES && value === null) {
// return true;
// }
function featureValue(value: null | boolean) {
if (ENV.ENABLE_OPTIONAL_FEATURES && value === null) {
return true;
}

// return value;
// }
return value;
}
//
// export const FLAG_NAME = featureValue(FEATURES.FLAG_NAME);

export const NEW_KEYWORDS_2026_05 = featureValue(FEATURES.NEW_KEYWORDS_2026_05);
6 changes: 6 additions & 0 deletions packages/@ember/helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ export const fn = glimmerFn as FnHelper;
export interface FnHelper extends Opaque<'helper:fn'> {}

/**
* @private - temporarily private until broader team approval
*
* The `element` helper lets you dynamically set the tag name of an element.
*
* ```js
Expand Down Expand Up @@ -514,6 +516,8 @@ export const uniqueId = glimmerUniqueId;
export type UniqueIdHelper = typeof uniqueId;

/**
* @private - temporarily private until broader team approval
*
* The `{{eq}}` helper returns `true` if its two arguments are strictly equal
* (`===`). Takes exactly two arguments.
*
Expand All @@ -538,6 +542,8 @@ export const eq = glimmerEq as unknown as EqHelper;
export interface EqHelper extends Opaque<'helper:eq'> {}

/**
* @private - temporarily private until broader team approval
*
* The `{{neq}}` helper returns `true` if its two arguments are strictly
* not equal (`!==`). Takes exactly two arguments.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AST, ASTPlugin } from '@glimmer/syntax';
import type { EmberASTPluginEnvironment } from '../types';
import { isPath, trackLocals } from './utils';
import { NEW_KEYWORDS_2026_05 } from '@ember/canary-features';

/**
@module ember
Expand All @@ -14,6 +15,13 @@ import { isPath, trackLocals } from './utils';
*/

export default function autoImportBuiltins(env: EmberASTPluginEnvironment): ASTPlugin {
if (!NEW_KEYWORDS_2026_05) {
return {
name: 'auto-import-built-ins-disabled',
visitor: {},
};
}

let { hasLocal, visitor } = trackLocals(env);

return {
Expand Down
1 change: 1 addition & 0 deletions packages/@ember/template-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"./types": "./lib/types.ts"
},
"dependencies": {
"@ember/canary-features": "workspace:*",
"@ember/-internals": "workspace:*",
"@ember/component": "workspace:*",
"@ember/debug": "workspace:*",
Expand Down
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading