ng-alain 18.3.0 → 19.0.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/.nvmrc +1 -1
- package/application/files/root/.stylelintrc.js +1 -0
- package/application/files/root/.vscode/settings.json +3 -0
- package/application/files/src/app/app.component.ts +1 -2
- package/application/files/src/app/core/net/refresh-token.ts +9 -8
- package/application/files/src/app/layout/basic/basic.component.ts +4 -5
- package/application/files/src/app/layout/basic/widgets/clear-storage.component.ts +0 -1
- package/application/files/src/app/layout/basic/widgets/fullscreen.component.ts +0 -1
- package/application/files/src/app/layout/basic/widgets/i18n.component.ts +0 -1
- package/application/files/src/app/layout/basic/widgets/search.component.ts +1 -3
- package/application/files/src/app/layout/basic/widgets/user.component.ts +0 -1
- package/application/files/src/app/layout/blank/blank.component.ts +0 -1
- package/application/files/src/app/layout/passport/passport.component.ts +0 -1
- package/application/files/src/app/routes/dashboard/dashboard.component.ts +0 -1
- package/application/files/src/app/routes/exception/exception.component.ts +0 -1
- package/application/files/src/app/routes/exception/trigger.component.ts +0 -1
- package/application/files/src/app/routes/passport/lock/lock.component.ts +0 -1
- package/application/files/src/app/routes/passport/login/login.component.ts +0 -1
- package/application/files/src/app/routes/passport/register/register.component.ts +0 -1
- package/application/files/src/app/routes/passport/register-result/register-result.component.ts +0 -1
- package/application/files/src/app/shared/index.ts +0 -1
- package/application/files/src/app/shared/json-schema/test/test.widget.ts +0 -1
- package/application/files/src/app/shared/shared-imports.ts +5 -2
- package/application/index.js +6 -6
- package/application/index.js.map +1 -1
- package/application/index.ts +7 -7
- package/docs/plugin.en-US.md +7 -7
- package/docs/plugin.zh-CN.md +7 -7
- package/edit/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -1
- package/empty/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -1
- package/empty/index.spec.ts +1 -1
- package/list/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -1
- package/list/index.spec.ts +1 -1
- package/migration.json +4 -4
- package/module/index.spec.ts +1 -1
- package/ng-add/index.js +3 -3
- package/ng-add/index.js.map +1 -1
- package/ng-add/index.ts +4 -4
- 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/{V18 → V19}/index.js +26 -5
- package/ng-update/upgrade-rules/V19/index.js.map +1 -0
- package/ng-update/upgrade-rules/V19/index.spec.ts +34 -0
- package/ng-update/upgrade-rules/V19/index.ts +47 -0
- package/package.json +2 -2
- package/plugin/files/rtl/layout/basic/widgets/rtl.component.ts +0 -1
- package/plugin/files/sts/swagger-list/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -1
- package/plugin/plugin.code-style.js.map +1 -1
- package/plugin/plugin.code-style.ts +1 -1
- package/plugin/plugin.icon.js +2 -2
- package/plugin/plugin.icon.js.map +1 -1
- package/plugin/plugin.icon.spec.ts +3 -0
- package/plugin/plugin.icon.ts +2 -2
- package/sta/index.js +1 -1
- package/sta/index.js.map +1 -1
- package/sta/index.ts +4 -4
- package/tpl/index.spec.ts +1 -1
- package/tpl/schema.json +7 -0
- package/utils/alain.spec.ts +1 -1
- package/utils/ast.spec.ts +0 -1
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/versions.js +16 -16
- package/utils/versions.ts +16 -16
- package/view/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -1
- package/ng-update/upgrade-rules/V18/index.js.map +0 -1
- package/ng-update/upgrade-rules/V18/index.spec.ts +0 -42
- package/ng-update/upgrade-rules/V18/index.ts +0 -25
- package/ng-update/upgrade-rules/V18/remove-ng-less-javascript-enabled-patch.js +0 -22
- package/ng-update/upgrade-rules/V18/remove-ng-less-javascript-enabled-patch.js.map +0 -1
- package/ng-update/upgrade-rules/V18/remove-ng-less-javascript-enabled-patch.ts +0 -24
package/utils/versions.js
CHANGED
|
@@ -21,31 +21,31 @@ 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@^8.
|
|
30
|
-
`@typescript-eslint/parser@^8.
|
|
24
|
+
`@angular-eslint/builder@^19.0.2`,
|
|
25
|
+
`@angular-eslint/eslint-plugin@^19.0.2`,
|
|
26
|
+
`@angular-eslint/eslint-plugin-template@^19.0.2`,
|
|
27
|
+
`@angular-eslint/schematics@^19.0.2`,
|
|
28
|
+
`@angular-eslint/template-parser@^19.0.2`,
|
|
29
|
+
`@typescript-eslint/eslint-plugin@^8.20.0`,
|
|
30
|
+
`@typescript-eslint/parser@^8.20.0`,
|
|
31
31
|
`eslint@^8.57.0`,
|
|
32
32
|
`eslint-config-prettier@~9.1.0`,
|
|
33
|
-
`eslint-plugin-import@~2.
|
|
34
|
-
`eslint-plugin-jsdoc@~50.
|
|
33
|
+
`eslint-plugin-import@~2.31.0`,
|
|
34
|
+
`eslint-plugin-jsdoc@~50.6.2`,
|
|
35
35
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
36
|
-
`eslint-plugin-prettier@~5.2.
|
|
36
|
+
`eslint-plugin-prettier@~5.2.2`,
|
|
37
37
|
`eslint-plugin-deprecation@^3.0.0`,
|
|
38
|
-
`prettier@^3.
|
|
39
|
-
`husky@^9.1.
|
|
38
|
+
`prettier@^3.4.2`,
|
|
39
|
+
`husky@^9.1.7`,
|
|
40
40
|
`ng-alain@${version}`,
|
|
41
41
|
`ng-alain-plugin-theme@^18.0.0`,
|
|
42
42
|
`source-map-explorer@^2.5.3`,
|
|
43
|
-
`@angular/language-service@^
|
|
44
|
-
`ngx-tinymce@^
|
|
45
|
-
`@ng-util/monaco-editor@^
|
|
43
|
+
`@angular/language-service@^19.1.1`,
|
|
44
|
+
`ngx-tinymce@^19.0.0`,
|
|
45
|
+
`@ng-util/monaco-editor@^19.0.0`,
|
|
46
46
|
`@delon/testing@${version}`
|
|
47
47
|
], 'devDependencies');
|
|
48
|
-
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
48
|
+
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^19.0.2`]);
|
|
49
49
|
}
|
|
50
50
|
function addESLintRule(projectName) {
|
|
51
51
|
return (0, workspace_1.updateWorkspace)((workspace) => __awaiter(this, void 0, void 0, function* () {
|
package/utils/versions.ts
CHANGED
|
@@ -16,33 +16,33 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
|
|
|
16
16
|
addPackage(
|
|
17
17
|
tree,
|
|
18
18
|
[
|
|
19
|
-
`@angular-eslint/builder@^
|
|
20
|
-
`@angular-eslint/eslint-plugin@^
|
|
21
|
-
`@angular-eslint/eslint-plugin-template@^
|
|
22
|
-
`@angular-eslint/schematics@^
|
|
23
|
-
`@angular-eslint/template-parser@^
|
|
24
|
-
`@typescript-eslint/eslint-plugin@^8.
|
|
25
|
-
`@typescript-eslint/parser@^8.
|
|
19
|
+
`@angular-eslint/builder@^19.0.2`,
|
|
20
|
+
`@angular-eslint/eslint-plugin@^19.0.2`,
|
|
21
|
+
`@angular-eslint/eslint-plugin-template@^19.0.2`,
|
|
22
|
+
`@angular-eslint/schematics@^19.0.2`,
|
|
23
|
+
`@angular-eslint/template-parser@^19.0.2`,
|
|
24
|
+
`@typescript-eslint/eslint-plugin@^8.20.0`,
|
|
25
|
+
`@typescript-eslint/parser@^8.20.0`,
|
|
26
26
|
`eslint@^8.57.0`,
|
|
27
27
|
`eslint-config-prettier@~9.1.0`,
|
|
28
|
-
`eslint-plugin-import@~2.
|
|
29
|
-
`eslint-plugin-jsdoc@~50.
|
|
28
|
+
`eslint-plugin-import@~2.31.0`,
|
|
29
|
+
`eslint-plugin-jsdoc@~50.6.2`,
|
|
30
30
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
31
|
-
`eslint-plugin-prettier@~5.2.
|
|
31
|
+
`eslint-plugin-prettier@~5.2.2`,
|
|
32
32
|
`eslint-plugin-deprecation@^3.0.0`,
|
|
33
|
-
`prettier@^3.
|
|
34
|
-
`husky@^9.1.
|
|
33
|
+
`prettier@^3.4.2`,
|
|
34
|
+
`husky@^9.1.7`,
|
|
35
35
|
`ng-alain@${version}`,
|
|
36
36
|
`ng-alain-plugin-theme@^18.0.0`,
|
|
37
37
|
`source-map-explorer@^2.5.3`,
|
|
38
|
-
`@angular/language-service@^
|
|
39
|
-
`ngx-tinymce@^
|
|
40
|
-
`@ng-util/monaco-editor@^
|
|
38
|
+
`@angular/language-service@^19.1.1`,
|
|
39
|
+
`ngx-tinymce@^19.0.0`,
|
|
40
|
+
`@ng-util/monaco-editor@^19.0.0`,
|
|
41
41
|
`@delon/testing@${version}`
|
|
42
42
|
],
|
|
43
43
|
'devDependencies'
|
|
44
44
|
);
|
|
45
|
-
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
45
|
+
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^19.0.2`]);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export function addESLintRule(projectName: string): Rule {
|
package/view/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template
CHANGED
|
@@ -7,7 +7,6 @@ import { SHARED_IMPORTS } from '@shared';<%}%>
|
|
|
7
7
|
|
|
8
8
|
@Component({
|
|
9
9
|
selector: '<%= selector %>',<% if(standalone) {%>
|
|
10
|
-
standalone: true,
|
|
11
10
|
imports: [...SHARED_IMPORTS],<%}%><% if(inlineTemplate) { %>
|
|
12
11
|
template: ``,<% } else { %>
|
|
13
12
|
templateUrl: './<%= dasherize(name) %>.component.html',<% } if(!inlineStyle) { %><% } else { %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V18/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAkBA,0BAMC;AAxBD,2DAAiF;AACjF,4DAA0E;AAE1E,0CAA+D;AAC/D,sDAA8D;AAC9D,uGAAwE;AAExE,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,IAAA,qDAAW,GAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAA,CAAC;AACJ,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
2
|
-
|
|
3
|
-
import { tryAddFile } from '../../../utils';
|
|
4
|
-
import { createAlainApp, migrationCollection } from '../../../utils/testing';
|
|
5
|
-
|
|
6
|
-
describe('Schematic: ng-update: v18Rule', () => {
|
|
7
|
-
let runner: SchematicTestRunner;
|
|
8
|
-
let tree: UnitTestTree;
|
|
9
|
-
const logs: string[] = [];
|
|
10
|
-
|
|
11
|
-
beforeEach(async () => {
|
|
12
|
-
({ runner, tree } = await createAlainApp());
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
async function runMigration(): Promise<void> {
|
|
16
|
-
logs.length = 0;
|
|
17
|
-
runner = new SchematicTestRunner('schematics', migrationCollection);
|
|
18
|
-
runner.logger.subscribe(e => logs.push(e.message));
|
|
19
|
-
await runner.runSchematic('migration-v18', {}, tree);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
it('remove ng-less-javascript-enabled-patch', async () => {
|
|
23
|
-
const packageJsonPath = '/package.json';
|
|
24
|
-
tryAddFile(
|
|
25
|
-
tree,
|
|
26
|
-
packageJsonPath,
|
|
27
|
-
`{
|
|
28
|
-
"scripts": {
|
|
29
|
-
"postinstall": "ng-less-javascript-enabled-patch"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"ng-less-javascript-enabled-patch": "17.0.2"
|
|
33
|
-
}
|
|
34
|
-
}`
|
|
35
|
-
);
|
|
36
|
-
await runMigration();
|
|
37
|
-
const content = tree.readContent(packageJsonPath);
|
|
38
|
-
expect(content).not.toContain(`"postinstall": "ng-less-javascript-enabled-patch"`);
|
|
39
|
-
expect(content).toContain(`"postinstall": ""`);
|
|
40
|
-
expect(content).not.toContain(`"ng-less-javascript-enabled-patch":`);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
-
|
|
4
|
-
import { logFinished, logInfo, logWarn } from '../../../utils';
|
|
5
|
-
import { UpgradeMainVersions } from '../../../utils/versions';
|
|
6
|
-
import { removeNljep } from './remove-ng-less-javascript-enabled-patch';
|
|
7
|
-
|
|
8
|
-
function finished(): Rule {
|
|
9
|
-
return (_tree: Tree, context: SchematicContext) => {
|
|
10
|
-
context.addTask(new NodePackageInstallTask());
|
|
11
|
-
|
|
12
|
-
logFinished(
|
|
13
|
-
context,
|
|
14
|
-
`Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2502`
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function v18Rule(): Rule {
|
|
20
|
-
return async (tree: Tree, context: SchematicContext) => {
|
|
21
|
-
UpgradeMainVersions(tree);
|
|
22
|
-
logInfo(context, `Upgrade dependency version number`);
|
|
23
|
-
return chain([removeNljep(), finished()]);
|
|
24
|
-
};
|
|
25
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeNljep = removeNljep;
|
|
4
|
-
const utils_1 = require("../../../utils");
|
|
5
|
-
const PACKAGE_NAME = 'ng-less-javascript-enabled-patch';
|
|
6
|
-
function removeNljep() {
|
|
7
|
-
return (tree, context) => {
|
|
8
|
-
const json = (0, utils_1.readPackage)(tree);
|
|
9
|
-
if (json == null)
|
|
10
|
-
return;
|
|
11
|
-
const postinstall = json.scripts.postinstall;
|
|
12
|
-
if (typeof postinstall === 'string' && postinstall.includes(PACKAGE_NAME)) {
|
|
13
|
-
json.scripts.postinstall = postinstall.replace(`${PACKAGE_NAME}`, '');
|
|
14
|
-
}
|
|
15
|
-
if (json.devDependencies[PACKAGE_NAME]) {
|
|
16
|
-
delete json.devDependencies[PACKAGE_NAME];
|
|
17
|
-
}
|
|
18
|
-
(0, utils_1.writePackage)(tree, json);
|
|
19
|
-
(0, utils_1.logInfo)(context, `Remove [https://github.com/cipchk/${PACKAGE_NAME}] for devDependencies`);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=remove-ng-less-javascript-enabled-patch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-ng-less-javascript-enabled-patch.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V18/remove-ng-less-javascript-enabled-patch.ts"],"names":[],"mappings":";;AAKA,kCAkBC;AArBD,0CAAoE;AAEpE,MAAM,YAAY,GAAG,kCAAkC,CAAC;AACxD,SAAgB,WAAW;IACzB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,MAAM,IAAI,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO;QAEzB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAC7C,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,YAAY,EAAE,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC;YACvC,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAC5C,CAAC;QAED,IAAA,oBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEzB,IAAA,eAAO,EAAC,OAAO,EAAE,qCAAqC,YAAY,uBAAuB,CAAC,CAAC;IAC7F,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
|
|
3
|
-
import { logInfo, readPackage, writePackage } from '../../../utils';
|
|
4
|
-
|
|
5
|
-
const PACKAGE_NAME = 'ng-less-javascript-enabled-patch';
|
|
6
|
-
export function removeNljep(): Rule {
|
|
7
|
-
return (tree: Tree, context: SchematicContext) => {
|
|
8
|
-
const json = readPackage(tree);
|
|
9
|
-
if (json == null) return;
|
|
10
|
-
|
|
11
|
-
const postinstall = json.scripts.postinstall;
|
|
12
|
-
if (typeof postinstall === 'string' && postinstall.includes(PACKAGE_NAME)) {
|
|
13
|
-
json.scripts.postinstall = postinstall.replace(`${PACKAGE_NAME}`, '');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (json.devDependencies[PACKAGE_NAME]) {
|
|
17
|
-
delete json.devDependencies[PACKAGE_NAME];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
writePackage(tree, json);
|
|
21
|
-
|
|
22
|
-
logInfo(context, `Remove [https://github.com/cipchk/${PACKAGE_NAME}] for devDependencies`);
|
|
23
|
-
};
|
|
24
|
-
}
|