ng-alain 15.2.1 → 16.0.0
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/index.js +7 -7
- package/application/index.ts +7 -7
- package/migration.json +4 -4
- package/ng-add/index.js +1 -1
- package/ng-add/index.ts +1 -1
- 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/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 +5 -5
- package/ng-update/index.ts +3 -3
- package/ng-update/upgrade-rules/{v15 → v16}/index.js +5 -17
- package/ng-update/upgrade-rules/v16/index.js.map +1 -0
- package/ng-update/upgrade-rules/{v15 → v16}/index.spec.ts +2 -2
- package/ng-update/upgrade-rules/v16/index.ts +26 -0
- package/package.json +2 -2
- package/tpl/index.js +1 -2
- package/tpl/index.js.map +1 -1
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/versions.js +15 -15
- package/utils/versions.ts +15 -15
- package/ng-update/upgrade-rules/v15/index.js.map +0 -1
- package/ng-update/upgrade-rules/v15/index.ts +0 -38
package/application/index.js
CHANGED
|
@@ -147,14 +147,14 @@ function addCodeStylesToPackageJson() {
|
|
|
147
147
|
// dependencies
|
|
148
148
|
(0, utils_1.addPackage)(tree, [
|
|
149
149
|
`husky@^7.0.4`,
|
|
150
|
-
`lint-staged@^13.
|
|
151
|
-
`prettier@^2.8.
|
|
152
|
-
`stylelint@^
|
|
153
|
-
`stylelint-config-prettier@^9.0.
|
|
150
|
+
`lint-staged@^13.2.2`,
|
|
151
|
+
`prettier@^2.8.8`,
|
|
152
|
+
`stylelint@^15.6.2`,
|
|
153
|
+
`stylelint-config-prettier@^9.0.5`,
|
|
154
154
|
`stylelint-config-rational-order@^0.1.2`,
|
|
155
|
-
`stylelint-config-standard@^
|
|
156
|
-
`stylelint-declaration-block-no-ignored-properties@^2.
|
|
157
|
-
`stylelint-order@^6.0.
|
|
155
|
+
`stylelint-config-standard@^33.0.0`,
|
|
156
|
+
`stylelint-declaration-block-no-ignored-properties@^2.7.0`,
|
|
157
|
+
`stylelint-order@^6.0.3`
|
|
158
158
|
], 'devDependencies');
|
|
159
159
|
return tree;
|
|
160
160
|
};
|
package/application/index.ts
CHANGED
|
@@ -184,14 +184,14 @@ function addCodeStylesToPackageJson(): Rule {
|
|
|
184
184
|
tree,
|
|
185
185
|
[
|
|
186
186
|
`husky@^7.0.4`,
|
|
187
|
-
`lint-staged@^13.
|
|
188
|
-
`prettier@^2.8.
|
|
189
|
-
`stylelint@^
|
|
190
|
-
`stylelint-config-prettier@^9.0.
|
|
187
|
+
`lint-staged@^13.2.2`,
|
|
188
|
+
`prettier@^2.8.8`,
|
|
189
|
+
`stylelint@^15.6.2`,
|
|
190
|
+
`stylelint-config-prettier@^9.0.5`,
|
|
191
191
|
`stylelint-config-rational-order@^0.1.2`,
|
|
192
|
-
`stylelint-config-standard@^
|
|
193
|
-
`stylelint-declaration-block-no-ignored-properties@^2.
|
|
194
|
-
`stylelint-order@^6.0.
|
|
192
|
+
`stylelint-config-standard@^33.0.0`,
|
|
193
|
+
`stylelint-declaration-block-no-ignored-properties@^2.7.0`,
|
|
194
|
+
`stylelint-order@^6.0.3`
|
|
195
195
|
],
|
|
196
196
|
'devDependencies'
|
|
197
197
|
);
|
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-v16": {
|
|
5
|
+
"version": "16",
|
|
6
|
+
"description": "Updates NG-ALAIN to v16 [https://github.com/ng-alain/ng-alain/issues/2390]",
|
|
7
|
+
"factory": "./ng-update/index#updateToV16"
|
|
8
8
|
},
|
|
9
9
|
"ng-post-update": {
|
|
10
10
|
"description": "Performs cleanup after ng-update.",
|
package/ng-add/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
5
5
|
const colors = require("ansi-colors");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const node_1 = require("../utils/node");
|
|
8
|
-
const V =
|
|
8
|
+
const V = 16;
|
|
9
9
|
function genRules(options) {
|
|
10
10
|
return () => {
|
|
11
11
|
const rules = [];
|
package/ng-add/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { DEFAULT_WORKSPACE_PATH, readJSON, readPackage } from '../utils';
|
|
|
7
7
|
import { getNodeMajorVersion } from '../utils/node';
|
|
8
8
|
import { Schema as NgAddOptions } from './schema';
|
|
9
9
|
|
|
10
|
-
const V =
|
|
10
|
+
const V = 16;
|
|
11
11
|
|
|
12
12
|
function genRules(options: NgAddOptions): Rule {
|
|
13
13
|
return () => {
|
|
@@ -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.V16]: []
|
|
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.V16]: []
|
|
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.V16]: []
|
|
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.V16]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-selectors.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.V16]: []
|
|
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.V16]: []
|
|
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.V16]: []
|
|
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.V16]: []
|
|
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.V16]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=property-names.js.map
|
package/ng-update/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.postUpdate = exports.
|
|
3
|
+
exports.postUpdate = exports.updateToV16 = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
const schematics_2 = require("@angular-devkit/schematics");
|
|
6
6
|
const upgrade_data_1 = require("./upgrade-data");
|
|
7
|
-
const
|
|
7
|
+
const v16_1 = require("./upgrade-rules/v16");
|
|
8
8
|
const migrations = [];
|
|
9
|
-
function
|
|
10
|
-
return (0, schematics_2.chain)([(0,
|
|
9
|
+
function updateToV16() {
|
|
10
|
+
return (0, schematics_2.chain)([(0, v16_1.v16Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V16, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
11
11
|
}
|
|
12
|
-
exports.
|
|
12
|
+
exports.updateToV16 = updateToV16;
|
|
13
13
|
/** Post-update schematic to be called when update is finished. */
|
|
14
14
|
function postUpdate(context, targetVersion, hasFailures) {
|
|
15
15
|
context.logger.info('');
|
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 { v16Rule } from './upgrade-rules/v16';
|
|
7
7
|
|
|
8
8
|
const migrations: NullableDevkitMigration[] = [];
|
|
9
9
|
|
|
10
|
-
export function
|
|
11
|
-
return chain([
|
|
10
|
+
export function updateToV16(): Rule {
|
|
11
|
+
return chain([v16Rule(), createMigrationSchematicRule(TargetVersion.V16, migrations, ruleUpgradeData, postUpdate)]);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/** Post-update schematic to be called when update is finished. */
|
|
@@ -9,36 +9,24 @@ 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.v16Rule = void 0;
|
|
13
13
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
14
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
15
15
|
const colors = require("ansi-colors");
|
|
16
16
|
const utils_1 = require("../../../utils");
|
|
17
|
-
const less_1 = require("../../../utils/less");
|
|
18
17
|
const versions_1 = require("../../../utils/versions");
|
|
19
|
-
function removeDuplicateDependencies() {
|
|
20
|
-
return (tree, context) => {
|
|
21
|
-
const pkg = (0, utils_1.readPackage)(tree);
|
|
22
|
-
if (!pkg.devDependencies)
|
|
23
|
-
return;
|
|
24
|
-
delete pkg.devDependencies['ng-alain-sts'];
|
|
25
|
-
delete pkg.devDependencies['ng-alain-plugin-theme'];
|
|
26
|
-
(0, utils_1.writePackage)(tree, pkg);
|
|
27
|
-
(0, utils_1.logStart)(context, `Remove duplicate dev-dependencies: 'ng-alain-sts', 'ng-alain-plugin-theme'`);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
18
|
function finished() {
|
|
31
19
|
return (_tree, context) => {
|
|
32
20
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
33
|
-
context.logger.info(colors.green(` ✓ Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/
|
|
21
|
+
context.logger.info(colors.green(` ✓ Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2390`));
|
|
34
22
|
};
|
|
35
23
|
}
|
|
36
|
-
function
|
|
24
|
+
function v16Rule() {
|
|
37
25
|
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
38
26
|
(0, utils_1.logStart)(context, `Upgrade @delon/* version number`);
|
|
39
27
|
(0, versions_1.UpgradeMainVersions)(tree);
|
|
40
|
-
return (0, schematics_1.chain)([
|
|
28
|
+
return (0, schematics_1.chain)([finished()]);
|
|
41
29
|
});
|
|
42
30
|
}
|
|
43
|
-
exports.
|
|
31
|
+
exports.v16Rule = v16Rule;
|
|
44
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/v16/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAiF;AACjF,4DAA0E;AAC1E,sCAAsC;AAEtC,0CAA0C;AAC1C,sDAA8D;AAE9D,SAAS,QAAQ;IACf,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,MAAM,CAAC,KAAK,CACV,uHAAuH,CACxH,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAA,gBAAQ,EAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC;QACrD,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,IAAA,kBAAK,EAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;AACJ,CAAC;AAND,0BAMC"}
|
|
@@ -2,7 +2,7 @@ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/te
|
|
|
2
2
|
|
|
3
3
|
import { createAlainApp, migrationCollection } from '../../../utils/testing';
|
|
4
4
|
|
|
5
|
-
describe('Schematic: ng-update:
|
|
5
|
+
describe('Schematic: ng-update: v16Rule', () => {
|
|
6
6
|
let runner: SchematicTestRunner;
|
|
7
7
|
let tree: UnitTestTree;
|
|
8
8
|
const logs: string[] = [];
|
|
@@ -15,6 +15,6 @@ describe('Schematic: ng-update: v15Rule', () => {
|
|
|
15
15
|
logs.length = 0;
|
|
16
16
|
runner = new SchematicTestRunner('schematics', migrationCollection);
|
|
17
17
|
runner.logger.subscribe(e => logs.push(e.message));
|
|
18
|
-
await runner.runSchematic('migration-
|
|
18
|
+
await runner.runSchematic('migration-v16', {}, tree);
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
+
import * as colors from 'ansi-colors';
|
|
4
|
+
|
|
5
|
+
import { logStart } from '../../../utils';
|
|
6
|
+
import { UpgradeMainVersions } from '../../../utils/versions';
|
|
7
|
+
|
|
8
|
+
function finished(): Rule {
|
|
9
|
+
return (_tree: Tree, context: SchematicContext) => {
|
|
10
|
+
context.addTask(new NodePackageInstallTask());
|
|
11
|
+
|
|
12
|
+
context.logger.info(
|
|
13
|
+
colors.green(
|
|
14
|
+
` ✓ Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2390`
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function v16Rule(): Rule {
|
|
21
|
+
return async (tree: Tree, context: SchematicContext) => {
|
|
22
|
+
logStart(context, `Upgrade @delon/* version number`);
|
|
23
|
+
UpgradeMainVersions(tree);
|
|
24
|
+
return chain([finished()]);
|
|
25
|
+
};
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-alain",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Schematics specific to ng-alain",
|
|
5
5
|
"author": "cipchk<cipchk@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"swagger-typescript-api": "^12.0.
|
|
25
|
+
"swagger-typescript-api": "^12.0.4",
|
|
26
26
|
"ng-alain-sts": "^0.0.2",
|
|
27
27
|
"ng-alain-plugin-theme": "^15.0.1"
|
|
28
28
|
},
|
package/tpl/index.js
CHANGED
|
@@ -33,11 +33,10 @@ function parseExtraArgs(options) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function runFixJS(options) {
|
|
36
|
-
var _a;
|
|
37
36
|
parseExtraArgs(options);
|
|
38
37
|
const fixScriptPath = path.join(options._tplDir, '_fix.js');
|
|
39
38
|
if (fs.existsSync(fixScriptPath)) {
|
|
40
|
-
return (
|
|
39
|
+
return Promise.resolve(`${path.relative(__dirname, fixScriptPath)}`).then(s => require(s)).then(a => {
|
|
41
40
|
if (a.fix) {
|
|
42
41
|
return a.fix(options);
|
|
43
42
|
}
|
package/tpl/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/tpl/index.ts"],"names":[],"mappings":";;AAAA,2DAAuE;AACvE,yBAAyB;AACzB,6BAA6B;AAE7B,oCAAsC;AAGtC,MAAM,KAAK,GAAG,yEAAyE,CAAC;AAExF,SAAS,QAAQ,CAAC,OAAe;IAC/B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;IACzD,IAAI;QACF,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KAChC;IAAC,WAAM;QACN,MAAM,IAAI,gCAAmB,CAAC,iBAAiB,OAAO,CAAC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;KAC5E;IACD,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;QAC1C,MAAM,IAAI,gCAAmB,CAAC,wBAAwB,OAAO,CAAC,OAAO,kBAAkB,OAAO,CAAC,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC;KACnH;IAED,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAA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,IAAI,CAAC,CAAC,GAAG,EAAE;gBACT,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;aACvB;YACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED,mBAAyB,OAAe;IACtC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClB,OAAO,GAAkB,EAAE;QACzB,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAU,kBAAG,aAAa,EAAE,KAAK,IAAK,OAAO,EAAG,CAAC,CAAC;IACxF,CAAC,CAAC;AACJ,CAAC;AALD,4BAKC"}
|
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 = '^16.0.0';
|
|
5
|
+
exports.ZORROVERSION = '^16.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 = '^16.0.0';
|
|
2
|
+
export const ZORROVERSION = '^16.0.0-beta.0';
|
package/utils/versions.js
CHANGED
|
@@ -21,29 +21,29 @@ 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/builder@~
|
|
25
|
-
`@angular-eslint/eslint-plugin@~
|
|
26
|
-
`@angular-eslint/eslint-plugin-template@~
|
|
27
|
-
`@angular-eslint/schematics@~
|
|
28
|
-
`@angular-eslint/template-parser@~
|
|
29
|
-
`@typescript-eslint/eslint-plugin@~5.
|
|
30
|
-
`@typescript-eslint/parser@~5.
|
|
31
|
-
`eslint@^8.
|
|
32
|
-
`eslint-config-prettier@~8.
|
|
33
|
-
`eslint-plugin-import@~2.
|
|
34
|
-
`eslint-plugin-jsdoc@~
|
|
24
|
+
`@angular-eslint/builder@~16.0.3`,
|
|
25
|
+
`@angular-eslint/eslint-plugin@~16.0.3`,
|
|
26
|
+
`@angular-eslint/eslint-plugin-template@~16.0.3`,
|
|
27
|
+
`@angular-eslint/schematics@~16.0.3`,
|
|
28
|
+
`@angular-eslint/template-parser@~16.0.3`,
|
|
29
|
+
`@typescript-eslint/eslint-plugin@~5.59.8`,
|
|
30
|
+
`@typescript-eslint/parser@~5.59.8`,
|
|
31
|
+
`eslint@^8.41.0`,
|
|
32
|
+
`eslint-config-prettier@~8.8.0`,
|
|
33
|
+
`eslint-plugin-import@~2.25.3`,
|
|
34
|
+
`eslint-plugin-jsdoc@~45.0.0`,
|
|
35
35
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
36
36
|
`eslint-plugin-prettier@~4.2.1`,
|
|
37
|
-
`eslint-plugin-deprecation@~1.
|
|
38
|
-
`prettier@^2.8.
|
|
37
|
+
`eslint-plugin-deprecation@~1.4.1`,
|
|
38
|
+
`prettier@^2.8.8`,
|
|
39
39
|
`husky@^7.0.4`,
|
|
40
40
|
`ng-alain@${version}`,
|
|
41
41
|
`ng-alain-plugin-theme@^15.0.1`,
|
|
42
42
|
`source-map-explorer@^2.5.3`,
|
|
43
|
-
`@angular/language-service@^
|
|
43
|
+
`@angular/language-service@^16.0.3`,
|
|
44
44
|
`@delon/testing@${version}`
|
|
45
45
|
], 'devDependencies');
|
|
46
|
-
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
46
|
+
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^16.0.0-beta.0`]);
|
|
47
47
|
}
|
|
48
48
|
exports.UpgradeMainVersions = UpgradeMainVersions;
|
|
49
49
|
function addESLintRule(context, showLog = true) {
|
package/utils/versions.ts
CHANGED
|
@@ -17,31 +17,31 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
|
|
|
17
17
|
addPackage(
|
|
18
18
|
tree,
|
|
19
19
|
[
|
|
20
|
-
`@angular-eslint/builder@~
|
|
21
|
-
`@angular-eslint/eslint-plugin@~
|
|
22
|
-
`@angular-eslint/eslint-plugin-template@~
|
|
23
|
-
`@angular-eslint/schematics@~
|
|
24
|
-
`@angular-eslint/template-parser@~
|
|
25
|
-
`@typescript-eslint/eslint-plugin@~5.
|
|
26
|
-
`@typescript-eslint/parser@~5.
|
|
27
|
-
`eslint@^8.
|
|
28
|
-
`eslint-config-prettier@~8.
|
|
29
|
-
`eslint-plugin-import@~2.
|
|
30
|
-
`eslint-plugin-jsdoc@~
|
|
20
|
+
`@angular-eslint/builder@~16.0.3`,
|
|
21
|
+
`@angular-eslint/eslint-plugin@~16.0.3`,
|
|
22
|
+
`@angular-eslint/eslint-plugin-template@~16.0.3`,
|
|
23
|
+
`@angular-eslint/schematics@~16.0.3`,
|
|
24
|
+
`@angular-eslint/template-parser@~16.0.3`,
|
|
25
|
+
`@typescript-eslint/eslint-plugin@~5.59.8`,
|
|
26
|
+
`@typescript-eslint/parser@~5.59.8`,
|
|
27
|
+
`eslint@^8.41.0`,
|
|
28
|
+
`eslint-config-prettier@~8.8.0`,
|
|
29
|
+
`eslint-plugin-import@~2.25.3`,
|
|
30
|
+
`eslint-plugin-jsdoc@~45.0.0`,
|
|
31
31
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
32
32
|
`eslint-plugin-prettier@~4.2.1`,
|
|
33
|
-
`eslint-plugin-deprecation@~1.
|
|
34
|
-
`prettier@^2.8.
|
|
33
|
+
`eslint-plugin-deprecation@~1.4.1`,
|
|
34
|
+
`prettier@^2.8.8`,
|
|
35
35
|
`husky@^7.0.4`,
|
|
36
36
|
`ng-alain@${version}`,
|
|
37
37
|
`ng-alain-plugin-theme@^15.0.1`,
|
|
38
38
|
`source-map-explorer@^2.5.3`,
|
|
39
|
-
`@angular/language-service@^
|
|
39
|
+
`@angular/language-service@^16.0.3`,
|
|
40
40
|
`@delon/testing@${version}`
|
|
41
41
|
],
|
|
42
42
|
'devDependencies'
|
|
43
43
|
);
|
|
44
|
-
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
44
|
+
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^16.0.0-beta.0`]);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export function addESLintRule(context: SchematicContext, showLog: Boolean = true): Rule {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/v15/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAiF;AACjF,4DAA0E;AAC1E,sCAAsC;AAEtC,0CAAqE;AACrE,8CAAwD;AACxD,sDAA8D;AAE9D,SAAS,2BAA2B;IAClC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,MAAM,GAAG,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,eAAe;YAAE,OAAO;QACjC,OAAO,GAAG,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;QACpD,IAAA,oBAAY,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACxB,IAAA,gBAAQ,EAAC,OAAO,EAAE,4EAA4E,CAAC,CAAC;IAClG,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ;IACf,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,MAAM,CAAC,KAAK,CACV,uHAAuH,CACxH,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAA,gBAAQ,EAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC;QACrD,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,wBAAiB,GAAE,EAAE,2BAA2B,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IACjF,CAAC,CAAA,CAAC;AACJ,CAAC;AAND,0BAMC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
-
import * as colors from 'ansi-colors';
|
|
4
|
-
|
|
5
|
-
import { logStart, readPackage, writePackage } from '../../../utils';
|
|
6
|
-
import { addImportNotation } from '../../../utils/less';
|
|
7
|
-
import { UpgradeMainVersions } from '../../../utils/versions';
|
|
8
|
-
|
|
9
|
-
function removeDuplicateDependencies(): Rule {
|
|
10
|
-
return (tree: Tree, context: SchematicContext) => {
|
|
11
|
-
const pkg = readPackage(tree);
|
|
12
|
-
if (!pkg.devDependencies) return;
|
|
13
|
-
delete pkg.devDependencies['ng-alain-sts'];
|
|
14
|
-
delete pkg.devDependencies['ng-alain-plugin-theme'];
|
|
15
|
-
writePackage(tree, pkg);
|
|
16
|
-
logStart(context, `Remove duplicate dev-dependencies: 'ng-alain-sts', 'ng-alain-plugin-theme'`);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function finished(): Rule {
|
|
21
|
-
return (_tree: Tree, context: SchematicContext) => {
|
|
22
|
-
context.addTask(new NodePackageInstallTask());
|
|
23
|
-
|
|
24
|
-
context.logger.info(
|
|
25
|
-
colors.green(
|
|
26
|
-
` ✓ Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2347`
|
|
27
|
-
)
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function v15Rule(): Rule {
|
|
33
|
-
return async (tree: Tree, context: SchematicContext) => {
|
|
34
|
-
logStart(context, `Upgrade @delon/* version number`);
|
|
35
|
-
UpgradeMainVersions(tree);
|
|
36
|
-
return chain([addImportNotation(), removeDuplicateDependencies(), finished()]);
|
|
37
|
-
};
|
|
38
|
-
}
|