- [Breaking]
@azure/storage-file
package is renamed to@azure/storage-file-share
to better align with the upcoming new package for Azure Storage Files DataLake. As a consequence,FileServiceClient
becomesShareServiceClient
DirectoryClient
becomesShareDirectoryClient
FileClient
becomesShareFileClient
- Bug Fix - Previous versions of
@azure/storage-file
library failed for the react-apps because of the usage offs.stat
method which is not available in browsers. The issue is fixed in this new release. - [Breaking] The custom browser and retry policies that are specific to the Storage libraries have been
renamed to have the
Storage
prefix. PR 5862. Below are the entities that now have the Storage prefix- BrowserPolicy
- BrowserPolicyFactory
- RetryPolicy
- RetryPolicyType
- RetryOptions
- RetryPolicyFactory
- [Breaking] The properties in the StoragePipelineOptions interface have been updated as below:
- The
proxy
property of typeProxySettings | string
has been renamed toproxyOptions
and will be of typeProxyOptions
. If you have been passing url directly, split the value intohost
andport
then pass it as a json object. - The
telemetry
property of typeTelemetryOptions
has been renamed touserAgentOptions
of typeUserAgentOptions
. - The
logger
is no longer a property available to configure. To enable logging, please see the Troubleshooting section of our readme.
- The
- [Breaking] The
UniqueRequestIdPolicy
andKeepAlivePolicy
are no longer exported from this library. The corresponding policies from the@azure/core-http
library are meant to be used instead. - Bug Fix - Previous versions of
@azure/storage-file
library failed for the react-apps because of the usage offs.stat
method which is not available in browsers. The issue is fixed in this new release.
- [Breaking]
IPRange
is renamed toSasIPRange
. PR #5551 - Created new interface
CommonOptions
. This interface is for standard options that apply to all methods that invoke remote operations. This interface currently contains options that enable client-side tracing of the SDK. PR #5550 offset
parameter is optional indownloadToBuffer
method ofFileClient
. PR #5592- Async iterator with pagination support is added to list Handles -
listHandles
PR #5536 - [Breaking]
Models
is no longer exported in public API surface. Instead generated model types required by the public API are explicitly re-exported. PR #5532 - [Breaking] Cancelling an operation now throws a standardized error with the name
AbortError
. PR #5633 - [Breaking]
filePath
is onFileClient
is renamed topath
.dirPath
is added toDirectoryClient
is renamed topath
. PR #5613 - [Breaking]
body
field fromRestError
Object in core-http Library is removed, theresponse
property on the error will now have theparsedBody
&headers
along with raw body & headers that are already present. PRs #5670, #5437- Errors from the storage service can be seen in an extra field
details
with the expected error code. #5688
- Errors from the storage service can be seen in an extra field
- [Breaking]
progress
callback in the option bags of all the helper methods is renamed toonProgress
. PR #5676 - [Breaking] Type of the
permissions
attribute in the options bagFileSASSignatureValues
to be passed intogenerateFileSASQueryParameters
is changed toFileSASPermissions
from typestring
. PR #5626- Similarly,
AccountSASPermissions
forgenerateAccountSASQueryParameters
instead of typestring
. - Example - permissions attribute in
generateFileSASQueryParameters
permissions: FileSASPermissions.parse("racwd").toString()
changes toFileSASPermissions.parse("racwd")
- Similarly,
- [Breaking]
sourceModifiedAccessConditions
attribute inFileUploadRangeFromURLOptions
is renamed tosourceConditions
. PR #5682 - Renames for following Options interfaces. PR #5650
UploadStreamToAzureFileOptions
->FileUploadStreamOptions
,UploadToAzureFileOptions
->FileParallelUploadOptions
,DownloadFromAzureFileOptions
->FileDownloadToBufferOptions
- [Breaking] Appropriate attribute renames in all the interfaces PR #5610
- Example -
nextMarker
->continuationToken
,HTTPClient
->HttpClient
,permission
->permissions
,parallelism
->concurrency
- Example -
- [Breaking]
forceCloseHandlesSegment
is not exposed from the library in favour of the new methodforceCloseAllHandles
onFileClient
andDirectoryClient
. PR #5620 - [Breaking] IE11 needs
Object.assign
polyfill loaded. PR #5727
- Library tries to load the proxy settings from the environment variables like HTTP_PROXY if the proxy settings are not provided when clients like
FileServiceClient
orFileClient
are instantiated. - Added name properties on all the clients for convenience.
accountName
is added forDirectoryClient
,FileClient
,FileServiceClient
andShareClient
.shareName
is added toDirectoryClient
,FileClient
andShareClient
.filePath
is added toFileClient
.dirPath
is added toDirectoryClient
.
- [Breaking]
Models.StorageServiceProperties
is renamed intoModels.FileServiceProperties
. - [Breaking] Replace string array with boolean flags to specify dataset to include when listing shares.
Before this change the option is specified as
After this change:
fileServiceClient.listShares({ include: ["metadata", "snapshots"] });
fileServiceClient.listShares({ includeMetadata: true, includeSnapshots: true });
- Updated Azure Storage Service API version to 2019-02-02.
- Added a new API
ShareClient.createPermission()
which allows for the creation of a security descriptor at the Azure File share level. This descriptor can be used for files and directories in the share. - Added a new API
ShareClient.getPermission()
which allows for the retrieval of the security descriptor set on a share. - Added APIs
DirectoryClient.setProperties()
andFileClient.setProperties()
, and updated APIsDirectoryClient.create()
andFileClient.create()
for setting file permission, attributes, creation time, and last write time. - Added a new API
FileClient.uploadRangeFromURL()
which allows range in a file to be written using a range of another file as a source. This permits synchronous server-side copies to be orchestrated for files of any size. - Fixed a bug of
FileClient.downloadToBuffer()
when provided offset is not 0. - Fixed a bug that
Aborter
cannot work during retry interval. - Fixed a bug that
Aborter
throws timeout error even though it succeeds ofFileClient.download()
. - Fixed a bug that "err.code.toUpperCase is not a function" when retries in browser.
Aborter
doesn't requiredom
as tsconfig lib requirement anymore forEvent
type.- Export
RetryPolicyType
. - Updated HTTP client from axios to node-fetch in Node.js runtime.
- A new option
keepAliveOptions
added to parameter ofnewPipeline()
which controls keep-alive configurations. Keep-alive is enabled by default. - The
ShareClient.getStatistics()
now returns the approximate size in bytes withshareUsageBytes
. - Added
DirectoryClient.listHandlesSegment()
andFileClient.listHandlesSegment()
to returns a list of open handles on a directory or a file. - Added
DirectoryClient.forceCloseHandlesSegment()
,FileClient.forceCloseHandlesSegment()
,DirectoryClient.forceCloseHandle()
andFileClient.forceCloseHandle()
to close handles. - Pass through
options.abortSignal
to the optionalabortSignal
attribute in option bags instead of usingAbortSignal.none
as the default value whenoptions.abortSignal
is not specified. - Basic HTTP proxy authentication support is added. Proxy settings can be passed in the options while creating a new client. Example - typescript/proxyAuth.ts
- Connection strings for explicit storage endpoints are supported. - Configure Azure Storage connection strings
- [Breaking] Aborter class is no longer exposed from the package. Use the package @azure/abort-controller to pass an abort signal to any of the async operations.
AbortController.timeout(<milliseconds>)
can be utitlized as an abort signal. - Storage service allows SAS connection string with SAS string and endpoints along with the Account connection string(account name, key and endpoint).
In this preview, SAS connection string support is added to the existing connection string client constructors and static methods.
- Account connection string example -
DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net
- SAS connection string example -
BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString
- SAS connection string is supported in both NodeJS and browser runtimes unlike the Account Connection String which is supported only in the NodeJS runtime.
- Account connection string example -
-
[Breaking] Client types are renamed from *URL to *Client.
- ServiceURL, ShareURL, DirectoryURL and FileURL to FileServiceClient, ShareClient, DirectoryClient and FileClient respectively.
-
[Breaking] Aborter parameters are now moved into option bags.
abortSignal
attrubute(optional) in the option-bag of respective module has to be utitlized for theAborter.timeout(<milliseconds>)
functionality.Aborter.none
is the default value.
-
[Breaking] I- prefixes are removed from interface names.
- Example-
IDirectoryCreateOptions
is updated toDirectoryCreateOptions
, the new names must to be used.
- Example-
-
[Breaking] The static methods to create client types are removed. The functionality is moved into new instance methods added to the parent clients.
-
[Breaking] The telemetry strings have been updated.
Azure-Storage/${SDK_VERSION}
is updated toazsdk-js-storageblob/${SDK_VERSION}
.
-
[Breaking]
withPipeline()
method is removed. -
Async iterators with pagination support are added for listing methods
listFilesAndDirectories()
andlistShares()
- Please refer to the samples for async iterators in the
samples
folder.
-
[Breaking] Methods that list segments(
listFilesAndDirectoriesSegment()
andlistSharesSegment()
) are no longer exposed in public api. -
[Breaking] High level convenience functions are moved into clients as their instance member function.
uploadFileToAzureFile()
,uploadStreamToAzureFile()
,downloadAzureFileToBuffer()
anduploadBrowserDataToAzureFile()
->FileClient.uploadFile()
,FileClient.uploadStream()
,FileClient.downloadToBuffer()
andFileClient.uploadBrowserData()
respectively.
-
[Breaking]
StorageClient
is no longer exposed.StorageClient.newPipeline()
static method is moved to the top level exported functionnewPipeline()
. -
Updated dependency
@azure/ms-rest-js
to@azure/core-http
. -
Constructor overloads added into client types so they can be constructed from a url and a pipeline/credential and connection string.
- Constructors with overloads -
FileServiceClient
andShareClient
- Connection string method is supported only in Node.js (not browsers).
- Constructors with overloads -
-
Creation/Deletion of child resources are duplicated to parent client type.
-
HTTP proxy support is added (Node.js only).
- Please refer to the
proxyAuth.ts
sample in thesamples/typescript
folder.
- Please refer to the
-
Request and response headers are now logged at INFO level, with sensitive data redacted.
-
downloadToFile()
is added toFileClient
.
For release notes and more information please visit https://aka.ms/azure-sdk-preview1-js
- Updated Azure Storage Service API version to 2019-02-02.
- Added a new API
ShareURL.createPermission()
which allows for the creation of a security descriptor at the Azure File share level. This descriptor can be used for files and directories in the share. - Added a new API
ShareURL.getPermission()
which allows for the retrieval of the security descriptor set on a share. - Added APIs
DirectoryURL.setProperties()
andFileURL.setProperties()
, and updated APIsDirectoryURL.create()
andFileURL.create()
for setting file permission, attributes, creation time, and last write time. - Added a new API
FileURL.uploadRangeFromURL()
which allows range in a file to be written using a range of another file as a source. This permits synchronous server-side copies to be orchestrated for files of any size.
- Fixed a bug of
downloadBlobToBuffer()
anddownloadAzureFileToBuffer()
when provided offset is not 0. - Fixed a bug that
Aborter
cannot work during retry interval. - Fixed a bug that
Aborter
throws timeout error even though it succeeds ofFileURL.download()
. - Fixed a bug that "err.code.toUpperCase is not a function" when retries in browser.
Aborter
doesn't requiredom
as tsconfig lib requirement anymore forEvent
type.- Export
RetryPolicyType
. - Updated HTTP client from axios to node-fetch in Node.js runtime.
- A new option
keepAliveOptions
added to parameter ofStorageURL.newPipeline()
which controls keep-alive configurations. Keep-alive is enabled by default. - Updated Azure Storage Service API version to 2018-11-09.
- The
ShareURL.getStatistics()
now returns the approximate size in bytes withshareUsageBytes
. - Added
DirectoryURL.listHandlesSegment()
andFileURL.listHandlesSegment()
to returns a list of open handles on a directory or a file. - Added
DirectoryURL.forceCloseHandlesSegment()
,FileURL.forceCloseHandlesSegment()
,DirectoryURL.forceCloseHandle()
andFileURL.forceCloseHandle()
to close handles. - Updated Azure Storage Service API version to 2018-11-09.
- [Breaking] Updated convenience layer methods enum type parameters into typescript union types, this will help reducing bundle footprint.
- [Breaking] Updated URL encoding strategy for
url
parameters ofnew XXXURL(url, pipeline)
methods, such asnew FileURL(url, pipeline)
.- URL will accept both encoded or non-encoded URL string. It will escape non-escaped special characters, like Chinese characters. However, if directory/file name includes
%
,url
must be encoded manually.
- URL will accept both encoded or non-encoded URL string. It will escape non-escaped special characters, like Chinese characters. However, if directory/file name includes
- [Breaking]
SASQueryParameters
is not going to be exported in browser bundle, and will be exported in Node.js runtime. - [Breaking] IE11 needs
Array.prototype.includes
andObject.keys
polyfills loaded. - Updated dependency
ms-rest-js
to@azure/ms-rest-js
. - Fixed
Aborter.timeout()
misleading scale description. - Removed default 60s server timeout value for retry options
tryTimeoutInMs
to avoid large blob download stream unexpected ending. - Fixed an issue that when body is string with special characters,
FileURL.uploadRange
will fail to upload. - Exported
HttpRequestBody
type for who wants to implement a customized HTTP client.
- Initial Release. API version 2018-03-28 supported. Please see the README for information on the new design.