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

Dependency package form-data-encoder has a new version available #27226

Closed
azure-sdk opened this issue Sep 25, 2023 · 1 comment · Fixed by #27258
Closed

Dependency package form-data-encoder has a new version available #27226

azure-sdk opened this issue Sep 25, 2023 · 1 comment · Fixed by #27258

Comments

@azure-sdk
Copy link
Collaborator

We have identified a dependency on version 1.7.2 of form-data-encoder. A new version (3.0.0) is available for upgrade.

Following are the steps to upgrade package dependency.

  1. Understand the breaking changes between the version being used and the version you want to upgrade to.

  2. Identify all packages that take a dependency on this package.

  3. Go to the root folder for each such package (/sdk/service-name/package-name) and update package.json to have the new version.

  4. Run rush update to ensure the new version is pulled in.

  5. Make relevant changes to absorb the breaking changes.

  6. Repeat steps 3 to 5 for each of the packages that have a dependency on this package.

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 25, 2023
@deyaaeldeen
Copy link
Member

We need to ignore this for now until we figure out how to bundle ESM-only libraries in our cjs bundles.

@jeremymeng jeremymeng self-assigned this Sep 25, 2023
@jeremymeng jeremymeng removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 25, 2023
@jeremymeng jeremymeng assigned deyaaeldeen and unassigned jeremymeng Sep 27, 2023
deyaaeldeen added a commit that referenced this issue Sep 27, 2023
### Packages impacted by this PR
@azure/openai

### Issues associated with this PR
Fixes #27227
Fixes #27226

### Describe the problem that is addressed by this PR
`@azure/openai` depends on v4 of `formdata-node` and v1.7.2 of
`form-data-encoder`. However, those are outdated versions and we should
depend on recent versions of those libraries instead but the recent
versions are ESM-only. I couldn't find a way to bundle ESM code into cjs
using rollup v2, our current rollup version. With rollup v3, you can
bundle ESM-only code if you import it with dynamic imports and this PR
does exactly that.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
N/A

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
N/A

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants