Skip to content

build: update angular #44024

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

Closed
wants to merge 2 commits into from
Closed

build: update angular #44024

wants to merge 2 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 3, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular-devkit/build-angular 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular-devkit/build-optimizer 0.1300.0-rc.3 -> 0.1300.0 age adoption passing confidence
@angular-devkit/core 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular-devkit/schematics 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/animations 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/animations-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/cdk 13.0.0-rc.2 -> 13.0.0 age adoption passing confidence
@angular/cli 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/common ^12.0.0 -> ^13.0.0 age adoption passing confidence
@angular/common 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/common-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/compiler 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/compiler-cli 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/core ^12.0.0 -> ^13.0.0 age adoption passing confidence
@angular/core 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/core-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/dev-infra-private eed375c -> 60f0cbc age adoption passing confidence
@angular/elements 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/forms 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/forms-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/material 13.0.0-rc.2 -> 13.0.0 age adoption passing confidence
@angular/platform-browser 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/platform-browser-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/platform-browser-dynamic 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/platform-browser-dynamic-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/platform-server-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/router 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@angular/router-12 12.2.11 -> 13.0.0 age adoption passing confidence
@angular/service-worker 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
@schematics/angular 13.0.0-rc.3 -> 13.0.0 age adoption passing confidence
angular/dev-infra 9277822 -> c1eb5f7 age adoption passing confidence

🔡 If you wish to disable git hash updates, add ":disableDigestUpdates" to the extends array in your config.


Release Notes

angular/angular-cli

v13.0.0

Compare Source

Breaking Changes

@​angular/cli
  • We drop support for Node.js versions prior to 12.20.
@​schematics/angular
  • 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:

import 'classlist.js';
import 'web-animations-js';

And then run:

npm install classlist.js web-animations-js --save
  • 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.
@​angular-devkit/build-angular
  • Support for karma-coverage-instanbul-reporter has been dropped in favor of the official karma coverage plugin karma-coverage.

  • Support for node-sass has been removed. sass will be used by default to compile SASS and SCSS files.

  • NG_PERSISTENT_BUILD_CACHE environment variable option no longer have effect. Configure cli.cache in the workspace configuration instead.

{
  "$schema": "./node_modules/@​angular/cli/lib/config/schema.json",
  "version": 1,
  "cli": {
    "cache": {
      "enabled": true,
      "path": ".custom-cache-path",
      "environment": "all"
    }
  }
  ...
}
  • The automatic inclusion of Angular-required ES2015 polyfills to support ES5 browsers has been removed. Previously when targetting ES5 within the application's TypeScript configuration or listing an ES5 requiring browser in the browserslist file, Angular-required polyfills were included in the built application. However, with Angular no longer supporting IE11, there are now no browsers officially supported by Angular that would require these polyfills. As a result, the automatic inclusion of these ES2015 polyfills has been removed. Any polyfills manually added to an application's code are not affected by this 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 this change we removed several deprecated builder options

  • extractCss has been removed from the browser builder. CSS is now always extracted.

  • servePathDefaultWarning and hmrWarning have been removed from the dev-server builder. These options had no effect.

  • Deprecated @angular-devkit/build-angular:tslint builder has been removed. Use https://github.com/angular-eslint/angular-eslint instead.

  • Differential loading support has been removed. With Angular no longer supporting IE11, there are now no browsers officially supported by Angular that require ES5 code. As a result, differential loading's functionality for creating and conditionally loading ES5 and ES2015+ variants of an application is no longer required.

  • TypeScript versions prior to 4.4 are no longer supported.

  • The dev-server now uses WebSockets to communicate changes to the browser during HMR and live-reloaded. If during your development you are using a proxy you will need to enable proxying of WebSockets.

  • We remove inlining of Google fonts in WOFF format since IE 11 is no longer supported. Other supported browsers use WOFF2.

@​angular-devkit/build-webpack

Note: this change only affects users depending on @angular-devkit/build-webpack directly.

@​angular-devkit/core
  • With this change we drop support for the deprecated behaviour to transform id in schemas. Use $id instead.

Note: this only effects schematics and builders authors.

  • The deprecated JSON parser has been removed from public API. jsonc-parser should be used instead.
@​angular-devkit/schematics
  • isAction has been removed without replacement as it was unused.

  • With this change we remove the following deprecated APIs

  • TslintFixTask

  • TslintFixTaskOptions

Note: this only effects schematics developers.

@​ngtools/webpack
  • Deprecated inlineStyleMimeType option has been removed from AngularWebpackPluginOptions. Use inlineStyleFileExtension instead.

  • Applications directly using the webpack-cli and not the Angular CLI to build must set the environment variable DISABLE_V8_COMPILE_CACHE=1. The @ngtools/webpack package now uses dynamic imports to provide support for the ESM @angular/compiler-cli package. The v8-compile-cache package used by the webpack-cli does not currently support dynamic import expressions and will cause builds to fail if the environment variable is not specified. Applications using the Angular CLI are not affected by this limitation.

Deprecations

  • @angular-devkit/build-optimizer

It's functionality has been included in @angular-devkit/build-angular so this package is no longer needed by the CLI and we will stop publishing the package soon. It has been an experimental (never hit 1.0.0) and internal (only used by Angular itself) package and should be not be used directly by others.

@​angular-devkit/build-angular
  • NG_BUILD_CACHE environment variable option will be removed in the next major version. Configure cli.cache in the workspace configuration instead.
@​angular/cli
Commit Type Description
9fe55752d feat officially support Node.js v16
5ad145722 fix error when updating Angular packages across multi-major migrations
e4bc35e33 fix exclude packages from ng add that contain invalid peer dependencies
e1b954d70 fix keep relative migration paths during update analysis
c3acf3cc2 fix remove unused cli project options.
77fe6c4e6 fix update engines to require node 12.20.0
8795536a3 fix update ng update output for Angular packages
d8c9f6eaf fix update the update command to fully support Node.js v16
@​schematics/angular
Commit Type Description
7ff8c5350 feat add /.angular/cache to .gitignore
3ba13f467 feat add noImplicitOverride and noPropertyAccessFromIndexSignature to workspace tsconfig
268a03b63 feat add migration to update the workspace config
7bdcd7da1 feat create new projects with rxjs 7
eac18aed7 feat drop polyfills required only for Internet Explorer now that support has been dropped for it
4f91816b2 feat migrate libraries to be published from ViewEngine to Ivy Partial compilation
5986befcd feat remove deprecated options
9fbd16655 feat remove IE 11 specific polyfills
a7b2e6f51 feat update ngsw-config resources extensions
732ef7985 fix add browserslist configuration in library projects
585adacd0 fix don't add destroyAfterEach in newly generated spec files
e58226ee9 fix don't export renderModuleFactory from server file
0ec0ad8a4 fix remove target and lib options for library tsconfig
f227e145d fix updated Angular new project version to v13.0 prerelease

Commit Type Description
5e435ff37 docs mark @angular-devkit/build-optimizer as deprecated.
@​angular-devkit/architect
Commit Type Description
09e039500 feat include workspace extensions in project metadata
@​angular-devkit/build-angular
Commit Type Description
f53bf9dc2 feat add type=module to all scripts tags
e95ecb8ab feat deprecate deployUrl
7dcfffaff feat drop support for karma-coverage-instanbul-reporter
ac3fc2752 feat drop support for node-sass
5904afd1d feat enable disk cache by default and provide configurable options
22cd9edfa feat favor es2020 main fields
7576136b2 feat remove automatic inclusion of ES5 browser polyfills
000b0e51c feat remove deprecated dev-server options
20e48a33c feat remove deprecated options
e78f6ab5d feat remove deprecated tslint builder
701214d17 feat remove differential loading support
fb1ad7c5b feat support ESM proxy configuration files for the dev server
505438cc4 feat support TypeScript 4.4
32dbf659a feat update webpack-dev-server to version 4
c1efaa17f fix calculate valid Angular versions from peerDependencies
d7af4a7b5 fix enable custom es2020 and es2015 conditional exports
f383f3201 fix ESM-interop loaded plugin creators of @angular/localize/tools not respected
7934becb5 fix generate unique webpack runtimes
b14e0a547 fix improve sourcemaps fidelity when code coverage is enabled
e19287453 fix move @angular/localize detection prior to webpack initialization
76d6d8826 fix set browserslist defaults
167eed465 fix update Angular peer dependencies to v13.0 prerelease
1d8cdf853 fix update esbuild to 0.13.12
884111ac0 fix update IE unsupported and deprecation messages
4be6537dd fix update TS/JS regexp checks to latest extensions
427a9ee97 fix update workspace tsconfig lib es2020
ea926db25 fix use es2015 when generating server bundles
13cceab8e fix use URLs for absolute import paths with ESM
4e0743c8a perf change webpack hashing function to xxhash64
cb7d156c2 perf use esbuild as a CSS optimizer for global styles
8e82263c5 perf use esbuild/terser combination to optimize global scripts
e82eef924 refactor remove WOFF handling from inline-fonts processor
@​angular-devkit/build-webpack
Commit Type Description
a0b5897d5 feat update webpack-dev-server to version 4
9efcb32e3 fix better handle concurrent dev-servers
@​angular-devkit/core
Commit Type Description
0c92ea5ca feat remove deprecated schema id handling
9874aff71 fix add missing option peer dependency on chokidar
a54e5e065 fix support Node.js v16 with NodeJsSyncHost/NodeJsAsyncHost delete operation
d722fdf1f refactor remove deprecated JSON parser
@​angular-devkit/schematics
Commit Type Description
0565ed62e feat add UpdateBuffer2 based on magic-string
8954d1152 feat remove deprecated isAction
053b7d66c feat remove deprecated tslint APIs
bdd89ae84 fix handle zero or negative length removals in update buffer
@​ngtools/webpack
Commit Type Description
d2a97f919 fix update Angular peer dependencies to v13.0 prerelease
7928b18ed perf reduce repeat path mapping analysis during resolution
8ce8e4edc refactor remove deprecated inlineStyleMimeType option
7d98ab3df refactor support an ESM-only @angular/compiler-cli package

Special Thanks

Alan Agius, Charles Lyding, Doug Parker, Douglas Parker, Joey Perrott, Kristiyan Kostadinov, Lukas Spirig and Paul Gschwendtner

angular/angular

v13.0.0

Compare Source

Breaking Changes

common
  • The behavior of the SpyLocation used by the RouterTestingModule has changed
    to match the behavior of browsers. It no longer emits a 'popstate' event
    when Location.go is called. In addition, simulateHashChange now
    triggers both a hashchange and a popstate event.
    Tests which use location.go and expect the changes to be picked up by
    the Router should likely change to simulateHashChange instead.
    Each test is different in what it attempts to assert so there is no
    single change that works for all tests. Each test using the SpyLocation to
    simulate browser URL changes should be evaluated on a case-by-case basis.
core
  • TypeScript versions older than 4.4.2 are no longer supported.

  • NodeJS versions older than v12.20.0 are no longer
    supported due to the Angular packages using the NodeJS package exports
    feature with subpath patterns.

  • The WrappedValue class can no longer be imported from @angular/core,
    which may result in compile errors or failures at runtime if outdated
    libraries are used that are still using WrappedValue. The usage of
    WrappedValue should be removed as no replacement is available.

forms
  • A new type called FormControlStatus has been introduced, which is a union of all possible status strings for form controls. AbstractControl.status has been narrowed from string to FormControlStatus, and statusChanges has been narrowed from Observable<any> to Observable<FormControlStatus>. Most applications should consume the new types seamlessly. Any breakage caused by this change is likely due to one of the following two problems: (1) the app is comparing AbstractControl.status against a string which is not a valid status; or, (2) the app is using statusChanges events as if they were something other than strings.
router
  • The default url serializer would previously drop
    everything after and including a question mark in query parameters. That
    is, for a navigation to /path?q=hello?&other=123, the query
    params would be parsed to just {q: 'hello'}. This is
    incorrect because the URI spec allows for question mark characers in
    query data. This change will now correctly parse the params for the
    above example to be {v: 'hello?', other: '123'}.

  • Previously null and undefined inputs for routerLink were
    equaivalent to empty string and there was no way to disable the link's
    navigation.
    In addition, the href is changed from a property HostBinding() to an
    attribute binding (HostBinding('attr.href')). The effect of this
    change is that DebugElement.properties['href'] will now return the
    href value returned by the native element which will be the full URL
    rather than the internal value of the RouterLink href property.

  • The router will no longer replace the browser URL when a new navigation
    cancels an ongoing navigation. This often causes URL flicker and was
    only in place to support some AngularJS hybrid applications. Hybrid
    applications which rely on the navigationId being present on initial
    navigations that were handled by the Angular router should instead
    subscribe to NavigationCancel events and perform the
    location.replaceState themselves to add navigationId to the Router
    state.
    In addition, tests which assert urlChanges on the SpyLocation may
    need to be adjusted to account for the replaceState which is no longer
    triggered.

  • It is no longer possible to use Route.loadChildren using a string
    value. The following supporting classes were removed from
    @angular/core:

  • NgModuleFactoryLoader

  • SystemJsNgModuleFactoryLoader

The @angular/router package no longer exports these symbols:

  • SpyNgModuleFactoryLoader
  • DeprecatedLoadChildren

The signature of the setupTestingRouter function from
@angular/core/testing has been changed to drop its NgModuleFactoryLoader
parameter, as an argument for that parameter can no longer be created.

service-worker
  • The return type of SwUpdate#activateUpdate and SwUpdate#checkForUpdate changed to Promise<boolean>.

Although unlikely, it is possible that this change will cause TypeScript type-checking to fail in
some cases. If necessary, update your types to account for the new
return type.

Deprecations

  • The renderModuleFactory symbol in @angular/platform-server is no longer necessary as of Angular v13.

The renderModuleFactory calls can be replaced with renderModule.

service-worker
  • The SwUpdate#activated observable is deprecated.

The SwUpdate#activated observable only emits values as a direct response to calling
SwUpdate#activateUpdate() and was only useful for determining whether the call resulted in an
update or not. Now, the return value of SwUpdate#activateUpdate() can be used to determine the
outcome of the operation and therefore using SwUpdate#activated does not offer any benefit.

  • The SwUpdate#availalbe observable is deprecated.

The new SwUpdate#versionUpdates observable provides the same information and more. Therefore, it
is possible to rebuild the same behavior as SwUpdate#availalbe using the events emitted by
SwUpdate#versionUpdates and filtering for VersionReadyEvent events.
As a result, the SwUpdate#availalbe observable is now redundant.

Commit Type Description
747553dd68 docs deprecate ViewEngine-based renderModuleFactory (#​43757)
bazel
Commit Type Description
62d7005a52 feat add strict_templates and experimental_extended_template_diagnostics to ng_module() rule (#​43582)
d977701a43 feat allow for custom conditions to be set in ng_package targets (#​43764)
4886585875 feat create transition for enabling partial compilation (#​43431)
cd1b52483e feat expose esm2020 and es2020 conditions in APF package exports (#​43740)
49b82ae561 feat implement partial compilation APF v13 for ng_package rule (#​43431)
274cb38e0b feat switch prodmode output to ES2020 (#​43431)
73ac50c447 feat wire up partial compilation build setting in ng_module (#​43431)
e0a72857cc fix construct a manifest file even when warnings are emitted (#​43582)
dbe656d1e0 fix ngc-wrapped should not rely on linker for external workspaces (#​43690)
common
Commit Type Description
adf4481211 feat add injection token for default date pipe timezone (#​43611)
c6a93001eb fix synchronise location mock behavior with the navigators (#​41730)
compiler
Commit Type Description
14b492df26 fix do not error if $any is used inside a listener (#​43866)
compiler-cli
Commit Type Description
bed121c34f feat inline resources when generating class metadata calls (#​43178)
263feba5c2 fix handle nullable expressions correctly in the nullish coalescing extended template diagnostic (#​43572)
8f7fdc59af fix not evaluating new signature for __spreadArray ([#&#820

Configuration

📅 Schedule: "after 10pm every weekday,before 4am every weekday,every weekend" in timezone America/Tijuana.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added action: review The PR is still awaiting reviews from at least one requested reviewer area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release labels Nov 3, 2021
@google-cla google-cla bot added the cla: yes label Nov 3, 2021
@ngbot ngbot bot modified the milestone: Backlog Nov 3, 2021
@renovate renovate bot force-pushed the renovate/angular branch from 749d2bb to c6f2668 Compare November 3, 2021 06:44
@devversion devversion self-requested a review November 3, 2021 13:58
@renovate renovate bot force-pushed the renovate/angular branch from c6f2668 to 661bb65 Compare November 3, 2021 19:40
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@google-cla

This comment has been minimized.

@google-cla google-cla bot added cla: no and removed cla: yes labels Nov 3, 2021
@josephperrott
Copy link
Member

@googlebot I consent

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 3, 2021
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We should add the v12 package aliases to the renovate ignore list

@alxhub alxhub added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 3, 2021
@alxhub
Copy link
Member

alxhub commented Nov 3, 2021

This PR was merged into the repository by commit 595a7e3.

@alxhub alxhub closed this in 595a7e3 Nov 3, 2021
@josephperrott josephperrott deleted the renovate/angular branch November 3, 2021 22:09
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project cla: yes target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants