deeplink-parity 0.2.0 → 0.2.1

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.
@@ -29,12 +29,26 @@ function collectIntentFilters(node, out) {
29
29
  collectIntentFilters(child, out);
30
30
  }
31
31
  }
32
+ /**
33
+ * A build type or flavor can append to the base id with `applicationIdSuffix`, and the
34
+ * dev variant is usually what a dev domain's assetlinks file names. Suffixes are applied
35
+ * to every base id so that both `com.example` and `com.example.dev` count as ours.
36
+ */
32
37
  function applicationIds(gradleSources) {
33
- const ids = new Set();
38
+ const bases = new Set();
39
+ const suffixes = new Set();
34
40
  for (const src of gradleSources) {
35
- for (const m of src.matchAll(/applicationId\s*(?:=|\s)\s*["']([^"']+)["']/g)) {
36
- ids.add(m[1]);
41
+ for (const m of src.matchAll(/\bapplicationId\s*(?:=|\s)\s*["']([^"']+)["']/g)) {
42
+ bases.add(m[1]);
37
43
  }
44
+ for (const m of src.matchAll(/\bapplicationIdSuffix\s*(?:=|\s)\s*["']([^"']+)["']/g)) {
45
+ suffixes.add(m[1]);
46
+ }
47
+ }
48
+ const ids = new Set(bases);
49
+ for (const base of bases) {
50
+ for (const suffix of suffixes)
51
+ ids.add(`${base}${suffix}`);
38
52
  }
39
53
  return [...ids];
40
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deeplink-parity",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Checks that what your mobile app declares about deep links matches what is actually hosted — across iOS and Android.",
5
5
  "type": "module",
6
6
  "bin": {