Skip to content

Commit

Permalink
[FEATURE strict-mode] Enable Template Strict Mode
Browse files Browse the repository at this point in the history
Enables strict mode, allowing the options for strict to be passed to the
Ember template compiler. Also adds some additional exported values,
`LinkTo` and `Textarea` to the global, as these have been deprecated on
their normal export paths.
  • Loading branch information
Chris Garrett committed Dec 21, 2020
1 parent 9b9ec95 commit 4479611
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@ember/canary-features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DEFAULT_FEATURES = {
EMBER_GLIMMER_HELPER_MANAGER: true,
EMBER_GLIMMER_INVOKE_HELPER: true,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS: null,
EMBER_STRICT_MODE: null,
EMBER_STRICT_MODE: true,
EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: null,
};

Expand Down
2 changes: 2 additions & 0 deletions packages/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ Ember._getComponentTemplate = getComponentTemplate;
Ember._setComponentTemplate = setComponentTemplate;
Ember._templateOnlyComponent = templateOnlyComponent;

Ember._Textarea = TextArea;
Ember._LinkTo = LinkComponent;
Ember._Input = Input;
Ember._hash = hash;
Ember._array = array;
Expand Down
13 changes: 12 additions & 1 deletion packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ if (!jQueryDisabled) {
}

let allExports = [
// @glimmer/runtime
['_templateOnlyComponent', '@glimmer/runtime', 'templateOnlyComponent'],
['_on', '@glimmer/runtime', 'on'],
['_fn', '@glimmer/runtime', 'fn'],
['_array', '@glimmer/runtime', 'array'],
['_hash', '@glimmer/runtime', 'hash'],
['_get', '@glimmer/runtime', 'get'],
['_concat', '@glimmer/runtime', 'concat'],

// @ember/-internals/environment
['ENV', '@ember/-internals/environment', { get: 'getENV' }],
['lookup', '@ember/-internals/environment', { get: 'getLookup', set: 'setLookup' }],
Expand Down Expand Up @@ -266,7 +275,6 @@ let allExports = [
['_componentManagerCapabilities', '@glimmer/manager', 'componentCapabilities'],
['_setComponentTemplate', '@glimmer/manager', 'setComponentTemplate'],
['_getComponentTemplate', '@glimmer/manager', 'getComponentTemplate'],
['_templateOnlyComponent', '@glimmer/runtime', 'templateOnlyComponent'],
EMBER_GLIMMER_HELPER_MANAGER
? ['_setHelperManager', '@glimmer/manager', 'setHelperManager']
: null,
Expand All @@ -275,6 +283,9 @@ let allExports = [
: null,
EMBER_GLIMMER_INVOKE_HELPER ? ['_invokeHelper', '@glimmer/runtime', 'invokeHelper'] : null,
['_captureRenderTree', '@ember/debug', 'captureRenderTree'],
['_Textarea', '@ember/-internals/glimmer', 'TextArea'],
['_LinkTo', '@ember/-internals/glimmer', 'LinkComponent'],
['_Input', '@ember/-internals/glimmer', 'Input'],

// @ember/-internals/runtime
['A', '@ember/-internals/runtime'],
Expand Down

0 comments on commit 4479611

Please sign in to comment.