With this change we update the universal schematic bootstrap code to handle HMR properly. Previously, the bootstrapping code was called only on `DOMContentLoaded` which is not triggered when running in HMR.
Closes#21932
`rxjs` 7 versions prior to 7.4.0 did not export the ES2015 variant in a way that could be leveraged via the new package.json `exports` feature. As a result, prior versions would cause larger ES5 variants of rxjs to be bundled within applications. Version 7.4.0 is now set as the minimum version for new projects to allow for the ES2015 rxjs code to be used when building applications.
Removes the `classlist.js` and `web-animations-js` polyfills from any polyfills files in a workspace. Specifically, it looks for `import 'classlist.js';` and `import 'web-animations-js';`, then removes those them along with any preceeding comments (aside from the file overview and browser polyfills header comment).
Previous versions of `ng new` generated a polyfills file with commented out imports for both modules, to avoid including them by default while giving users an easy way to enable them. This migration also looks for these commented out imports and removes them along with associated descriptive comments. This has no effect on the application, but cleans up unnecessary noise from the polyfills file.
BREAKING CHANGE:
`classlist.js` and `web-animations-js` are removed from application polyfills and uninstalled from the package. These were only needed for compatibility with Internet Explorer, which is no longer needed now that Angular only supports evergreen browsers. See: https://angular.io/guide/browser-support.
Add the following to the polyfills file for an app to re-add these packages:
```typescript
import 'classlist.js';
import 'web-animations-js';
```
And then run:
```sh
npm install classlist.js web-animations-js --save
```
This removes polyfills only required on Internet Explorer since it is no longer supported (`web-animations-js`). Also updates the doc comment to leave specific versions unspecified, since they are already out of date and updating them now would just cause them to go out of date again in the future. Instead, users can visit the browser support guide to understand find the most up to date browser versions supported.
BREAKING CHANGE: With this change a number of deprecated dev-server builder options which proxied to the browser builder have been removed. These options should be configured in the browser builder instead.
The removed options are:
- `aot`
- `sourceMap`
- `deployUrl`
- `baseHref`
- `vendorChunk`
- `commonChunk`
- `optimization`
- `progress`
With the Angular framework supporting rxjs 7 for Angular 13, new projects (`ng new ...`) can now be created using rxjs 7. rxjs 6 is also still fully supported with Angular 13 allowing existing projects to continue to use rxjs 6 if preferred or required.
Support for rxjs 7 within the framework was enabled via https://github.com/angular/angular/pull/42991
Previously, browserslist configuration was not added in library projects. This in some cases caused a large number of CSS prefixes to be included in components stylesheets
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
This migration updates libraries to be published in partial mode instead of view engine. Also, it removed deprecated options from ng-packagr configuration.
With this change we update service worker ngsw-config resources extensions.
- Remove `eot`. Old IE font format. Not supported by browsers which support service worker.
- Remove `ani`. Not supported by browsers.
- Add `jpeg` as common alias for `jpg`.
- Add `apng` as modern alternative to `gif`.
- Add `avif` a modern image format.
Closes#21526
With this change we removed several deprecated `@schematics/angular` deprecated options.
BREAKING CHANGE:
We removed several deprecated `@schematics/angular` deprecated options.
- `lintFix` have been removed from all schematics. `ng lint --fix` should be used instead.
- `legacyBrowsers` have been removed from the `application` schematics since IE 11 is no longer supported.
- `configuration` has been removed from the `web-worker` as it was unused.
- `target` has been removed from the `service-worker` as it was unused.
With this change we improve the versions we set in the users project to be less confusing. Previously, for both stable and next versions we set the versions of Angular packages to the below;
```
"@angular/animations": "~12.2.0-"
```
This might be problematic as one might not immediately notice that they might depend on a prerelease. The `-` is short character and can be missed when having a large set of dependencies.
With this can we are more explicate by adding `--next` when it's a prerelease and omit the suffix for stable releases.
With this change we sync workspace and library schematic dependencies using Renovate. We do this to avoid having to keep these in sync by hand.
We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe. But `ts_library` doesn't support JSON inputs.
An internal schematics helper rule has been introduced for Angular schematics that only generate a set of project files from a set of templated files. Multiple current generation schematics contained essentially the same code which increased the sustainment burden and made refactoring and improvements more complicated.
This is not the first time, that this package caused a breaking change in a minor version, were it drops support for older `jasmine-core` versions.
Related to #21326
A keyboard user who has a problem in using a mouse, will not be able to select the `div`, because he cannot initiate the click event, which is specific to the mouse. Interactive elements like button can initiate the click event on keyboard events.
Instead of adding additional events, such as `keyup`, `keydown` or `keypress`, we replace these with a `button`.
The `nativeElement` property on a `TestBed` fixture is of type `any`. In one of the tests within a new application's spec file, the `nativeElement` is accessed but not cast to an appropriate type which results in potentially unsafe member access. The `nativeElement` is now cast as an `HTMLElement` and allows additional usage to be type checked.
In version 12.1, the framework added the `destroyAfterEach` an opt-in feature that improves tests performance and also addresses two long-standing issues.
The idea, is to have this enabled by default in the future. Related PR: https://github.com/angular/angular/pull/42566Closes#21280