Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate bower support #402

Merged
merged 1 commit into from Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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