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

Prepare Storage packages to move to @types/node v12 #16020

Merged
merged 2 commits into from
Jun 28, 2021

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Jun 25, 2021

As part of #7022, we will be moving the version of @types/node from 8 to 12
This PR has the changes required to fix the build errors that occurred in the Storage packages when trying out this change.
The net changes are:

  • Use BufferEncoding in the storage packages as the encoding in Buffer.from(string, encoding) overload is not a string, but a union of string literals called BufferEncoding in Node.js 12 & above
  • The promisfied fs.stat() returns Promise<unknown> for non node case. Updated to ignore the case when isNode is false as the entire file is only used in node due to there being a separate utils file for the browser

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jun 25, 2021
@ramya-rao-a ramya-rao-a reopened this Jun 26, 2021
@ramya-rao-a ramya-rao-a changed the title Use BufferEncoding as encoding is not a string in Node.js 12 Prepare Storage packages to move to @types/node v12 Jun 26, 2021
@ramya-rao-a ramya-rao-a marked this pull request as ready for review June 26, 2021 05:26
@ramya-rao-a
Copy link
Contributor Author

cc @xirzec

@ramya-rao-a ramya-rao-a merged commit ff90eba into Azure:main Jun 28, 2021
@ramya-rao-a ramya-rao-a deleted the storage-node12 branch June 28, 2021 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants