Skip to content

Commit

Permalink
chore: bump angular from 15 to 16 (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jun 1, 2023
1 parent d2bf211 commit 3779e0a
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 126 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ module.exports = {
'@angular-eslint/no-input-rename': 'off',
'prefer-const': 'off',
'max-len': 'off',
'deprecation/deprecation': 'warn'
'deprecation/deprecation': 'warn',
'jsdoc/newline-after-description': 'off'
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
"*.json": "jsonc",
".prettierrc": "json",
".stylelintrc": "json"
}
},
"angular.enable-strict-mode-prompt": false
}
114 changes: 57 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"homepage": "https://ng-alain.com",
"engines": {
"node": "^16.10.0 || ^18.10.0",
"node": "^16.13.0 || ^18.10.0",
"yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
Expand Down Expand Up @@ -57,61 +57,61 @@
"ssr:prerender": "ng run site:prerender"
},
"dependencies": {
"@angular/animations": "^15.1.0",
"@angular/common": "^15.1.0",
"@angular/compiler": "^15.1.0",
"@angular/core": "^15.1.0",
"@angular/forms": "^15.1.0",
"@angular/platform-browser": "^15.1.0",
"@angular/platform-browser-dynamic": "^15.1.0",
"@angular/router": "^15.1.0",
"@angular/animations": "^16.0.3",
"@angular/common": "^16.0.3",
"@angular/compiler": "^16.0.3",
"@angular/core": "^16.0.3",
"@angular/forms": "^16.0.3",
"@angular/platform-browser": "^16.0.3",
"@angular/platform-browser-dynamic": "^16.0.3",
"@angular/router": "^16.0.3",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0",
"@angular/service-worker": "^15.1.0",
"@angular/platform-server": "^15.1.0",
"@angular/elements": "^15.1.0",
"zone.js": "~0.13.0",
"@angular/service-worker": "^16.0.3",
"@angular/platform-server": "^16.0.3",
"@angular/elements": "^16.0.3",
"@antv/data-set": "^0.11.8",
"@antv/g2": "^4.2.8",
"echarts": "^5.4.1",
"@stackblitz/sdk": "^1.8.2",
"@antv/g2": "^4.2.10",
"echarts": "^5.4.2",
"@stackblitz/sdk": "^1.9.0",
"codesandbox": "^2.2.3",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"extend": "^3.0.2",
"file-saver": "^2.0.5",
"ng-github-button": "^15.0.0",
"ng-zorro-antd": "^15.1.0",
"ngx-color": "~8.0.3",
"ng-zorro-antd": "^16.0.0-beta.0",
"ngx-color": "~9.0.0",
"ngx-countdown": "^15.0.0",
"ngx-highlight-js": "^15.0.0",
"ngx-tinymce": "^15.0.0",
"qrious": "^4.0.2",
"@webcomponents/custom-elements": "^1.5.1",
"@webcomponents/custom-elements": "^1.6.0",
"aos": "^3.0.0-beta.6",
"@ng-util/monaco-editor": "^15.0.0",
"@nguniversal/express-engine": "~15.1.0",
"@nguniversal/express-engine": "~16.0.2",
"express": "^4.18.2",
"isutf8": "^4.0.0",
"@github/hotkey": "^2.0.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.1.3",
"@angular/cli": "~15.1.3",
"@angular/compiler-cli": "^15.1.0",
"@angular-devkit/build-angular": "^16.0.3",
"@angular/cli": "~16.0.3",
"@angular/compiler-cli": "^16.0.3",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.9.4",
"typescript": "~5.0.4",
"codelyzer": "^6.0.2",
"jasmine-spec-reporter": "^7.0.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.1",
"@angular/language-service": "^15.1.0",
"@angular/language-service": "^16.0.3",
"@types/jasminewd2": "~2.0.10",
"karma-junit-reporter": "^2.0.1",
"karma-spec-reporter": "0.0.36",
Expand All @@ -138,51 +138,51 @@
"mark-twain": "^2.0.3",
"mockjs": "^1.1.0",
"mustache": "^4.2.0",
"ng-packagr": "^15.1.0",
"ng-packagr": "^16.0.1",
"parse5": "^7.1.2",
"prettier": "^2.8.3",
"prettier": "^2.8.8",
"readline-sync": "^1.4.10",
"stream": "0.0.2",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint": "^15.6.2",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^29.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.6.0",
"stylelint-order": "^6.0.1",
"stylelint-config-standard": "^33.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
"stylelint-order": "^6.0.3",
"source-map-explorer": "^2.5.3",
"xlsx": "^0.18.5",
"jszip": "^3.10.1",
"plyr": "^3.7.3",
"pdfjs-dist": "^3.6.172",
"plyr": "^3.7.8",
"pdfjs-dist": "~3.6.172",
"screenfull": "^6.0.2",
"less-bundle-promise": "^1.0.11",
"ng-alain-codelyzer": "^0.0.1",
"ng-alain-sts": "^0.0.2",
"ng-alain-plugin-theme": "^15.0.1",
"tsconfig-paths": "^4.1.2",
"@nguniversal/builders": "^15.1.0",
"@types/express": "^4.17.16",
"html-minifier-terser": "^7.1.0",
"terser": "^5.16.1",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-angular": "^17.4.2",
"@angular-eslint/builder": "~15.2.0",
"@angular-eslint/eslint-plugin": "~15.2.0",
"@angular-eslint/eslint-plugin-template": "~15.2.0",
"@angular-eslint/schematics": "~15.2.0",
"@angular-eslint/template-parser": "~15.2.0",
"@typescript-eslint/eslint-plugin": "~5.49.0",
"@typescript-eslint/parser": "~5.49.0",
"eslint": "^8.33.0",
"eslint-config-prettier": "~8.6.0",
"eslint-plugin-import": "~2.26.0",
"eslint-plugin-jsdoc": "~39.7.4",
"tsconfig-paths": "^4.2.0",
"@nguniversal/builders": "^16.0.2",
"@types/express": "^4.17.17",
"html-minifier-terser": "^7.2.0",
"terser": "^5.17.6",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-angular": "^17.6.3",
"@angular-eslint/builder": "~16.0.3",
"@angular-eslint/eslint-plugin": "~16.0.3",
"@angular-eslint/eslint-plugin-template": "~16.0.3",
"@angular-eslint/schematics": "~16.0.3",
"@angular-eslint/template-parser": "~16.0.3",
"@typescript-eslint/eslint-plugin": "~5.59.8",
"@typescript-eslint/parser": "~5.59.8",
"eslint": "^8.41.0",
"eslint-config-prettier": "~8.8.0",
"eslint-plugin-import": "~2.25.3",
"eslint-plugin-jsdoc": "~45.0.0",
"eslint-plugin-prefer-arrow": "~1.2.3",
"eslint-plugin-prettier": "~4.2.1",
"eslint-plugin-deprecation": "~1.3.3",
"lint-staged": "^13.1.0",
"eslint-plugin-deprecation": "~1.4.1",
"lint-staged": "^13.2.2",
"raw-loader": "^4.0.2",
"swagger-typescript-api": "^12.0.2",
"swagger-typescript-api": "^12.0.4",
"sitemap": "^7.1.1"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/date-picker/range.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class RangePickerDirective implements OnDestroy, AfterViewInit {
get shortcut(): AlainDateRangePickerShortcut | null {
return this._shortcut;
}
@Input() ngModelEnd: NzSafeAny;
@Input({ required: true }) ngModelEnd: NzSafeAny;
@Output() readonly ngModelEndChange = new EventEmitter<NzSafeAny>();

private get dp(): NzDatePickerComponent {
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/down-file/down-file.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class DownFileDirective {
@Input('http-data') httpData: NzSafeAny;
@Input('http-body') httpBody: NzSafeAny;
@Input('http-method') httpMethod: string = 'get';
@Input('http-url') httpUrl!: string;
@Input({ alias: 'http-url', required: true }) httpUrl!: string;
@Input('file-name') fileName?: string | ((rep: HttpResponse<Blob>) => string);
@Input() pre?: (ev: MouseEvent) => Promise<boolean>;
@Output() readonly success = new EventEmitter<HttpResponse<Blob>>();
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/let/let.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class LetContext<T> {

@Directive({ selector: '[let]' })
export class LetDirective<T> {
@Input() let!: T;
@Input({ required: true }) let!: T;

constructor(@Inject(ViewContainerRef) vc: ViewContainerRef, @Inject(TemplateRef) ref: TemplateRef<LetContext<T>>) {
vc.createEmbeddedView(ref, new LetContext<T>(this));
Expand Down
1 change: 0 additions & 1 deletion packages/abc/loading/loading.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const COMPONENTS = [LoadingDefaultComponent];
@NgModule({
imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule],
declarations: COMPONENTS,
entryComponents: COMPONENTS,
exports: COMPONENTS
})
export class LoadingModule {}
5 changes: 1 addition & 4 deletions packages/abc/loading/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@

&-default {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
inset: 0;
z-index: @loading-zindex + 1;
display: flex;
flex-direction: column;
Expand Down
1 change: 0 additions & 1 deletion packages/abc/onboarding/onboarding.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const COMPONENTS = [OnboardingComponent];
imports: [CommonModule, DelonLocaleModule, NzPopoverModule, NzOutletModule, NzButtonModule, NzNoAnimationModule],
declarations: COMPONENTS,
providers: [OnboardingService],
entryComponents: COMPONENTS,
exports: COMPONENTS
})
export class OnboardingModule {}
5 changes: 1 addition & 4 deletions packages/abc/onboarding/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

&__mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
inset: 0;
z-index: @onboarding-zindex - 1;
background-color: @onboarding-mask-background-color;
opacity: @onboarding-mask-opacity;
Expand Down
6 changes: 3 additions & 3 deletions packages/abc/st/st.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ export class STComponent implements AfterViewInit, OnChanges, OnDestroy {
@Input() header?: string | TemplateRef<void> | null;
@Input() @InputBoolean() showHeader = true;
@Input() footer?: string | TemplateRef<void> | null;
@Input() bodyHeader?: TemplateRef<STStatisticalResults> | null;
@Input() body?: TemplateRef<STStatisticalResults> | null;
@Input() bodyHeader?: TemplateRef<{ $implicit: STStatisticalResults }> | null;
@Input() body?: TemplateRef<{ $implicit: STStatisticalResults }> | null;
@Input() @InputBoolean() expandRowByClick = false;
@Input() @InputBoolean() expandAccordion = false;
@Input() expand: TemplateRef<{ $implicit: NzSafeAny; column: STColumn }> | null = null;
@Input() expand: TemplateRef<{ $implicit: NzSafeAny; index: number }> | null = null;
@Input() noResult?: string | TemplateRef<void> | null;
@Input() @InputBoolean() responsive: boolean = true;
@Input() @InputBoolean() responsiveHideHeaderFooter?: boolean;
Expand Down
3 changes: 1 addition & 2 deletions packages/form/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ const WIDGETS = [
@NgModule({
imports: [CommonModule, FormsModule, DelonLocaleModule, ...ZORROS],
declarations: [...COMPONENTS, ...WIDGETS],
exports: COMPONENTS,
entryComponents: WIDGETS
exports: COMPONENTS
})
export class DelonFormModule {
static forRoot(): ModuleWithProviders<DelonFormModule> {
Expand Down
5 changes: 1 addition & 4 deletions packages/theme/system/utils/_other.less
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@
*/
.page-loading {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
inset: 0;
z-index: 10000;
padding-top: 200px;
text-align: center;
Expand Down
5 changes: 1 addition & 4 deletions packages/theme/system/widgets/_abs.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

.abs-center {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
inset: 0;
margin: auto;
overflow: auto;

Expand Down
8 changes: 4 additions & 4 deletions schematics/migration.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"migration-v15": {
"version": "15",
"description": "Updates NG-ALAIN to v15 [https://github.com/ng-alain/ng-alain/issues/2347]",
"factory": "./ng-update/index#updateToV15"
"migration-v16": {
"version": "16",
"description": "Updates NG-ALAIN to v16 [https://github.com/ng-alain/ng-alain/issues/2390]",
"factory": "./ng-update/index#updateToV16"
},
"ng-post-update": {
"description": "Performs cleanup after ng-update.",
Expand Down
2 changes: 1 addition & 1 deletion schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DEFAULT_WORKSPACE_PATH, readJSON, readPackage } from '../utils';
import { getNodeMajorVersion } from '../utils/node';
import { Schema as NgAddOptions } from './schema';

const V = 15;
const V = 16;

function genRules(options: NgAddOptions): Rule {
return () => {
Expand Down
2 changes: 1 addition & 1 deletion schematics/ng-update/data/attribute-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AttributeSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const attributeSelectors: VersionChanges<AttributeSelectorUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/class-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClassNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const classNames: VersionChanges<ClassNameUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/constructor-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { ConstructorChecksUpgradeData, TargetVersion, VersionChanges } from '@an
* automatically through type checking.
*/
export const constructorChecks: VersionChanges<ConstructorChecksUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/css-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CssSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const cssSelectors: VersionChanges<CssSelectorUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/element-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ElementSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const elementSelectors: VersionChanges<ElementSelectorUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/input-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const inputNames: VersionChanges<InputNameUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/method-call-checks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MethodCallUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const methodCallChecks: VersionChanges<MethodCallUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/output-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OutputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const outputNames: VersionChanges<OutputNameUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/property-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropertyNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const propertyNames: VersionChanges<PropertyNameUpgradeData> = {
[TargetVersion.V15]: []
[TargetVersion.V16]: []
};
Loading

0 comments on commit 3779e0a

Please sign in to comment.