Skip to content

Commit 19e70e2

Browse files
committed
1.0.4
1 parent 6d44c6d commit 19e70e2

File tree

8 files changed

+57
-57
lines changed

8 files changed

+57
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
.DS_Store
33
yarn-error.log
44
.rpt2_cache
5+
coverage

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
src
2+
test
3+
coverage
24

35
tsconfig.json
46
.travis.yml

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# react-qr-hooks Changelog
22

3+
## 1.0.3 / 1.0.4 (2020-02-19)
4+
## Bug Fix
5+
- fixed TypeScript types
6+
37
## 1.0.2 (2020-02-10)
48
#### Repository Changes
59
- moved `qrcode` and `qrcode-decoder` from `peerDependencies` to `dependencies`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { useQrEncode, useQrDecode } from 'react-qr-hooks';
2929
Name | Type | Default | Description
3030
-|-|-|-
3131
**text** | string | ` ` | Text to encode
32-
**options** | QRCodeOptions | `{}` | Options for `qrcode` library
32+
**options** | QRCodeToDataURLOptions | `{}` | Options for `qrcode` library
3333

3434
#### Returned Values
3535
Type | Description

lib/useQrEncode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import QrCode from 'qrcode';
2-
export declare const useQrEncode: (text: string | QrCode.QRCodeSegment[], options?: QrCode.QRCodeOptions) => string | null;
2+
export declare const useQrEncode: (text: string | QrCode.QRCodeSegment[], options?: QrCode.QRCodeToDataURLOptions) => string | null;

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-qr-hooks",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "Encode & decode QR code in React",
55
"author": "Jakub Biesiada",
66
"license": "MIT",
@@ -35,19 +35,19 @@
3535
"devDependencies": {
3636
"@rollup/plugin-node-resolve": "^7.1.1",
3737
"@types/qrcode": "^1.3.4",
38-
"@types/react": "^16.9.19",
39-
"@typescript-eslint/parser": "^2.19.0",
38+
"@types/react": "^16.9.20",
39+
"@typescript-eslint/parser": "^2.20.0",
4040
"eslint": "^6.8.0",
4141
"eslint-config-prettier": "^6.10.0",
4242
"eslint-plugin-prettier": "^3.1.2",
4343
"eslint-plugin-react": "^7.18.3",
44-
"eslint-plugin-react-hooks": "^2.3.0",
45-
"husky": "^4.2.1",
44+
"eslint-plugin-react-hooks": "^2.4.0",
45+
"husky": "^4.2.3",
4646
"lint-staged": "^10.0.7",
4747
"prettier": "^1.19.1",
4848
"react": "^16.12.0",
4949
"rollup-plugin-terser": "^5.2.0",
50-
"rollup-plugin-typescript2": "^0.25.3",
50+
"rollup-plugin-typescript2": "^0.26.0",
5151
"typescript": "^3.7.5"
5252
},
5353
"peerDependencies": {

src/useQrEncode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { useState, useEffect } from 'react';
2-
import QrCode, { QRCodeSegment, QRCodeOptions } from 'qrcode';
2+
import QrCode, { QRCodeSegment, QRCodeToDataURLOptions } from 'qrcode';
33

44
export const useQrEncode = (
55
text: string | QRCodeSegment[],
6-
options: QRCodeOptions = {}
6+
options: QRCodeToDataURLOptions = {}
77
) => {
88
const [qrCode, setQrCode] = useState<string | null>(null);
99

yarn.lock

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@
103103
dependencies:
104104
"@types/node" "*"
105105

106-
"@types/react@^16.9.19":
107-
version "16.9.19"
108-
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.19.tgz#c842aa83ea490007d29938146ff2e4d9e4360c40"
109-
integrity sha512-LJV97//H+zqKWMms0kvxaKYJDG05U2TtQB3chRLF8MPNs+MQh/H1aGlyDUxjaHvu08EAGerdX2z4LTBc7ns77A==
106+
"@types/react@^16.9.20":
107+
version "16.9.20"
108+
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.20.tgz#e83285766340fb1a7fafe7e5c4708c53832e3641"
109+
integrity sha512-jRrWBr25zzEVNa4QbESKLPluvrZ3W6Odfwrfe2F5vzbrDuNvlpnHa/xbZcXg8RH5D4CE181J5VxrRrLvzRH+5A==
110110
dependencies:
111111
"@types/prop-types" "*"
112112
csstype "^2.2.0"
@@ -118,29 +118,29 @@
118118
dependencies:
119119
"@types/node" "*"
120120

121-
"@typescript-eslint/experimental-utils@2.19.0":
122-
version "2.19.0"
123-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz#d5ca732f22c009e515ba09fcceb5f2127d841568"
124-
integrity sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==
121+
"@typescript-eslint/experimental-utils@2.20.0":
122+
version "2.20.0"
123+
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz#3b6fa5a6b8885f126d5a4280e0d44f0f41e73e32"
124+
integrity sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==
125125
dependencies:
126126
"@types/json-schema" "^7.0.3"
127-
"@typescript-eslint/typescript-estree" "2.19.0"
127+
"@typescript-eslint/typescript-estree" "2.20.0"
128128
eslint-scope "^5.0.0"
129129

130-
"@typescript-eslint/parser@^2.19.0":
131-
version "2.19.0"
132-
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.19.0.tgz#912160d9425395d09857dcd5382352bc98be11ae"
133-
integrity sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg==
130+
"@typescript-eslint/parser@^2.20.0":
131+
version "2.20.0"
132+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.20.0.tgz#608e5bb06ba98a415b64ace994c79ab20f9772a9"
133+
integrity sha512-o8qsKaosLh2qhMZiHNtaHKTHyCHc3Triq6aMnwnWj7budm3xAY9owSZzV1uon5T9cWmJRJGzTFa90aex4m77Lw==
134134
dependencies:
135135
"@types/eslint-visitor-keys" "^1.0.0"
136-
"@typescript-eslint/experimental-utils" "2.19.0"
137-
"@typescript-eslint/typescript-estree" "2.19.0"
136+
"@typescript-eslint/experimental-utils" "2.20.0"
137+
"@typescript-eslint/typescript-estree" "2.20.0"
138138
eslint-visitor-keys "^1.1.0"
139139

140-
"@typescript-eslint/typescript-estree@2.19.0":
141-
version "2.19.0"
142-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz#6bd7310b9827e04756fe712909f26956aac4b196"
143-
integrity sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==
140+
"@typescript-eslint/typescript-estree@2.20.0":
141+
version "2.20.0"
142+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz#90a0f5598826b35b966ca83483b1a621b1a4d0c9"
143+
integrity sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==
144144
dependencies:
145145
debug "^4.1.1"
146146
eslint-visitor-keys "^1.1.0"
@@ -632,10 +632,10 @@ eslint-plugin-prettier@^3.1.2:
632632
dependencies:
633633
prettier-linter-helpers "^1.0.0"
634634

635-
eslint-plugin-react-hooks@^2.3.0:
636-
version "2.3.0"
637-
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a"
638-
integrity sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw==
635+
eslint-plugin-react-hooks@^2.4.0:
636+
version "2.4.0"
637+
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.4.0.tgz#db6ee1cc953e3a217035da3d4e9d4356d3c672a4"
638+
integrity sha512-bH5DOCP6WpuOqNaux2BlaDCrSgv8s5BitP90bTgtZ1ZsRn2bdIfeMDY5F2RnJVnyKDy6KRQRDbipPLZ1y77QtQ==
639639

640640
eslint-plugin-react@^7.18.3:
641641
version "7.18.3"
@@ -845,7 +845,7 @@ fill-range@^7.0.1:
845845
dependencies:
846846
to-regex-range "^5.0.1"
847847

848-
find-cache-dir@^3.0.0:
848+
find-cache-dir@^3.2.0:
849849
version "3.2.0"
850850
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.2.0.tgz#e7fe44c1abc1299f516146e563108fd1006c1874"
851851
integrity sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==
@@ -1001,10 +1001,10 @@ human-signals@^1.1.1:
10011001
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
10021002
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
10031003

1004-
husky@^4.2.1:
1005-
version "4.2.1"
1006-
resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.1.tgz#b09f1bd9129e6c323cc515dc17081d0615e2d7c1"
1007-
integrity sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==
1004+
husky@^4.2.3:
1005+
version "4.2.3"
1006+
resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.3.tgz#3b18d2ee5febe99e27f2983500202daffbc3151e"
1007+
integrity sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==
10081008
dependencies:
10091009
chalk "^3.0.0"
10101010
ci-info "^2.0.0"
@@ -1808,10 +1808,10 @@ resolve-from@^4.0.0:
18081808
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
18091809
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
18101810

1811-
resolve@1.12.0:
1812-
version "1.12.0"
1813-
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
1814-
integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==
1811+
resolve@1.15.1:
1812+
version "1.15.1"
1813+
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
1814+
integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
18151815
dependencies:
18161816
path-parse "^1.0.6"
18171817

@@ -1856,25 +1856,18 @@ rollup-plugin-terser@^5.2.0:
18561856
serialize-javascript "^2.1.2"
18571857
terser "^4.6.2"
18581858

1859-
rollup-plugin-typescript2@^0.25.3:
1860-
version "0.25.3"
1861-
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.25.3.tgz#a5fb2f0f85488789334ce540abe6c7011cbdf40f"
1862-
integrity sha512-ADkSaidKBovJmf5VBnZBZe+WzaZwofuvYdzGAKTN/J4hN7QJCFYAq7IrH9caxlru6T5qhX41PNFS1S4HqhsGQg==
1859+
rollup-plugin-typescript2@^0.26.0:
1860+
version "0.26.0"
1861+
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.26.0.tgz#cee2b44d51d9623686656d76dc30a73c4de91672"
1862+
integrity sha512-lUK7XZVG77tu8dmv1L/0LZFlavED/5Yo6e4iMMl6fdox/yKdj4IFRRPPJEXNdmEaT1nDQQeCi7b5IwKHffMNeg==
18631863
dependencies:
1864-
find-cache-dir "^3.0.0"
1864+
find-cache-dir "^3.2.0"
18651865
fs-extra "8.1.0"
1866-
resolve "1.12.0"
1867-
rollup-pluginutils "2.8.1"
1866+
resolve "1.15.1"
1867+
rollup-pluginutils "2.8.2"
18681868
tslib "1.10.0"
18691869

1870-
rollup-pluginutils@2.8.1:
1871-
version "2.8.1"
1872-
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97"
1873-
integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==
1874-
dependencies:
1875-
estree-walker "^0.6.1"
1876-
1877-
rollup-pluginutils@^2.8.2:
1870+
rollup-pluginutils@2.8.2, rollup-pluginutils@^2.8.2:
18781871
version "2.8.2"
18791872
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
18801873
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==

0 commit comments

Comments
 (0)