ng-alain 20.1.1 → 21.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/application/files/root/eslint.config.mjs +0 -1
  2. package/application/files/src/app/app.config.ts +4 -2
  3. package/application/files/src/app/layout/basic/basic.component.ts +6 -4
  4. package/application/files/src/app/shared/shared-zorro.module.ts +2 -2
  5. package/application/index.js +4 -4
  6. package/application/index.spec.ts +10 -0
  7. package/application/index.ts +4 -4
  8. package/application/schema.json +6 -0
  9. package/application/schema.ts +1 -0
  10. package/docs/plugin.en-US.md +0 -1
  11. package/docs/plugin.zh-CN.md +0 -1
  12. package/migration.json +4 -4
  13. package/ng-add/index.js +1 -1
  14. package/ng-add/index.spec.ts +3 -4
  15. package/ng-add/index.ts +1 -1
  16. package/ng-add/schema.json +6 -0
  17. package/ng-add/schema.ts +1 -0
  18. package/ng-update/data/attribute-selectors.js +1 -1
  19. package/ng-update/data/attribute-selectors.ts +1 -1
  20. package/ng-update/data/class-names.js +1 -1
  21. package/ng-update/data/class-names.ts +1 -1
  22. package/ng-update/data/constructor-checks.js +1 -1
  23. package/ng-update/data/constructor-checks.ts +1 -1
  24. package/ng-update/data/css-selectors.js +1 -1
  25. package/ng-update/data/css-selectors.ts +1 -1
  26. package/ng-update/data/css-tokens.js +1 -1
  27. package/ng-update/data/css-tokens.ts +1 -1
  28. package/ng-update/data/element-selectors.js +1 -1
  29. package/ng-update/data/element-selectors.ts +1 -1
  30. package/ng-update/data/input-names.js +1 -1
  31. package/ng-update/data/input-names.ts +1 -1
  32. package/ng-update/data/method-call-checks.js +1 -1
  33. package/ng-update/data/method-call-checks.ts +1 -1
  34. package/ng-update/data/output-names.js +1 -1
  35. package/ng-update/data/output-names.ts +1 -1
  36. package/ng-update/data/property-names.js +1 -1
  37. package/ng-update/data/property-names.ts +1 -1
  38. package/ng-update/index.js +4 -4
  39. package/ng-update/index.ts +3 -3
  40. package/ng-update/upgrade-rules/{V20 → V21}/index.js +3 -3
  41. package/ng-update/upgrade-rules/{V20 → V21}/index.js.map +1 -1
  42. package/ng-update/upgrade-rules/{V20 → V21}/index.ts +2 -2
  43. package/package.json +2 -2
  44. package/utils/lib-versions.js +2 -2
  45. package/utils/lib-versions.ts +2 -2
  46. package/utils/versions.js +12 -12
  47. package/utils/versions.ts +12 -12
  48. /package/ng-update/upgrade-rules/{V20 → V21}/index.spec.ts +0 -0
@@ -27,7 +27,6 @@ export default tseslint.config(
27
27
  languageOptions: {
28
28
  parserOptions: {
29
29
  projectService: true,
30
- project: ['tsconfig.json'],
31
30
  tsconfigRootDir: import.meta.dirname
32
31
  }
33
32
  },
@@ -7,7 +7,8 @@ import { <% if (i18n) { %>I18NService, <% } %>defaultInterceptor, provideStartup
7
7
  import { provideCellWidgets } from '@delon/abc/cell';
8
8
  import { provideSTWidgets } from '@delon/abc/st';
9
9
  import { authSimpleInterceptor, provideAuth } from '@delon/auth';<% if (form) { %>
10
- import { provideSFConfig } from '@delon/form';<% } %>
10
+ import { provideSFConfig } from '@delon/form';<% } %><% if (reuseTab) { %>
11
+ import { provideReuseTabConfig } from '@delon/abc/reuse-tab';<% } %>
11
12
  import { AlainProvideLang, provideAlain, zh_CN as delonLang } from '@delon/theme';
12
13
  import { AlainConfig } from '@delon/util/config';
13
14
  import { environment } from '@env/environment';
@@ -45,7 +46,8 @@ if (environment.useHash) routerFeatures.push(withHashLocation());
45
46
  const providers: Array<Provider | EnvironmentProviders> = [
46
47
  provideHttpClient(withInterceptors([...(environment.interceptorFns ?? []), authSimpleInterceptor, defaultInterceptor])),
47
48
  provideAnimations(),
48
- provideRouter(routes, ...routerFeatures),
49
+ provideRouter(routes, ...routerFeatures),<% if (reuseTab) { %>
50
+ provideReuseTabConfig(),<% } %>
49
51
  provideAlain({ config: alainConfig, defaultLang<% if (i18n) { %>, i18nClass: I18NService<% } %>, icons: [...ICONS_AUTO, ...ICONS] }),
50
52
  provideNzConfig(ngZorroConfig),
51
53
  provideAuth(),
@@ -6,7 +6,7 @@ import { SettingDrawerModule } from '@delon/theme/setting-drawer';
6
6
  import { ThemeBtnComponent } from '@delon/theme/theme-btn';
7
7
  import { environment } from '@env/environment';
8
8
  import { NzAvatarModule } from 'ng-zorro-antd/avatar';
9
- import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
9
+ import { NzDropdownModule } from 'ng-zorro-antd/dropdown';
10
10
  import { NzIconModule } from 'ng-zorro-antd/icon';
11
11
  import { NzMenuModule } from 'ng-zorro-antd/menu';
12
12
 
@@ -74,8 +74,10 @@ import { HeaderI18nComponent } from './widgets/i18n.component';<% } %>
74
74
  </ul>
75
75
  </nz-dropdown-menu>
76
76
  </ng-template>
77
- <ng-template #contentTpl>
78
- <router-outlet />
77
+ <ng-template #contentTpl><% if (reuseTab) { %>
78
+ <reuse-tab #reuseTab />
79
+ <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)" /><% } else { %>
80
+ <router-outlet /><% } %>
79
81
  </ng-template>
80
82
  </layout-default>
81
83
  @if (showSettingDrawer) {
@@ -92,7 +94,7 @@ import { HeaderI18nComponent } from './widgets/i18n.component';<% } %>
92
94
  ThemeBtnComponent,
93
95
  NzIconModule,
94
96
  NzMenuModule,
95
- NzDropDownModule,
97
+ NzDropdownModule,
96
98
  NzAvatarModule,
97
99
  HeaderSearchComponent,
98
100
  HeaderClearStorageComponent,
@@ -4,7 +4,7 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
4
4
  import { NzCardModule } from 'ng-zorro-antd/card';
5
5
  import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
6
6
  import { NzDrawerModule } from 'ng-zorro-antd/drawer';
7
- import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
7
+ import { NzDropdownModule } from 'ng-zorro-antd/dropdown';
8
8
  import { NzFormModule } from 'ng-zorro-antd/form';
9
9
  import { NzGridModule } from 'ng-zorro-antd/grid';
10
10
  import { NzIconModule } from 'ng-zorro-antd/icon';
@@ -31,7 +31,7 @@ export const SHARED_ZORRO_MODULES = [
31
31
  NzSelectModule,
32
32
  NzAvatarModule,
33
33
  NzCardModule,
34
- NzDropDownModule,
34
+ NzDropdownModule,
35
35
  NzPopconfirmModule,
36
36
  NzTableModule,
37
37
  NzPopoverModule,
@@ -142,10 +142,10 @@ function addCodeStylesToPackageJson() {
142
142
  // dependencies
143
143
  (0, utils_1.addPackage)(tree, [
144
144
  `husky@^9.1.7`,
145
- `lint-staged@^16.1.6`,
146
- `prettier@^3.6.2`,
147
- `stylelint@^16.24.0`,
148
- `stylelint-config-standard@^39.0.0`,
145
+ `lint-staged@^16.2.7`,
146
+ `prettier@^3.7.4`,
147
+ `stylelint@^16.26.1`,
148
+ `stylelint-config-standard@^39.0.1`,
149
149
  `stylelint-declaration-block-no-ignored-properties@^2.8.0`,
150
150
  `stylelint-config-clean-order@^7.0.0`
151
151
  ], 'devDependencies');
@@ -111,6 +111,16 @@ describe('NgAlainSchematic: application', () => {
111
111
  });
112
112
  });
113
113
 
114
+ describe('#reuse-tab', () => {
115
+ it(`should be working`, async () => {
116
+ ({ tree } = await createAlainApp({ reuseTab: true }));
117
+ const appConfig = tree.readContent('/projects/foo/src/app/app.config.ts');
118
+ expect(appConfig).toContain(`provideReuseTabConfig(),`);
119
+ const baseComp = tree.readContent('/projects/foo/src/app/layout/basic/basic.component.ts');
120
+ expect(baseComp).toContain(`<reuse-tab #reuseTab />`);
121
+ });
122
+ });
123
+
114
124
  describe('#multiple-projects', () => {
115
125
  let runner: SchematicTestRunner;
116
126
  let tree: UnitTestTree;
@@ -188,10 +188,10 @@ function addCodeStylesToPackageJson(): Rule {
188
188
  tree,
189
189
  [
190
190
  `husky@^9.1.7`,
191
- `lint-staged@^16.1.6`,
192
- `prettier@^3.6.2`,
193
- `stylelint@^16.24.0`,
194
- `stylelint-config-standard@^39.0.0`,
191
+ `lint-staged@^16.2.7`,
192
+ `prettier@^3.7.4`,
193
+ `stylelint@^16.26.1`,
194
+ `stylelint-config-standard@^39.0.1`,
195
195
  `stylelint-declaration-block-no-ignored-properties@^2.8.0`,
196
196
  `stylelint-config-clean-order@^7.0.0`
197
197
  ],
@@ -22,6 +22,12 @@
22
22
  "default": true,
23
23
  "x-prompt": "Would you like to add mock plugin? (default: Y)"
24
24
  },
25
+ "reuseTab": {
26
+ "type": "boolean",
27
+ "description": "Generate reuse-tab plugin",
28
+ "default": false,
29
+ "x-prompt": "Would you like to add a multi-tag implementation? (default: N)"
30
+ },
25
31
  "i18n": {
26
32
  "type": "boolean",
27
33
  "description": "Generate i18n plugin",
@@ -1,6 +1,7 @@
1
1
  export interface Schema {
2
2
  form?: boolean;
3
3
  mock?: boolean;
4
+ reuseTab?: boolean;
4
5
  i18n?: boolean;
5
6
  codeStyle?: boolean;
6
7
  project?: string;
@@ -138,7 +138,6 @@ export class StartupService {
138
138
  <nz-icon [nzType]="d.status === 'NORMAL' ? 'close1' : 'close2'" />
139
139
  <nz-icon nzType="{{ type ? 'arrow-left' : 'arrow-right' }}" />
140
140
  <nz-icon nzType="filter" theme="outline" />
141
- <nz-input-group [nzAddOnBeforeIcon]="focus ? 'anticon anticon-arrow-down' : 'anticon anticon-search'"></nz-input-group>
142
141
  ```
143
142
 
144
143
  ### rtl
@@ -139,7 +139,6 @@ export class StartupService {
139
139
  <nz-icon [nzType]="d.status === 'NORMAL' ? 'close1' : 'close2'" />
140
140
  <nz-icon nzType="{{ type ? 'arrow-left' : 'arrow-right' }}" />
141
141
  <nz-icon nzType="filter" theme="outline" />
142
- <nz-input-group [nzAddOnBeforeIcon]="focus ? 'anticon anticon-arrow-down' : 'anticon anticon-search'"></nz-input-group>
143
142
  ```
144
143
 
145
144
  ### rtl
package/migration.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
3
3
  "schematics": {
4
- "migration-v20": {
5
- "version": "20",
6
- "description": "Updates NG-ALAIN to v20 [https://github.com/ng-alain/ng-alain/issues/2562]",
7
- "factory": "./ng-update/index#updateToV20"
4
+ "migration-v21": {
5
+ "version": "21",
6
+ "description": "Updates NG-ALAIN to v21 [https://github.com/ng-alain/ng-alain/issues/2589]",
7
+ "factory": "./ng-update/index#updateToV21"
8
8
  },
9
9
  "ng-post-update": {
10
10
  "description": "Performs cleanup after ng-update.",
package/ng-add/index.js CHANGED
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
6
6
  const listr2_1 = require("listr2");
7
7
  const utils_1 = require("../utils");
8
8
  const node_1 = require("../utils/node");
9
- const V = 20;
9
+ const V = 21;
10
10
  function genRules(options) {
11
11
  return () => {
12
12
  const rules = [];
@@ -5,18 +5,17 @@ import { createAlainApp } from '../utils/testing';
5
5
  import { DEFAULT_WORKSPACE_PATH } from '../utils/workspace';
6
6
 
7
7
  describe('Schematic: ng-add', () => {
8
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
- let runner: SchematicTestRunner;
8
+ let _runner: SchematicTestRunner;
10
9
  let tree: UnitTestTree;
11
10
 
12
11
  it('should dependencies @delon of an application', async () => {
13
- ({ runner, tree } = await createAlainApp());
12
+ ({ runner: _runner, tree } = await createAlainApp());
14
13
  const packageJson = JSON.parse(tree.readContent('package.json'));
15
14
  expect(packageJson.dependencies['@delon/theme']).toBeDefined();
16
15
  });
17
16
 
18
17
  it('#issues-https://github.com/ng-alain/ng-alain/issues/2359', async () => {
19
- ({ runner, tree } = await createAlainApp());
18
+ ({ runner: _runner, tree } = await createAlainApp());
20
19
  const json = JSON.parse(tree.readContent(DEFAULT_WORKSPACE_PATH));
21
20
  const budgets = json.projects['foo'].architect.build.configurations.production.budgets;
22
21
  expect(budgets[0].maximumWarning).toBe('2mb');
package/ng-add/index.ts CHANGED
@@ -7,7 +7,7 @@ import { DEFAULT_WORKSPACE_PATH, readJSON, readPackage } from '../utils';
7
7
  import { Schema as NgAddOptions } from './schema';
8
8
  import { getNodeMajorVersion } from '../utils/node';
9
9
 
10
- const V = 20;
10
+ const V = 21;
11
11
 
12
12
  function genRules(options: NgAddOptions): Rule {
13
13
  return () => {
@@ -74,6 +74,12 @@
74
74
  "default": true,
75
75
  "x-prompt": "Would you like to add mock plugin? (default: Y)"
76
76
  },
77
+ "reuseTab": {
78
+ "type": "boolean",
79
+ "description": "Generate reuse-tab plugin",
80
+ "default": false,
81
+ "x-prompt": "Would you like to add a multi-tag implementation? (default: N)"
82
+ },
77
83
  "i18n": {
78
84
  "type": "boolean",
79
85
  "description": "Generate i18n plugin",
package/ng-add/schema.ts CHANGED
@@ -2,6 +2,7 @@ export interface Schema {
2
2
  project?: string;
3
3
  form?: boolean;
4
4
  mock?: boolean;
5
+ reuseTab?: boolean;
5
6
  defaultLanguage?: string;
6
7
  i18n?: boolean;
7
8
  codeStyle?: boolean;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.attributeSelectors = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.attributeSelectors = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=attribute-selectors.js.map
@@ -1,5 +1,5 @@
1
1
  import { AttributeSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const attributeSelectors: VersionChanges<AttributeSelectorUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.classNames = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.classNames = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=class-names.js.map
@@ -1,5 +1,5 @@
1
1
  import { ClassNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const classNames: VersionChanges<ClassNameUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -8,6 +8,6 @@ const schematics_1 = require("@angular/cdk/schematics");
8
8
  * automatically through type checking.
9
9
  */
10
10
  exports.constructorChecks = {
11
- [schematics_1.TargetVersion.V20]: []
11
+ [schematics_1.TargetVersion.V21]: []
12
12
  };
13
13
  //# sourceMappingURL=constructor-checks.js.map
@@ -6,5 +6,5 @@ import { ConstructorChecksUpgradeData, TargetVersion, VersionChanges } from '@an
6
6
  * automatically through type checking.
7
7
  */
8
8
  export const constructorChecks: VersionChanges<ConstructorChecksUpgradeData> = {
9
- [TargetVersion.V20]: []
9
+ [TargetVersion.V21]: []
10
10
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cssSelectors = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.cssSelectors = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=css-selectors.js.map
@@ -1,5 +1,5 @@
1
1
  import { CssSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const cssSelectors: VersionChanges<CssSelectorUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cssTokens = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.cssTokens = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=css-tokens.js.map
@@ -1,5 +1,5 @@
1
1
  import { CssTokenUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const cssTokens: VersionChanges<CssTokenUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.elementSelectors = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.elementSelectors = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=element-selectors.js.map
@@ -1,5 +1,5 @@
1
1
  import { ElementSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const elementSelectors: VersionChanges<ElementSelectorUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inputNames = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.inputNames = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=input-names.js.map
@@ -1,5 +1,5 @@
1
1
  import { InputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const inputNames: VersionChanges<InputNameUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.methodCallChecks = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.methodCallChecks = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=method-call-checks.js.map
@@ -1,5 +1,5 @@
1
1
  import { MethodCallUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const methodCallChecks: VersionChanges<MethodCallUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.outputNames = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.outputNames = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=output-names.js.map
@@ -1,5 +1,5 @@
1
1
  import { OutputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const outputNames: VersionChanges<OutputNameUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.propertyNames = void 0;
4
4
  const schematics_1 = require("@angular/cdk/schematics");
5
5
  exports.propertyNames = {
6
- [schematics_1.TargetVersion.V20]: []
6
+ [schematics_1.TargetVersion.V21]: []
7
7
  };
8
8
  //# sourceMappingURL=property-names.js.map
@@ -1,5 +1,5 @@
1
1
  import { PropertyNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';
2
2
 
3
3
  export const propertyNames: VersionChanges<PropertyNameUpgradeData> = {
4
- [TargetVersion.V20]: []
4
+ [TargetVersion.V21]: []
5
5
  };
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateToV20 = updateToV20;
3
+ exports.updateToV21 = updateToV21;
4
4
  exports.postUpdate = postUpdate;
5
5
  const schematics_1 = require("@angular/cdk/schematics");
6
6
  const schematics_2 = require("@angular-devkit/schematics");
7
7
  const upgrade_data_1 = require("./upgrade-data");
8
- const V20_1 = require("./upgrade-rules/V20");
8
+ const V21_1 = require("./upgrade-rules/V21");
9
9
  const migrations = [];
10
- function updateToV20() {
11
- return (0, schematics_2.chain)([(0, V20_1.v20Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V20, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
10
+ function updateToV21() {
11
+ return (0, schematics_2.chain)([(0, V21_1.v21Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V21, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
12
12
  }
13
13
  /** Post-update schematic to be called when update is finished. */
14
14
  function postUpdate(context, targetVersion, hasFailures) {
@@ -3,12 +3,12 @@ import { createMigrationSchematicRule, NullableDevkitMigration, TargetVersion }
3
3
  import { chain, Rule, SchematicContext } from '@angular-devkit/schematics';
4
4
 
5
5
  import { ruleUpgradeData } from './upgrade-data';
6
- import { v20Rule } from './upgrade-rules/V20';
6
+ import { v21Rule } from './upgrade-rules/V21';
7
7
 
8
8
  const migrations: NullableDevkitMigration[] = [];
9
9
 
10
- export function updateToV20(): Rule {
11
- return chain([v20Rule(), createMigrationSchematicRule(TargetVersion.V20, migrations, ruleUpgradeData, postUpdate)]);
10
+ export function updateToV21(): Rule {
11
+ return chain([v21Rule(), createMigrationSchematicRule(TargetVersion.V21, migrations, ruleUpgradeData, postUpdate)]);
12
12
  }
13
13
 
14
14
  /** Post-update schematic to be called when update is finished. */
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.v20Rule = v20Rule;
12
+ exports.v21Rule = v21Rule;
13
13
  const schematics_1 = require("@angular-devkit/schematics");
14
14
  const tasks_1 = require("@angular-devkit/schematics/tasks");
15
15
  const utils_1 = require("../../../utils");
@@ -17,10 +17,10 @@ const versions_1 = require("../../../utils/versions");
17
17
  function finished() {
18
18
  return (_tree, context) => {
19
19
  context.addTask(new tasks_1.NodePackageInstallTask());
20
- (0, utils_1.logFinished)(context, `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2562`);
20
+ (0, utils_1.logFinished)(context, `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2589`);
21
21
  };
22
22
  }
23
- function v20Rule() {
23
+ function v21Rule() {
24
24
  return (tree, context) => __awaiter(this, void 0, void 0, function* () {
25
25
  (0, versions_1.UpgradeMainVersions)(tree);
26
26
  (0, utils_1.logInfo)(context, `Upgrade dependency version number`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V20/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAiBA,0BAMC;AAvBD,2DAAiF;AACjF,4DAA0E;AAE1E,0CAAsD;AACtD,sDAA8D;AAE9D,SAAS,QAAQ;IACf,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,IAAA,mBAAW,EACT,OAAO,EACP,mHAAmH,CACpH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;QAC1B,IAAA,eAAO,EAAC,OAAO,EAAE,mCAAmC,CAAC,CAAC;QACtD,OAAO,IAAA,kBAAK,EAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V21/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAiBA,0BAMC;AAvBD,2DAAiF;AACjF,4DAA0E;AAE1E,0CAAsD;AACtD,sDAA8D;AAE9D,SAAS,QAAQ;IACf,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,IAAA,mBAAW,EACT,OAAO,EACP,mHAAmH,CACpH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;QAC1B,IAAA,eAAO,EAAC,OAAO,EAAE,mCAAmC,CAAC,CAAC;QACtD,OAAO,IAAA,kBAAK,EAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;AACJ,CAAC"}
@@ -10,12 +10,12 @@ function finished(): Rule {
10
10
 
11
11
  logFinished(
12
12
  context,
13
- `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2562`
13
+ `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2589`
14
14
  );
15
15
  };
16
16
  }
17
17
 
18
- export function v20Rule(): Rule {
18
+ export function v21Rule(): Rule {
19
19
  return async (tree: Tree, context: SchematicContext) => {
20
20
  UpgradeMainVersions(tree);
21
21
  logInfo(context, `Upgrade dependency version number`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-alain",
3
- "version": "20.1.1",
3
+ "version": "21.0.0-next.1",
4
4
  "description": "Schematics specific to NG-ALAIN",
5
5
  "author": "cipchk<cipchk@qq.com>",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "swagger-typescript-api": "^12.0.4",
26
26
  "ng-alain-sts": "^0.0.2",
27
27
  "ng-alain-plugin-theme": "^18.0.0",
28
- "@angular/cdk": "^20.2.3"
28
+ "@angular/cdk": "^21.0.5"
29
29
  },
30
30
  "ng-update": {
31
31
  "migrations": "./migration.json",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZORROVERSION = exports.VERSION = void 0;
4
- exports.VERSION = '^20.1.1';
5
- exports.ZORROVERSION = '^20.3.1';
4
+ exports.VERSION = '^21.0.0-next.1';
5
+ exports.ZORROVERSION = '^21.0.0-beta.0';
6
6
  //# sourceMappingURL=lib-versions.js.map
@@ -1,2 +1,2 @@
1
- export const VERSION = '^20.1.1';
2
- export const ZORROVERSION = '^20.3.1';
1
+ export const VERSION = '^21.0.0-next.1';
2
+ export const ZORROVERSION = '^21.0.0-beta.0';
package/utils/versions.js CHANGED
@@ -21,28 +21,28 @@ const workspace_2 = require("./workspace");
21
21
  function UpgradeMainVersions(tree, version = lib_versions_1.VERSION) {
22
22
  (0, package_1.addPackage)(tree, ['abc', 'acl', 'auth', 'cache', 'form', 'mock', 'theme', 'util', 'chart'].map(name => `@delon/${name}@${version}`));
23
23
  (0, package_1.addPackage)(tree, [
24
- `angular-eslint@^20.3.0`,
25
- `@typescript-eslint/eslint-plugin@^8.44.0`,
26
- `@typescript-eslint/parser@^8.44.0`,
27
- `@typescript-eslint/utils@^8.44.0`,
28
- `eslint@^9.35.0`,
24
+ `angular-eslint@21.1.0`,
25
+ `@typescript-eslint/eslint-plugin@^8.50.1`,
26
+ `@typescript-eslint/parser@^8.50.1`,
27
+ `@typescript-eslint/utils@^8.50.1`,
28
+ `eslint@^9.39.1`,
29
29
  `eslint-config-prettier@^10.1.8`,
30
30
  `eslint-plugin-import@~2.32.0`,
31
- `eslint-plugin-jsdoc@~61.1.4`,
31
+ `eslint-plugin-jsdoc@~61.5.0`,
32
32
  `eslint-plugin-prefer-arrow@~1.2.3`,
33
33
  `eslint-plugin-prettier@~5.5.4`,
34
- `eslint-plugin-unused-imports@^4.2.0`,
35
- `typescript-eslint@^8.44.0`,
36
- `prettier@^3.6.2`,
34
+ `eslint-plugin-unused-imports@^4.3.0`,
35
+ `typescript-eslint@8.47.0`,
36
+ `prettier@^3.7.4`,
37
37
  `husky@^9.1.7`,
38
38
  `ng-alain@${version}`,
39
39
  `ng-alain-plugin-theme@^18.0.0`,
40
40
  `source-map-explorer@^2.5.3`,
41
- `ngx-tinymce@^20.0.0`,
42
- `@ng-util/monaco-editor@^20.1.0`,
41
+ `ngx-tinymce@^21.0.0`,
42
+ `@ng-util/monaco-editor@^21.0.1`,
43
43
  `@delon/testing@${version}`
44
44
  ], 'devDependencies');
45
- (0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^20.3.1`]);
45
+ (0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^21.0.0-beta.0`]);
46
46
  }
47
47
  function addESLintRule(projectName) {
48
48
  return (0, workspace_1.updateWorkspace)((workspace) => __awaiter(this, void 0, void 0, function* () {
package/utils/versions.ts CHANGED
@@ -16,30 +16,30 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
16
16
  addPackage(
17
17
  tree,
18
18
  [
19
- `angular-eslint@^20.3.0`,
20
- `@typescript-eslint/eslint-plugin@^8.44.0`,
21
- `@typescript-eslint/parser@^8.44.0`,
22
- `@typescript-eslint/utils@^8.44.0`,
23
- `eslint@^9.35.0`,
19
+ `angular-eslint@21.1.0`,
20
+ `@typescript-eslint/eslint-plugin@^8.50.1`,
21
+ `@typescript-eslint/parser@^8.50.1`,
22
+ `@typescript-eslint/utils@^8.50.1`,
23
+ `eslint@^9.39.1`,
24
24
  `eslint-config-prettier@^10.1.8`,
25
25
  `eslint-plugin-import@~2.32.0`,
26
- `eslint-plugin-jsdoc@~61.1.4`,
26
+ `eslint-plugin-jsdoc@~61.5.0`,
27
27
  `eslint-plugin-prefer-arrow@~1.2.3`,
28
28
  `eslint-plugin-prettier@~5.5.4`,
29
- `eslint-plugin-unused-imports@^4.2.0`,
30
- `typescript-eslint@^8.44.0`,
31
- `prettier@^3.6.2`,
29
+ `eslint-plugin-unused-imports@^4.3.0`,
30
+ `typescript-eslint@8.47.0`,
31
+ `prettier@^3.7.4`,
32
32
  `husky@^9.1.7`,
33
33
  `ng-alain@${version}`,
34
34
  `ng-alain-plugin-theme@^18.0.0`,
35
35
  `source-map-explorer@^2.5.3`,
36
- `ngx-tinymce@^20.0.0`,
37
- `@ng-util/monaco-editor@^20.1.0`,
36
+ `ngx-tinymce@^21.0.0`,
37
+ `@ng-util/monaco-editor@^21.0.1`,
38
38
  `@delon/testing@${version}`
39
39
  ],
40
40
  'devDependencies'
41
41
  );
42
- addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^20.3.1`]);
42
+ addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^21.0.0-beta.0`]);
43
43
  }
44
44
 
45
45
  export function addESLintRule(projectName: string): Rule {