Skip to content

Commit

Permalink
Ensure we are properly testing multiple Ember versions.
Browse files Browse the repository at this point in the history
Prior to this commit (since c2ca068) we were only testing ember-source@2.11.
Even though we had a `config/ember-try.js` with many scenarios, none of them
properly removed the `ember-source` version (even though ba7f462 was
specifically trying to do this 😭).

The fundamental issue here is:

* `ember-try` supports removing packages, but requires that you specify them
  in the `dependencies` or `devDependencies` objects.  Since my changes in
  ba7f462 added `"ember-source": null` to the root of the `npm` config
  it was completely ignored 😞.
* `ember-source` emits a warning to the console when it is present **and**
  the bower package for `ember` is in use.  Unfortunately, this warning is
  a bit misleading (it doesn't tell you that the `ember-source` from `npm`
  will always win). The `ember-source` addon should be updated to throw an
  error when this misconfiguration is detected.
* `ember-cli` will **always** use `ember-source` if it is present, and
  completely ignore whatever is in `bower.json`. IMHO, this default was not
  correct and `ember-cli` should have done the same thing that `ember-data`
  did during its migration from bower to `npm`: if both packages are present
  default to `bower.json` version with a warning.
  • Loading branch information
rwjblue committed Aug 13, 2017
1 parent 171102c commit 7245c9e
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ module.exports = {
scenarios: [
{
name: 'default',
bower: {
dependencies: { }
}
bower: { },
npm: { }
},
{
name: 'ember-1-13',
Expand All @@ -18,7 +17,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -32,7 +33,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -46,7 +49,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -60,7 +65,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -74,7 +81,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -88,7 +97,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -102,7 +113,9 @@ module.exports = {
}
},
npm: {
'ember-source': null
devDependencies: {
'ember-source': null
}
}
}
]
Expand Down

0 comments on commit 7245c9e

Please sign in to comment.