-
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1969,14 +1969,6 @@ ember-cli@~2.16.1: | |
walk-sync "^0.3.0" | ||
yam "0.0.22" | ||
|
||
ember-compatibility-helpers@^0.1.2: | ||
version "0.1.2" | ||
resolved "https://registry.yarnpkg.com/ember-compatibility-helpers/-/ember-compatibility-helpers-0.1.2.tgz#8eb1769ad761db273fd40242b1170d9f3841d0f0" | ||
dependencies: | ||
babel-plugin-debug-macros "^0.1.11" | ||
ember-cli-version-checker "^2.0.0" | ||
semver "^5.4.1" | ||
|
||
ember-disable-prototype-extensions@^1.1.2: | ||
version "1.1.2" | ||
resolved "https://registry.yarnpkg.com/ember-disable-prototype-extensions/-/ember-disable-prototype-extensions-1.1.2.tgz#261cccaf6bf8fbb1836be7bdfe4278f9ab92b873" | ||
|
@@ -4362,10 +4354,6 @@ semver@^5.1.0, semver@^5.1.1, semver@^5.3.0: | |
version "5.3.0" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" | ||
|
||
semver@^5.4.1: | ||
version "5.4.1" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" | ||
|
||
[email protected]: | ||
version "0.15.3" | ||
resolved "https://registry.yarnpkg.com/send/-/send-0.15.3.tgz#5013f9f99023df50d1bd9892c19e3defd1d53309" | ||
|