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.
- package/application/files/root/eslint.config.mjs +0 -1
- package/application/files/src/app/app.config.ts +4 -2
- package/application/files/src/app/layout/basic/basic.component.ts +6 -4
- package/application/files/src/app/shared/shared-zorro.module.ts +2 -2
- package/application/index.js +4 -4
- package/application/index.spec.ts +10 -0
- package/application/index.ts +4 -4
- package/application/schema.json +6 -0
- package/application/schema.ts +1 -0
- package/docs/plugin.en-US.md +0 -1
- package/docs/plugin.zh-CN.md +0 -1
- package/migration.json +4 -4
- package/ng-add/index.js +1 -1
- package/ng-add/index.spec.ts +3 -4
- package/ng-add/index.ts +1 -1
- package/ng-add/schema.json +6 -0
- package/ng-add/schema.ts +1 -0
- package/ng-update/data/attribute-selectors.js +1 -1
- package/ng-update/data/attribute-selectors.ts +1 -1
- package/ng-update/data/class-names.js +1 -1
- package/ng-update/data/class-names.ts +1 -1
- package/ng-update/data/constructor-checks.js +1 -1
- package/ng-update/data/constructor-checks.ts +1 -1
- package/ng-update/data/css-selectors.js +1 -1
- package/ng-update/data/css-selectors.ts +1 -1
- package/ng-update/data/css-tokens.js +1 -1
- package/ng-update/data/css-tokens.ts +1 -1
- package/ng-update/data/element-selectors.js +1 -1
- package/ng-update/data/element-selectors.ts +1 -1
- package/ng-update/data/input-names.js +1 -1
- package/ng-update/data/input-names.ts +1 -1
- package/ng-update/data/method-call-checks.js +1 -1
- package/ng-update/data/method-call-checks.ts +1 -1
- package/ng-update/data/output-names.js +1 -1
- package/ng-update/data/output-names.ts +1 -1
- package/ng-update/data/property-names.js +1 -1
- package/ng-update/data/property-names.ts +1 -1
- package/ng-update/index.js +4 -4
- package/ng-update/index.ts +3 -3
- package/ng-update/upgrade-rules/{V20 → V21}/index.js +3 -3
- package/ng-update/upgrade-rules/{V20 → V21}/index.js.map +1 -1
- package/ng-update/upgrade-rules/{V20 → V21}/index.ts +2 -2
- package/package.json +2 -2
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/versions.js +12 -12
- package/utils/versions.ts +12 -12
- /package/ng-update/upgrade-rules/{V20 → V21}/index.spec.ts +0 -0
|
@@ -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 {
|
|
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
|
-
<
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
34
|
+
NzDropdownModule,
|
|
35
35
|
NzPopconfirmModule,
|
|
36
36
|
NzTableModule,
|
|
37
37
|
NzPopoverModule,
|
package/application/index.js
CHANGED
|
@@ -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.
|
|
146
|
-
`prettier@^3.
|
|
147
|
-
`stylelint@^16.
|
|
148
|
-
`stylelint-config-standard@^39.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;
|
package/application/index.ts
CHANGED
|
@@ -188,10 +188,10 @@ function addCodeStylesToPackageJson(): Rule {
|
|
|
188
188
|
tree,
|
|
189
189
|
[
|
|
190
190
|
`husky@^9.1.7`,
|
|
191
|
-
`lint-staged@^16.
|
|
192
|
-
`prettier@^3.
|
|
193
|
-
`stylelint@^16.
|
|
194
|
-
`stylelint-config-standard@^39.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
|
],
|
package/application/schema.json
CHANGED
|
@@ -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",
|
package/application/schema.ts
CHANGED
package/docs/plugin.en-US.md
CHANGED
|
@@ -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
|
package/docs/plugin.zh-CN.md
CHANGED
|
@@ -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-
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "Updates NG-ALAIN to
|
|
7
|
-
"factory": "./ng-update/index#
|
|
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 =
|
|
9
|
+
const V = 21;
|
|
10
10
|
function genRules(options) {
|
|
11
11
|
return () => {
|
|
12
12
|
const rules = [];
|
package/ng-add/index.spec.ts
CHANGED
|
@@ -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
|
-
|
|
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 =
|
|
10
|
+
const V = 21;
|
|
11
11
|
|
|
12
12
|
function genRules(options: NgAddOptions): Rule {
|
|
13
13
|
return () => {
|
package/ng-add/schema.json
CHANGED
|
@@ -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
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=attribute-selectors.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=class-names.js.map
|
|
@@ -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.
|
|
11
|
+
[schematics_1.TargetVersion.V21]: []
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=constructor-checks.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-selectors.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-tokens.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=element-selectors.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=input-names.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=method-call-checks.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=output-names.js.map
|
|
@@ -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.
|
|
6
|
+
[schematics_1.TargetVersion.V21]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=property-names.js.map
|
package/ng-update/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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
|
|
8
|
+
const V21_1 = require("./upgrade-rules/V21");
|
|
9
9
|
const migrations = [];
|
|
10
|
-
function
|
|
11
|
-
return (0, schematics_2.chain)([(0,
|
|
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) {
|
package/ng-update/index.ts
CHANGED
|
@@ -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 {
|
|
6
|
+
import { v21Rule } from './upgrade-rules/V21';
|
|
7
7
|
|
|
8
8
|
const migrations: NullableDevkitMigration[] = [];
|
|
9
9
|
|
|
10
|
-
export function
|
|
11
|
-
return chain([
|
|
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.
|
|
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/
|
|
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
|
|
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/
|
|
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/
|
|
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
|
|
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": "
|
|
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": "^
|
|
28
|
+
"@angular/cdk": "^21.0.5"
|
|
29
29
|
},
|
|
30
30
|
"ng-update": {
|
|
31
31
|
"migrations": "./migration.json",
|
package/utils/lib-versions.js
CHANGED
|
@@ -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 = '^
|
|
5
|
-
exports.ZORROVERSION = '^
|
|
4
|
+
exports.VERSION = '^21.0.0-next.1';
|
|
5
|
+
exports.ZORROVERSION = '^21.0.0-beta.0';
|
|
6
6
|
//# sourceMappingURL=lib-versions.js.map
|
package/utils/lib-versions.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '^
|
|
2
|
-
export const ZORROVERSION = '^
|
|
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
|
|
25
|
-
`@typescript-eslint/eslint-plugin@^8.
|
|
26
|
-
`@typescript-eslint/parser@^8.
|
|
27
|
-
`@typescript-eslint/utils@^8.
|
|
28
|
-
`eslint@^9.
|
|
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.
|
|
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.
|
|
35
|
-
`typescript-eslint
|
|
36
|
-
`prettier@^3.
|
|
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@^
|
|
42
|
-
`@ng-util/monaco-editor@^
|
|
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@^
|
|
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
|
-
`@typescript-eslint/eslint-plugin@^8.
|
|
21
|
-
`@typescript-eslint/parser@^8.
|
|
22
|
-
`@typescript-eslint/utils@^8.
|
|
23
|
-
`eslint@^9.
|
|
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.
|
|
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.
|
|
30
|
-
`typescript-eslint
|
|
31
|
-
`prettier@^3.
|
|
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@^
|
|
37
|
-
`@ng-util/monaco-editor@^
|
|
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@^
|
|
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 {
|
|
File without changes
|