mattcarlotta / snackables-next
Showing 1 of 6 files from the diff.
Other files ignored by Codecov
package.json has changed.
UPDATESLOG.md has changed.
yarn.lock has changed.
tsconfig.json has changed.

@@ -127,28 +127,32 @@
Loading
127 127
    const keyValueArr = keyValues[i].match(/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/);
128 128
129 129
    if (keyValueArr) {
130 -
      // default undefined or missing values to empty string
131 -
      let value = keyValueArr[2] || "";
132 -
      const end = value.length - 1;
133 -
      const isDoubleQuoted = value[0] === '"' && value[end] === '"';
134 -
      const isSingleQuoted = value[0] === "'" && value[end] === "'";
135 -
136 -
      // if single or double quoted, remove quotes
137 -
      if (isSingleQuoted || isDoubleQuoted) {
138 -
        value = value.substring(1, end);
139 -
140 -
        // if double quoted, expand newlines
141 -
        if (isDoubleQuoted) value = value.replace(/\\n/g, "\n");
142 -
      } else {
143 -
        // remove surrounding whitespace
144 -
        value = value.trim();
130 +
      const key = keyValueArr[1];
131 +
132 +
      if (!env[key]) {
133 +
        // default undefined or missing values to empty string
134 +
        let value = keyValueArr[2] || "";
135 +
        const end = value.length - 1;
136 +
        const isDoubleQuoted = value[0] === '"' && value[end] === '"';
137 +
        const isSingleQuoted = value[0] === "'" && value[end] === "'";
138 +
139 +
        // if single or double quoted, remove quotes
140 +
        if (isSingleQuoted || isDoubleQuoted) {
141 +
          value = value.substring(1, end);
142 +
143 +
          // if double quoted, expand newlines
144 +
          if (isDoubleQuoted) value = value.replace(/\\n/g, "\n");
145 +
        } else {
146 +
          // remove surrounding whitespace
147 +
          value = value.trim();
148 +
        }
149 +
150 +
        // interpolate value from process.env or .env
151 +
        value = interpolate(value);
152 +
153 +
        // prevents the extracted value from overriding a process.env variable
154 +
        extracted[keyValueArr[1]] = value;
145 155
      }
146 -
147 -
      // interpolate value from process.env or .env
148 -
      value = interpolate(value);
149 -
150 -
      // prevents the extracted value from overriding a process.env variable
151 -
      if (!env[keyValueArr[1]]) extracted[keyValueArr[1]] = value;
152 156
    }
153 157
  }
154 158
Files Coverage
index.ts 100.00%
Project Totals (1 files) 100.00%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading