Merge pull request #448 from maorleger/use-self

Use self instead of window when referring to the global object
This commit is contained in:
Jeremy Meng 2021-05-05 10:14:40 -07:00 коммит произвёл GitHub
Родитель 1850bd8a7e bae8216f47
Коммит e62e826d2c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,5 +1,9 @@
# Changelog # Changelog
## 2.4.1 - (2021-05-05)
- Use `self` instead of `window` in order to support web workers.
## 2.4.0 - 2021-04-19 ## 2.4.0 - 2021-04-19
- Expose `AzureIdentityCredentialAdapter` in the public API to enable users of this package make use of credentials from `@azure/identity`. - Expose `AzureIdentityCredentialAdapter` in the public API to enable users of this package make use of credentials from `@azure/identity`.

Просмотреть файл

@ -18,7 +18,7 @@ export function getDefaultUserAgentKey(): string {
} }
export function getPlatformSpecificData(): TelemetryInfo[] { export function getPlatformSpecificData(): TelemetryInfo[] {
const navigator = window.navigator as NavigatorEx; const navigator = self.navigator as NavigatorEx;
const osInfo = { const osInfo = {
key: "OS", key: "OS",
value: (navigator.oscpu || navigator.platform).replace(" ", ""), value: (navigator.oscpu || navigator.platform).replace(" ", ""),

Просмотреть файл

@ -7,7 +7,7 @@ export const Constants = {
* @const * @const
* @type {string} * @type {string}
*/ */
msRestVersion: "2.4.0", msRestVersion: "2.4.1",
/** /**
* Specifies HTTP. * Specifies HTTP.

Просмотреть файл

@ -5,7 +5,7 @@
"email": "azsdkteam@microsoft.com", "email": "azsdkteam@microsoft.com",
"url": "https://github.com/Azure/ms-rest-js" "url": "https://github.com/Azure/ms-rest-js"
}, },
"version": "2.4.0", "version": "2.4.1",
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
"tags": [ "tags": [
"isomorphic", "isomorphic",