Skip to content
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

chore(deps): update dependency @angular/compiler-cli to v10 - autoclosed #482

Conversation

mend-for-github-com[bot]
Copy link

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular/compiler-cli ^9.0.0 -> ^10.0.0 age adoption passing confidence

By merging this PR, the below vulnerabilities will be automatically resolved:

Severity CVSS Score CVE
High High 7.5 CVE-2021-3807

Release Notes

angular/angular

v10.0.0

Compare Source

Blog post "Version 10 of Angular Now Available".

Release Highlights & Update instructions

To learn about the release highlights and our CLI-powered automated update workflow for your projects please check out the v10 release announcement.

Features
Bug Fixes
Code Refactoring
Performance Improvements
Dependency updates

@​angular/compiler-cli now requires:

  • TypeScript 3.9
BREAKING CHANGES
  • TypeScript 3.6, 3.7 and 3.8 are no longer supported, please update to TypeScript 3.9.
  • core: Angular npm packages no longer contain jsdoc comments
    to support Closure Compiler's advanced optimizations

The support for Closure Compiler in Angular packages has been
experimental and broken for quite some time.

As of TS3.9, Closure is unusable with the JavaScript emit. Please follow
microsoft/TypeScript#38374 for more
information and updates.

If you used Closure Compiler with Angular in the past, you will likely
be better off consuming Angular packages built from sources directly
rather than consuming the version we publish on npm,
which is primarily optimized for Webpack/Rollup + Terser build pipeline.

As a temporary workaround, you might consider using your current build
pipeline with Closure flag --compilation_level=SIMPLE. This flag
will ensure that your build pipeline produces buildable and
runnable artifacts, at the cost of increased payload size due to
advanced optimizations being disabled.

If you were affected by this change, please help us understand your
needs by leaving a comment on https://github.com/angular/angular/issues/37234.

  • core: make generic mandatory for ModuleWithProviders

A generic type parameter has always been required for the ModuleWithProviders pattern to work with Ivy, but prior to this commit, View Engine allowed the generic type to be omitted (though support was officially deprecated).
If you're using ModuleWithProviders without a generic type in your application code, a v10 migration will update your code for you.

However, if you are using View Engine and also depending on a library that omits the generic type, you will now get a build time error similar to:

error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

In this case, ngcc won't help you (because it's Ivy-only) and the migration only covers application code.
You should contact the library author to fix their library to provide a type parameter when they use this class.

As a workaround, we suggest setting skipLibChecks to false in your tsconfig or updating your app to use Ivy.

  • forms: Number inputs no longer listen to the change event.

Tests which trigger change events need to be updated to trigger input events instead.

The change event was in place to support IE9, as we found that input events were not fired with backspace or cut actions. If you need to maintain IE9 support, you will need to add a change event listener to number inputs and call the onChange method of NumberValueAccessor manually.

Lastly, old versions of WebDriver would synthetically trigger the change event on WebElement.clear and WebElement.sendKeys. If you are using an old version of WebDriver, you may need to update tests to ensure input events are triggered. For example, you could use element.sendKeys(Keys.chord(Keys.CONTROL, "a"), Keys.BACK_SPACE); in place of element.clear().

  • forms: The minLength and maxLength validators now verify that the form control's value has a
    numeric length property, and only validate for length if that's the case.

Previously, falsey values without the length property (such as 0 or
false values) were triggering validation errors. If your code relies on
the old behavior, you can include other validators such as min or
requiredTrue to the list of validators for a particular field.

  • bazel: esm5 and fesm5 format is no longer distributed in
    Angular's npm packages e.g. @​angular/core

If you are not using Angular CLI to build your application or library,
and you need to be able to build es5 artifacts, then you will need to
downlevel the distributed Angular code to es5 on your own.

Angular CLI will automatically downlevel the code to es5 if differential
loading is enabled in the Angular project, so no action is required from
Angular CLI users.

  • core: Warnings about unknown elements are now logged as errors. This won't break your app, but it may trip up tools that expect nothing to be logged via console.error.
  • router: Any resolver which return EMPTY will cancel navigation.
    If you want to allow the navigation to continue, you will need to update the resolvers to emit
    some value, (i.e. defaultIfEmpty(...), of(...), etc).
  • service-worker: Previously, Vary
    headers would be taken into account when retrieving resources from the
    cache, completely preventing the retrieval of cached assets (due to
    ServiceWorker implementation details) and leading to unpredictable
    behavior due to inconsistent/buggy implementations in different
    browsers.

Now, Vary headers are ignored when retrieving resources from the
ServiceWorker caches, which can result in resources being retrieved even
when their headers are different. If your application needs to
differentiate its responses based on request headers, please make sure
the Angular ServiceWorker is configured
to avoid caching the affected resources.

  • common: This change could result in ExpressionChangedAfterItHasBeenChecked errors that
    were not detected before. The error could previously have gone undetected
    because two WrappedValues are considered "equal" in all cases for the purposes
    of the check, even if their respective unwrapped values are not.

Additionally, [val]=(observable | async).someProperty will no longer
trigger change detection if the value of someProperty is identical to
the value in the previous emit. If you need to force change detection,
either update the binding to use an object whose reference changes or
subscribe to the observable and call markForCheck as needed.

  • common: format day-periods that cross midnight

    When formatting a time with the b or B format codes, the rendered
    string was not correctly handling day periods that spanned midnight.
    Instead the logic was falling back to the default case of AM.

    Now the logic has been updated so that it matches times that are within
    a day period that spans midnight, so it will now render the correct
    output, such as at night in the case of English.

    Applications that are using either formatDate() or DatePipe and any
    of the b or B format codes will be affected by this change.

  • router: UrlMatcher's type now reflects that it could always return
    null.

    If you implemented your own Router or Recognizer class, please update it to
    handle matcher returning null.

9.1.11 (2020-06-10)

Reverts
  • elements: fire custom element output events during component initialization (dc9da17)

9.1.10 (2020-06-09)

Bug Fixes
Performance Improvements

9.1.9 (2020-05-20)

This release contains a re-submit of the following 3 commits with fixes for TS 3.8.

Bug Fixes

9.1.8 (2020-05-20)

Bug Fixes

9.1.7 (2020-05-13)

This release contains various API docs improvements.

9.1.6 (2020-05-08)

Bug Fixes
  • compiler-cli: Revert "fix(compiler-cli): fix case-sensitivity issues in NgtscCompilerHost (#​36968)" (#​37003)

9.1.5 (2020-05-07)

Bug Fixes

@mend-for-github-com mend-for-github-com bot added the security fix Security fix generated by WhiteSource label Feb 5, 2022
@mend-for-github-com mend-for-github-com bot changed the title chore(deps): update dependency @angular/compiler-cli to v10 chore(deps): update dependency @angular/compiler-cli to v10 - autoclosed Feb 6, 2022
@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/angular-compiler-cli-10.x branch February 6, 2022 02:19
@mend-for-github-com mend-for-github-com bot changed the title chore(deps): update dependency @angular/compiler-cli to v10 - autoclosed chore(deps): update dependency @angular/compiler-cli to v10 Feb 7, 2022
@mend-for-github-com mend-for-github-com bot restored the whitesource-remediate/angular-compiler-cli-10.x branch February 7, 2022 19:48
@mend-for-github-com mend-for-github-com bot reopened this Feb 7, 2022
@mend-for-github-com mend-for-github-com bot changed the title chore(deps): update dependency @angular/compiler-cli to v10 chore(deps): update dependency @angular/compiler-cli to v10 - autoclosed Feb 8, 2022
@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/angular-compiler-cli-10.x branch February 8, 2022 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security fix Security fix generated by WhiteSource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants