diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 622dfac..b946e91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,13 @@ jobs: - name: checkout uses: actions/checkout@master - - name: install - run: npm install + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: install - name: run run: | - npm run build + yarn run build test: runs-on: ubuntu-latest @@ -22,12 +23,13 @@ jobs: - name: checkout uses: actions/checkout@master - - name: install - run: npm install + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: install - name: run run: | - npm run test + yarn run test cat ./coverage/lcov.info | ./node_modules/.bin/codecov env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -38,12 +40,13 @@ jobs: - name: checkout uses: actions/checkout@master - - name: install - run: npm install + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: install - name: run run: | - npm run lint + yarn run lint site: runs-on: ubuntu-latest @@ -51,8 +54,9 @@ jobs: - name: checkout uses: actions/checkout@master - - name: install - run: npm install + - uses: borales/actions-yarn@v2.3.0 + with: + cmd: install - name: build run: | diff --git a/.gitignore b/.gitignore index 3c97f28..7a9d8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /out-tsc /publish /yarn.lock +/.angular/cache # dependencies /node_modules diff --git a/.nvmrc b/.nvmrc index 66df3b7..6b17d22 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12.16.1 +14.16.1 diff --git a/lib/ng-package.json b/lib/ng-package.json index 85a1fea..1c7d8a0 100644 --- a/lib/ng-package.json +++ b/lib/ng-package.json @@ -6,8 +6,6 @@ "entryFile": "index.ts" }, "allowedNonPeerDependencies": [ - "tslib", - "angular", "@ng-util/util", "@ng-util/lazy" ] diff --git a/lib/package.json b/lib/package.json index d9f96e4..c8755e2 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "ngx-ueditor", - "version": "12.0.0", + "version": "13.0.0", "description": "Angular for Baidu UEditor", "author": "cipchk ", "license": "MIT", @@ -9,7 +9,7 @@ }, "homepage": "https://cipchk.github.io/ngx-ueditor/", "dependencies": { - "@ng-util/lazy": "^12.0.0", - "@ng-util/util": "^12.0.0" + "@ng-util/lazy": "^13.0.0", + "@ng-util/util": "^13.0.0" } } diff --git a/lib/src/ueditor.component.ts b/lib/src/ueditor.component.ts index 4f2a600..e98ab1b 100644 --- a/lib/src/ueditor.component.ts +++ b/lib/src/ueditor.component.ts @@ -13,6 +13,7 @@ import { SimpleChanges, NgZone, Inject, + SimpleChange, } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms'; @@ -128,7 +129,7 @@ export class UEditorComponent implements OnInit, AfterViewInit, OnChanges, OnDes this.lazySrv.load(this.cog.js!); } - ngOnChanges(changes: SimpleChanges): void { + ngOnChanges(changes: { [P in keyof this]?: SimpleChange } & SimpleChanges): void { if (this.inited && changes.config) { this.destroy(); this.initDelay(); diff --git a/package.json b/package.json index dff19bb..5662484 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-ueditor", - "version": "12.0.0", + "version": "13.0.0", "description": "Angular for Baidu UEditor", "license": "MIT", "author": "cipchk ", @@ -17,44 +17,44 @@ "release": "npm run build && cd publish && npm publish --access public" }, "dependencies": { - "@angular/animations": "~12.0.2", - "@angular/common": "~12.0.2", - "@angular/compiler": "~12.0.2", - "@angular/core": "~12.0.2", - "@angular/forms": "~12.0.2", - "@angular/platform-browser": "~12.0.2", - "@angular/platform-browser-dynamic": "~12.0.2", - "@angular/router": "~12.0.2", - "rxjs": "~6.6.0", - "tslib": "^2.1.0", + "@angular/animations": "~13.1.1", + "@angular/common": "~13.1.1", + "@angular/compiler": "~13.1.1", + "@angular/core": "~13.1.1", + "@angular/forms": "~13.1.1", + "@angular/platform-browser": "~13.1.1", + "@angular/platform-browser-dynamic": "~13.1.1", + "@angular/router": "~13.1.1", + "rxjs": "~7.4.0", + "tslib": "^2.3.1", "zone.js": "~0.11.4", - "@ng-util/lazy": "^12.0.0", - "@ng-util/util": "^12.0.0" + "@ng-util/lazy": "^13.0.0", + "@ng-util/util": "^13.0.0" }, "devDependencies": { - "@angular-devkit/build-angular": "~12.0.2", - "@angular/cli": "~12.0.2", - "@angular/compiler-cli": "~12.0.2", - "@types/jasmine": "~3.6.0", + "@angular-devkit/build-angular": "~13.1.2", + "@angular/cli": "~13.1.2", + "@angular/compiler-cli": "~13.1.0", + "@types/jasmine": "~3.10.0", "@types/node": "^12.11.1", - "jasmine-core": "~3.7.0", + "jasmine-core": "~3.10.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.0.3", + "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", - "karma-jasmine-html-reporter": "^1.5.0", - "typescript": "~4.2.3", - "@angular-eslint/builder": "12.0.0", - "@angular-eslint/eslint-plugin": "12.0.0", - "@angular-eslint/eslint-plugin-template": "12.0.0", - "@angular-eslint/schematics": "12.0.0", - "@angular-eslint/template-parser": "12.0.0", - "@typescript-eslint/eslint-plugin": "4.23.0", - "@typescript-eslint/parser": "4.23.0", - "codecov": "^3.8.1", - "eslint": "^7.26.0", - "ng-packagr": "^12.0.2", - "ngx-highlight-js": "^12.0.0", - "ngx-bootstrap": "^6.2.0" + "karma-jasmine-html-reporter": "~1.7.0", + "typescript": "~4.5.2", + "@angular-eslint/builder": "^13.0.1", + "@angular-eslint/eslint-plugin": "^13.0.1", + "@angular-eslint/eslint-plugin-template": "^13.0.1", + "@angular-eslint/schematics": "^13.0.1", + "@angular-eslint/template-parser": "^13.0.1", + "@typescript-eslint/eslint-plugin": "^5.8.1", + "@typescript-eslint/parser": "^5.8.1", + "codecov": "^3.8.3", + "eslint": "^8.5.0", + "ng-packagr": "^13.1.2", + "ngx-highlight-js": "^13.0.0", + "ngx-bootstrap": "^8.0.0-RC.5" } } diff --git a/tsconfig.json b/tsconfig.json index ed09ff9..20b6906 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,8 @@ "outDir": "./dist/out-tsc", "forceConsistentCasingInFileNames": true, "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "sourceMap": true, @@ -16,7 +18,10 @@ "importHelpers": true, "target": "es2017", "module": "es2020", - "lib": ["es2018", "dom"], + "lib": [ + "es2020", + "dom" + ], "paths": { "ngx-ueditor": ["lib/index"] }