@adobe/helix-html-pipeline 5.0.2 → 5.0.3

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
+ ## [5.0.3](https://github.com/adobe/helix-html-pipeline/compare/v5.0.2...v5.0.3) (2023-09-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * properly rewrite meta image ([#406](https://github.com/adobe/helix-html-pipeline/issues/406)) ([d0c173f](https://github.com/adobe/helix-html-pipeline/commit/d0c173f21942f6fb123ff6d4288364d4b9f0ec98)), closes [#405](https://github.com/adobe/helix-html-pipeline/issues/405)
7
+
1
8
  ## [5.0.2](https://github.com/adobe/helix-html-pipeline/compare/v5.0.1...v5.0.2) (2023-09-14)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -74,13 +74,13 @@
74
74
  "@markedjs/html-differ": "4.0.2",
75
75
  "@semantic-release/changelog": "6.0.3",
76
76
  "@semantic-release/git": "10.0.1",
77
- "@semantic-release/npm": "10.0.5",
77
+ "@semantic-release/npm": "10.0.6",
78
78
  "c8": "8.0.1",
79
79
  "eslint": "8.49.0",
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.28.1",
83
- "esmock": "2.4.1",
83
+ "esmock": "2.5.1",
84
84
  "husky": "8.0.3",
85
85
  "js-yaml": "4.1.0",
86
86
  "jsdom": "22.1.0",
@@ -89,7 +89,7 @@
89
89
  "mocha": "10.2.0",
90
90
  "mocha-multi-reporters": "1.5.1",
91
91
  "mocha-suppress-logs": "0.3.1",
92
- "semantic-release": "21.1.1"
92
+ "semantic-release": "21.1.2"
93
93
  },
94
94
  "lint-staged": {
95
95
  "*.js": "eslint",
@@ -248,10 +248,10 @@ export default function extractMetaData(state, req) {
248
248
  }
249
249
 
250
250
  if (!('image' in meta)) {
251
- meta.image = getAbsoluteUrl(
252
- state,
253
- optimizeMetaImage(state.info.path, content.image || '/default-meta-image.png'),
254
- );
251
+ meta.image = content.image || '/default-meta-image.png';
252
+ }
253
+ if (meta.image) {
254
+ meta.image = getAbsoluteUrl(state, optimizeMetaImage(state.info.path, meta.image));
255
255
  }
256
256
 
257
257
  meta.imageAlt = meta['image-alt'] ?? content.imageAlt;