From 31f2ff8f0f0369214a4ffd894cc63db2a62a40ff Mon Sep 17 00:00:00 2001 From: Huan LI Date: Fri, 13 Mar 2020 18:01:58 +0800 Subject: [PATCH 1/6] code clean --- .github/workflows/npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 16b85064..cea3af43 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -78,7 +78,7 @@ jobs: - name: Is A Publish Branch if: steps.check-branch.outputs.match == 'true' run: | - VERSION=$(npx pkg-jq -r .version package.json) + VERSION=$(npx pkg-jq -r .version) if npx version-exists @chatie/grpc "$VERSION" then "Version $VERSION exists on NPM, skipped." else npm publish From 0786cd77468d595f2da4169d1b981512c033c936 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Fri, 13 Mar 2020 18:02:11 +0800 Subject: [PATCH 2/6] 0.21.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 996fcfd4..e129d873 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wechaty-puppet", - "version": "0.21.10", + "version": "0.21.11", "description": "Abstract Puppet for Wechaty", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", From 6b263ba3754b9df07c186c0806dfa1fe19e59682 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Fri, 13 Mar 2020 18:03:29 +0800 Subject: [PATCH 3/6] doc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c7ed104..00eba6e5 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Abstract(Base) Class of Puppet Providers for Wechaty Framework. -This module is part of the [Wechaty](https://github.com/wechaty/wechaty) SDK. +This module is part of the [Wechaty](https://github.com/wechaty/wechaty) Framework SDK. Learn more at: From 0b5ec0cd40829cce36318b00fefbe77948693c6c Mon Sep 17 00:00:00 2001 From: Huan LI Date: Fri, 13 Mar 2020 18:12:23 +0800 Subject: [PATCH 4/6] fix name --- .github/workflows/npm.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index cea3af43..dfac500e 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -78,9 +78,10 @@ jobs: - name: Is A Publish Branch if: steps.check-branch.outputs.match == 'true' run: | + NAME=$(npx pkg-jq -r .name) VERSION=$(npx pkg-jq -r .version) - if npx version-exists @chatie/grpc "$VERSION" - then "Version $VERSION exists on NPM, skipped." + if npx version-exists "$NAME" "$VERSION" + then echo "$NAME@$VERSION) exists on NPM, skipped." else npm publish fi env: From e25a3ad69c3c63274aa03d8fafb6f10fdfba9076 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Sat, 14 Mar 2020 09:13:56 +0800 Subject: [PATCH 5/6] revert selfId() return type (#85) --- .github/workflows/npm.yml | 2 +- src/puppet.ts | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index dfac500e..de4cc72f 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -81,7 +81,7 @@ jobs: NAME=$(npx pkg-jq -r .name) VERSION=$(npx pkg-jq -r .version) if npx version-exists "$NAME" "$VERSION" - then echo "$NAME@$VERSION) exists on NPM, skipped." + then echo "$NAME@$VERSION exists on NPM, skipped." else npm publish fi env: diff --git a/src/puppet.ts b/src/puppet.ts index 83e7f359..60771861 100644 --- a/src/puppet.ts +++ b/src/puppet.ts @@ -453,15 +453,12 @@ export abstract class Puppet extends EventEmitter { */ public abstract async logout (): Promise - public selfId (): undefined | string { + public selfId (): string { log.verbose('Puppet', 'selfId()') - /** - * Huan (202003): do not throw exception. deal `undefined` outside. - */ - // if (!this.id) { - // throw new Error('not logged in, no this.id yet.') - // } + if (!this.id) { + throw new Error('not logged in, no this.id yet.') + } return this.id } From 2475fc8d747bbcafd10db7c30c6c31062e0ab8d1 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Sat, 14 Mar 2020 09:14:11 +0800 Subject: [PATCH 6/6] 0.21.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e129d873..c8b8ce86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wechaty-puppet", - "version": "0.21.11", + "version": "0.21.12", "description": "Abstract Puppet for Wechaty", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts",