Skip to content

Commit 74de720

Browse files
author
Robert Jackson
authored
Deprecate bower support in ember-try (#402)
Deprecate bower support in ember-try
2 parents d2fb312 + 6fbd09f commit 74de720

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

lib/utils/result-summary.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module.exports = CoreObject.extend({
3535
task.ui.writeLine(`with env: ${JSON.stringify(scenario.envState, null, 2)}`);
3636
}
3737
task._printDependencyTable(scenario.dependencyState);
38+
task._deprecateBowerSupport(scenario.dependencyState);
3839
});
3940

4041
task.ui.writeLine('');
@@ -69,6 +70,15 @@ module.exports = CoreObject.extend({
6970
task.ui.writeLine(table);
7071
task.ui.writeLine('');
7172
},
73+
_deprecateBowerSupport(dependencyStatus) {
74+
if (!dependencyStatus.length) { return; }
75+
let anyBower = dependencyStatus.some(function(element) {
76+
return element.packageManager === 'bower';
77+
});
78+
if (anyBower) {
79+
this.ui.writeLine(chalk.yellow('DEPRECATION: The next major version of `ember-try` (v2.0) will drop support for installing dependencies with `bower`.'));
80+
}
81+
},
7282
_printResultsSummary(countFailed, countPassed, allowedFailCount, total) {
7383
let task = this;
7484
if (countFailed) {

test/tasks/try-each-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ describe('tryEach', () => {
155155
expect(output).to.include('Scenario second: SUCCESS');
156156
expect(output).to.include('Scenario with-bower-resolutions: SUCCESS');
157157

158+
expect(output).to.include('DEPRECATION: The next major version of `ember-try` (v2.0) will drop support for installing dependencies with `bower`.');
159+
158160
let tables = output.filter((line) => {
159161
return typeof line === "object";
160162
});

test/utils/config-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('utils/config', () => {
3737
}
3838

3939
describe('addImplicitBowerToScenarios', () => {
40-
it('adds an npm with a bower dev depencency for scenarios that have only bower', () => {
40+
it('adds an npm with a bower dev dependency for scenarios that have only bower', () => {
4141
expect(addImplicitBowerToScenarios({
4242
scenarios: [{
4343
name: 'bower-only',
@@ -52,7 +52,7 @@ describe('utils/config', () => {
5252
});
5353
});
5454

55-
it('adds a bower dev dependency for scnearios that have bower and npm', () => {
55+
it('adds a bower dev dependency for scenarios that have bower and npm', () => {
5656
expect(addImplicitBowerToScenarios({
5757
scenarios: [{
5858
name: 'bower-and-npm',

0 commit comments

Comments
 (0)