Skip to content

Conversation

@dev-saad07
Copy link
Contributor

No description provided.

@lgtm-com
Copy link

lgtm-com bot commented Jun 29, 2022

This pull request introduces 1 alert when merging e11e356 into 05f6002 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

Copy link
Collaborator

@imagekitio imagekitio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases are failing.
image

}

export const request = (uploadFileXHR: XMLHttpRequest,formData: FormData, options: ImageKitOptions & { authenticationEndpoint: string }, callback?: (err: Error | null, response: UploadResponse | null) => void) => {
var signatureXHR = new XMLHttpRequest();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to create xhr for signature here and change generateSignatureToken at all?

@lgtm-com
Copy link

lgtm-com bot commented Jun 29, 2022

This pull request introduces 1 alert when merging f9c18d6 into 05f6002 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

else if(Array.isArray(param)) {
formData.append(i, JSON.stringify(param));
}
else if(typeof param === "object" && !(param instanceof File || param instanceof Blob)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js sdk is doing it in a better way. You can replace this whole thing.
https://github.com/imagekit-developer/imagekit-nodejs/blob/master/libs/upload/index.ts#L50

@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #56 (05f6002) into dev (dc44520) will not change coverage.
The diff coverage is n/a.

❗ Current head 05f6002 differs from pull request most recent head ad1ad38. Consider uploading reports for the commit ad1ad38 to get more accurate results

@@           Coverage Diff           @@
##              dev      #56   +/-   ##
=======================================
  Coverage   94.53%   94.53%           
=======================================
  Files           9        9           
  Lines         183      183           
  Branches       41       41           
=======================================
  Hits          173      173           
  Misses          4        4           
  Partials        6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc44520...ad1ad38. Read the comment docs.

@dev-saad07 dev-saad07 changed the base branch from master to dev June 29, 2022 10:03
@lgtm-com
Copy link

lgtm-com bot commented Jun 29, 2022

This pull request introduces 1 alert when merging 20a9602 into 05f6002 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

Copy link
Collaborator

@imagekitio imagekitio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme.md needs to be updated.

src/index.ts Outdated

const promisify = function <T = void>(thisContext: ImageKit, fn: Function) {
return function (...args: any[]): Promise<T> | void {
console.log('arg: ', args);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

expect(arg.get('isPrivateFile')).to.be.equal('true');
expect(arg.get('publicKey')).to.be.equal('test_public_key');
expect(arg.get('extensions')).to.be.equal(jsonStringifiedExtensions);
expect(arg.get('overwriteFile')).to.be.equal('false');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assertion for customMetadata is missing.

Copy link
Collaborator

@imagekitio imagekitio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases for exposing xhr in callback is missing.

Copy link
Collaborator

@imagekitio imagekitio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases for ResponseMetadata is missing.

@lgtm-com
Copy link

lgtm-com bot commented Jun 30, 2022

This pull request introduces 1 alert when merging e74ca08 into 05f6002 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@imagekitio imagekitio merged commit ce60c41 into imagekit-developer:dev Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants