Skip to content

Commit

Permalink
deprecate versions prior to Ember 2.16 (#690)
Browse files Browse the repository at this point in the history
* deprecate versions prior to Ember 2.16

* fix test
  • Loading branch information
Gaurav0 committed Mar 2, 2020
1 parent bba960a commit de5dd10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/services/dependency-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const {
testing
} = Ember;

const EMBER_VERSIONS = ['3.14.3', '3.13.4', '3.12.2', '3.11.1', '3.10.2', '3.9.1', '3.8.3', '3.7.3', '3.6.1', '3.5.1', '3.4.3', '3.3.2', '3.2.2', '3.1.4', '3.0.0', '2.18.2', '2.17.2', '2.16.2', '2.15.3', '2.14.1', '2.13.0', '2.12.0'];
const EMBER_DATA_VERSIONS = ['3.14.1', '3.13.2', '3.12.5', '3.11.5', '3.10.0', '3.9.3', '3.8.1', '3.7.0', '3.6.0', '3.5.2', '3.4.2', '3.3.2', '3.2.2', '3.1.2', '3.0.4', '2.18.5', '2.17.1', '2.16.4', '2.15.3', '2.14.10', '2.13.2', '2.12.2'];
const EMBER_VERSIONS = ['3.14.3', '3.13.4', '3.12.2', '3.11.1', '3.10.2', '3.9.1', '3.8.3', '3.7.3', '3.6.1', '3.5.1', '3.4.3', '3.3.2', '3.2.2', '3.1.4', '3.0.0', '2.18.2', '2.17.2', '2.16.2'];
const EMBER_DATA_VERSIONS = ['3.14.1', '3.13.2', '3.12.5', '3.11.5', '3.10.0', '3.9.3', '3.8.1', '3.7.0', '3.6.0', '3.5.2', '3.4.2', '3.3.2', '3.2.2', '3.1.2', '3.0.4', '2.18.5', '2.17.1', '2.16.4'];

const VERSION_REGEX = /^\d+.\d+.\d+(-beta\.\d+)?$/;

Expand Down Expand Up @@ -163,11 +163,11 @@ export default Service.extend({
return deprecatedUrl;
}

if (compareVersions(version, '2.12.0') === -1) {
const msg = 'Versions of Ember prior to 2.12.0 are no longer supported in Ember Twiddle';
if (compareVersions(version, '2.16.0') === -1) {
const msg = 'Versions of Ember prior to 2.16.0 are no longer supported in Ember Twiddle';
deprecate(msg, testing, {
id: 'ember-twiddle.deprecate-ember-versions-before-2-12',
until: '0.16.0',
id: 'ember-twiddle.deprecate-ember-versions-before-2-16',
until: '0.17.0',
});
this.notify.warning(msg);

Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/dependency-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ module('Acceptance | dependencies', function(hooks) {
await click(findContains('.test-set-ember-data-version', '2.16.4'));

await click('.versions-menu .dropdown-toggle');
await click(findContains('.test-set-ember-version', '2.15.3'));
await click(findContains('.test-set-ember-version', '2.18.2'));

await waitForLoadedIFrame();
assert.equal(outputContents('.ember-version'), '2.15.3');
assert.equal(outputContents('.ember-version'), '2.18.2');
assert.equal(outputContents('.ember-data-version'), '2.16.4');
});
});
Expand Down

0 comments on commit de5dd10

Please sign in to comment.