Skip to content

feat(@schematics/angular): remove Browserslist configuration files from projects #23897

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

Merged
merged 2 commits into from
Sep 14, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ describe('Browser Builder browser support', () => {
afterEach(async () => host.restore().toPromise());

it('warns when IE is present in browserslist', async () => {
host.appendToFile('.browserslistrc', '\nIE 9');
host.writeMultipleFiles({
'.browserslistrc': '\nIE 9',
});

const logger = new logging.Logger('');
const logs: string[] = [];
Expand Down
1 change: 1 addition & 0 deletions packages/schematics/angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ts_library(
"//packages/angular_devkit/schematics/tasks",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript",
"@npm//@types/node",
"@npm//browserslist",
"@npm//jsonc-parser",
],
)
Expand Down

This file was deleted.

11 changes: 5 additions & 6 deletions packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ describe('Application Schematic', () => {
const tree = await schematicRunner
.runSchematicAsync('application', options, workspaceTree)
.toPromise();
const exists = tree.exists('/projects/my-cool/.browserslistrc');
const exists = tree.exists('/projects/my-cool/tsconfig.app.json');
expect(exists).toBeTrue();
});

Expand All @@ -556,7 +556,7 @@ describe('Application Schematic', () => {
const tree = await schematicRunner
.runSchematicAsync('application', options, workspaceTree)
.toPromise();
const exists = tree.exists('/projects/foo/my-cool/.browserslistrc');
const exists = tree.exists('/projects/foo/my-cool/tsconfig.app.json');
expect(exists).toBeTrue();
});

Expand All @@ -565,7 +565,7 @@ describe('Application Schematic', () => {
const tree = await schematicRunner
.runSchematicAsync('application', options, workspaceTree)
.toPromise();
const exists = tree.exists('/projects/my-cool/.browserslistrc');
const exists = tree.exists('/projects/my-cool/tsconfig.app.json');
expect(exists).toBeTrue();
});

Expand All @@ -574,7 +574,7 @@ describe('Application Schematic', () => {
const tree = await schematicRunner
.runSchematicAsync('application', options, workspaceTree)
.toPromise();
const exists = tree.exists('/projects/foo/my-cool/.browserslistrc');
const exists = tree.exists('/projects/foo/my-cool/tsconfig.app.json');
expect(exists).toBeTrue();
});

Expand All @@ -584,8 +584,7 @@ describe('Application Schematic', () => {
.runSchematicAsync('application', options, workspaceTree)
.toPromise();

const exists = tree.exists('/projects/foo.bar_buz/.browserslistrc');
expect(exists).toBeTrue();
expect(tree.exists('/projects/foo.bar_buz/tsconfig.app.json')).toBeTrue();
});

it('should support creating scoped application', async () => {
Expand Down
33 changes: 4 additions & 29 deletions packages/schematics/angular/migrations/migration-collection.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
{
"schematics": {
"update-angular-packages-version-prefix": {
"version": "14.0.0",
"factory": "./update-14/angular-packages-version-prefix",
"description": "Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'."
},
"update-tsconfig-target": {
"version": "14.0.0",
"factory": "./update-14/update-tsconfig-target",
"description": "Update TypeScript compilation target to 'ES2020'."
},
"remove-show-circular-dependencies-option": {
"version": "14.0.0",
"factory": "./update-14/remove-show-circular-dependencies-option",
"description": "Remove 'showCircularDependencies' option from browser and server builders."
},
"remove-default-project-option": {
"version": "14.0.0",
"factory": "./update-14/remove-default-project-option",
"description": "Remove 'defaultProject' option from workspace configuration. The project to use will be determined from the current working directory."
},
"replace-default-collection-option": {
"version": "14.0.0",
"factory": "./update-14/replace-default-collection-option",
"description": "Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'."
},
"update-libraries-secondary-entrypoints": {
"version": "14.0.0",
"factory": "./update-14/update-libraries-secondary-entrypoints",
"description": "Remove 'package.json' files from library projects secondary entrypoints."
"remove-browserslist-config": {
"version": "15.0.0",
"factory": "./update-15/remove-browserslist-config",
"description": "Remove Browserslist configuration files that matches the Angular CLI default configuration."
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading