***NO_CI***
- update engine.node to >=16.0.0 in package.json
- update @types/node version to ^16.0.0
- update dev-tool sample's MIN_SUPPORTED_NODE_VERSION to 16
- update eslint-plugin's rules and tests related to engine.node version
- remove TextEncoder and TextDecoder stubs as they are now on global object
- fix tests compiler error due to better typings in v16
- update some README files to not reference version like 14.x.x
Due to security reason we don't want to have secrets in the browsers.
This PR updates the web-worker sample to use container SAS url to
construct storage blob clients.
### Packages impacted by this PR
N/A
### Issues associated with this PR
Fixes#20934
### Describe the problem that is addressed by this PR
A customer reported a few issues:
- At some point when updating our arm-template path we lost a character for
url-encoded / - instead of %2F we only had %2... combined with the followed
character "a" this would end up as the * character instead of the intended
".../a..." character.
- It seems that a recent change in browsers to remove SharedArrayBuffer (see
https://developer.chrome.com/blog/enabling-shared-array-buffer/) has broken
JSDOM's dependencies and by extension JSDOM. This has been fixed upstream.
For good measure, I just bumped both dependencies.
Upgrade prettier dependencies to latest version (`^2.5.1`) in the following folders:
- Root package.json
- eng/tools/dependency-testing/
- samples/
- cors/ts/
- frameworks/electron/
- frameworks/electron/
- sdk/
- anomalydetector/
- deviceupdate/
- quantum/
- videoanalyzer/
Files were re-formatted as well, with two exceptions:
- In the `samples/` folder, there was no format script, so only the version in package.json files was modified.
- For `sdk/quatum/quantum-jobs`, the format script is skipped.
There are only format changes in this PR, no manual changes except for package.json files.
Main format changes with Prettier 2.x in this PR include:
- Trailing commas by default.
- Whitespace added after every `function` keyword.
## What
- Adds a helpful error message about missing global DOM APIs when using core-xml / core-http in web workers
- Adds a sample and document demonstrating possible workarounds and polyfills
## Why
A customer raised an issue in #11067 when trying to use @azure/storage-blob from a web worker. Because we use DOM APIs which are not available for web workers, customers using Storage Blob (and any other library that depends on XML) in workers will see a few errors:
1. `document` is not defined
2. `window` is not defined (fixed in #13873)
We decided in a previous PR (see https://github.com/Azure/azure-sdk-for-js/pull/13977#issuecomment-786273058) on some guidelines for supporting platforms other than browsers and node out of the box. And bundling a heavy XML library such as `xml2js` to support web workers did not meet the criteria of support we want to provide.
What this change offers is a better error message when we detect global dependencies are missing and a sample demonstrating how I might use an XML / DOM library to provide this functionality in web workers.
Resolves#11067