yarn @angular/platform-browser-dynamic 19.0.0
v19.0.0

14 hours ago

19.0.0 (2024-11-19)

common

Commit Description
feat - 24c6373820 add optional rounded transform support in cloudinary image loader (#55364)
feat - 50f08e6c4b automatically use sizes auto in NgOptimizedImage (#57479)
feat - 13c13067bc disable keyvalue sorting using null compareFn (#57487)

compiler

Commit Description
feat - a2e4ee0cb3 add diagnostic for unused standalone imports (#57605)
feat - 0c9d721ac1 add support for the typeof keyword in template expressions. (#58183)
fix - 09f589f000 this.a should always refer to class property a (#55183)
fix - 98804fd4be add more specific matcher for hydrate never block (#58360)
fix - b25121ee4a avoid having to duplicate core environment (#58444)
fix - 560282aa9b control flow nodes with root at the end projected incorrectly (#58607)
fix - 2be161d015 fix :host parsing in pseudo-selectors (#58681)
fix - 806a61b5a6 fix multiline selectors (#58681)
fix - a3cb530d84 handle typeof expressions in serializer (#58217)
fix - ba4340875a ignore placeholder-only i18n messages (#58154)
fix - e5d3abb298 resolve :host:host-context(.foo) (#58681)
fix - 80f56954ce transform chained pseudo-selectors (#58681)

compiler-cli

Commit Description
feat - d9687f43dd 'strictStandalone' flag enforces standalone (#57935)
feat - 9e87593055 ensure template style elements are preprocessed as inline styles (#57429)
feat - 231e6ff6ca generate the HMR replacement module (#58205)
fix - dbe612f2cd disable standalone by default on older versions of Angular (#58405)
fix - d4d76ead80 do not fail fatal when references to non-existent module are discovered (#58515)
fix - 33fe252c58 do not report unused declarations coming from an imported array (#57940)
fix - fb44323c51 incorrectly generating relative file paths on case-insensitive platforms (#58150)
fix - 22cd6869ef make the unused imports diagnostic easier to read (#58468)
fix - 9bbb01c85e report individual diagnostics for unused imports (#58589)
perf - 4716c3b966 reduce duplicate component style resolution (#57502)

core

Commit Description
feat - 6ea8e1e9aa Add a schematics to migrate to standalone: false. (#57643)
feat - 3ebe6b4ad4 Add async run method on ExperimentalPendingTasks (#56546)
feat - 69fc5ae922 Add incremental hydration public api (#58249)
feat - 8ebbae88ca Add rxjs operator prevent app stability until an event (#56533)
feat - 19edf2c057 add syntactic sugar for initializers (#53152)
feat - c93b510f9b allow passing undefined without needing to include it in the type argument of input (#57621)
feat - ab25a192ba allow running output migration on a subset of paths (#58299)
feat - fc59e2a7b7 change effect() execution timing & no-op allowSignalWrites (#57874)
feat - 8bcc663a53 drop support for TypeScript 5.4 (#57577)
feat - 18d8d44b1f experimental resource() API for async dependencies (#58255)
feat - 9762b24b5e experimental impl of rxResource() (#58255)
feat - 6b8c494d05 flipping the default value for standalone to true (#58169)
feat - e6e5d29e83 initial version of the output migration (#57604)
feat - be2e49639b introduce afterRenderEffect (#57549)
feat - ec386e7f12 introduce debugName optional arg to framework signal functions (#57073)
feat - 8311f00faa introduce the reactive linkedSignal (#58189)
feat - 1b1519224d mark input, output and model APIs as stable (#57804)
feat - a7eff3ffaa mark signal-based query APIs as stable (#57921)
feat - a1f229850a migrate ExperimentalPendingTasks to PendingTasks (#57533)
feat - 3f1e7ab6ae promote outputFromObservable & outputToObservable to stable. (#58214)
feat - 97c44a1d6c Promote takeUntilDestroyed to stable. (#58200)
feat - e5adf92965 stabilize @let syntax (#57813)
feat - b063468027 support TypeScript 5.6 (#57424)
feat - 819ff034ce treat directives, pipes, components as by default (#58229)
fix - ee426c62f0 allow signal write error (#57973)
fix - c095679f92 avoid breaking change with apps using rxjs 6.x (#58341)
fix - 71ee81af2c clean up event contract once hydration is done (#58174)
fix - f03d274e87 ComponentFixture autoDetect feature works like production (#55228)
fix - 950a5540f1 Ensure the ViewContext is retained after closure minification (#57903)
fix - 7b1e5be20b fallback to default ng-content with empty projectable nodes. (#57480)
fix - 0300dd2e18 Fix fixture.detectChanges with autoDetect disabled and zoneless (#57416)
fix - 5fe57d4fbb fixes issues with control flow and incremental hydration (#58644)
fix - 51933ef5a6 prevent errors on contract cleanup (#58614)
fix - fd7716440b Prevents trying to trigger incremental hydration on CSR (#58366)
fix - 656b5d3e78 Re-assign error codes to be within core bounds (<1000) (#53455)
fix - 6e0af6dbbb resolve forward-referenced host directives during directive matching (#58492)
fix - 468d3fb9b1 rethrow errors during ApplicationRef.tick in TestBed (#57200)
fix - 226a67dabb Schedulers run in zone above Angular rather than root (#57553)
perf - 97fb86d331 set encapsulation to None for empty component styles (#57130)
refactor - c15ec36bd1 remove deprecated factories Property in KeyValueDiffers (#58064)

elements

Commit Description
fix - fe5c4e086a support output()-shaped outputs (#57535)
fix - 0cebfd7462 switch to ComponentRef.setInput & remove custom scheduler (#56728)

forms

Commit Description
feat - 3e7d724037 add ability to clear a FormRecord (#50750)
fix - 18b6f3339f fix FormRecord type inference (#50750)

http

Commit Description
feat - 4b9accdf16 promote withRequestsMadeViaParent to stable. (#58221)
fix - 057cf7fb6b preserve all headers from Headers object (#57802)

language-service

Commit Description
feat - 8da9fb49b5 add code fix for unused standalone imports (#57605)
feat - 1f067f4507 add code reactoring action to migrate @Input to signal-input (#57214)
feat - 56ee47f2ec allow code refactorings to compute edits asynchronously (#57214)
feat - bc83fc1e2e support converting to signal queries in VSCode extension (#58106)
feat - 5c4305f024 support migrating full classes to signal inputs in VSCode (#57975)
feat - 6342befff8 support migrating full classes to signal queries (#58263)
fix - 7ecfd89592 The suppress diagnostics option should work for external templates (#57873)

localize

Commit Description
refactor - 9c3bd1b5d1 remove deprecated name option. (#58063)

migrations

Commit Description
feat - dff4de0f75 add a combined migration for all signals APIs (#58259)
feat - b6bc93803c add schematic to migrate to signal queries (#58032)
feat - bb286f65e7 capture output migration stats (#58321)
feat - 2bfc64daf1 expose output as function migration (#58299)
feat - 59fe9bc772 introduce signal input migration as ng generate schematic (#57805)
feat - cbec46a51d migrate .pipe calls in outputs used in tests (#57691)
feat - cf70d626cd print output migration stats in ng generate (#58321)
feat - 68e5370a66 remove complete calls for migrated outputs (#57671)
feat - 9da21f798d replace .next usage on outputs (#57654)
fix - 42607bf0f2 add outputs migration to combined shorthand (#58318)
fix - 71f5ef2aa5 change imports to be G3 compatible (#57654)
fix - e6514b9f3d do not migrate next calls in template if not an EventEmitter (#58631)
fix - c5e676bb87 flip the default standalone flag in route-lazy-loading migration (#58474)
fix - b84ed2b628 include the output migration in the defaults of the signal migration (#58635)
fix - 90c7ec39a0 inject migration always inserting generated variables before super call (#58393)
fix - 7a65cdd911 inject migration not inserting generated code after super call in some cases (#58393)
fix - 00e2001351 migrate more .next output usages (#58282)
fix - e85ac5c7cb properly bundle shared compiler code into migrations (#58515)
fix - 3a264db866 properly handle comments in output migration (#57691)
fix - 616b411a6d properly migrate output aliases (#58411)
fix - d504452e2f properly replace imports across files (#58414)
fix - c1aa411cf1 properly resolve tsconfig paths on windows (#58137)
fix - e26797b38e replace removed NgModules in tests with their exports (#58627)

platform-browser

Commit Description
fix - c36a1c023b correctly add external stylesheets to ShadowDOM components (#58482)
refactor - 5c61f46409 remove deprecated BrowserModule.withServerTransition method (#58062)

platform-server

Commit Description
fix - 9e82559de4 destroy PlatformRef when error happens during the bootstrap() phase (#58112)

router

Commit Description
feat - f271021e19 Add routerOutletData input to RouterOutlet directive (#57051)
fix - b2790813a6 Align RouterModule.forRoot errorHandler with provider error handler (#57050)
fix - a49c35ec76 remove setter for injector on OutletContext (#58343)
fix - 7436d3180e Update Resolve interface to include RedirectCommand like ResolveFn (#57309)

service-worker

Commit Description
feat - 8ddce80a0b allow specifying maxAge for entire application (#49601)
feat - 1479af978c finish implementation of refreshAhead feature (#53356)

Breaking Changes

compiler

  • this.foo property reads no longer refer to template context variables. If you intended to read the template variable, do not use this..

core

  • Generally this PR has two implications:

    • effects which are triggered outside of change detection run as part of
      the change detection process instead of as a microtask. Depending on the
      specifics of application/test setup, this can result in them executing
      earlier or later (or requiring additional test steps to trigger; see below
      examples).

    • effects which are triggered during change detection (e.g. by input
      signals) run earlier, before the component's template.

    We've seen a few common failure cases:

    • Tests which used to rely on the Promise timing of effects now need to
      await whenStable() or call .detectChanges() in order for effects to
      run.

    • Tests which use faked clocks may need to fast-forward/flush the clock to
      cause effects to run.

    • effect()s triggered during CD could rely on the application being fully
      rendered (for example, they could easily read computed styles, etc). With
      the change, they run before the component's updates and can get incorrect
      answers. The recent afterRenderEffect() API is a natural replacement for
      this style of effect.

    • effect()s which synchronize with the forms system are particularly
      timing-sensitive and might need to adjust their initialization timing.

    • TypeScript versions less than 5.5 are no longer supported.
  • ExperimentalPendingTasks has been renamed to
    PendingTasks.

  • Angular directives, components and pipes are now standalone by default. Specify for declarations that are currently declared in s. for v19 will take care of this automatically.

  • The autoDetect feature of ComponentFixture will now
    attach the fixture to the ApplicationRef. As a result, errors during
    automatic change detection of the fixture be reported to the ErrorHandler.
    This change may cause custom error handlers to observe new failures that were previously unreported.

  • Render default fallback with empty projectableNodes.

    When passing an empty array to projectableNodes in the createComponent API, the default fallback content of the ng-content will be rendered if present. To prevent rendering the default content, pass document.createTextNode('') as a projectableNode.

    For example:

    // The first ng-content will render the default fallback content if present
    createComponent(MyComponent. { projectableNodes: [[], [secondNode]] });
    
    // To prevent projecting the default fallback content:
    createComponent(MyComponent. { projectableNodes: [[document.createTextNode('')], [secondNode]] });
  • Errors that are thrown during ApplicationRef.tick
    will now be rethrown when using TestBed. These errors should be
    resolved by ensuring the test environment is set up correctly to
    complete change detection successfully. There are two alternatives to
    catch the errors:

    • Instead of waiting for automatic change detection to happen, trigger
      it synchronously and expect the error. For example, a jasmine test
      could write expect(() => TestBed.inject(ApplicationRef).tick()).toThrow()
    • TestBed will reject any outstanding ComponentFixture.whenStable promises. A jasmine test,
      for example, could write expectAsync(fixture.whenStable()).toBeRejected().

    As a last resort, you can configure errors to not be rethrown by
    setting rethrowApplicationErrors to false in TestBed.configureTestingModule.

  • The timers that are used for zone coalescing and hybrid
    mode scheduling (which schedules an application state synchronization
    when changes happen outside the Angular zone) will now run in the zone
    above Angular rather than the root zone. This will mostly affect tests
    which use fakeAsync: these timers will now be visible to fakeAsync
    and can be affected by tick or flush.

  • The deprecated factories property in KeyValueDiffers has been removed.

elements

  • as part of switching away from custom CD behavior to the
    hybrid scheduler, timing of change detection around custom elements has
    changed subtly. These changes make elements more efficient, but can cause
    tests which encoded assumptions about how or when elements would be checked
    to require updating.

localize

  • The name option in the ng add @localize`` schematic has been removed in favor of the project option.

platform-browser

  • The deprecated BrowserModule.withServerTransition method has been removed. Please use the APP_ID DI token to set the application id instead.

router

  • The Router.errorHandler property has been removed.
    Adding an error handler should be configured in either
    withNavigationErrorHandler with provideRouter or the errorHandler
    property in the extra options of RouterModule.forRoot. In addition,
    the error handler cannot be used to change the return value of the
    router navigation promise or prevent it from rejecting. Instead, if you
    want to prevent the promise from rejecting, use resolveNavigationPromiseOnError.
  • The return type of the Resolve interface now includes
    RedirectCommand.

Don't miss a new platform-browser-dynamic release

NewReleases is sending notifications on new releases.