-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix positional to hash params transform for Ember 1.11/1.12 (#155)
* Enable HBS transforms for Ember 1.13.0 and below again * Fix HBS transforms for AST difference in Ember 1.11/1.12 * Extract Ember version checks into separate module * Reenable most positional param to hash pair tests * Remove unused `ember-compatibility-helpers` dependency
- Loading branch information
Showing
10 changed files
with
59 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import Ember from 'ember'; | ||
import { GTE_EMBER_1_13 } from 'ember-compatibility-helpers'; | ||
import { hasPositionalParams } from 'dummy/version-checks'; | ||
|
||
const { Controller } = Ember; | ||
|
||
export default Controller.extend({ | ||
shouldRenderParamTests: GTE_EMBER_1_13 | ||
hasPositionalParams, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Ember from 'ember'; | ||
|
||
const { VERSION } = Ember; | ||
|
||
const EMBERS_WITHOUT_POSITIONAL_PARAMS = [ | ||
'1.12', | ||
'1.11', | ||
]; | ||
|
||
const EMBERS_WITHOUT_RELIABLE_POSITIONAL_PARAMS = [ | ||
'2.2', | ||
'2.1', | ||
'2.0', | ||
'1.13', | ||
'1.12', | ||
'1.11', | ||
]; | ||
|
||
export const hasPositionalParams = !EMBERS_WITHOUT_POSITIONAL_PARAMS | ||
.some(version => VERSION.indexOf(`${version}.`) === 0); | ||
|
||
export const hasReliablePositionalParams = !EMBERS_WITHOUT_RELIABLE_POSITIONAL_PARAMS | ||
.some(version => VERSION.indexOf(`${version}.`) === 0); |
16 changes: 1 addition & 15 deletions
16
tests/integration/strip-data-test-attributes-from-components-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters