From fc491d5dab5db90b166d24b12495e5a46893aa49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Fri, 24 Jun 2022 17:24:26 +0800 Subject: [PATCH] release: 14.0.0 (#7) --- .github/workflows/ci.yml | 10 +++--- angular.json | 3 +- lib/package.json | 5 +-- lib/src/component.ts | 7 +++-- lib/src/module.ts | 4 +-- package.json | 66 ++++++++++++++++++++-------------------- src/index.html | 38 +++++++++++------------ tsconfig.json | 2 +- 8 files changed, 67 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6405c03..31c1336 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: - name: checkout uses: actions/checkout@master - - uses: borales/actions-yarn@v2.3.0 + - uses: borales/actions-yarn@v3.0.0 with: cmd: install @@ -23,7 +23,7 @@ jobs: - name: checkout uses: actions/checkout@master - - uses: borales/actions-yarn@v2.3.0 + - uses: borales/actions-yarn@v3.0.0 with: cmd: install @@ -40,7 +40,7 @@ jobs: - name: checkout uses: actions/checkout@master - - uses: borales/actions-yarn@v2.3.0 + - uses: borales/actions-yarn@v3.0.0 with: cmd: install @@ -54,13 +54,13 @@ jobs: - name: checkout uses: actions/checkout@master - - uses: borales/actions-yarn@v2.3.0 + - uses: borales/actions-yarn@v3.0.0 with: cmd: install - name: build run: | - node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod --base-href /ng-github-button/ + node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --base-href /ng-github-button/ cp ./dist/index.html ./dist/404.html ls ./dist diff --git a/angular.json b/angular.json index a492311..b69372f 100644 --- a/angular.json +++ b/angular.json @@ -101,8 +101,7 @@ } } }, - "defaultProject": "ng-github-button", "cli": { - "defaultCollection": "@angular-eslint/schematics" + "schematicCollections": "@angular-eslint/schematics" } } diff --git a/lib/package.json b/lib/package.json index a000e77..93a5699 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "ng-github-button", - "version": "13.0.0", + "version": "14.0.0", "description": "Unofficial GitHub buttons in Angular.", "author": "cipchk ", "license": "MIT", @@ -17,7 +17,8 @@ "angular-github-button", "angular2-github-button", "github-button", - "github button" + "github button", + "angular standalone library" ], "repository": { "type": "git", diff --git a/lib/src/component.ts b/lib/src/component.ts index 6f9144e..a54f91f 100644 --- a/lib/src/component.ts +++ b/lib/src/component.ts @@ -10,17 +10,18 @@ import { } from '@angular/core'; import { GithubButtonService } from './service'; import { Subscription } from 'rxjs'; +import { CommonModule } from '@angular/common'; const isSSR = !(typeof document === 'object' && !!document); @Component({ selector: 'github-button', template: ` - + {{ typeToLabel[type] }} - + {{ count }} @@ -32,6 +33,8 @@ const isSSR = !(typeof document === 'object' && !!document); encapsulation: ViewEncapsulation.Emulated, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CommonModule], }) export class GithubButtonComponent implements OnChanges, OnInit, OnDestroy { private notify$: Subscription | null = null; diff --git a/lib/src/module.ts b/lib/src/module.ts index 216642e..de21348 100644 --- a/lib/src/module.ts +++ b/lib/src/module.ts @@ -1,11 +1,9 @@ -import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { GithubButtonComponent } from './component'; @NgModule({ - imports: [CommonModule], - declarations: [GithubButtonComponent], + imports: [GithubButtonComponent], exports: [GithubButtonComponent], }) export class GithubButtonModule {} diff --git a/package.json b/package.json index 8bdbc75..a9199b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-github-button", - "version": "13.0.0", + "version": "14.0.0", "description": "Unofficial GitHub buttons in Angular.", "keywords": [ "angular", @@ -11,7 +11,8 @@ "angular-github-button", "angular2-github-button", "github-button", - "github button" + "github button", + "angular standalone library" ], "author": "cipchk ", "license": "MIT", @@ -25,48 +26,47 @@ "homepage": "https://cipchk.github.io/ng-github-button/", "scripts": { "analyze": "ng b --stats-json --source-map", - "lint": "ng l", + "lint": "ng lint", "test": "ng t --no-progress --browsers=ChromeHeadlessCI --code-coverage --no-watch", "build": "node scripts/build.js", "release:next": "npm run build && cd publish && npm publish --access public --tag next", "release": "npm run build && cd publish && npm publish --access public" }, "dependencies": { - "@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", + "@angular/animations": "^14.0.0", + "@angular/common": "^14.0.0", + "@angular/compiler": "^14.0.0", + "@angular/core": "^14.0.0", + "@angular/forms": "^14.0.0", + "@angular/platform-browser": "^14.0.0", + "@angular/platform-browser-dynamic": "^14.0.0", + "@angular/router": "^14.0.0", + "rxjs": "~7.5.0", + "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { - "@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.10.0", + "@angular-devkit/build-angular": "^14.0.3", + "@angular/cli": "~14.0.3", + "@angular/compiler-cli": "^14.0.0", + "@types/jasmine": "~4.0.0", + "jasmine-core": "~4.1.0", "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.1.0", - "karma-jasmine": "~4.0.0", + "karma-chrome-launcher": "~3.1.1", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.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", + "typescript": "~4.7.4", + "@angular-eslint/builder": "^14.0.0", + "@angular-eslint/eslint-plugin": "^14.0.0", + "@angular-eslint/eslint-plugin-template": "^14.0.0", + "@angular-eslint/schematics": "^14.0.0", + "@angular-eslint/template-parser": "^14.0.0", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.0", "codecov": "^3.8.3", - "eslint": "^8.5.0", - "ng-packagr": "^13.1.2", - "ngx-highlight-js": "^13.0.0" + "eslint": "^8.18.0", + "ng-packagr": "^14.0.2", + "ngx-highlight-js": "^14.0.0" } } diff --git a/src/index.html b/src/index.html index 48e4f07..e287e0f 100644 --- a/src/index.html +++ b/src/index.html @@ -1,23 +1,21 @@ - + + + + ng-github-button | Unofficial GitHub buttons in Angular. + + + + + + - - - ng-github-button | Unofficial GitHub buttons in Angular. - - - - - - - - -
- Loading... -
- - Fork me on GitHub - - - + +
+ Loading... +
+ + Fork me on GitHub + + diff --git a/tsconfig.json b/tsconfig.json index 6a5baa9..b2e8a38 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "experimentalDecorators": true, "moduleResolution": "node", "importHelpers": true, - "target": "es2017", + "target": "es2020", "module": "es2020", "lib": [ "es2020",