Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment version for new core packages, fix linter errors #13691

Merged
merged 5 commits into from
Feb 9, 2021

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Feb 9, 2021

Among other things this PR is a replacement for #13615 after including changes from running rush update --recheck.
Rest of the changes are to fix linter errors in core-client and core-https packages, and enabling further regressions to break the build

Related to #10775

@ramya-rao-a ramya-rao-a changed the title Increment version for new core packages Increment version for new core packages, fix linter errors Feb 9, 2021
@@ -39,6 +39,8 @@ function isArrayBuffer(body: any): body is ArrayBuffer | ArrayBufferView {
class ReportTransform extends Transform {
private loadedBytes = 0;
private progressCallback: (progress: TransferProgressEvent) => void;

// eslint-disable-next-line @typescript-eslint/ban-types
_transform(chunk: string | Buffer, _encoding: string, callback: Function): void {
Copy link
Member

Choose a reason for hiding this comment

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

Would that work instead of disabling the rule?

Suggested change
_transform(chunk: string | Buffer, _encoding: string, callback: Function): void {
_transform(chunk: string | Buffer, _encoding: string, callback: (error?: any) => void): void {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here we are overriding a method from the parent class which we do not own. So, thought it best to not change the signature compared to the same method in the parent class

Copy link
Member

Choose a reason for hiding this comment

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

Function may have came from the definition of _transform in base.d.ts.

Would (error?: Error) => void be better? The doc says it must be an Error object if an error occurred.

@@ -127,7 +129,7 @@ export class NodeHttpsClient implements HttpsClient {
request
};

let responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;
responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xirzec This causes change in behavior. The responseStream used in the catch block was never assigned to anything. Am assuming this is what you had originally wanted

Copy link
Member

Choose a reason for hiding this comment

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

Looks like I didn't catch this problem when I reviewed #12038 -- nice find!

Copy link
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@@ -127,7 +129,7 @@ export class NodeHttpsClient implements HttpsClient {
request
};

let responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;
responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;
Copy link
Member

Choose a reason for hiding this comment

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

Looks like I didn't catch this problem when I reviewed #12038 -- nice find!

@ramya-rao-a ramya-rao-a merged commit fc443f9 into Azure:master Feb 9, 2021
@ramya-rao-a ramya-rao-a deleted the core-v2-lock-file branch February 9, 2021 19:00
Copy link
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

LGTM

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Mar 30, 2021
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.

4 participants