azure-sdk-for-js/documentation/Changelog-for-next-generati...

2.4 KiB

The next-generation Azure JavaScript libraries introduce a few important changes:

  1. Authentication: The packages @azure/ms-rest-nodeauth or @azure/ms-rest-browserauth are no longer supported. Use package @azure/identity instead. Select a credential from Azure Identity examples based on the authentication method of your choice. You may find out the new authentication examples here
  2. Callbacks: Method overloads that use callbacks have been removed and please use Promise instead. You may find out the examples here
  3. List operations now return an iterable result that follows the PagedAsyncIterableIterator interface as opposite to the previous model where you have to make a new request using the link to the next page. You may find out the new list examples here
  4. Interface and API change for Long running operations: To check the final result of the Poller object returned by long running operations like beginCreateOrUpdate, please use pollUntilDone instead of pollUntilFinished. To get the final result directly, use the method with the suffix AndWait e.g.beginCreateOrUpdateAndWait. You may find out the LRO examples here
  5. The ClientContext class has been removed and all its properties could be found in Client class itself.
  6. The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.

Tips:

  1. For more details on how to migrate the next-generation libraries, please visit the migration guide.
  2. To get started, please visit the quickstart guide.
  3. For more sample code, please visit our samples repo.