- Remove cookie support from nodeFetchHttpClient to address a security issue with the
tough-cookie
package.
- Update dependency
xml2js
version to^0.5.0
.
- Add Microsoft SECURITY.md
- Wrap Trusted Types policy-creation in a try/catch.
- Address Trusted Types compliance issue.
- Fix a security issue with CVE-2022-0235 by upgrade node-fetch (PR 459)
- Added a new property
baseUri
on theServiceClientOptions
that is then used to initialize the correspondingbaseUri
protected property on theServiceClient
.- For
baseUri
that happen to be known Azure resource manager endpoints, this allows the instantiating of theAzureIdentityCredentialAdapter
class with the right scope when a user constructs aServiceClient
with aTokenCredential
. Resolves Azure/azure-sdk-for-js#15945
- For
- Updated the dependency on the uuid package to v8 (PR 456)
- Fixed an issue where
proxySettings
does not work when there is username but no password (PR 453)
- [BugFix] Array flattening in deserializer loses previously de-serialized attributes (PR #451)
- Add WebResource.redirectLimit: Limit the number of redirects followed for this request. If set to 0, redirects will not be followed.
- Port changes to redirect policy from [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js/pull/11863/files]
- Use
self
instead ofwindow
in order to support web workers.
- Expose
AzureIdentityCredentialAdapter
in the public API to enable users of this package make use of credentials from@azure/identity
.
- Moving @types dependencies into devdependencies
- Add NO_PROXY and ALL_PROXY support.
- Add username/password support in proxy url string.
- Update
WebResource.prepare()
to also copystreamResponseBody
.
- Dependent projects of @azure/ms-rest-js no longer need to have a dev dependency on @types/tunnel.
- Port fix for nextLink issue from core-http (PR #426)
- Fix abort signal event handler memory leak (PR #425)
- Rework the use of
lib: ["dom"]
so consumers of this package don't need it in their tsconfig. Fixes (Issue #367)
- Fix issue of
SystemErrorRetryPolicy
didn't retry on errors (Issue #412) ThrottlingRetryPolicy
now keep retrying on 429 responses up to a limit. Fixes (Issue #394)- The global
fetch()
is no longer overridden by node-fetch. Fixes (Issue #383)
- Add support for @azure/core-auth's TokenCredential (PR #410)
- Allow = character in parameter value (PR #408)
- Add support for custom http/https agent (PR #403)
- Fix WebResource clone to include extra settings (Issue #405)
- [BugFix] - Fixed loading of proxyPolicy.browser.js in the HTML files.(PR #397)
- Fixes encoding query parameters in an array before joining them.(PR #382)
- Replace public usage of
RequestPolicyOptions
to an interfaceRequestPolicyOptionsLike
to avoid compatibility issues with private members. - Fix issue with null/undefined values in array and tabs/space delimiter arrays during sendOperationRequest. PR #390
- Fix in flattenResponse when expecting an array, checking for parsedBody to be an array before proceeding with flattening. (PR #385)
- A new interface
WebResourceLike
was introduced to avoid a direct dependency on the classWebResource
in public interfaces.HttpHeadersLike
was also added to replace references toHttpHeaders
. This change was added to improve compatibility between@azure/core-http
and@azure/ms-rest-nodeauth
.
- Fix node-fetch bundling when using Webpack (PR #376).
- Ensure that a primitive type (string, number, boolean, null, undefined) response body with or without a
bodyMapper
is not flattened.
- Added support to not send default values while sending the request.
- Added support to populate entities with it's default value if it is present in the mapper while deserializing the response.
- During deserialization, if the service does not provide the discriminator property then we set it. While setting the discriminator property, we compare model property name and the
clientName
of thepolymorphicDiscriminator
instead of theserializedName
of thepolymorphicDiscriminator
. - Added tests for serializing and deserializing additional properties.
- Updated
cookieJar.setCookie()
with{ ignoreError: true }
forNodeFetchHttpClient
. This should silently ignore things like parse errors and invalid domains. This should resolve issues where customers using the@azure/arm-appservice
package get an error due to mismatch in the domain Azure/azure-sdk-for-js#1008. This behavior makes it consistent with the old package azure-arm-website which depends on the runtime ms-rest that depends on the request library which uses the tough-cookie package in{ looseMode: true }
by default with{ ignoreError: true }
as can be seen here.
- Updated tests to include Pattern constraint
- Change default HTTP client in Node.js environment from
axios
-based tonode-fetch
-based. - Add
keepAlive
option toWebResource
which sets proper header in Node.js HTTP client. - Breaking changes:
- AbortController
- added required
dispatchEvent
method - added required (or null)
onabort
method - enforce type
Event
forev
parameter inlistener
inaddEventListener
andremoveEventListener
- added required
- AbortController
- Added DomainCredentials class for providing credentials to publish to an Azure EventGrid domain.
- Added back the workaround of uppercasing method names otherwise axios causes issues with signing requests for storage data plane libraries.
- Moved testing dependent projects from a script to Azure Devops Pipeline
axios
changed the way it treats properties of the request config in0.19.0
. Previously we were settingtrasnformResponse
toundefined
. This would indicateaxios
to not transform (JSON.parse()
) the response body. In0.19.0
, they are setting the default response transformer if transformResponse is set toundefined
. This breaks our pasrsing logic where we are doingJSON.parse()
onoperationResponse.bodyAsText
. Moreover, we are exposing thebodyAsText
property in the generated clients. Not populating this property or setting the value of this property to a parsed JSON would be a breaking change for our users. Hence we are setting thetransformResponse
property in the request config to an indentity function that returns the response body as-is.
- Added build job to CI pipeline
- Fixed vulnerabilities by bumping
axios
to^0.19.0
. - New version of axios fixed some issues hence removed one of the workarounds of uppercasing method names while following redirects axios PR.
- Added script to run tests on dependent projects #345
- Fixed http over https bug #341
- Fixed serialization issue when required object is empty #337
- Added exports to several request policy factory methods #336
- Added userAgentHeaderName to ServiceClientOptions #330
- Fixed including proxy policy in browser 0c552f
- Brought Axios interceptors back c33602
- Fixed default HTTP client tests c75b87
- Added support to specify proxy setting in ServiceClientOptions.
- Movec browser-environment tests to Karma.
- Allowed ServiceClientOptions.requestPolicyFactories to be a function.
- Allowed ServiceClientOptions.userAgent property to be a function.
- Improved debugging by adding rollup-plugin-sourcemaps.
- Renamed NPM package to @azure/ms-rest-js.
- Moved to Rollup for node and browser bundles
- Moved browser bundle from ./msRestBundle.js to ./dist/msRest.browser.js.
- Added Authenticator type.
- Added support for EventGrid TopicCredentials object.
- Flatten response body properties, headers, etc. into one object for convenience
- Fixed bug where operationSpec.baseUrl might get mutated
- Fixed some edge cases in response headers parsing in browser
- Refinements to support LRO work in ms-rest-azure-js
- Improved type definitions of generated operation responses
- Replaced RequestPolicyCreator function with RequestPolicyFactory interface with create() method.
- Refactored mappers interfaces
- Added "sideEffects": false to package.json
- Added timeout parameter to request options
- Call onDownload/UploadProgress callbacks in nodejs
- Support x-nullable in Swagger
- Added architecture overview in docs/ folder
- Added withCredentials flag to request options
- Moved header deserialization to runtime
- Using XhrHttpClient in browser
- Miscellaneous internal breaking changes
- Support x-ms-header-collection-prefix in Swagger
- Export RequestPolicyOptions
- Fix base64 encoding in browser
- Add es6 module build
- withCredentials fixes
- Allow bundling individual operation groups instead of all operations
- Add onDownloadProgress/onUploadProgress handlers for browser
- Add parsed response headers support
- Added URLBuilder to parse and build URLs
- Removed fetch responses from public APIs
- Added AbortSignal optional parameter to operations for cancellation
- Replaced BaseFilter type with RequestPolicy.
- Removed ServiceClient.pipeline() in favor of ServiceClient.sendRequest().
- Started work on OperationSpecs to replace the imperative generated operations.
- Added isomorphic-xml2js dependency to reduce browser package size
- Removed moment.js dependency, instead passing ISO 8601 strings for durations.
- Relaxed validation for object types
- Relaxed handling of unrecognized polymorphic discriminator
- Added ApiKeyCredentials type
- Updated moment to 2.21.0
- Added support to ensure that the provided Duration is a Duration like object. (based on ms-rest 2.3.2 in https://github.com/Azure/azure-sdk-for-node)
- Added support for [de]serializing an "any" type (case when type is not present for an entity in the open api spec.). Resolves Azure/autorest#2855
- Updated dependency versions
- Compiled target to
ES5
for supporting IE11 #13.
- Removed dependency on detect-node and added a utility method to detect whether the app is being executed in a node.js environment. Fixes #10.
- We will return the actual response when the return type of a method in the generated code is
stream
. Hence, removingbodyAsStream
property fromHttpOperationResponse
.
- replacing eval by traversing recursively in the object.
- moment version 2.19.0 has lot of issues. Hence fixing the dependency strictly to 2.18.1.
- Reverting the change made in #2.
- Initial version of ms-rest-js
- Provides support for basic credentials
- Supports serialization and deserialization of basic and complex types
- Supports sending requests in the node environment and also in the browser
- Builds the request pipeline by adding predefined filters
- Provides mechanism to add custom flters in the pipeline
- Provides a bundled file named msRestBundle.js that can be used in the browser
- Please take a look at the samples directory for node and browser samples