From 21588183768f94c613134f3d75708d55eb8f0322 Mon Sep 17 00:00:00 2001 From: Harsha Nalluru Date: Tue, 22 Oct 2019 15:17:49 -0700 Subject: [PATCH] [Storage] Update polyfill to fix the failed browser tests in IE (#5727) * update polyfill * IE -> ChromeHeadless --- sdk/storage/README.md | 1 + sdk/storage/storage-blob/ChangeLog.md | 1 + sdk/storage/storage-blob/README.md | 1 + sdk/storage/storage-blob/karma.conf.js | 4 ++-- sdk/storage/storage-blob/samples/browserSamples/basic.html | 2 +- sdk/storage/storage-file/ChangeLog.md | 1 + sdk/storage/storage-file/README.md | 1 + sdk/storage/storage-file/karma.conf.js | 4 ++-- sdk/storage/storage-file/samples/browserSample.html | 2 +- sdk/storage/storage-queue/ChangeLog.md | 1 + sdk/storage/storage-queue/README.md | 1 + sdk/storage/storage-queue/karma.conf.js | 4 ++-- sdk/storage/storage-queue/samples/browserSample.html | 2 +- 13 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sdk/storage/README.md b/sdk/storage/README.md index 5e8bbfcdd57f..68ee24fdee22 100644 --- a/sdk/storage/README.md +++ b/sdk/storage/README.md @@ -55,6 +55,7 @@ This library depends on following ES features which need external polyfills load - `String.prototype.repeat` - `String.prototype.includes` - `Array.prototype.includes` +- `Object.assign` - `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes)) - `Symbol` diff --git a/sdk/storage/storage-blob/ChangeLog.md b/sdk/storage/storage-blob/ChangeLog.md index 261c353dc97e..bf7407c23692 100644 --- a/sdk/storage/storage-blob/ChangeLog.md +++ b/sdk/storage/storage-blob/ChangeLog.md @@ -58,6 +58,7 @@ - (with proxyURI) `UseDevelopmentStorage=true;DevelopmentStorageProxyUri=proxyURI` - [Breaking] `encrypted` attribute is removed from `BlobMetadata` interface. [PR #5612](https://github.com/Azure/azure-sdk-for-js/pull/5612) - [Breaking] Return type of `downloadToBuffer` helper method on `BlobClient` is changed to `Promise` from `Promise` [PR #5624](https://github.com/Azure/azure-sdk-for-js/pull/5624) +- [Breaking] IE11 needs `Object.assign` polyfill loaded. ## 2019.10 12.0.0-preview.4 diff --git a/sdk/storage/storage-blob/README.md b/sdk/storage/storage-blob/README.md index 7358cf3b90a3..aaf67680ba0f 100644 --- a/sdk/storage/storage-blob/README.md +++ b/sdk/storage/storage-blob/README.md @@ -45,6 +45,7 @@ This library depends on following ES features which need external polyfills load - `String.prototype.repeat` - `String.prototype.includes` - `Array.prototype.includes` +- `Object.assign` - `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes)) - `Symbol` diff --git a/sdk/storage/storage-blob/karma.conf.js b/sdk/storage/storage-blob/karma.conf.js index 06209ba5fc76..cbef09627b99 100644 --- a/sdk/storage/storage-blob/karma.conf.js +++ b/sdk/storage/storage-blob/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ // polyfill service supporting IE11 missing features - // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys - "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", + // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys + "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys|always", "dist-test/index.browser.js", "recordings/browsers/**/*.json" ], diff --git a/sdk/storage/storage-blob/samples/browserSamples/basic.html b/sdk/storage/storage-blob/samples/browserSamples/basic.html index be656fde3c8f..891954778a13 100644 --- a/sdk/storage/storage-blob/samples/browserSamples/basic.html +++ b/sdk/storage/storage-blob/samples/browserSamples/basic.html @@ -9,7 +9,7 @@ diff --git a/sdk/storage/storage-file/ChangeLog.md b/sdk/storage/storage-file/ChangeLog.md index ba17f10c47df..be33bf79521b 100644 --- a/sdk/storage/storage-file/ChangeLog.md +++ b/sdk/storage/storage-file/ChangeLog.md @@ -24,6 +24,7 @@ - [Breaking] Appropriate attribute renames in all the interfaces [PR #5610](https://github.com/Azure/azure-sdk-for-js/pull/5610) - Example - `nextMarker` -> `continuationToken`, `HTTPClient` -> `HttpClient`, `permission` -> `permissions`, `parallelism` -> `concurrency` - [Breaking] `forceCloseHandlesSegment` is not exposed from the library in favour of the new method `forceCloseAllHandles` on `FileClient` and `DirectoryClient`. [PR #5620](https://github.com/Azure/azure-sdk-for-js/pull/5620) +- [Breaking] IE11 needs `Object.assign` polyfill loaded. ## 2019.10 12.0.0-preview.4 diff --git a/sdk/storage/storage-file/README.md b/sdk/storage/storage-file/README.md index 897a500ee9e7..a475af3bde65 100644 --- a/sdk/storage/storage-file/README.md +++ b/sdk/storage/storage-file/README.md @@ -44,6 +44,7 @@ This library depends on following ES features which need external polyfills load - `String.prototype.repeat` - `String.prototype.includes` - `Array.prototype.includes` +- `Object.assign` - `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes)) - `Symbol` diff --git a/sdk/storage/storage-file/karma.conf.js b/sdk/storage/storage-file/karma.conf.js index 1ab4d7cb4999..9630fcf2d0fc 100644 --- a/sdk/storage/storage-file/karma.conf.js +++ b/sdk/storage/storage-file/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ // polyfill service supporting IE11 missing features - // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys - "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", + // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys + "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys|always", "dist-test/index.browser.js", "recordings/browsers/**/*.json" ], diff --git a/sdk/storage/storage-file/samples/browserSample.html b/sdk/storage/storage-file/samples/browserSample.html index aaa9765bf3ba..c769249aadbf 100644 --- a/sdk/storage/storage-file/samples/browserSample.html +++ b/sdk/storage/storage-file/samples/browserSample.html @@ -9,7 +9,7 @@ diff --git a/sdk/storage/storage-queue/ChangeLog.md b/sdk/storage/storage-queue/ChangeLog.md index c81b3a5e8e6e..26862d4c0a2c 100644 --- a/sdk/storage/storage-queue/ChangeLog.md +++ b/sdk/storage/storage-queue/ChangeLog.md @@ -28,6 +28,7 @@ - emulator connection string shorthands are supported - `UseDevelopmentStorage=true` - (with proxyURI) `UseDevelopmentStorage=true;DevelopmentStorageProxyUri=proxyURI` +- [Breaking] IE11 needs `Object.assign` polyfill loaded. ## 2019.10 12.0.0-preview.4 diff --git a/sdk/storage/storage-queue/README.md b/sdk/storage/storage-queue/README.md index 9d9f4c78bf3f..91fb335aa559 100644 --- a/sdk/storage/storage-queue/README.md +++ b/sdk/storage/storage-queue/README.md @@ -43,6 +43,7 @@ This library depends on following ES features which need external polyfills load - `String.prototype.repeat` - `String.prototype.includes` - `Array.prototype.includes` +- `Object.assign` - `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes)) - `Symbol` diff --git a/sdk/storage/storage-queue/karma.conf.js b/sdk/storage/storage-queue/karma.conf.js index bd4d9de2bd45..c354bbe2fc92 100644 --- a/sdk/storage/storage-queue/karma.conf.js +++ b/sdk/storage/storage-queue/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ // polyfill service supporting IE11 missing features - // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys - "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", + // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys + "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.assign,Object.keys|always", "dist-test/index.browser.js", "recordings/browsers/**/*.json" ], diff --git a/sdk/storage/storage-queue/samples/browserSample.html b/sdk/storage/storage-queue/samples/browserSample.html index a1e4e08eeb94..4b89c3a60e17 100644 --- a/sdk/storage/storage-queue/samples/browserSample.html +++ b/sdk/storage/storage-queue/samples/browserSample.html @@ -9,7 +9,7 @@