expensify-common 2.0.164 → 2.0.166

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.
Files changed (2) hide show
  1. package/dist/Device.js +5 -1
  2. package/package.json +1 -1
package/dist/Device.js CHANGED
@@ -3,12 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOSAndName = getOSAndName;
4
4
  const ua_parser_js_1 = require("ua-parser-js");
5
5
  function getOSAndName() {
6
+ var _a;
6
7
  const parser = new ua_parser_js_1.UAParser();
7
8
  const { browser, os } = parser.getResult();
8
9
  let osVersion = os.version;
9
10
  // Detection logic inspired by UAParser guide on iOS 26:
10
11
  // https://docs.uaparser.dev/guides/how-to-detect-ios-26-using-javascript.html
11
- if (browser.name === 'Mobile Safari' && browser.major === '26' && os.name === 'iOS' && os.version === '18.6') {
12
+ const [osMajor, osMinor] = ((_a = os.version) !== null && _a !== void 0 ? _a : '').split('.');
13
+ const osMajorInt = parseInt(osMajor, 10);
14
+ const osMinorInt = parseInt(osMinor, 10);
15
+ if (browser.name === 'Mobile Safari' && browser.major === '26' && os.name === 'iOS' && (osMajorInt > 18 || (osMajorInt === 18 && osMinorInt >= 6))) {
12
16
  osVersion = '26';
13
17
  }
14
18
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expensify-common",
3
- "version": "2.0.164",
3
+ "version": "2.0.166",
4
4
  "author": "Expensify, Inc.",
5
5
  "description": "Expensify libraries and components shared across different repos",
6
6
  "homepage": "https://expensify.com",