From 9d82edf6d5f9def56b9b902a6091b02b1f6b1135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Thu, 1 Nov 2018 13:57:37 +0800 Subject: [PATCH] release(2.0.0-rc.2): release 2.0.0-rc.2 (#250) --- CHANGELOG.md | 23 +++++++++ docs/changelog.en-US.md | 20 ++++++++ docs/changelog.zh-CN.md | 21 ++++++++ package.json | 32 ++++++------- packages/abc/lodop/lodop.spec.ts | 1 + packages/abc/xlsx/xlsx.spec.ts | 8 ++-- packages/mock/src/mock.service.spec.ts | 1 + .../class-names/classNamesIdentifierRule.ts | 48 +++++++++++++------ .../cssSelectorsStringLiteralRule.ts | 6 +-- .../cssSelectorsStylesheetRule.ts | 6 +-- .../css-selectors/cssSelectorsTemplateRule.ts | 6 +-- .../misc-checks/checkPropertyNamesMiscRule.ts | 18 +++---- 12 files changed, 137 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f54bc076f9..6c1ffa85ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ + +# [2.0.0-rc.2](https://github.com/ng-alain/delon/compare/2.0.0-rc.1...2.0.0-rc.2) (2018-11-01) + + +### Bug Fixes + +* **module:*:** safe html ([#239](https://github.com/ng-alain/delon/issues/239)) ([0298665](https://github.com/ng-alain/delon/commit/0298665)) +* **module:form:** fix attempt to use a destroyed error ([#248](https://github.com/ng-alain/delon/issues/248)) ([3e470e7](https://github.com/ng-alain/delon/commit/3e470e7)) +* **module:sf:** fix button spanLabelFixed is zero value ([#242](https://github.com/ng-alain/delon/issues/242)) ([1f601e2](https://github.com/ng-alain/delon/commit/1f601e2)) +* **module:theme:** fix grey color values ([#249](https://github.com/ng-alain/delon/issues/249)) ([6234538](https://github.com/ng-alain/delon/commit/6234538)) +* **module:theme:** fix ng-invalid style ([#243](https://github.com/ng-alain/delon/issues/243)) ([fe6d104](https://github.com/ng-alain/delon/commit/fe6d104)) +* **schematics:** fix repeat alias name ([#247](https://github.com/ng-alain/delon/issues/247)) ([4f744fa](https://github.com/ng-alain/delon/commit/4f744fa)) + + +### Features + +* **module:mock:** support array params of queryString ([#246](https://github.com/ng-alain/delon/issues/246)) ([f0135ce](https://github.com/ng-alain/delon/commit/f0135ce)) +* **module:st:** add icon of button ([#240](https://github.com/ng-alain/delon/issues/240)) ([1145d47](https://github.com/ng-alain/delon/commit/1145d47)) +* **module:theme:** add recursive upward find in menu service ([#244](https://github.com/ng-alain/delon/issues/244)) ([c391d3a](https://github.com/ng-alain/delon/commit/c391d3a)) +* **module:theme:i18n:** add i18n pipe ([#238](https://github.com/ng-alain/delon/issues/238)) ([423c9c3](https://github.com/ng-alain/delon/commit/423c9c3)) + + + # [2.0.0-rc.1](https://github.com/ng-alain/delon/compare/2.0.0-beta.5...2.0.0-rc.1) (2018-10-25) diff --git a/docs/changelog.en-US.md b/docs/changelog.en-US.md index f83579534e..148295d8b3 100644 --- a/docs/changelog.en-US.md +++ b/docs/changelog.en-US.md @@ -4,6 +4,26 @@ title: Change Log type: Other --- +## 2.0.0-rc.2 + +`2018-11-01` + +### Bug Fixes + +* **module:sf:** 修复 `attempt to use a destroyed` 异常 ([#248](https://github.com/ng-alain/delon/issues/248)) ([3e470e7](https://github.com/ng-alain/delon/commit/3e470e7)) +* **module:sf:** 修复按钮 `spanLabelFixed` 为 `0` 时无效问题 ([#242](https://github.com/ng-alain/delon/issues/242)) ([1f601e2](https://github.com/ng-alain/delon/commit/1f601e2)) +* **module:theme:** 修复错误的灰色系代码 ([#249](https://github.com/ng-alain/delon/issues/249)) ([6234538](https://github.com/ng-alain/delon/commit/6234538)) +* **module:theme:** 修复 `ng-invalid` 样式风格 ([#243](https://github.com/ng-alain/delon/issues/243)) ([fe6d104](https://github.com/ng-alain/delon/commit/fe6d104)) +* **schematics:** 修复 `-t` 重复别名导致无效问题 ([#247](https://github.com/ng-alain/delon/issues/247)) ([4f744fa](https://github.com/ng-alain/delon/commit/4f744fa)) + +### Features + +* **module:mock:** QueryString 支持数组类型 ([#246](https://github.com/ng-alain/delon/issues/246)) ([f0135ce](https://github.com/ng-alain/delon/commit/f0135ce)) +* **module:st:** 增加按钮 Icon ([#240](https://github.com/ng-alain/delon/issues/240)) ([1145d47](https://github.com/ng-alain/delon/commit/1145d47)) +* **module:theme:MenuService** 增加向上查找能力 ([#244](https://github.com/ng-alain/delon/issues/244)) ([c391d3a](https://github.com/ng-alain/delon/commit/c391d3a)) +* **module:theme:html:** 安全HTML,增加 `| html` 管道 ([#239](https://github.com/ng-alain/delon/issues/239)) ([0298665](https://github.com/ng-alain/delon/commit/0298665)) +* **module:theme:i18n:** 增加 `| i18n` 管道 ([#238](https://github.com/ng-alain/delon/issues/238)) ([423c9c3](https://github.com/ng-alain/delon/commit/423c9c3)) + ## 2.0.0-rc.1 `2018-10-25` diff --git a/docs/changelog.zh-CN.md b/docs/changelog.zh-CN.md index bcb0965265..e5afa4e1d0 100644 --- a/docs/changelog.zh-CN.md +++ b/docs/changelog.zh-CN.md @@ -4,6 +4,27 @@ title: 更新日志 type: Other --- +## 2.0.0-rc.2 + +`2018-11-01` + +### Bug Fixes + +* **module:sf:** fix attempt to use a destroyed error ([#248](https://github.com/ng-alain/delon/issues/248)) ([3e470e7](https://github.com/ng-alain/delon/commit/3e470e7)) +* **module:sf:** fix button spanLabelFixed is zero value ([#242](https://github.com/ng-alain/delon/issues/242)) ([1f601e2](https://github.com/ng-alain/delon/commit/1f601e2)) +* **module:theme:** fix grey color values ([#249](https://github.com/ng-alain/delon/issues/249)) ([6234538](https://github.com/ng-alain/delon/commit/6234538)) +* **module:theme:** fix ng-invalid style ([#243](https://github.com/ng-alain/delon/issues/243)) ([fe6d104](https://github.com/ng-alain/delon/commit/fe6d104)) +* **schematics:** fix repeat alias name ([#247](https://github.com/ng-alain/delon/issues/247)) ([4f744fa](https://github.com/ng-alain/delon/commit/4f744fa)) + +### Features + +* **module:mock:** support array params of queryString ([#246](https://github.com/ng-alain/delon/issues/246)) ([f0135ce](https://github.com/ng-alain/delon/commit/f0135ce)) +* **module:st:** add icon of button ([#240](https://github.com/ng-alain/delon/issues/240)) ([1145d47](https://github.com/ng-alain/delon/commit/1145d47)) +* **module:theme:MenuService:** add recursive upward find in menu service ([#244](https://github.com/ng-alain/delon/issues/244)) ([c391d3a](https://github.com/ng-alain/delon/commit/c391d3a)) +* **module:theme:html:** safe html, add `| html` pipe ([#239](https://github.com/ng-alain/delon/issues/239)) ([0298665](https://github.com/ng-alain/delon/commit/0298665)) +* **module:theme:i18n:** add i18n pipe ([#238](https://github.com/ng-alain/delon/issues/238)) ([423c9c3](https://github.com/ng-alain/delon/commit/423c9c3)) + + ## 2.0.0-rc.1 `2018-10-25` diff --git a/package.json b/package.json index 0fad361485..ed5bd8be40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "delon", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "typings": "index.d.ts", "description": "Delon is a set of essential modules for ng-alain.", "repository": { @@ -47,7 +47,7 @@ "@antv/data-set": "^0.9.5", "@antv/g2": "^3.2.7", "@antv/g2-plugin-slider": "^2.0.2", - "@ngx-translate/core": "^10.0.1", + "@ngx-translate/core": "^11.0.0", "@stackblitz/sdk": "^1.2.0", "ajv": "^6.4.0", "core-js": "^2.5.4", @@ -58,7 +58,7 @@ "ng-github-button": "^1.0.0", "ng-zorro-antd": "^1.8.0", "ng2-ace-editor": "^0.3.8", - "ngx-color": "^1.3.1", + "ngx-color": "^2.0.5", "ngx-countdown": "^3.0.0", "ngx-highlight-js": "^2.0.0", "ngx-simplemde": "^1.1.1", @@ -76,9 +76,7 @@ "@angular/compiler-cli": "^6.1.0", "@angular/language-service": "^6.1.0", "@angularclass/hmr": "^2.1.3", - "@bazel/ibazel": "^0.5.0", "@schematics/schematics": "~0.8.0", - "@types/chalk": "^0.4.31", "@types/deep-extend": "^0.4.31", "@types/extend": "^3.0.0", "@types/fs-extra": "^5.0.1", @@ -90,41 +88,41 @@ "@types/node": "~8.9.4", "@types/parse5": "^5.0.0", "antd-theme-generator": "^1.1.3", - "chalk": "^1.1.3", + "chalk": "^2.4.1", "codecov": "^3.1.0", - "codelyzer": "~4.3.0", + "codelyzer": "^4.5.0", "conventional-changelog-cli": "^2.0.5", "domhandler": "^2.4.2", "editorconfig-tools": "^0.1.1", "fs-extra": "^7.0.0", - "gh-pages": "^1.2.0", + "gh-pages": "^2.0.1", "htmlparser2": "^3.9.2", "husky": "^1.1.0", - "jasmine-core": "~2.99.1", + "jasmine-core": "~3.3.0", "jasmine-spec-reporter": "~4.2.1", "jsonml.js": "^0.1.0", - "karma": "~3.0.0", + "karma": "~3.1.1", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", - "klaw-sync": "^5.0.0", + "karma-jasmine-html-reporter": "^1.4.0", + "klaw-sync": "^6.0.0", "less-plugin-clean-css": "^1.5.1", - "lint-staged": "^7.1.0", + "lint-staged": "^8.0.4", "mark-twain": "^2.0.3", "mockjs": "^1.0.1-beta3", - "mustache": "^2.3.0", + "mustache": "^3.0.0", "ng-packagr": "^4.1.1", "parse5": "^5.0.0", "prettier": "^1.14.1", "prettier-stylelint": "^0.4.2", "protractor": "~5.4.0", "readline-sync": "^1.4.9", - "rollup": "^0.58.2", + "rollup": "^0.66.6", "rollup-plugin-node-resolve": "^3.3.0", "rollup-plugin-replace": "^2.0.0", "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-uglify": "^5.0.0", + "rollup-plugin-uglify": "^6.0.0", "stream": "0.0.2", "stylelint": "^9.2.0", "stylelint-config-standard": "^18.2.0", @@ -133,7 +131,7 @@ "tslint-config-prettier": "^1.12.0", "tslint-language-service": "^0.9.9", "typescript": "~2.9.2", - "webpack-bundle-analyzer": "^2.13.0", + "webpack-bundle-analyzer": "^3.0.3", "xlsx": "^0.14.0" }, "husky": { diff --git a/packages/abc/lodop/lodop.spec.ts b/packages/abc/lodop/lodop.spec.ts index 5e16430563..dad11168d7 100644 --- a/packages/abc/lodop/lodop.spec.ts +++ b/packages/abc/lodop/lodop.spec.ts @@ -254,6 +254,7 @@ describe('abc: lodop', () => { const code = `LODOP.PRINT_INITA(0, 0, 100, 100, 'test');`; let isPrintError = false; beforeEach(() => { + isPrintError = false; genModule(cog); mockLodop = { SET_LICENSES: jasmine.createSpy('SET_LICENSES'), diff --git a/packages/abc/xlsx/xlsx.spec.ts b/packages/abc/xlsx/xlsx.spec.ts index 152410b36e..3f80b4f75e 100644 --- a/packages/abc/xlsx/xlsx.spec.ts +++ b/packages/abc/xlsx/xlsx.spec.ts @@ -1,5 +1,5 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { LazyService } from '@delon/util'; +import { LazyService, deepCopy } from '@delon/util'; import { HttpClient } from '@angular/common/http'; import { of, throwError } from 'rxjs'; import { Component, DebugElement } from '@angular/core'; @@ -8,9 +8,11 @@ import * as fs from 'file-saver'; import { XlsxModule } from './xlsx.module'; import { XlsxService } from './xlsx.service'; import { XlsxExportOptions } from './xlsx.types'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; class MockLazyService { load() { + (window as any).XLSX = deepCopy(DEFAULTMOCKXLSX); return Promise.resolve(); } } @@ -43,7 +45,6 @@ const DEFAULTMOCKXLSX = { let isErrorRequest = false; class MockHttpClient { request() { - (window as any).XLSX = DEFAULTMOCKXLSX; return isErrorRequest ? throwError(null) : of(null); } } @@ -52,7 +53,7 @@ describe('abc: xlsx', () => { let srv: XlsxService; function genModule() { const injector = TestBed.configureTestingModule({ - imports: [XlsxModule.forRoot()], + imports: [XlsxModule.forRoot(), HttpClientTestingModule], declarations: [TestComponent], providers: [ { provide: HttpClient, useClass: MockHttpClient }, @@ -114,6 +115,7 @@ describe('abc: xlsx', () => { describe('[#export]', () => { beforeEach(() => { spyOn(fs.default, 'saveAs'); + genModule(); }); it('should be export xlsx via array', (done: () => void) => { srv diff --git a/packages/mock/src/mock.service.spec.ts b/packages/mock/src/mock.service.spec.ts index 9f79c046d7..8ac82cc710 100644 --- a/packages/mock/src/mock.service.spec.ts +++ b/packages/mock/src/mock.service.spec.ts @@ -156,6 +156,7 @@ describe('mock: service', () => { }); it('#clearCache', () => { + genModule({ data: DATA }); srv.clearCache(); const rule = srv.getRule('POST', '/users/1'); expect(rule).toBeNull(); diff --git a/packages/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.ts b/packages/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.ts index 31d5d97d5b..495169d56c 100644 --- a/packages/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.ts +++ b/packages/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {green, red} from 'chalk'; -import {RuleFailure, Rules, RuleWalker} from 'tslint'; +import chalk from 'chalk'; +import { RuleFailure, Rules, RuleWalker } from 'tslint'; import * as ts from 'typescript'; import { isExportSpecifierNode, @@ -18,21 +18,19 @@ import { isDelonExportDeclaration, isDelonImportDeclaration, } from '../../typescript/module-specifiers'; -import {getUpgradeDataFromWalker} from '../../upgrade-data'; +import { getUpgradeDataFromWalker } from '../../upgrade-data'; /** * Rule that walks through every identifier that is part of Angular Material or thr CDK * and replaces the outdated name with the new one if specified in the upgrade data. */ export class Rule extends Rules.AbstractRule { - apply(sourceFile: ts.SourceFile): RuleFailure[] { return this.applyWithWalker(new Walker(sourceFile, this.getOptions())); } } export class Walker extends RuleWalker { - /** Change data that upgrades to the specified target version. */ data = getUpgradeDataFromWalker(this, 'classNames'); @@ -56,7 +54,10 @@ export class Walker extends RuleWalker { // For namespace imports that are referring to`@delon/*`, we store the // namespace name in order to be able to safely find identifiers that don't belong to the // developer's application. - if (isNamespaceImportNode(identifier) && isDelonImportDeclaration(identifier)) { + if ( + isNamespaceImportNode(identifier) && + isDelonImportDeclaration(identifier) + ) { this.trustedNamespaces.add(identifier.text); return this._createFailureWithReplacement(identifier); @@ -64,14 +65,20 @@ export class Walker extends RuleWalker { // For export declarations that are referring to`@delon/*`, the identifier // can be immediately updated to the new name. - if (isExportSpecifierNode(identifier) && isDelonExportDeclaration(identifier)) { + if ( + isExportSpecifierNode(identifier) && + isDelonExportDeclaration(identifier) + ) { return this._createFailureWithReplacement(identifier); } // For import declarations that are referring to`@delon/*`, the name of // the import identifiers. This allows us to identify identifiers that belong to Material and // the CDK, and we won't accidentally touch a developer's identifier. - if (isImportSpecifierNode(identifier) && isDelonImportDeclaration(identifier)) { + if ( + isImportSpecifierNode(identifier) && + isDelonImportDeclaration(identifier) + ) { this.trustedIdentifiers.add(identifier.text); return this._createFailureWithReplacement(identifier); @@ -82,7 +89,10 @@ export class Walker extends RuleWalker { if (ts.isPropertyAccessExpression(identifier.parent)) { const expression = identifier.parent.expression; - if (ts.isIdentifier(expression) && this.trustedNamespaces.has(expression.text)) { + if ( + ts.isIdentifier(expression) && + this.trustedNamespaces.has(expression.text) + ) { return this._createFailureWithReplacement(identifier); } } else if (this.trustedIdentifiers.has(identifier.text)) { @@ -95,18 +105,26 @@ export class Walker extends RuleWalker { const classData = this.data.find(data => data.replace === identifier.text); if (!classData) { - console.error(`Could not find updated name for identifier "${identifier.text}" in ` + - ` in file ${this.getSourceFile().fileName}.`); + console.error( + `Could not find updated name for identifier "${identifier.text}" in ` + + ` in file ${this.getSourceFile().fileName}.`, + ); return; } const replacement = this.createReplacement( - identifier.getStart(), identifier.getWidth(), classData.replaceWith); + identifier.getStart(), + identifier.getWidth(), + classData.replaceWith, + ); this.addFailureAtNode( identifier, - `Found deprecated identifier "${red(classData.replace)}" which has been renamed to` + - ` "${green(classData.replaceWith)}"`, - replacement); + `Found deprecated identifier "${chalk.red( + classData.replace, + )}" which has been renamed to` + + ` "${chalk.green(classData.replaceWith)}"`, + replacement, + ); } } diff --git a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.ts b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.ts index d8581b46d8..a57baae91c 100644 --- a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.ts +++ b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {green, red} from 'chalk'; +import chalk from 'chalk'; import {Replacement, RuleFailure, Rules, RuleWalker} from 'tslint'; import * as ts from 'typescript'; import {CssSelectorUpgradeData} from '../../data/css-selectors'; @@ -50,7 +50,7 @@ export class Walker extends RuleWalker { /** Adds a css selector failure with the given replacement at the specified node. */ private _addFailureWithReplacement(node: ts.Node, replacement: Replacement, data: CssSelectorUpgradeData) { - this.addFailureAtNode(node, `Found deprecated CSS selector "${red(data.replace)}" which has ` + - `been renamed to "${green(data.replaceWith)}"`, replacement); + this.addFailureAtNode(node, `Found deprecated CSS selector "${chalk.red(data.replace)}" which has ` + + `been renamed to "${chalk.green(data.replaceWith)}"`, replacement); } } diff --git a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.ts b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.ts index c5f1e94914..aac09958ac 100644 --- a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.ts +++ b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {green, red} from 'chalk'; +import chalk from 'chalk'; import {IOptions, Replacement, RuleFailure, Rules} from 'tslint'; import * as ts from 'typescript'; import {ExternalResource} from '../../tslint/component-file'; @@ -58,8 +58,8 @@ export class Walker extends ComponentWalker { return; } - const failureMessage = `Found deprecated CSS selector "${red(data.replace)}" ` + - `which has been renamed to "${green(data.replaceWith)}"`; + const failureMessage = `Found deprecated CSS selector "${chalk.red(data.replace)}" ` + + `which has been renamed to "${chalk.green(data.replaceWith)}"`; findAllSubstringIndices(stylesheetContent, data.replace) .map(offset => node.getStart() + offset) diff --git a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.ts b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.ts index ae4c1924bb..41d47c84d8 100644 --- a/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.ts +++ b/packages/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {green, red} from 'chalk'; +import chalk from 'chalk'; import {Replacement, RuleFailure, Rules} from 'tslint'; import * as ts from 'typescript'; import {ExternalResource} from '../../tslint/component-file'; @@ -53,8 +53,8 @@ export class Walker extends ComponentWalker { return; } - const failureMessage = `Found deprecated CSS selector "${red(data.replace)}"` + - ` which has been renamed to "${green(data.replaceWith)}"`; + const failureMessage = `Found deprecated CSS selector "${chalk.red(data.replace)}"` + + ` which has been renamed to "${chalk.green(data.replaceWith)}"`; findAllSubstringIndices(templateContent, data.replace) .map(offset => node.getStart() + offset) diff --git a/packages/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.ts b/packages/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.ts index 5be8b5e94b..478000cdae 100644 --- a/packages/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.ts +++ b/packages/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.ts @@ -1,4 +1,4 @@ -import { green, red, bold } from 'chalk'; +import chalk from 'chalk'; import { RuleFailure, Rules } from 'tslint'; import * as ts from 'typescript'; import { ExternalResource } from '../../tslint/component-file'; @@ -48,10 +48,10 @@ export class Walker extends ComponentWalker { start: node.getStart() + list.offset, end: node.getStart() + list.offset + list.attr.length, message: - `Found deprecated @Output() "${red(list.attr)}" on "${bold( + `Found deprecated @Output() "${chalk.red(list.attr)}" on "${chalk.bold( 'st(simple-table)', )}". ` + - `Use "${green( + `Use "${chalk.green( '(change)', )}" instead, Document: https://ng-alain.com/components/table#STChange`, }); @@ -61,9 +61,9 @@ export class Walker extends ComponentWalker { failures.push({ start: node.getStart() + offset, end: node.getStart() + offset + '[sortReName]'.length, - message: `Found deprecated @Input() "${red( + message: `Found deprecated @Input() "${chalk.red( '[sortReName]', - )}" which has been removed, Use "${green( + )}" which has been removed, Use "${chalk.green( 'STColumn.sort.reName', )}" instead.`, }); @@ -77,10 +77,10 @@ export class Walker extends ComponentWalker { start: node.getStart() + list.offset, end: node.getStart() + list.offset + list.attr.length, message: - `Found deprecated @Input() "${red(list.attr)}" on "${bold( + `Found deprecated @Input() "${chalk.red(list.attr)}" on "${chalk.bold( 'sv(desc-list-item)', )}". ` + - `Use "${green( + `Use "${chalk.green( '[type]', )}" instead, Document: https://ng-alain.com/components/view#sv`, }); @@ -90,9 +90,9 @@ export class Walker extends ComponentWalker { failures.push({ start: node.getStart() + offset, end: node.getStart() + offset + 'standard-form-row'.length, - message: `Found deprecated component "${red( + message: `Found deprecated component "${chalk.red( '[standard-form-row]', - )}" which has been removed, you can use "${green( + )}" which has been removed, you can use "${chalk.green( '[se]', )}" instead, Document: https://ng-alain.com/components/edit`, });