Skip to content

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

Merged
ramya-rao-a merged 2 commits intoAzure:mainfrom
ramya-rao-a:storage-node12
Jun 28, 2021
Merged

Prepare Storage packages to move to @types/node v12 #16020
ramya-rao-a merged 2 commits intoAzure:mainfrom
ramya-rao-a:storage-node12

Conversation

@ramya-rao-a
Copy link
Copy Markdown
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
Copy Markdown
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