Skip to content

Commit 2fef98d

Browse files
fix messed up import (#457)
fix messed up import
2 parents 6d89cc2 + 3417c77 commit 2fef98d

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This project adheres to [Semantic Versioning](http://semver.org/). Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/airbnb/react-sketchapp/releases) page.
44

5+
## Version 3.0.3
6+
7+
- Fix typo in Symbol (Thanks @antoni!)
8+
- Fix messed up `js-sha` import (#456)
9+
510
## Version 3.0.2
611

712
- Fix rotation direction (#433)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-sketchapp",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"description": "A React renderer for Sketch.app",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import requireObjCBridge from './requireObjCBridge';
22

3-
export default function makeImageDataFromUrl(url?: string) {
3+
export default function makeImageDataFromUrl(url?: string): string {
44
return requireObjCBridge().makeImageDataFromUrl(url);
55
}

src/types/js-sha1.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
declare module 'js-sha1';
1+
declare module 'js-sha1' {
2+
function sha1<T>(dest: string | Array<T> | ArrayBuffer | Uint8Array): string;
3+
4+
namespace sha1 {
5+
export function hex(arg: string): string;
6+
export function update<T>(arg: string | Array<T> | Uint8Array | ArrayBuffer): string;
7+
export function array(): Uint8Array;
8+
export function digest(): Uint8Array;
9+
export function arrayBuffer(): ArrayBuffer;
10+
}
11+
12+
export = sha1;
13+
}

src/utils/getImageDataFromURL.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const makeImageDataFromUrl = (url?: string): { data: string; sha1: string } => {
88

99
return {
1010
data,
11-
sha1: sha1.default(data),
11+
sha1: sha1(data),
1212
};
1313
};
1414

0 commit comments

Comments
 (0)