@griddo/cx 1.75.198 → 1.75.200

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/build/index.js CHANGED
@@ -25,7 +25,7 @@ GFS4: `),console.error(e)});G[Q]||(ea=global[Q]||[],ra(G,ea),G.close=function(e)
25
25
  \u2502 Access credentials failure \u2502
26
26
  \u2502 Check that the login details are correct in your .env file \u2502
27
27
  \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F
28
- `)),process.exit(1)}}},hr=new On;var Yu=Y(Rn()),Xu=Y(mt()),Ku=Y(Gt());var fp=Y(mt()),Uu=Y(Gt()),hp=Y(eu()),Gu=Y($u());var Hu="1.75.198";Uu.default.config();var dp=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS);function zu(...e){dp&&console.info(...e)}function Wu(e){return new Promise(t=>setTimeout(t,e))}function ai(e,t=3){return(e/1e3).toFixed(t)}function Ju(e){return"site"in e&&e.site?e?.site:void 0}function ci(...e){let t=performance.now();return e.forEach(r=>r()),ai(performance.now()-t)}function Vu(){let e=`
28
+ `)),process.exit(1)}}},hr=new On;var Yu=Y(Rn()),Xu=Y(mt()),Ku=Y(Gt());var fp=Y(mt()),Uu=Y(Gt()),hp=Y(eu()),Gu=Y($u());var Hu="1.75.200";Uu.default.config();var dp=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS);function zu(...e){dp&&console.info(...e)}function Wu(e){return new Promise(t=>setTimeout(t,e))}function ai(e,t=3){return(e/1e3).toFixed(t)}function Ju(e){return"site"in e&&e.site?e?.site:void 0}function ci(...e){let t=performance.now();return e.forEach(r=>r()),ai(performance.now()-t)}function Vu(){let e=`
29
29
  \xB7\xB7
30
30
  \xB7\xB7
31
31
  \xB7\xB7
package/gatsby-config.ts CHANGED
@@ -25,7 +25,6 @@ const config: GatsbyConfig = {
25
25
  // Defaults plugins
26
26
  "gatsby-plugin-react-svg",
27
27
  "gatsby-plugin-react-helmet", // TODO: Remove with Gatsby@5.5.0
28
- "gatsby-plugin-no-sourcemaps",
29
28
  ],
30
29
  };
31
30
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "1.75.198",
4
+ "version": "1.75.200",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -33,7 +33,7 @@
33
33
  "@babel/preset-env": "^7.14.5",
34
34
  "@babel/preset-react": "^7.14.5",
35
35
  "@babel/preset-typescript": "^7.16.5",
36
- "@griddo/core": "^1.75.198",
36
+ "@griddo/core": "^1.75.199",
37
37
  "@svgr/webpack": "^5.5.0",
38
38
  "babel-loader": "^8.0.6",
39
39
  "babel-plugin-styled-components": "^1.10.7",
@@ -46,7 +46,6 @@
46
46
  "find-up": "^5.0.0",
47
47
  "fs-extra": "^9.0.1",
48
48
  "gatsby": "^4.8.0",
49
- "gatsby-plugin-no-sourcemaps": "^4.8.0",
50
49
  "gatsby-plugin-polyfill-io": "^1.1.0",
51
50
  "gatsby-plugin-react-helmet": "^5.8.0",
52
51
  "gatsby-plugin-react-svg": "^3.1.0",
@@ -64,7 +63,7 @@
64
63
  "react-helmet": "^6.0.0"
65
64
  },
66
65
  "devDependencies": {
67
- "@griddo/eslint-config-back": "^1.75.198",
66
+ "@griddo/eslint-config-back": "^1.75.199",
68
67
  "@types/babel__core": "^7.20.0",
69
68
  "@types/babel__preset-env": "^7.9.2",
70
69
  "@types/csvtojson": "^2.0.0",
@@ -112,5 +111,5 @@
112
111
  "publishConfig": {
113
112
  "access": "public"
114
113
  },
115
- "gitHead": "8ca176c6cc523bf0ebf5cadd2af9715aab6d377e"
114
+ "gitHead": "350ffeddb79e7d6563265fb860116b2579841251"
116
115
  }
@@ -8,6 +8,7 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
8
8
  plugins,
9
9
  loaders,
10
10
  getConfig,
11
+ stage,
11
12
  }) => {
12
13
  if (IS_COMPONENT_LIBRARY) {
13
14
  const config = getConfig();
@@ -36,6 +37,11 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
36
37
  },
37
38
  plugins: [plugins.provide({ process: "process/browser", React: "react" })],
38
39
  });
40
+
41
+ // No sourcemaps on builds
42
+ if (stage === "build-javascript") {
43
+ actions.setWebpackConfig({ devtool: false });
44
+ }
39
45
  };
40
46
 
41
47
  export { onCreateWebpackConfig };
@@ -485,6 +485,18 @@ function getPaginatedPages(listTemplate: TemplateWithDistributor) {
485
485
  return pageClusters;
486
486
  }
487
487
 
488
+ /**
489
+ * Remove duplicate ending trailing character from a string
490
+ *
491
+ * @param url the strin url
492
+ * @example
493
+ * removeDuplicateTrailingSlash('http://griddo.com/foo/bar//')
494
+ * // -> http://griddo.com/foo/bar/
495
+ */
496
+ function removeDuplicateTrailing(url: string) {
497
+ return url.replace(/\/+$/, "/");
498
+ }
499
+
488
500
  /**
489
501
  * Adds a number to an URL adding optionally an ending slash.
490
502
  *
@@ -505,10 +517,12 @@ function addPageNumberToUrl(
505
517
  const endingSlash = options?.addEndingSlash ? "/" : "";
506
518
 
507
519
  if (pageNumber <= 1) {
508
- return `${url}${endingSlash}`;
520
+ return removeDuplicateTrailing(`${url}${endingSlash}`);
509
521
  }
510
522
 
511
- return `${url}${trailingSlash}${pageNumber}${endingSlash}`;
523
+ return removeDuplicateTrailing(
524
+ `${url}${trailingSlash}${pageNumber}${endingSlash}`
525
+ );
512
526
  }
513
527
 
514
528
  /**