Skip to content

Commit

Permalink
fix(types): handle Symbol.toStringTag
Browse files Browse the repository at this point in the history
closes #59
  • Loading branch information
antongolub committed Oct 22, 2019
1 parent 85d01b9 commit 93e4068
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 49 deletions.
30 changes: 0 additions & 30 deletions .releaserc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ deploy:
provider: script
skip_cleanup: true
script:
- yarn lerna exec --concurrency 1 "npx --no-install semantic-release -e semantic-release-monorepo" && node -e "require('semantic-release-monorepo-hooks').hookAfterAll()"
- yarn release
26 changes: 22 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"codeclimate:push": "codeclimate-test-reporter < ./coverage/lcov.info",
"coveralls:push": "cat ./coverage/lcov.info | coveralls",
"lint": "tslint -c tslint.json -p tsconfig.json 'packages/**/src/main/*.ts' --fix | snazzy",
"docs": "typedoc packages/**/src/main --ignoreCompilerErrors || exit 0"
"docs": "typedoc packages/**/src/main --ignoreCompilerErrors || exit 0",
"release": "multi-semantic-release --execasync"
},
"devDependencies": {
"@types/jest": "^24.0.18",
Expand All @@ -34,9 +35,6 @@
"lodash": "^4.17.15",
"replace-in-file": "^4.1.3",
"semantic-release": "15.13.21",
"semantic-release-monorepo": "6.1.1",
"semantic-release-monorepo-hooks": "2.9.5",
"semantic-release-plugin-decorators": "^2.0.0",
"snazzy": "^8.0.0",
"ts-jest": "^24.0.2",
"tslint": "^5.19.0",
Expand All @@ -51,5 +49,25 @@
"<rootDir>/packages/types/jest.config.json",
"<rootDir>/packages/facade/jest.config.json"
]
},
"release": {
"branch": "master",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"src/**/*.{js,css}",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
}
6 changes: 3 additions & 3 deletions packages/abstract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"target"
],
"devDependencies": {
"@qiwi/uniconfig": "^3.0.1",
"@qiwi/uniconfig": "^3.1.0",
"@types/bluebird": "^3.5.27",
"@types/config": "^0.0.34",
"@types/jest": "^24.0.18",
Expand All @@ -44,8 +44,8 @@
"@types/parsimmon": "^1.10.0",
"@types/underscore": "^1.9.2",
"bluebird": "^3.5.5",
"conf": "^4.1.0",
"config": "^3.1.0",
"conf": "^5.0.0",
"config": "^3.2.2",
"dts-generator": "^3.0.0",
"dtslint": "^0.9.1",
"flowgen": "^1.10.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"target"
],
"devDependencies": {
"@qiwi/uniconfig": "^3.0.1",
"@qiwi/uniconfig": "^3.1.0",
"@types/bluebird": "^3.5.27",
"@types/config": "^0.0.34",
"@types/jest": "^24.0.18",
Expand All @@ -42,8 +42,8 @@
"@types/parsimmon": "^1.10.0",
"@types/underscore": "^1.9.2",
"bluebird": "^3.5.5",
"conf": "^4.1.0",
"config": "^3.1.0",
"conf": "^5.0.0",
"config": "^3.2.2",
"dts-generator": "^3.0.0",
"dtslint": "^0.9.1",
"flowgen": "^1.10.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/types/src/main/ts/IPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export interface IPromiseConstructor<TValue = any, TReason = any> {
export interface IPromise<TValue = any, TReason = any> {
then: (onSuccess?: (value: TValue) => any, onReject?: (reason: TReason) => any) => IPromise
catch: (onReject: (reason: TReason) => any) => IPromise
finally?: (onFinally: () => any) => IPromise
finally: (onFinally: () => any) => IPromise
readonly [Symbol.toStringTag]: string
}

// https://stackoverflow.com/questions/45902881/ts1055-when-using-async-await-using-a-type-alias
Expand Down
3 changes: 2 additions & 1 deletion packages/types/src/test/ts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ declare module '@qiwi/substrate-types/target/es5/IPromise' {
interface IPromise<TValue = any, TReason = any> {
then: (onSuccess?: (value: TValue) => any, onReject?: (reason: TReason) => any) => IPromise;
catch: (onReject: (reason: TReason) => any) => IPromise;
finally?: (onFinally: () => any) => IPromise;
finally: (onFinally: () => any) => IPromise;
readonly [Symbol.toStringTag]: string;
}
const IPromise: PromiseConstructor;
}
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@
js-yaml "^3.13.1"
tslib "^1.10.0"

"@qiwi/uniconfig@^3.0.1":
"@qiwi/uniconfig@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@qiwi/uniconfig/-/uniconfig-3.1.0.tgz#02e8e5fee66e502b7aa333ef0aedf33c6a7a638d"
integrity sha512-+K4qevFU+DgNXOAtGTsl9SPHa4aZeTXa3c0s1NSF7TOBDt+p7P1tmuqg7jhtCsHyjRLbjgOEQDVtWx9ragVj2Q==
Expand Down Expand Up @@ -2455,10 +2455,10 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"

conf@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/conf/-/conf-4.1.0.tgz#c7029f629d7158eaf03ae118484d100f878c28b2"
integrity sha512-/G++SsVVt4MkKYZ1E+XdNEyCYghM7e7SSgx4PA55lQrmJjUY1APGGfz42YX9YpRkhLFvlhkJ5S341FWsufZZ5w==
conf@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/conf/-/conf-5.0.0.tgz#6530308a36041bf010ab96b05a0f4aff5101c65d"
integrity sha512-lRNyt+iRD4plYaOSVTxu1zPWpaH0EOxgFIR1l3mpC/DGZ7XzhoGFMKmbl54LAgXcSu6knqWgOwdINkqm58N85A==
dependencies:
ajv "^6.10.0"
dot-prop "^5.0.0"
Expand All @@ -2476,7 +2476,7 @@ config-chain@^1.1.11, config-chain@^1.1.12:
ini "^1.3.4"
proto-list "~1.2.1"

config@^3.1.0:
config@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/config/-/config-3.2.2.tgz#c7d31bb2a9d30013a905ff420101e3b1ba58eead"
integrity sha512-rOsfIOAcG82AWouK4/vBS/OKz3UPl2T/kP0irExmXJJOoWg2CmdfPLdx56bCoMUMFNh+7soQkQWCUC8DyemiwQ==
Expand Down

0 comments on commit 93e4068

Please sign in to comment.