Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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: true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be false by default.

};

/**
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);
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';

Check failure on line 4 in packages/@ember/template-compiler/lib/plugins/auto-import-builtins.ts

View workflow job for this annotation

GitHub Actions / tests / Type Checking (current version)

Cannot find module '@ember/canary-features' or its corresponding type declarations.

/**
@module ember
Expand All @@ -14,6 +15,13 @@
*/

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
Loading