Skip to content

Commit

Permalink
Deprecate bower support in ember-try
Browse files Browse the repository at this point in the history
  • Loading branch information
kategengler committed Sep 30, 2019
1 parent d2fb312 commit 6fbd09f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions lib/utils/result-summary.js
Expand Up @@ -35,6 +35,7 @@ module.exports = CoreObject.extend({
task.ui.writeLine(`with env: ${JSON.stringify(scenario.envState, null, 2)}`);
}
task._printDependencyTable(scenario.dependencyState);
task._deprecateBowerSupport(scenario.dependencyState);
});

task.ui.writeLine('');
Expand Down Expand Up @@ -69,6 +70,15 @@ module.exports = CoreObject.extend({
task.ui.writeLine(table);
task.ui.writeLine('');
},
_deprecateBowerSupport(dependencyStatus) {
if (!dependencyStatus.length) { return; }
let anyBower = dependencyStatus.some(function(element) {
return element.packageManager === 'bower';
});
if (anyBower) {
this.ui.writeLine(chalk.yellow('DEPRECATION: The next major version of `ember-try` (v2.0) will drop support for installing dependencies with `bower`.'));
}
},
_printResultsSummary(countFailed, countPassed, allowedFailCount, total) {
let task = this;
if (countFailed) {
Expand Down
2 changes: 2 additions & 0 deletions test/tasks/try-each-test.js
Expand Up @@ -155,6 +155,8 @@ describe('tryEach', () => {
expect(output).to.include('Scenario second: SUCCESS');
expect(output).to.include('Scenario with-bower-resolutions: SUCCESS');

expect(output).to.include('DEPRECATION: The next major version of `ember-try` (v2.0) will drop support for installing dependencies with `bower`.');

let tables = output.filter((line) => {
return typeof line === "object";
});
Expand Down
4 changes: 2 additions & 2 deletions test/utils/config-test.js
Expand Up @@ -37,7 +37,7 @@ describe('utils/config', () => {
}

describe('addImplicitBowerToScenarios', () => {
it('adds an npm with a bower dev depencency for scenarios that have only bower', () => {
it('adds an npm with a bower dev dependency for scenarios that have only bower', () => {
expect(addImplicitBowerToScenarios({
scenarios: [{
name: 'bower-only',
Expand All @@ -52,7 +52,7 @@ describe('utils/config', () => {
});
});

it('adds a bower dev dependency for scnearios that have bower and npm', () => {
it('adds a bower dev dependency for scenarios that have bower and npm', () => {
expect(addImplicitBowerToScenarios({
scenarios: [{
name: 'bower-and-npm',
Expand Down

0 comments on commit 6fbd09f

Please sign in to comment.