11import { setModifierManager , capabilities } from '@ember/modifier' ;
2- import { macroCondition , dependencySatisfies , importSync } from '@embroider/macros' ;
2+ import {
3+ macroCondition ,
4+ dependencySatisfies ,
5+ importSync ,
6+ } from '@embroider/macros' ;
37
48const untrack = ( function ( ) {
59 if ( macroCondition ( dependencySatisfies ( 'ember-source' , '> 3.27.0-beta.1' ) ) ) {
610 // ember-source@3.27 shipped "real modules" by default, so we can just use
711 // importSync to get @glimmer /validator directly
812 return importSync ( '@glimmer/validator' ) . untrack ;
9- } else if ( macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) ) ) {
13+ } else if (
14+ macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) )
15+ ) {
1016 // we can access `window.Ember` here because it wasn't deprecated until at least 3.27
1117 // eslint-disable-next-line no-undef
1218 return Ember . __loader . require ( '@glimmer/validator' ) . untrack ;
@@ -73,7 +79,9 @@ const untrack = (function () {
7379*/
7480export default setModifierManager (
7581 ( ) => ( {
76- capabilities : macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) )
82+ capabilities : macroCondition (
83+ dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) ,
84+ )
7785 ? capabilities ( '3.22' , { disableAutoTracking : false } )
7886 : capabilities ( '3.13' , { disableAutoTracking : true } ) ,
7987
@@ -84,7 +92,9 @@ export default setModifierManager(
8492 // save element into state bucket
8593 state . element = element ;
8694
87- if ( macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) ) ) {
95+ if (
96+ macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) )
97+ ) {
8898 // Consume individual properties to entangle tracking.
8999 // https://github.com/emberjs/ember.js/issues/19277
90100 // https://github.com/ember-modifier/ember-modifier/pull/63#issuecomment-815908201
@@ -96,7 +106,9 @@ export default setModifierManager(
96106 updateModifier ( { element } , args ) {
97107 let [ fn , ...positional ] = args . positional ;
98108
99- if ( macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) ) ) {
109+ if (
110+ macroCondition ( dependencySatisfies ( 'ember-source' , '>= 3.22.0-alpha.1' ) )
111+ ) {
100112 // Consume individual properties to entangle tracking.
101113 // https://github.com/emberjs/ember.js/issues/19277
102114 // https://github.com/ember-modifier/ember-modifier/pull/63#issuecomment-815908201
@@ -112,5 +124,5 @@ export default setModifierManager(
112124
113125 destroyModifier ( ) { } ,
114126 } ) ,
115- class DidUpdateModifier { }
127+ class DidUpdateModifier { } ,
116128) ;
0 commit comments