Skip to content

Commit

Permalink
fix messed up import (#457)
Browse files Browse the repository at this point in the history
fix messed up import
  • Loading branch information
mathieudutour authored Dec 1, 2019
2 parents 6d89cc2 + 3417c77 commit 2fef98d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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.

## Version 3.0.3

- Fix typo in Symbol (Thanks @antoni!)
- Fix messed up `js-sha` import (#456)

## Version 3.0.2

- Fix rotation direction (#433)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-sketchapp",
"version": "3.0.2",
"version": "3.0.3",
"description": "A React renderer for Sketch.app",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/jsonUtils/nodeImpl/makeImageDataFromUrl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import requireObjCBridge from './requireObjCBridge';

export default function makeImageDataFromUrl(url?: string) {
export default function makeImageDataFromUrl(url?: string): string {
return requireObjCBridge().makeImageDataFromUrl(url);
}
14 changes: 13 additions & 1 deletion src/types/js-sha1.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
declare module 'js-sha1';
declare module 'js-sha1' {
function sha1<T>(dest: string | Array<T> | ArrayBuffer | Uint8Array): string;

namespace sha1 {
export function hex(arg: string): string;
export function update<T>(arg: string | Array<T> | Uint8Array | ArrayBuffer): string;
export function array(): Uint8Array;
export function digest(): Uint8Array;
export function arrayBuffer(): ArrayBuffer;
}

export = sha1;
}
2 changes: 1 addition & 1 deletion src/utils/getImageDataFromURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const makeImageDataFromUrl = (url?: string): { data: string; sha1: string } => {

return {
data,
sha1: sha1.default(data),
sha1: sha1(data),
};
};

Expand Down

0 comments on commit 2fef98d

Please sign in to comment.