1. 23 Jun, 2021 1 commit
  2. 22 Jun, 2021 2 commits
    • Kyle Keating's avatar
      Pass config name directly to getValue · b208c1e9
      Kyle Keating authored
      This change fixes the usage of redundant names being expressed in the configDefinitions map.
      b208c1e9
    • Kyle Keating's avatar
      Add `allowInBrowserExt` and `defaultValue` to configDefinitions · d834fefd
      Kyle Keating authored
      - Logic for `allowInBrowserExt` and `defaultValue` are moved up into getConfig() from various places inside settings. There are no external changes here, but there are a few subtle changes to how a config values work.
      
        1. Previously if in a browser ext context and  `allowInBrowserEx` was false (default), then the value was was changed to null. This bit of logic was not entirely explicit, but now the logic is that the value will be set to the `defaultValue` if provided or otherwise the value will be omitted entirely. Currently, all values have a `defaultValue` and most of the defaults are null. This ensures things work the same, but also helps bring clarity to what values will be transformed under this condition. Later we can revisit these config values and determine if any don't need a default or simply leave them as is.
      
        2. The `defaultValue` was previously only used for several fields, but now its set for every field for clarity. It should also be noted that the `defaultValue` will now take precedent over the `coerce` method if settings returns an undefined value for that config key. This is in contrast to how it worked before, but was problematic under some possible circumstances. For example, if a settings value was not found or undefined, and a `defaultValue` was true and the coerce was `toBoolean`, then the value would become false rather than true and that is confusing because the default would not work due to the `coerce` taking precedent. This is now fixed.
      
      - Remove default export from is-browser-extension
      d834fefd
  3. 21 Jun, 2021 14 commits
  4. 17 Jun, 2021 5 commits
  5. 15 Jun, 2021 2 commits
  6. 14 Jun, 2021 13 commits
  7. 09 Jun, 2021 1 commit
    • Kyle Keating's avatar
      Change configFrom() to configDefinitions() · 0f6532a8
      Kyle Keating authored
      The main difference is that configFrom returned config key:value pairs, but now configDefinitions returns key:object pairs. Where the object may hold additional flags and methods for each specific config value. Currently the only method included is valueFn() which gets the value from its source. Others will follow.
      
      Additionally:
      - Remove `experimental` from configDefinitions/configFrom as it is not used
      0f6532a8
  8. 08 Jun, 2021 2 commits