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

fix(arcgis-rest-request): node ReadStream encoding bug at 3.x #1034

Merged
merged 6 commits into from
Oct 31, 2022

Conversation

haoliangyu
Copy link
Member

@haoliangyu haoliangyu commented Oct 29, 2022

This PR addresses the issue #1033 at rest-js v3. The bug is related to the form-data library in the node environment. It requires to use an unofficial option to specify the stream length so that the streaming request can end properly (see #1033 (comment)).

I add a dataSize option to the addItemData() function so that the user can give a number for the stream data length.

PS: I suspect other functions accepting node ReadStream can have the same issue, but I don't have the availability to verify and fix each API.

PS2: I assume that no more than one stream is used in one API call.

PS3: I have to update the npm version to v7 in CI so that npm install won't throw an error.

@haoliangyu haoliangyu self-assigned this Oct 29, 2022
@haoliangyu haoliangyu changed the title fix(arcgis-rest-request): node ReadStream encoding fix(arcgis-rest-request): node ReadStream encoding bug at 3.x Oct 30, 2022
@haoliangyu haoliangyu requested a review from tomwayson October 31, 2022 11:36
@haoliangyu
Copy link
Member Author

haoliangyu commented Oct 31, 2022

The CI failed at the Chrome test stage because that required 100% test coverage for the code. But this change is for node environment. Is there a way to bypass the test coverage check for a certain block of code? fixed

Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

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

Nice work @haoliangyu

I think when this is merged it will trigger a 3.x patch release, but I'm not certain. Let's wait until @dbouwman confirms before merging.

@dbouwman
Copy link
Member

For rest-js v3, we did not have semantic-release, so you actually want to PR this to master and then we manually run the release like we did in the olden times.

This PR is the last time we did a 3.x release.

I can run the scripts if you want. Just lmk via teams once this is merged.

@tomwayson tomwayson changed the base branch from 3.x to master October 31, 2022 18:05
@tomwayson
Copy link
Member

Thanks @dbouwman, yeah, I just noticed that we don't have a .releaserc.json file that I believe would be required to run the release on maintenance branches.

I've updated the base, and will merge and run the scripts.

@tomwayson tomwayson merged commit 2619312 into master Oct 31, 2022
@tomwayson tomwayson deleted the b/v3-formdata-bug branch October 31, 2022 18:11
@haoliangyu
Copy link
Member Author

haoliangyu commented Nov 28, 2022

@tomwayson Do you have any availability to release this as v3.5.1?

@tomwayson
Copy link
Member

@haoliangyu this has been published as v.3.5.1

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