@exodus/analytics-validation 2.11.1 → 2.12.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/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.12.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@2.11.2...@exodus/analytics-validation@2.12.0) (2024-03-06)
7
+
8
+ ### Features
9
+
10
+ - add schema for SettingsLanguageTap ([#6002](https://github.com/ExodusMovement/exodus-hydra/issues/6002)) ([4c2ef04](https://github.com/ExodusMovement/exodus-hydra/commit/4c2ef04b55781ece7f90e0782a76dd4156615a2f))
11
+
12
+ ## [2.11.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@2.11.0...@exodus/analytics-validation@2.11.2) (2024-02-20)
13
+
14
+ ### Bug Fixes
15
+
16
+ - os_version is too strict ([#5760](https://github.com/ExodusMovement/exodus-hydra/issues/5760)) ([b52f16c](https://github.com/ExodusMovement/exodus-hydra/commit/b52f16c0a6872fac841446de08780c8b936c90b5))
17
+ - reintroduce discriminator in analytics-validation ([#5577](https://github.com/ExodusMovement/exodus-hydra/issues/5577)) ([8364584](https://github.com/ExodusMovement/exodus-hydra/commit/8364584afbc94d58ec8f148fff695f28299d5d28))
18
+
6
19
  ## [2.11.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@2.11.0...@exodus/analytics-validation@2.11.1) (2024-02-05)
7
20
 
8
21
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/analytics-validation",
3
- "version": "2.11.1",
3
+ "version": "2.12.0",
4
4
  "description": "JSON schemas for analytics events, to prevent sensitive data from being sent up to the infamous cloud",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "repository": {
@@ -22,16 +22,14 @@
22
22
  ],
23
23
  "scripts": {
24
24
  "build": "node scripts/build-schemasafe.js",
25
- "lint": "eslint . --ignore-path ../../.gitignore",
25
+ "lint": "run -T eslint . --ignore-path ../../.gitignore",
26
26
  "lint:fix": "yarn lint --fix",
27
27
  "test": "yarn build && jest",
28
28
  "prepublishOnly": "yarn run -T build --scope @exodus/analytics-validation"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@exodus/schemasafe": "^1.0.0",
32
- "@exodus/schemasafe-babel-plugin": "^1.1.0",
33
- "eslint": "^8.44.0",
34
- "jest": "^29.1.2"
32
+ "@exodus/schemasafe-babel-plugin": "^1.1.0"
35
33
  },
36
34
  "nx": {
37
35
  "targets": {
@@ -41,5 +39,6 @@
41
39
  ]
42
40
  }
43
41
  }
44
- }
42
+ },
43
+ "gitHead": "9f5dfc4037317b15a26ee1aea7f97e2b6646b50c"
45
44
  }
@@ -29,7 +29,6 @@ getSchemas({ schemaDir, schemaNames })
29
29
  const semVerRegEx =
30
30
  /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?$/
31
31
  const localeRegEx = /^[A-Za-z]{2,4}([_-][A-Za-z]{2,4})?$/
32
- const osRegEx = /^(\d+\.)?(\d+\.)?(\d+)$/
33
32
  // NOTE: this is exported so consumers can use the same settings at runtime
34
33
  // as were used to compile schemas at build time
35
34
  module.exports = {
@@ -37,7 +36,6 @@ module.exports = {
37
36
  formats: {
38
37
  'any-string': (str) => typeof str === 'string',
39
38
  'semver-string': semVerRegEx,
40
- 'os-version-string': osRegEx,
41
39
  locale: localeRegEx,
42
40
  },
43
41
  schemas,
@@ -171,7 +171,7 @@
171
171
  },
172
172
  "os_version": {
173
173
  "type": "string",
174
- "format": "os-version-string",
174
+ "format": "any-string",
175
175
  "maxLength": 10,
176
176
  "$comment": "Max length is arbitrary"
177
177
  },
@@ -287,6 +287,9 @@
287
287
  {
288
288
  "$ref": "settings-default-wallet-toggle#"
289
289
  },
290
+ {
291
+ "$ref": "settings-language-tap#"
292
+ },
290
293
  {
291
294
  "$ref": "settings-lightning-higher-limits-toggle#"
292
295
  },
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "event": {
6
+ "const": "SettingsLanguageTap"
7
+ },
8
+ "properties": {
9
+ "allOf": [
10
+ {
11
+ "$ref": "common-properties#"
12
+ }
13
+ ],
14
+ "type": "object",
15
+ "required": [],
16
+ "properties": {
17
+ "language": {
18
+ "type": "string",
19
+ "format": "any-string"
20
+ }
21
+ },
22
+ "unevaluatedProperties": false
23
+ }
24
+ },
25
+ "unevaluatedProperties": false,
26
+ "required": ["event", "properties"]
27
+ }