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: bump angular from 12.x to 13 #7050

Merged
merged 15 commits into from
Dec 23, 2021
Merged

Conversation

simplejason
Copy link
Member

@simplejason simplejason commented Nov 11, 2021

close #7044

TODO

  • Upgrade to angular v13 ( Angular Update Guide )
  • Upgrade @angular/cdk to v13
  • Testing Ivy to build & tests ( CLI Issue | NG3003 Error )
  • Update official document
  • update icons to v13 @wendellhu95 , latest @13.0.0-beta.0

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@zorro-bot
Copy link

zorro-bot bot commented Nov 11, 2021

This preview will be available after the AzureCI is passed.

package.json Outdated Show resolved Hide resolved
@simplejason simplejason changed the title WIP chore: bump angular from 12.x to 13 chore: bump angular from 12.x to 13 Nov 18, 2021
@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #7050 (307a685) into master (5cd40b4) will increase coverage by 1.96%.
The diff coverage is 67.74%.

❗ Current head 307a685 differs from pull request most recent head 6921d7a. Consider uploading reports for the commit 6921d7a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7050      +/-   ##
==========================================
+ Coverage   89.71%   91.67%   +1.96%     
==========================================
  Files         488      486       -2     
  Lines       15945    15954       +9     
  Branches     2579     2589      +10     
==========================================
+ Hits        14305    14626     +321     
- Misses       1007     1014       +7     
+ Partials      633      314     -319     
Impacted Files Coverage Δ
components/menu/menu-item.directive.ts 76.38% <25.00%> (-0.43%) ⬇️
components/tabs/tabset.component.ts 91.83% <40.00%> (+2.25%) ⬆️
components/core/overlay/nz-connected-overlay.ts 80.00% <71.42%> (-5.72%) ⬇️
components/form/form-control.component.ts 95.90% <100.00%> (+2.45%) ⬆️
components/popconfirm/popconfirm.ts 98.71% <100.00%> (+2.56%) ⬆️
components/popover/popover.ts 100.00% <100.00%> (ø)
components/tooltip/base.ts 94.00% <100.00%> (+0.46%) ⬆️
components/tooltip/tooltip.ts 100.00% <100.00%> (ø)
components/test.ts
components/core/environments/environment.test.ts
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cd40b4...6921d7a. Read the comment docs.

@wzhudev
Copy link
Member

wzhudev commented Dec 14, 2021

@simplejason I updated icons in commt eb352ef.

@qtopie
Copy link

qtopie commented Dec 15, 2021

Just provide some useful links, pls check this related PR and solved issue of Angular CLI. Hope Angular 13 will be supported soon.

@bgramaje
Copy link

Hi! I can't install Ng Zorro in my angular project.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/animations
npm ERR! @angular/animations@"~13.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/animations@"^12.1.0" from [email protected]
npm ERR! node_modules/ng-zorro-antd
npm ERR! ng-zorro-antd@"12.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@simplejason
Copy link
Member Author

Hi! I can't install Ng Zorro in my angular project.

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/animations npm ERR! @angular/animations@"~13.0.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/animations@"^12.1.0" from [email protected] npm ERR! node_modules/ng-zorro-antd npm ERR! ng-zorro-antd@"12.1.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

[email protected] is not released now

@maratkalibek
Copy link

I'm curious about the release with Angular 13 support. Is this PR ready to be merged? @simplejason are you waiting only for approval? Or more work to be done in this PR?

@simplejason
Copy link
Member Author

I'm curious about the release with Angular 13 support. Is this PR ready to be merged? @simplejason are you waiting only for approval? Or more work to be done in this PR?

It's ready to merge now, only wait to review, I think v13 will be coming soon in this week.

@simplejason
Copy link
Member Author

@hsuanxyz @yangjunhan @wendellhu95 @wenqi73 Hi all, the changes about v13 have been committed, if no request changes are suggested, we can merge this PR to master today. And then we need to prepare the upgrade documentation to ensure that users can successfully upgrade from v12 to v13.

@@ -36,7 +36,7 @@ export class NzConnectedOverlayDirective {
}

private updateArrowPosition(position: ConnectedOverlayPositionChange): void {
const originEl = this.cdkConnectedOverlay.origin.elementRef.nativeElement as HTMLElement;
const originEl = (this.cdkConnectedOverlay.origin as ElementRef).nativeElement as HTMLElement;
Copy link
Member

Choose a reason for hiding this comment

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

Could this be another types?

Copy link
Member

Choose a reason for hiding this comment

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

@@ -134,7 +134,7 @@ export class NzFormControlComponent implements OnChanges, OnDestroy, OnInit, Aft
this.validateChanges.unsubscribe();
/** miss detect https://github.com/angular/angular/issues/10887 **/
if (this.validateControl && this.validateControl.statusChanges) {
this.validateChanges = this.validateControl.statusChanges
this.validateChanges = (this.validateControl.statusChanges as Observable<string>)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
this.validateChanges = (this.validateControl.statusChanges as Observable<string>)
this.validateChanges = (this.validateControl.statusChanges as Observable<SafeAny>)

@@ -41,7 +41,7 @@ function generate(target) {
}
}
const componentDirPath = path.join(rootPath, componentName);
const skips = ['style', 'core', 'locale', 'cdk', 'i18n', 'version', 'experimental'];
const skips = ['style', 'core', 'locale', 'cdk', 'i18n', 'version', 'experimental', 'node_modules'];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const skips = ['style', 'core', 'locale', 'cdk', 'i18n', 'version', 'experimental', 'node_modules'];
const skips = ['style', 'core', 'locale', 'cdk', 'i18n', 'version', 'experimental'];

Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@hsuanxyz hsuanxyz left a comment

Choose a reason for hiding this comment

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

LGTM

@hsuanxyz hsuanxyz merged commit 7c11bb1 into NG-ZORRO:master Dec 23, 2021
@RoboZoom
Copy link

It's fantastic that this is merged, but the latest release on the home page still is version 12.1.1 and references Angular v12. Are you planning on updating the release version number for this?

Thanks for the work!

@FOWind
Copy link
Contributor

FOWind commented Dec 28, 2021

When will it release after merged?

@hsuanxyz
Copy link
Member

@FOWind #7158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V13 update
8 participants