-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unblock react native support when using corev2 packages #17783
Changes from 11 commits
88a219c
5b57c64
e9919b9
2d48ab4
c4b7435
7425dc8
5db944c
73356b8
dee0d6f
8e590d2
ef06c5e
105664a
6b5e878
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
|
||
### Other Changes | ||
|
||
- Updates package to work with the react native bundler. Browser APIs may still need to be pollyfilled for this package to run in react native. [PR #17783](https://github.com/Azure/azure-sdk-for-js/pull/17783) | ||
|
||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am curious, is there a way to document those APIs with mappings to the appropriate polyfills? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pollyfill landscape in react native is kind of still like the wild west. I plan to have an example shims file in the samples that are included in a follow-up PR, but I don't want to recommend any specific 3rd party pollyfill at this time since I haven't properly vetted them beyond ensuring some seem to work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is fair. In order to make it easier for react native customers to use the SDK, should we consider providing documentation of non-standard definitions that need to be polyfilled for every package? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My plan was to document that in react-native samples (that live alongside our current react/electron samples.) Happy to include some documentation at that point as well similar to how we have documentation on bundling. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds great! Thanks! |
||
## 1.3.0 (2021-08-04) | ||
|
||
### Features Added | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Release History | ||
|
||
## 1.2.1 (Unreleased) | ||
|
||
### Other Changes | ||
|
||
- Updates package to work with the react native bundler. Browser APIs such as `URL` will still need to be pollyfilled for this package to run in react native. [PR #17783](https://github.com/Azure/azure-sdk-for-js/pull/17783) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this package does not reference There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, I was thinking of |
||
## 1.2.0 (2021-08-30) | ||
|
||
### Features Added | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,10 @@ | |
"./dist-esm/src/util/url.js": "./dist-esm/src/util/url.browser.js", | ||
"./dist-esm/src/util/userAgentPlatform.js": "./dist-esm/src/util/userAgentPlatform.browser.js" | ||
}, | ||
"react-native": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changelog? |
||
"./dist/index.js": "./dist-esm/src/index.js", | ||
"./dist-esm/src/util/userAgentPlatform.js": "./dist-esm/src/util/userAgentPlatform.native.js" | ||
}, | ||
"types": "core-rest-pipeline.shims.d.ts", | ||
"typesVersions": { | ||
"<3.6": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
/* | ||
* NOTE: When moving this file, please update "react-native" section in package.json. | ||
*/ | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export function getHeaderName(): string { | ||
return "x-ms-useragent"; | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export function setPlatformSpecificData(map: Map<string, string>): void { | ||
// TODO: Investigate using `import { Platform } from "react-native"` to get "OS" and "Version". | ||
// This may bring in a lot of overhead if we have to use this package directly, perhaps we can shim | ||
// types. | ||
map.set("OS", `react-native`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joheredi is this package still a dep in the rest clients? if not, we could probably skip updating it. Same applies for the lro one.