Skip to content

Commit

Permalink
Merge pull request #1002 from bertdeblock/clean-up-everything-related…
Browse files Browse the repository at this point in the history
…-to-bower

Clean up everything related to Bower
  • Loading branch information
bertdeblock authored Dec 10, 2024
2 parents 1818a7e + 5c540b2 commit effd50b
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 52 deletions.
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

0 comments on commit effd50b

Please sign in to comment.