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

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "user-agents",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.7",
4
4
  "description": "A JavaScript library for generating random user agents. ",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -24,7 +24,6 @@
24
24
  "postbuild": "yarn gunzip-data && cp src/user-agents.json dist/",
25
25
  "gunzip-data": "node --loader ts-node/esm src/gunzip-data.ts src/user-agents.json.gz",
26
26
  "lint": "eslint src/ && prettier --check src/",
27
- "postversion": "git push && git push --tags",
28
27
  "test": "NODE_ENV=testing mocha --exit --require @babel/register --extensions '.ts, .js'",
29
28
  "update-data": "node --loader ts-node/esm src/update-data.ts src/user-agents.json.gz"
30
29
  },
@@ -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'