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

Clean up everything related to Bower #1002

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/
!.*
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
Expand Down
5 changes: 0 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -21,7 +17,6 @@
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/ember-cli-build.js
/testem.js
Expand Down
8 changes: 0 additions & 8 deletions lib/utils/dependency-manager-adapter-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const WorkspaceAdapter = require('../dependency-manager-adapters/workspace');
module.exports = {
generateFromConfig(config, root) {
let hasNpm = false;
let hasBower = false;
let adapters = [];
if (!config || !config.scenarios) {
return [];
Expand All @@ -17,15 +16,8 @@ module.exports = {
if (scenario.npm) {
hasNpm = true;
}
if (scenario.bower || scenario.dependencies || scenario.devDependencies) {
hasBower = true;
}
});

if (hasBower) {
throw new Error('[ember-try] bower configuration is no longer supported');
}

if (config.useWorkspaces) {
adapters.push(
new WorkspaceAdapter({
Expand Down
1 change: 0 additions & 1 deletion smoke-test-app/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
Expand Down
1 change: 0 additions & 1 deletion smoke-test-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
Expand Down
5 changes: 0 additions & 5 deletions smoke-test-app/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -21,7 +17,6 @@
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand Down
1 change: 0 additions & 1 deletion smoke-test-app/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
Expand Down
27 changes: 0 additions & 27 deletions test/utils/dependency-manager-adapter-factory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,6 @@ describe('DependencyManagerAdapterFactory', () => {
expect(adapters.length).to.equal(1);
});

it('errors when it sees `bower` explicitly', () => {
expect(() => {
DependencyManagerAdapterFactory.generateFromConfig(
{ scenarios: [{ bower: {}, npm: {} }] },
'here',
);
}).to.throw(/bower configuration is no longer supported/);
});

it('errors when there is only a legacy top-level dependencies', () => {
expect(() => {
DependencyManagerAdapterFactory.generateFromConfig(
{ scenarios: [{ dependencies: {} }] },
'here',
);
}).to.throw(/bower configuration is no longer supported/);
});

it('errors when there is only a legacy top-level devDependencies', () => {
expect(() => {
DependencyManagerAdapterFactory.generateFromConfig(
{ scenarios: [{ devDependencies: {} }] },
'here',
);
}).to.throw(/bower configuration is no longer supported/);
});

it('creates only a workspace adapter when useWorkspaces is set to true', () => {
writeJSONFile('package.json', { workspaces: ['packages/test'] });

Expand Down
Loading