@dvsa/cvs-feature-flags 1.1.0-canary.2 → 1.1.0-canary.3

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.
Files changed (2) hide show
  1. package/feature-flags.js +1 -3
  2. package/package.json +1 -1
package/feature-flags.js CHANGED
@@ -16,9 +16,7 @@ function resolveVariants(config, email) {
16
16
  const { emails, ...flagValues } = value;
17
17
  const normalisedEmail = email?.toLowerCase();
18
18
  const isTargeted = normalisedEmail && emails.map((e) => e.toLowerCase()).includes(normalisedEmail);
19
- if (isTargeted) {
20
- resolved[key] = flagValues;
21
- }
19
+ resolved[key] = isTargeted ? flagValues : { ...flagValues, enabled: false };
22
20
  }
23
21
  console.log('Resolving Variants', { resolved });
24
22
  return resolved;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvsa/cvs-feature-flags",
3
- "version": "1.1.0-canary.2",
3
+ "version": "1.1.0-canary.3",
4
4
  "description": "Common package to be used in CVS to manage feature flags",
5
5
  "author": "DVSA",
6
6
  "license": "ISC",