Socket
Socket
Sign inDemoInstall

angular-html-parser

Package Overview
Dependencies
1
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

5.2.0

Diff

Changelog

Source

15.2.0 (2023-02-22)

Deprecations

  • Class and InjectionToken guards and resolvers are deprecated. Instead, write guards as plain JavaScript functions and inject dependencies with inject from @angular/core.

| Commit | Type | Description | | -- | -- | -- | | 926c35f4ac | docs | Deprecate class and InjectionToken and resolvers (#47924) |

common

| Commit | Type | Description | | -- | -- | -- | | 54b24eb40f | feat | Add loaderParams attribute to NgOptimizedImage (#48907) |

compiler-cli

| Commit | Type | Description | | -- | -- | -- | | 0cf11167f1 | fix | incorrectly detecting forward refs when symbol already exists in file (#48988) |

core

| Commit | Type | Description | | -- | -- | -- | | a154db8a81 | feat | add ng generate schematic to convert declarations to standalone (#48790) | | 345e737daa | feat | add ng generate schematic to convert to standalone bootstrapping APIs (#48848) | | e7318fc758 | feat | add ng generate schematic to remove unnecessary modules (#48832) |

language-service

| Commit | Type | Description | | -- | -- | -- | | 4ae384fd61 | feat | Allow auto-imports of a pipe via quick fix when its selector is used, both directly and via reexports. (#48354) | | 141333411e | feat | Introduce a new NgModuleIndex, and use it to suggest re-exports. (#48354) | | d0145033bd | fix | generate forwardRef for same file imports (#48898) |

migrations

| Commit | Type | Description | | -- | -- | -- | | 2796230e95 | fix | add enum in mode option in standalone schema (#48851) | | 816e76a578 | fix | automatically prune root module after bootstrap step (#49030) | | bdbf21d04b | fix | avoid generating imports with forward slashes (#48993) | | 32cf4e5cb9 | fix | avoid internal modules when generating imports (#48958) | | 521ccfbe6c | fix | avoid interrupting the migration if language service lookup fails (#49010) | | a40cd47aa7 | fix | avoid modifying testing modules without declarations (#48921) | | 1afa6ed322 | fix | don't add ModuleWithProviders to standalone test components (#48987) | | c98c6a8452 | fix | don't copy animations modules into the imports of test components (#49147) | | 8389557848 | fix | don't copy unmigrated declarations into imports array (#48882) | | f82bdc4b01 | fix | don't delete classes that may provide dependencies transitively (#48866) | | 759db12e0b | fix | duplicated comments on migrated classes (#48966) | | ba38178d19 | fix | generate forwardRef for same file imports (#48898) | | 03fcb36cfd | fix | migrate HttpClientModule to provideHttpClient() (#48949) | | 2de6dae16d | fix | migrate RouterModule.forRoot with a config object to use features (#48935) | | 770191cf1f | fix | migrate tests when switching to standalone bootstrap API (#48987) | | c7926b5773 | fix | move standalone migrations into imports (#48987) | | 65c74ed93e | fix | normalize paths to posix (#48850) | | 6377487b1a | fix | only exclude bootstrapped declarations from initial standalone migration (#48987) | | e9e4449a43 | fix | preserve tsconfig in standalone migration (#48987) | | ffad1b49d9 | fix | reduce number of files that need to be checked (#48987) | | ba7a757cc5 | fix | return correct alias when conflicting import exists (#49139) | | 49a7c9f94a | fix | standalone migration incorrectly throwing path error for multi app projects (#48958) | | 584976e6c8 | fix | support --defaults in standalone migration (#48921) | | 03f47ac901 | fix | use consistent quotes in generated imports (#48876) | | ebae506d89 | fix | use import remapper in root component (#49046) | | 40c976c909 | fix | use NgForOf instead of NgFor (#49022) | | 4ac25b2aff | perf | avoid re-traversing nodes when resolving bootstrap call dependencies (#49010) | | 26cb7ab2e6 | perf | speed up language service lookups (#49010) |

platform-browser

| Commit | Type | Description | | -- | -- | -- | | bf4ad38117 | fix | remove styles from DOM of destroyed components (#48298) |

platform-server

| Commit | Type | Description | | -- | -- | -- | | 25e220a23a | fix | avoid duplicate TransferState info after renderApplication call (#49094) |

router

| Commit | Type | Description | | -- | -- | -- | | 31b94c762f | feat | Add a withNavigationErrorHandler feature to provideRouter (#48551) | | dedac8d3f7 | feat | Add test helper for trigger navigations in tests (#48552) |

Special Thanks

Alan Agius, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dylan Hunn, Ikko Eltociear Ashimine, Ilyass, Jessica Janiuk, Joey Perrott, John Manners, Kalbarczyk, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Virginia Dooley, Walid Bouguima, cexbrayat and mgechev

<!-- CHANGELOG SPLIT MARKER -->

<a name="15.1.5"></a>

sosukesuzuki
published 5.1.0 •

Changelog

Source

15.1.0 (2023-01-10)

Deprecations

router

  • CanLoad guards in the Router are deprecated. Use CanMatch instead.

  • router writable properties

    The following strategies are meant to be configured by registering the application strategy in DI via the providers in the root NgModule or bootstrapApplication:

    • routeReuseStrategy
    • titleStrategy
    • urlHandlingStrategy

    The following options are meant to be configured using the options available in RouterModule.forRoot or provideRouter.

    • onSameUrlNavigation
    • paramsInheritanceStrategy
    • urlUpdateStrategy
    • canceledNavigationResolution

    The following options are available in RouterModule.forRoot but not available in provideRouter:

    • malformedUriErrorHandler - This was found to not be used anywhere internally.
    • errorHandler - Developers can instead subscribe to Router.events and filter for NavigationError.

common

| Commit | Type | Description | | -- | -- | -- | | fe50813664 | feat | Add BrowserPlatformLocation to the public API (#48488) | | 2f4f0638c7 | fix | Add data attribtue to NgOptimizedImage (#48497) |

compiler

| Commit | Type | Description | | -- | -- | -- | | a532d71975 | feat | allow self-closing tags on custom elements (#48535) | | caf7228f8a | fix | resolve deprecation warning (#48652) | | 33f35b04ef | fix | type-only symbols incorrectly retained when downlevelling custom decorators (#48638) |

compiler-cli

| Commit | Type | Description | | -- | -- | -- | | caedef0f5b | fix | update @babel/core dependency and lock version (#48634) |

core

| Commit | Type | Description | | -- | -- | -- | | 6acae1477a | feat | Add TestBed.runInInjectionContext to help test functions which use inject (#47955) | | 38421578a2 | feat | Make the isStandalone() function available in public API (#48114) | | dd42974b07 | feat | support TypeScript 4.9 (#48005) |

forms

| Commit | Type | Description | | -- | -- | -- | | 8aa8b4b77c | fix | Form provider FormsModule.withConfig return a FormsModule (#48526) |

language-service

| Commit | Type | Description | | -- | -- | -- | | 5f0b53c735 | feat | Allow auto-imports to suggest multiple possible imports. (#47787) | | 6a8ea29a04 | fix | expose package.json for vscode extension resolution (#48678) | | ce8160ecb2 | fix | Prevent crashes on unemitable references (#47938) | | e615b598ba | fix | ship /api entry-point (#48670) | | 6ce7d76a0e | fix | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48663) |

localize

| Commit | Type | Description | | -- | -- | -- | | a1a8e91eca | fix | add triple slash type reference on @angular/localize on `ng add (#48502) |

migrations

| Commit | Type | Description | | -- | -- | -- | | cc284afbbc | fix | combine newly-added imports in import manager (#48620) |

router

| Commit | Type | Description | | -- | -- | -- | | 228e992db7 | docs | Deprecate canLoad guards in favor of canMatch (#48180) | | 0a8b8a66cd | docs | Deprecate public members of Router that are meant to be configured elsewhere (#48006) | | 332461bd0c | feat | Add ability to override onSameUrlNavigation default per-navigation (#48050) | | f58ad86e51 | feat | Add feature provider for enabling hash navigation (#48301) | | 73f03ad2d2 | feat | Add new NavigationSkipped event for ignored navigations (#48024) | | 3fe75710d9 | fix | page refresh should not destroy history state (#48540) |

Special Thanks

Alan Agius, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bob Watson, Charles Lyding, Derek Cormier, Doug Parker, Dylan Hunn, George Kalpakas, Greg Magolan, Jessica Janiuk, JiaLiPassion, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Renan Ferro, Tim Gates, Vadim, Virginia Dooley, ced, mgechev, piyush132000, robertIsaac and sr5434

<!-- CHANGELOG SPLIT MARKER -->

<a name="15.0.4"></a>

fisker
published 5.0.2 •

Changelog

Source

15.0.2 (2022-11-30)

compiler-cli

| Commit | Type | Description | | -- | -- | -- | | 86a21f5569 | fix | accept inheriting the constructor from a class in a library (#48156) |

Special Thanks

Alan Agius, Andrew Scott, Aristeidis Bampakos, Bob Watson, Derek Cormier, JoostK, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Rokas Brazdžionis, mgechev and piyush132000

<!-- CHANGELOG SPLIT MARKER -->

<a name="15.0.1"></a>

sosukesuzuki
published 5.0.1 •

Changelog

Source

15.0.1 (2022-11-22)

common

| Commit | Type | Description | | -- | -- | -- | | 930af9dd26 | fix | Fix MockPlatformLocation events and missing onPopState implementation (#48113) |

forms

| Commit | Type | Description | | -- | -- | -- | | b342e55509 | fix | don't mutate validators array (#47830) | | a12a120272 | fix | FormBuilder.group return right type with shorthand parameters. (#48084) |

language-service

| Commit | Type | Description | | -- | -- | -- | | cc8b76ef7c | fix | correctly handle host directive inputs/outputs (#48147) | | a8c33bf931 | fix | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48120) |

router

| Commit | Type | Description | | -- | -- | -- | | e4309d57d8 | fix | correct type of nextState parameter in canDeactivate (#48038) | | 9baefd085f | fix | Ensure renavigating in component init works with enabledBlocking (#48063) | | fa5528fb5f | fix | restore 'history.state' on popstate even if navigationId missing (#48033) |

Special Thanks

Alan Agius, Andrew Scott, Bjarki, Bob Watson, Brooke, Derek Cormier, Dylan Hunn, George Kalpakas, Greg Magolan, Ikko Ashimine, Ivan Rodriguez, Jessica Janiuk, Joe Roxbury, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Mikhail Savchuk, Nebojsa Cvetkovic, Pawel Kozlowski, Volodymyr and Wooshaah

<!-- CHANGELOG SPLIT MARKER -->

<a name="12.2.17"></a>

sosukesuzuki
published 5.0.0 •

Changelog

Source

15.0.0 (2022-11-16)

Blog post "Angular v15 is now available".

Breaking Changes

compiler

  • Keyframes names are now prefixed with the component's "scope name". For example, the following keyframes rule in a component definition, whose "scope name" is host-my-cmp:

    @keyframes foo { ... }

    will become:

    @keyframes host-my-cmp_foo { ... }

    Any TypeScript/JavaScript code which relied on the names of keyframes rules will no longer match.

    The recommended solutions in this case are to either:

    • change the component's view encapsulation to the None or ShadowDom
    • define keyframes rules in global stylesheets (e.g styles.css)
    • define keyframes rules programmatically in code.

compiler-cli

  • Invalid constructors for DI may now report compilation errors

    When a class inherits its constructor from a base class, the compiler may now report an error when that constructor cannot be used for DI purposes. This may either be because the base class is missing an Angular decorator such as @Injectable() or @Directive(), or because the constructor contains parameters which do not have an associated token (such as primitive types like string). These situations used to behave unexpectedly at runtime, where the class may be constructed without any of its constructor parameters, so this is now reported as an error during compilation.

    Any new errors that may be reported because of this change can be resolved either by decorating the base class from which the constructor is inherited, or by adding an explicit constructor to the class for which the error is reported.

  • Angular compiler option enableIvy has been removed as Ivy is the only rendering engine.

core

  • Angular no longer supports Node.js versions 14.[15-19].x and 16.[10-12].x. Current supported versions of Node.js are 14.20.x, 16.13.x and 18.10.x.
  • TypeScript versions older than 4.8 are no longer supported.
  • Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
  • Existing iframe usages may have src or srcdoc preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.

forms

  • setDisabledState will always be called when a ControlValueAccessor is attached. You can opt-out with FormsModule.withConfig or ReactiveFormsModule.withConfig.

localize

    • canParse method has been removed from all translation parsers in @angular/localize/tools. analyze should be used instead.
    • the hint parameter in theparse methods is now mandatory.

router

  • Previously, the RouterOutlet would immediately instantiate the component being activated during navigation. Now the component is not instantiated until the change detection runs. This could affect tests which do not trigger change detection after a router navigation. In rarer cases, this can affect production code that relies on the exact timing of component availability.
  • The title property is now required on ActivatedRouteSnapshot
  • relativeLinkResolution is no longer configurable in the Router. This option was used as a means to opt out of a bug fix.

Deprecations

common

  • The DATE_PIPE_DEFAULT_TIMEZONE token is now deprecated in favor of the DATE_PIPE_DEFAULT_OPTIONS token, which accepts an object as a value and the timezone can be defined as a field (called timezone) on that object.

core

    • The ability to pass an NgModule to the providedIn option for @Injectable and InjectionToken is now deprecated.

    providedIn: NgModule was intended to be a tree-shakable alternative to NgModule providers. It does not have wide usage, and in most cases is used incorrectly, in circumstances where providedIn: 'root' should be preferred. If providers should truly be scoped to a specific NgModule, use NgModule.providers instead.

    • The ability to set providedIn: 'any' for an @Injectable or InjectionToken is now deprecated.

    providedIn: 'any' is an option with confusing semantics and is almost never used apart from a handful of esoteric cases internal to the framework.

  • The bit field signature of Injector.get() has been deprecated, in favor of the new options object.

  • The bit field signature of TestBed.inject() has been deprecated, in favor of the new options object.

router

  • The RouterLinkWithHref directive is deprecated, use the RouterLink directive instead. The RouterLink contains the code from the RouterLinkWithHref to handle elements with href attributes.

common

| Commit | Type | Description | | -- | -- | -- | | c0c7efaf7c | feat | add provideLocationMocks() function to provide Location mocks (#47674) | | 75e6297f09 | feat | add <link> preload tag on server for priority img (#47343) | | 4fde292bb5 | feat | Add automatic srcset generation to ngOptimizedImage (#47547) | | 9483343ebf | feat | Add fill mode to NgOptimizedImage (#47738) | | bdb5371033 | feat | add injection token for default DatePipe configuration (#47157) | | 449d29b701 | fix | Add fetchpriority to ngOptimizedImage preloads (#48010) | | 4f52d4e474 | fix | don't generate srcset if noopImageLoader is used (#47804) | | 3a18398d83 | fix | Don't warn about image distortion is fill mode is enabled (#47824) | | edea15f2c6 | fix | export the IMAGE_CONFIG token (#48051) | | 8abf1c844c | fix | fix formatting on oversized image error (#47188) | | ca7bf65933 | fix | rename rawSrc -> ngSrc in NgOptimizedImage directive (#47362) | | b3879dbf14 | fix | support density descriptors with 2+ decimals (#47197) | | fa4798095e | fix | update size error to mention 'fill' mode (#47797) | | 23f210c0ab | fix | warn if using supported CDN but not built-in loader (#47330) | | 945432e3fa | fix | Warn on fill ngOptimizedImage without height (#48036) |

compiler

| Commit | Type | Description | | -- | -- | -- | | 051f75648d | fix | scope css keyframes in emulated view encapsulation (#42608) | | 39b72e208b | fix | update element schema (#47552) | | 48b354a83e | fix | update element schema (#47552) |

compiler-cli

| Commit | Type | Description | | -- | -- | -- | | bc54687c7b | fix | exclude abstract classes from strictInjectionParameters requirement (#44615) | | 309b2cde51 | fix | implement more host directive validations as diagnostics (#47768) | | 2e1dddec45 | fix | support hasInvalidatedResolutions. (#47585) | | 19ad4987f9 | fix | use @ts-ignore. (#47636) | | 8fcadaad48 | perf | cache source file for reporting type-checking diagnostics (#47471) | | 16f96eeabf | refactor | remove enableIvy options (#47346) |

core

| Commit | Type | Description | | -- | -- | -- | | e3cef4a784 | docs | deprecate providedIn: NgModule and providedIn: 'any' (#47616) | | 1b9fd46d14 | feat | add support for Node.js version 18 (#47730) | | ed11a13c3c | feat | drop support for TypeScript 4.6 and 4.7 (#47690) | | db28badfe6 | feat | enable the new directive composition API (#47642) | | 7de1469be6 | feat | introduce EnvironmentProviders wrapper type (#47669) | | 841c8e5138 | feat | support object-based DI flags in Injector.get() (#46761) | | 120555a626 | feat | support object-based DI flags in TestBed.inject() (#46761) | | 96c0e42e61 | fix | allow readonly arrays for standalone imports (#47851) | | 28f289b825 | fix | hardening attribute and property binding rules for <iframe> elements (#47964) | | d4b3c0b47c | fix | hardening rules related to the attribute order on iframe elements (#47935) | | 85330f3fd9 | fix | update isDevMode to rely on ngDevMode (#47475) |

forms

| Commit | Type | Description | | -- | -- | -- | | a8569e3802 | feat | export forms utility functions: isFormArray, isFormGroup… (#47718) | | 96b7fe93af | fix | call setDisabledState on ControlValueAcessor when control is enabled (#47576) | | a99d9d67f3 | fix | don't mutate validators array (#47830) | | 2625dc1312 | fix | Improve a very commonly viewed error message by adding a guide. (#47969) | | ae29f98c20 | fix | Runtime error pages must begin with leading zero (#47991) |

http

| Commit | Type | Description | | -- | -- | -- | | 3ba99e286a | feat | allow for child HttpClients to request via parents (#47502) | | 84d0d33c35 | feat | introduce provideHttpClientTesting provider function (#47502) | | 62c7a7a16e | feat | introduce functional interceptors (#47502) | | e47b129070 | feat | introduce the provideHttpClient() API (#47502) | | ea16a98dfe | fix | better handle unexpected undefined XSRF tokens (#47683) | | e7b48da713 | fix | rename withLegacyInterceptors to withInterceptorsFromDi (#47901) |

language-service

| Commit | Type | Description | | -- | -- | -- | | bebef5fb43 | feat | Quick fix to import a component when its selector is used (#47088) | | e7ee53c541 | feat | support to fix invalid banana in box (#47393) |

localize

| Commit | Type | Description | | -- | -- | -- | | 400a6b5e37 | fix | add polyfill in polyfills array instead of polyfills.ts (#47569) | | b6fd814542 | fix | update ng add schematic to support Angular CLI version 15 (#47763) | | d36fd3d9e4 | refactor | remove deprecated canParse method from TranslationParsers (#47275) |

platform-server

| Commit | Type | Description | | -- | -- | -- | | 2908eba59c | fix | align server renderer interface with base renderer (#47868) |

router

| Commit | Type | Description | | -- | -- | -- | | 7bee28d037 | feat | add a migration to remove relativeLinkResolution usages (#47604) | | 5163e3d876 | feat | Add UrlTree constructor to public API (#47186) | | da58801f95 | feat | auto-unwrap default exports when lazy loading (#47586) | | c3f857975d | feat | make RouterOutlet name an Input so it can be set dynamically (#46569) | | f73ef21442 | feat | merge RouterLinkWithHref into RouterLink (#47630) | | 16c8f55663 | feat | migrate RouterLinkWithHref references to RouterLink (#47599) | | 07017a7bd3 | feat | prevent provideRouter() from usage in @Component (#47669) | | 79e9e8ab77 | fix | Delay router scroll event until navigated components have rendered (#47563) | | 6a88bad019 | fix | Ensure ActivatedRouteSnapshot#title has correct value (#47481) | | 7b89d95c0e | fix | Remove deprecated relativeLinkResolution (#47623) |

Special Thanks

Alan Agius, AleksanderBodurri, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Charles Lyding, Dylan Hunn, Ferdinand Malcher, George Kalpakas, Jeremy Elbourn, Jessica Janiuk, JiaLiPassion, Joey Perrott, JoostK, Kara Erickson, Kristiyan Kostadinov, Martin Probst, Matthias Weiß, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Sabareesh Kappagantu, WD Snoeijer, angular-robot[bot], arturovt, ced, dario-piotrowicz, ivanwonder and jaybell

<!-- CHANGELOG SPLIT MARKER -->

<a name="14.2.11"></a>

fisker
published 4.0.1 •

Changelog

Source

14.0.1 (2022-06-08)

bazel

| Commit | Type | Description | | -- | -- | -- | | b00d237c0e | fix | update API extractor version (#46259) | | 9a0a7bac21 | perf | reduce input files for ng_package rollup and type bundle actions (#46187) |

forms

| Commit | Type | Description | | -- | -- | -- | | dde0b7f4b3 | fix | allow FormBuilder.group(...) to accept optional fields. (#46253) |

Special Thanks

Adrien Crivelli, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dylan Hunn, Fabrizio Fallico, George Kalpakas, Jelle Bruisten, JoostK, Kristiyan Kostadinov, Krzysztof Platis, Paul Gschwendtner, Phalgun Vaddepalli, San Leen, dario-piotrowicz, mgechev and wellWINeo

<!-- CHANGELOG SPLIT MARKER -->

<a name="14.0.0"></a>

fisker
published 4.0.0 •

Changelog

Source

14.0.0 (2022-06-02)

Blog post "Angular v14 is now available".

Breaking Changes

animations

  • The AnimationDriver.getParentElement method has become required, so any implementors of this interface are now required to provide an implementation for this method. This breakage is unlikely to affect application developers, as AnimationDriver is not expected to be implemented in user code.

common

  • Adds new required class member that any implementors of the LocationStrategy will need to satisfy. Location does not depend on PlatformLocation anymore.

compiler

  • Keyframes names are now prefixed with the component's "scope name". For example, the following keyframes rule in a component definition, whose "scope name" is host-my-cmp:

    @keyframes foo { ... }

    will become:

    @keyframes host-my-cmp_foo { ... }

    Any TypeScript/JavaScript code which relied on the names of keyframes rules will no longer match.

    The recommended solutions in this case are to either:

    • change the component's view encapsulation to the None or ShadowDom
    • define keyframes rules in global stylesheets (e.g styles.css)
    • define keyframes rules programmatically in code.

core

  • Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.

  • TypeScript versions older than 4.6 are no longer supported.

  • Forms [email] input coercion

    Forms [email] input value will be considered as true if it is defined with any value rather than false and 'false'.

  • Since Ivy, TestBed doesn't use AOT summaries. The aotSummaries fields in TestBed APIs were present, but unused. The fields were deprecated in previous major version and in v14 those fields are removed. The aotSummaries fields were completely unused, so you can just drop them from the TestBed APIs usage.

forms

  • Forms classes accept a generic.

    Forms model classes now accept a generic type parameter. Untyped versions of these classes are available to opt-out of the new, stricter behavior.

  • objects with a length key set to zero will no longer validate as empty.

    This is technically a breaking change, since objects with a key length and value 0 will no longer validate as empty. This is a very minor change, and any reliance on this behavior is probably a bug anyway.

http

  • Queries including + will now actually query for + instead of space. Most workarounds involving custom codecs will be unaffected. Possible server-side workarounds will need to be undone.

  • JSONP will throw an error when headers are set on a reques

    JSONP does not support headers being set on requests. Before when a request was sent to a JSONP backend that had headers set the headers were ignored. The JSONP backend will now throw an error if it receives a request that has any headers set. Any uses of JSONP on requests with headers set will need to remove the headers to avoid the error.

platform-browser

  • This change may cause a breaking change in unit tests that are implicitly depending on a specific number and sequence of change detections in order for their assertions to pass.

  • This may break invalid calls to TransferState methods.

    This tightens parameter types of TransferState usage, and is a minor breaking change which may reveal existing problematic calls.

router

  • The type of Route.pathMatch is now stricter. Places that use pathMatch will likely need to be updated to have an explicit Route/Routes type so that TypeScript does not infer the type as string.
  • When returning a Promise from the LoadChildrenCallback, the possible type is now restricted to Type<any>|NgModuleFactory<any> rather than any.
  • initialNavigation: 'enabled' was deprecated in v11 and is replaced by initialNavigation: 'enabledBlocking'.
  • The type of component on ActivatedRoute and ActivatedRouteSnapshot includes string. In reality, this is not the case. The component cannot be anything other than a component class.
    • The type of initialUrl is set to string|UrlTree but in reality, the Router only sets it to a value that will always be UrlTree
    • initialUrl is documented as "The target URL passed into the Router#navigateByUrl() call before navigation" but the value actually gets set to something completely different. It's set to the current internal UrlTree of the Router at the time navigation occurs.
    With this change, there is no exact replacement for the old value of initialUrl because it was never intended to be exposed. Router.url is likely the best replacement for this. In more specific use-cases, tracking the finalUrl between successful navigations can also be used as a replacement.
  • Lazy loaded configs are now also validated once loaded like the initial set of routes are. Lazy loaded modules which have invalid Route configs will now error. Note that this is only done in dev mode so there is no production impact of this change.
  • When a guard returns a UrlTree, the router would previously schedule the redirect navigation within a setTimeout. This timeout is now removed, which can result in test failures due to incorrectly written tests. Tests which perform navigations should ensure that all timeouts are flushed before making assertions. Tests should ensure they are capable of handling all redirects from the original navigation.
  • Previously, resolvers were waiting to be completed before proceeding with the navigation and the Router would take the last value emitted from the resolver. The router now takes only the first emitted value by the resolvers and then proceeds with navigation. This is now consistent with Observables returned by other guards: only the first value is used.
fisker
published 3.0.0 •

fisker
published 2.1.0 •

thorn0
published 2.0.0 •

2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc