@flighthq/useragent 0.3.0-next.1162.e90e518 → 0.3.0-next.1248.f867198

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/useragent",
3
- "version": "0.3.0-next.1162.e90e518",
3
+ "version": "0.3.0-next.1248.f867198",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -36,7 +36,7 @@
36
36
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@flighthq/types": "0.3.0-next.1162.e90e518"
39
+ "@flighthq/types": "0.3.0-next.1248.f867198"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "^5.3.0"
@@ -115,6 +115,19 @@ describe('parseUserAgentEngine', () => {
115
115
  });
116
116
  });
117
117
 
118
+ describe('parseUserAgentEngine for Opera on iOS', () => {
119
+ const IOS_PREFIX = 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 ';
120
+
121
+ it.each([
122
+ ['OPiOS', `${IOS_PREFIX}(KHTML, like Gecko) OPiOS/9.2.0.11256 Mobile/15E148 Safari/9537.53`],
123
+ ['OPT', `${IOS_PREFIX}(KHTML, like Gecko) Version/17.0 OPT/3.6.1 Mobile/15E148 Safari/604.1`],
124
+ ])('keeps the %s product token on WebKit', (_token, ua) => {
125
+ const engine = parseUserAgentEngine(ua);
126
+ expect(engine).toBe('webkit');
127
+ expect(parseUserAgentEngineVersion(ua, engine)).not.toBe('');
128
+ });
129
+ });
130
+
118
131
  describe('parseUserAgentEngine on iOS', () => {
119
132
  // Every browser on iOS/iPadOS runs on the system WebKit, whatever product token it advertises.
120
133
  // Deciding the engine from the product token got EdgiOS wrong — it contains `edg`, so it was