@aws-sdk/util-user-agent-browser 3.535.0 → 3.575.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -4,16 +4,15 @@ exports.defaultUserAgent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const bowser_1 = tslib_1.__importDefault(require("bowser"));
6
6
  const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
7
- var _a, _b, _c, _d, _e, _f, _g;
8
- const parsedUA = typeof window !== "undefined" && ((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent)
7
+ const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
9
8
  ? bowser_1.default.parse(window.navigator.userAgent)
10
9
  : undefined;
11
10
  const sections = [
12
11
  ["aws-sdk-js", clientVersion],
13
12
  ["ua", "2.0"],
14
- [`os/${((_b = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _b === void 0 ? void 0 : _b.name) || "other"}`, (_c = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _c === void 0 ? void 0 : _c.version],
13
+ [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version],
15
14
  ["lang/js"],
16
- ["md/browser", `${(_e = (_d = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : "unknown"}_${(_g = (_f = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _f === void 0 ? void 0 : _f.version) !== null && _g !== void 0 ? _g : "unknown"}`],
15
+ ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`],
17
16
  ];
18
17
  if (serviceId) {
19
18
  sections.push([`api/${serviceId}`, clientVersion]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-browser",
3
- "version": "3.535.0",
3
+ "version": "3.575.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline util-user-agent-browser",
@@ -22,8 +22,8 @@
22
22
  "license": "Apache-2.0",
23
23
  "react-native": "dist-es/index.native.js",
24
24
  "dependencies": {
25
- "@aws-sdk/types": "3.535.0",
26
- "@smithy/types": "^2.12.0",
25
+ "@aws-sdk/types": "3.575.0",
26
+ "@smithy/types": "^3.0.0",
27
27
  "bowser": "^2.11.0",
28
28
  "tslib": "^2.6.2"
29
29
  },