Skip to content

Form data monkey patch #1547

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

Merged
merged 1 commit into from
May 21, 2020
Merged

Conversation

tim-lai
Copy link
Contributor

@tim-lai tim-lai commented May 19, 2020

Description

Replace formdata-node with an internal patch of form-data. Update tests to reflect dependency change.

Motivation and Context

commit b35d36b introduced a dependency change from form-data to formdata-node. The reason was that form-data is missing matching methods for FormData. However, formdata-node also required Node 10, which is technically a breaking semver change for swagger-client, but not noted as a breaking semver change in the release v3.10.3.

We are choosing to maintain swagger-client in a non-breaking semver state. As a result, we are applying an internal patch to form-data and removing formdata-node.

Note: Node 8 has been EOL for some time now, and remains technically unsupported by swagger-client.

How Has This Been Tested?

Existing tests updated to reflect change between formdata-node and form-data + patch

Screenshots (if appropriate):

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tim-lai tim-lai requested review from char0n and webron May 19, 2020 23:26
@tim-lai tim-lai force-pushed the form-data-monkey-patch branch 2 times, most recently from 2d78112 to 986d14b Compare May 19, 2020 23:35
char0n
char0n previously requested changes May 20, 2020
Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

Looks good! Please have look at my CRC (code review comments) that address multiple aspects of the PR we need to take care of before merge.

@tim-lai tim-lai force-pushed the form-data-monkey-patch branch from 986d14b to 62b1a36 Compare May 20, 2020 18:14
* if form-data lib adds 'any' new method included in monkey patch,
  monkey patch will fail

* update http-multipart tests for compatibility with form-data patch
* live tests also refactored, remain in skip state
* tested on node 8

Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
Co-authored-by: Timothy Lai <timothy.lai@gmail.com>
@tim-lai tim-lai force-pushed the form-data-monkey-patch branch from 62b1a36 to 6c5a476 Compare May 20, 2020 18:48
@tim-lai tim-lai requested a review from char0n May 20, 2020 18:53
@tim-lai tim-lai dismissed char0n’s stale review May 20, 2020 18:57

changes implemented

@tim-lai tim-lai merged commit 18a0002 into swagger-api:master May 21, 2020
tim-lai added a commit to tim-lai/swagger-js that referenced this pull request May 26, 2020
…api#1547)

* if form-data lib adds 'any' new method included in monkey patch,
  monkey patch will fail

* update http-multipart tests for compatibility with form-data patch
* live tests also refactored, remain in skip state
* tested on node 8


Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
@tim-lai tim-lai deleted the form-data-monkey-patch branch June 5, 2020 22:50
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.

2 participants