@adobe/helix-html-pipeline 6.12.7 → 6.12.8

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,3 +1,10 @@
1
+ ## [6.12.8](https://github.com/adobe/helix-html-pipeline/compare/v6.12.7...v6.12.8) (2024-06-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add unmapped surrogate key for 404.html ([#633](https://github.com/adobe/helix-html-pipeline/issues/633)) ([8d36aa2](https://github.com/adobe/helix-html-pipeline/commit/8d36aa286330af8be2dfbabb28fce2db8b479b30)), closes [#632](https://github.com/adobe/helix-html-pipeline/issues/632)
7
+
1
8
  ## [6.12.7](https://github.com/adobe/helix-html-pipeline/compare/v6.12.6...v6.12.7) (2024-06-21)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.12.7",
3
+ "version": "6.12.8",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -48,7 +48,7 @@
48
48
  "@adobe/mdast-util-gridtables": "4.0.6",
49
49
  "@adobe/remark-gridtables": "3.0.6",
50
50
  "github-slugger": "2.0.0",
51
- "hast-util-raw": "9.0.3",
51
+ "hast-util-raw": "9.0.4",
52
52
  "hast-util-select": "6.0.2",
53
53
  "hast-util-to-html": "9.0.1",
54
54
  "hast-util-to-string": "3.0.0",
@@ -61,7 +61,7 @@
61
61
  "rehype-parse": "9.0.0",
62
62
  "remark-parse": "11.0.0",
63
63
  "strip-markdown": "6.0.0",
64
- "unified": "11.0.4",
64
+ "unified": "11.0.5",
65
65
  "unist-util-map": "4.0.0",
66
66
  "unist-util-remove": "4.0.0",
67
67
  "unist-util-remove-position": "5.0.0",
@@ -80,7 +80,7 @@
80
80
  "eslint-import-resolver-exports": "1.0.0-beta.5",
81
81
  "eslint-plugin-header": "3.1.1",
82
82
  "eslint-plugin-import": "2.29.1",
83
- "esmock": "2.6.5",
83
+ "esmock": "2.6.6",
84
84
  "husky": "9.0.11",
85
85
  "js-yaml": "4.1.0",
86
86
  "jsdom": "24.1.0",
@@ -40,5 +40,19 @@ export default async function fetch404(state, req, res) {
40
40
 
41
41
  // set 404 keys in any case
42
42
  const pathKey = await getPathKey(state);
43
- res.headers.set('x-surrogate-key', `${pathKey} ${contentBusId} ${ref}--${repo}--${owner}_404 ${ref}--${repo}--${owner}_code`);
43
+ const keys = [
44
+ pathKey,
45
+ contentBusId,
46
+ `${ref}--${repo}--${owner}_404`,
47
+ `${ref}--${repo}--${owner}_code`,
48
+ ];
49
+
50
+ if (state.info.unmappedPath) {
51
+ keys.push(await getPathKey({
52
+ contentBusId,
53
+ info: { path: state.info.unmappedPath },
54
+ }));
55
+ }
56
+
57
+ res.headers.set('x-surrogate-key', keys.join(' '));
44
58
  }