Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

[Snyk] Upgrade @angular/common from 17.3.1 to 19.0.0 #159

Closed

Conversation

chevvak2
Copy link
Contributor

snyk-top-banner

Snyk has created this PR to upgrade @angular/common from 17.3.1 to 19.0.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


⚠️ Warning: This PR contains major version upgrade(s), and may be a breaking change.

  • The recommended version is 79 versions ahead of your current version.

  • The recommended version was released on 25 days ago.

Release notes
Package name: @angular/common
  • 19.0.0 - 2024-11-19

    19.0.0 (2024-11-19)

    Explore Angular v19 with a blog post from the Angular team: https://blog.angular.dev/meet-angular-v19-7b29dfd05b84

    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

    • Angular directives, components and pipes are now standalone by default.

      • Specify standalone: false for declarations that are currently declared in @ NgModules.
      • ng update for v19 will take care of this automatically.
    • TypeScript versions less than 5.5 are no longer supported.

    • Timing changes for effect API (in developer preview):

      • 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.

    • ExperimentalPendingTasks has been renamed to PendingTasks.

    • 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.

    • createComponent will now 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.
      // 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.

    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)

Snyk has created this PR to upgrade @angular/common from 17.3.1 to 19.0.0.

See this package in npm:
@angular/common

See this project in Snyk:
https://app.snyk.io/org/labshare-bot/project/303924b3-73a2-406b-aa4e-4b7c06693a59?utm_source=github&utm_medium=referral&page=upgrade-pr
@tsheils tsheils closed this Dec 16, 2024
@tsheils tsheils deleted the snyk-upgrade-cc3ca88b15e69e2f2378075a2e691d6b branch December 16, 2024 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants