user-agents 2.0.0-alpha.5 → 2.0.0-alpha.51

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "user-agents",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.51",
4
4
  "description": "A JavaScript library for generating random user agents. ",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
- "repository": "git@github.com:intoli/user-agents.git",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+ssh://git@github.com/intoli/user-agents.git"
10
+ },
8
11
  "author": "Intoli, LLC <contact@intoli.com>",
9
12
  "files": [
10
13
  "dist/",
@@ -24,7 +27,6 @@
24
27
  "postbuild": "yarn gunzip-data && cp src/user-agents.json dist/",
25
28
  "gunzip-data": "node --loader ts-node/esm src/gunzip-data.ts src/user-agents.json.gz",
26
29
  "lint": "eslint src/ && prettier --check src/",
27
- "postversion": "git push && git push --tags",
28
30
  "test": "NODE_ENV=testing mocha --exit --require @babel/register --extensions '.ts, .js'",
29
31
  "update-data": "node --loader ts-node/esm src/update-data.ts src/user-agents.json.gz"
30
32
  },
@@ -96,10 +96,6 @@ const getUserAgentTable = async (limit = 1e4) => {
96
96
  profile.weight = weight;
97
97
  delete profile.sessionId;
98
98
 
99
- // Deleting these because they weren't in the old format, but we should leave them in...
100
- delete profile.language;
101
- delete profile.oscpu;
102
-
103
99
  // Find the device category.
104
100
  const parser = new UAParser(profile.userAgent);
105
101
  const device = parser.getDevice();
package/src/user-agent.ts CHANGED
@@ -22,6 +22,8 @@ export interface UserAgentData {
22
22
  downlinkMax?: number | null;
23
23
  type?: 'cellular' | 'wifi';
24
24
  };
25
+ language?: string | null;
26
+ oscpu?: string | null;
25
27
  platform:
26
28
  | 'iPad'
27
29
  | 'iPhone'