mod-build 3.7.33 → 3.7.34

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.34
4
+
5
+ - Updated the seasonal changes regex to include "or" conditions when swapping heating and ac in the strings.
6
+
3
7
  ## 3.7.33
4
8
 
5
9
  - Added support for seasonal changes in all steps objects.
@@ -82,11 +82,11 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
82
82
  siteData.isWarmWeather = true;
83
83
  const data = JSON.stringify(siteData, null, 4);
84
84
  const heating = '(Heating|heating|calentadores|Calentadores|calefactores|Calefactores)';
85
- const and = '(\\s&\\s|\\sand\\s|and|\\sy\\s)'; // eslint-disable-line no-useless-escape
85
+ const andOr = '(\\s&\\s|&|\\sand\\s|and|\\sor\\s|or)'; // eslint-disable-line no-useless-escape
86
86
  const ac = '(AC|Cooling|cooling|aires.*?acondicionados|Aires.*?Acondicionados)';
87
87
  const spaces = '.*?';
88
88
 
89
- const regex = new RegExp(`${heating}${spaces}${and}${spaces}${ac}`, 'gm');
89
+ const regex = new RegExp(`${heating}${spaces}${andOr}${spaces}${ac}`, 'gm');
90
90
  // Find and reverse the required words in the string using regex group capture
91
91
  const processedData = data.replaceAll(regex, '$3 $2 $1');
92
92
  // Convert data into JSON
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.33",
3
+ "version": "3.7.34",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",