# Changelog

## 3.7.36

- Fix issues with templates.js due to last version updates.

## 3.7.35

- Add 'grab-b2b-data' task to build/serve

## 3.7.34

- Updated the seasonal changes regex to include "or" conditions when swapping heating and ac in the strings.

## 3.7.33

- Added support for seasonal changes in all steps objects.

## 3.7.32

- Update editorconfig path


## 3.7.31

- Avoided overriding the control's step configuration during the merge with the variation's steps and the default form config.

## 3.7.30

- Removed the `addVwoTestAttribute` flag. The `data-vwo-test` attribute will now always be added to the `body` tag if the current session is a variation.

## 3.7.29

- Calling modalytics.initHeapVwo after creating `window._vwo_campaignData`.

## 3.7.28

- Applying merging of default form config on all the `steps` objects found.

## 3.7.27

- Adding VWO variation ID to the body tag as an attribute `data-vwo-test-id`.

## 3.7.26

- Added jacuzzi in the sites that should have tcpa below the cta.

## 3.7.25

- Upgraded to new VWO smart code.

## 3.7.24

- Removed `GUTTERS`, `GUTTER_COVERS`, & `SOLAR` from the TCPA placement configurations.

## 3.7.23

- Added `geolocation.min.js` to the `grab-shared-scripts` task to grab & hash that file during build (leaving the file in `grab-cdn` task to not break what is currently there).

## 3.7.22

- Added extra conditions for `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to not break when required data is not passed.

## 3.7.21

- Added `GUTTERS` & `GUTTER_COVERS` to the `addTcpaAboveCta` and `addTcpaBelowCta` configurations.

## 3.7.20

- Added `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to determine where tcpa should be placed based on trade/branded conditions.

## 3.7.19

- Added missed attributes in global questions config of siding and tree services.

## 3.7.18

- Fixing console log

## 3.7.17

- Added in the outer `ServiceType` missing object for Water Treatment trade questions config.

## 3.7.16

- Added the new `getDataAttributeValue` helper function; Also updated the generic error language in `get-default-trade-questions`.

## 3.7.15

- Added the Clients List modal to be grabbed as part of the  `grab-cdn` task.

## 3.7.14

- Added trade steps configs.

## 3.7.13

- An enhancement has been added to the `getConsentCaptureLanguage()` function to replace the subdirectory path throughout the response object.

## 3.7.12

- Added the E-Sign Consent modal to be grabbed as part of the  `grab-cdn` task.

## 3.7.11

- Added branded name to `brandedIncludeExclusivelyConsentCapture` object in consent capture.

## 3.7.10

- Included an option for `service` to be appended to the `brandedIncludeServiceConsentCapture` for consent capture.

## 3.7.9

- Updated `isBranded` sites to grab the display name from HS Form Service API to add to the `brandedConsentLanguage`.

## 3.7.8

- removed race condition from grab-cdn task.

## 3.7.6

- Removing all the `!window.Modalytics.privacyPreferencesDetected` conditionals (as we are no longer moving forward with this integration).

## 3.7.5

- fixed trade directory name issue for section deals pages

## 3.7.4

- Added small enhancements in `grab-mhsadmin-data`

## 3.7.3

- Added `grab-section-deals-components` and `grab-mhsadmin-data` tasks for section deals pages.

## 3.7.1

- updated clean task.

## 3.7.0

- Updating `templates.js` gulp task to grab the O&O Consent Capture TCPA language.

## 3.6.100

- JSLint failure is back! *(needed a brief pause while implementing modernize consent)*

## 3.6.99

- Updating final TCPA text from `fetchTcpaFromSitegenie()` with the Modernize consent checkbox + Privacy & Terms of Use modal links.
*This is a quick, temporary solve to get all of S3 updated with the Modernize consent. Once O&O Consent Capture starts actually getting implemented — we will update this as Modernize will need to be populated with the API response*

## 3.6.98

- Add howDidYouHearAboutUs value to Contractor Form

## 3.6.97

- Update regex for homeowner form to accomodate if contractor form is present

## 3.6.96

- Updating VWO cookies' expiration date to be only 1 day

## 3.6.95

- Updating the `gulp-uglify` package to use a newer version of `gulp-uglify-es` as we have had issues with `gulp-uglify` in the past

## 3.6.94

- Fixed bugs in seasonal updates

## 3.6.93

- updated grab-cdn task to pull geolocation script

## 3.6.92

- Updating `.eslintrc.yml` with our new lint rules; This configuration will also live on `quote.modernize.com`
- Adding a new `add-editorconfig` task that will grab our global `editorconfig` file configuration & either add it to the project, or override the existing file contents

## 3.6.91

- Added support for xml files

## 3.6.90

- Updating `fetchTcpaFromSitegenie()` to no longer have any use-cases of QuinStreet as the company name; should be Modernize all the time.

## 3.6.89

- Updated the `add-path-subdirectories` task to include path replacements for `../` or any variation of `../` in the attribute replacement values.
- Updated the `grab-shared-scripts` task to only add the `${pathSubdirectory}` inside the JS files; as the `add-path-subdirectories` task will handle replacement of everything else

## 3.6.88

- Reverting the change made in `3.6.87` — need to regroup on a solve for our cache bust & it affecting JS parameters.

## 3.6.87

- Updated the `cache-bust` gulp task to exclude our entire `scripts/` folder when updating asset names.

## 3.6.86

- Updated the `add-path-subdirectories` task to include `<video>` tag attributes in the replacements, as well as fixing a bug for replacing `accessible-components/` paths

## 3.6.85

- Updated the `firstDate` for the Warmer Weather season (needs to match the flags set in the seasonal-updates repository trigger)

## 3.6.84

- Removed downloading of jornaya file.

## 3.6.83

- Add 'Water Filtration' to the list of trades unsupported by CXP

## 3.6.82

- Making sure the abandonment.min.js gets copied to the right folder path (needs to copy to /abandonment/accessible/ if the site is indeed using the accessible version). This will ensure our shared-resource deployments trigger the files correctly.

## 3.6.81

- Reverting change to .gitignore

## 3.6.80

- Add Dealer Network checkbox to Mod contractor form

## 3.6.79

- Adding a handlebars helper to see if the value is an array or not

## 3.6.78

- Add functions to validate a contractor lead matches MQL criteria
- TY messages logic updates to match the new MQL criteria

## 3.6.76

- Add EIN field to data for Mod endpoint

## 3.6.75

- Update grab-shared-scripts task to consider isPathSubdirectory flag for modalytics script path

## 3.6.74

- Updating the `add-path-subdirectories` task to update paths that also start with `accessible-components`

## 3.6.73

- Updating `grab-shared-scripts` path to grab & replace the new, global `callrail.min.js` file

## 3.6.72

- Updating "isFontPresent" flag name to "copyLocalFontFile"

## 3.6.71

- Implemented copy-font gulp task based on configuration . Also update cache-bust task to not to include font files.

## 3.6.70

- Removed qa environment heap integration

## 3.6.69

- Adjusting the `browserSyncServeFolders` to include the `mod-base/src`

## 3.6.67

- Adjusting the `grab-theme-json` task conditional to also check for `opts.siteData.page` to exist as well as the `themeFile` before running the task!

## 3.6.66

- Adjusting the `mergeDefaultFormFieldConfig()` for the accessible configuration so it merges the values correctly.

## 3.6.65

- Removing the `'brand'` task (was working off `mod-site` dependencies which we are no longer using). Also removed the `useCDN` conditional for a few tasks (that I believe was added due to just copying/pasting).

## 3.6.64

- Removing the massive amounts of console logs added in version `3.6.60`; I think the issue with our `grab-shared-scripts` task was that we are calling the `[replaceFooterStylesReference, replaceFooterStylesReferenceInMap]` twice. On the first go around, the QS footer styles are not yet loaded, & then once QS footer styles DID get loaded and we called the function a second time – it might have gotten hung up (we should only call these functions once).

## 3.6.63

- Adding conditional to check for `siteData` to exist before checking for the `useAccessibleConfig`.

## 3.6.62

- Adding the accessible components to the `grab-shared-components` task; As well as pulling the accessible `defaultFormFieldConfig` for the new template.js configuration (& merging to the new template stucture appropriately); As well as updating the `grab-shared-scripts` to pull in / edit the necessary accessible components (including the accessible abandonment JS file);

## 3.6.61

- added functionality to increase the fileInclude maxRecursion value from site level
- fixed bug in `templates` task. Noticed that the task was not completing as expected.

## 3.6.60

- Adding consoles allllll throughout the `grab-shared-scripts` task. It is still breaking down somewhere; and the first step to trying to force-fail our builds is figure out where the issue is

## 3.6.59

- adding `srcset` to the `add-path-subdirectories` gulp task to update relative paths in `<picture>` tags

## 3.6.58

- removing the copying of mod-form & qs-form JS files out of `grab-shared-scripts` gulp task, now that all S3 sites have been migrated over to use homeowner.min.js

## 3.6.56

- `noheap` + `nogtm` conditionals no longer needed (those variables will & have been set to "true" for all sites in our shared components / configs)
- adding `!window.Modalytics.privacyPreferencesDetected` conditional to check privacy settings to not load Heap for modernize.com

## 3.6.55

- Added conditional to check if `siteData` is empty — so our  `fetchTcpaFromSitegenie()` and `getDefaultFormFieldConfig()` functions won't try to run on modify.modernize.com

## 3.6.54

- swapping out `modUtils.getHeapCookieData()` in the old (but still used) mod-form-contractor.js

## 3.6.53

- Since we moved our footer modal templates to live in /quote/resources/shared-resources/, we needed to update `grab-cdn` gulp task to copy them from the updated path

## 3.6.52

- Added `templatesData.primary_trade` conditional to the  `fetchTcpaFromSitegenie()` function so it won't try to run on quote/home-remodel

## 3.6.50

- Added functionality in `templates.js` to grab the tcpa from sitegenie at build time

## 3.6.47

- Bump up package version to publish a new version

## 3.6.46

- Added one condition for pathSubdirectory variable to resolve a bug (CRO-3185) . Also Made little updates on add-path-subdirectories to make the code more DRY

## 3.6.45

- Added `add-path-subdirectories` task. If `siteData.pathSubdirectory` exists at a site level, it will get the value & append the path to all of the existing RELATIVE paths (build task only – doesn't run on gulp serve). Also updated `grab-shared-scripts` to include the `pathSubdirectory` in the replacement paths during `build` if it exists.

## 3.6.44

- Added a `grab-form-helpers` task

## 3.6.42

- moved the `replaceFootAssetScripts` function to run off the largest file; reordered the tasks for `grab-shared-scripts`; also added consoles to print out the hashes for each file name & print `start` & `finish` states for replacing the foot asset paths

## 3.6.41

- added functionality to fetch & merge default form filed config in templateData

## 3.6.40

- Adding tree services to valid list of trade parameter values

## 3.6.39

- implementing a buffer to our `grab-shared-scripts` task, which fixes the hashing issue we were facing for our larger files. updated the hashing algorithm to MD5, so it matches our CircleCI CLI hash. updated `mod-form-beta.min.js` to `homeowner.min.js`

## 3.6.38

- when we removed the mod-form-beta functionality in 3.6.37 — we needed to also remove the replace search in the function.

## 3.6.37

- removing the mod-form-beta functionality in `grab-shared-scripts` while we rename the files.

## 3.6.36

- implementing fix needed for grabbing SVG sprites in our `grab-global-images` task. also removed consoles running in `grab-shared-scripts`

## 3.6.35

- trying one replace pipe for `replaceFootAssetScripts` function inside our `grab-shared-scripts` task. also added some console logs so within build.sh in circleci — you will be able to see it complete all the replacements.

## 3.6.34

- undid the chaining in `replaceFootAssetScripts` function inside our `grab-shared-scripts` task. seemed to make things worse in terms of replacing paths.

## 3.6.33

- chained the `.pipe(replace())` lines within the `replaceFootAssetScripts` function inside our `grab-shared-scripts` task to run after the previous has been completed — in hopes to keep our foot assets paths from getting incomplete paths during deployment

## 3.6.32

- made changes in `grab-cdn` task to copy footer templates
- added a new task to copy `resources` directory from `src` into `dist`

## 3.6.31

- `grab-global-images` task bug fixes.

## 3.6.30

- Adding in the `copy-videos` gulp task needed for native landing pages.

## 3.6.29

- added enhancements to abandonment path replace function in grab-shared-scripts task

## 3.6.28

- Changing warm seasonal change date to be April 14th, part of reverting changes once more to rule out variants to potential cause of low CVR performance in HVAC sites.

## 3.6.25

- Added new `addAttributes` handlebar helper that allows us to loop through all the attributes defined in the `attributes: {}` object. Use would be `{{{addAttributes objectName 'class'}}}`, with `objectName` being the object that contains `attributes: {}`, and the 'class' being the keys you wish you ignore.  If you want to ignore multiple keys, you will add them as follows: `{{{addAttributes objectName 'class' 'id'}}}`. Note: Make sure you use 3 `{{{` so it doesn't automatically escape characters.

## 3.6.24

- Changing warm seasonal change date to be April 14th, part of reverting changes on March 15th 2023 where there was a bug triggered on HVACPros.org.

## 3.6.21

- `grab-shared-scripts` task code refactoring changes.

## 3.6.14

- Updating the `replaceFooterStylesReference` in `grab-shared-scripts` to use relative paths if the `useRelativePathForResources` parameter is set

## 3.6.13

- Adding in `dontSearchFile` param to `cache-bust` gulp task so it doesn't cache bust any paths in our local resources/ folder.

## 3.6.12

- In the `grab-shared-scripts` gulp task, we will no longer be replacing mod-footer.css for quote pages. We ran into a bug with split URL test pages, and since the original file lives on the same domain, we will leave as is.

## 3.6.11

- Adding `mod-form` & `qs-form` to the `grab-shared-scripts` gulp task. It will copy these files into the site's `resources/scripts/mod-form` folder & then update the src for both in the `foot-assets` shared component.

## 3.6.10

- Adding `modutils` JS to the `grab-shared-scripts` gulp task. It will copy this version into the site's `resources/scripts/mod-utils` folder & then update the src in the `foot-assets` shared component.

## 3.6.9

- Adding `footer-component` JS + CSS & `abandonment` JS + CSS to the `grab-shared-scripts` gulp task. It will copy local versions into the site's `resources/` folder & then update the src or href as needed. `cache-bust` will also ignore the entire resources folder.

## 3.6.8

- Adding a new `useRelativePathForResources` parameter for special use-cases that need to use a relative path for shared scripts (ie. the improvementcenter pages)

## 3.6.7

- Adding a new `grab-shared-scripts` gulp task grab the most recent version from `mod-analytics`. It will copy this version into the site's `resources/scripts/mod-alytics` folder & then update the src in the `head` shared component. Also updated `cache-bust` to ignore this file on build.

## 3.6.5

- Updating `settings_tolerance` & `library_tolerance` parameters default values in the VWO script to help reduce Heap-VWO undefined properties (for more information on these parameters you can read here -> <https://help.vwo.com/hc/en-us/articles/900001789546-Why-Does-VWO-SmartCode-Time-out-and-How-to-Resolve-It->)

## 3.6.3

- Updating `cache-bust` gulp task to use dashes instead of a period. For example, cached files will now be `home-51fbcbac.js` instead of `home.51fbcbac.js`

## 3.6.2

- Adding `check-seasonal-variations` to grab seasons json; loop through the siteData for `seasonalVariations: {}`; find any active seasons; merge the json objects and adjust json content accordingly;

## 3.5.7

- Making `maxRecursion` for our file include plugin in template.js a lot higher

## 3.5.6

- Adding `inc` handlebars helper to template.js to increment a certain value by 1

## 3.5.5

- Added functionality to don't include the gtm script if `nogtm=true` parameter is present in vwo_callback.html/analytics.html fileInclude call (from site level). This is useful in late loading gtm on test versions.

## 3.5.2

- `grab-shared-components` task updated: now it grabs all shared-components files that are listed under `mod-site/shared-components/all.json` So there's no need to update the task every time we add a new component.

## 3.5.1

- `grab-shared-components` task was created; added to tasks.js, serve.js & build.js to grab the new shared-components folder from mod-site and copy them to your local env

## 3.5.0

- `gulp-sass` package updated to version 5 to make it compatible with active LTS version of node
- Updated `bootstrap-sass` to `^3.4.3` package version so that it can handle math.div feature in sass.

## 3.4.40

- Downgraded `bootstrap-sass` to version `3.4.1` as new version was breaking because of math.div feature.
