@dylandepass/helix-product-pipeline 1.2.2 → 1.2.4

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,19 @@
1
+ ## [1.2.4](https://github.com/adobe-rnd/helix-product-pipeline/compare/v1.2.3...v1.2.4) (2025-06-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * include videos and uids ([08d1c00](https://github.com/adobe-rnd/helix-product-pipeline/commit/08d1c00d0b95e32a6439515646f488446e54cb5a))
7
+ * trigger release ([6064771](https://github.com/adobe-rnd/helix-product-pipeline/commit/6064771e63967e2b3a3aceedeb72f13d3aa4d161))
8
+ * update workflow ([8e36e8f](https://github.com/adobe-rnd/helix-product-pipeline/commit/8e36e8f023cd82bb2cda3ba16981df232a1d1fce))
9
+
10
+ ## [1.2.3](https://github.com/adobe-rnd/helix-product-pipeline/compare/v1.2.2...v1.2.3) (2025-06-04)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * string pricing and noindex ([1e5094a](https://github.com/adobe-rnd/helix-product-pipeline/commit/1e5094a99fd8a6840e39cd7cd189ca81daeb0039))
16
+
1
17
  ## [1.2.2](https://github.com/adobe-rnd/helix-product-pipeline/compare/v1.2.1...v1.2.2) (2025-06-02)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dylandepass/helix-product-pipeline",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Helix Product Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -27,9 +27,9 @@ function formatPrice(price) {
27
27
  if (!price) return '';
28
28
  const { regular, final } = price;
29
29
  if (final < regular) {
30
- return h('p', [`$${final.toFixed(2)} `, '(', h('del', `$${regular.toFixed(2)}`), ')']);
30
+ return h('p', [`$${final} `, '(', h('del', `$${regular}`), ')']);
31
31
  }
32
- return h('p', `$${final.toFixed(2)}`);
32
+ return h('p', `$${final}`);
33
33
  }
34
34
 
35
35
  function formatOptions(variant) {
@@ -44,8 +44,10 @@ function formatOptions(variant) {
44
44
  ...options.map((option) => h('div', [
45
45
  h('div', option.id),
46
46
  h('div', option.value),
47
+ option.uid ? h('div', option.uid) : null,
47
48
  ])),
48
49
  ]);
50
+
49
51
  return sectionMetadata;
50
52
  }
51
53
 
@@ -57,6 +59,17 @@ function createBlock(name, content) {
57
59
  ]);
58
60
  }
59
61
 
62
+ // Render media. Image first than anchor if video
63
+ function renderMedia(media) {
64
+ if (media.video) {
65
+ return h('p', [
66
+ createOptimizedPicture(media.url),
67
+ h('a', { href: media.video }, 'Video'),
68
+ ]);
69
+ }
70
+ return h('p', createOptimizedPicture(media.url));
71
+ }
72
+
60
73
  /**
61
74
  * @type PipelineStep
62
75
  * @param {PipelineState} state
@@ -95,6 +108,7 @@ export default async function render(state, req, res) {
95
108
  h('meta', { name: 'twitter:title', content: metaTitle }),
96
109
  h('meta', { name: 'twitter:description', content: metaDescription }),
97
110
  h('meta', { name: 'twitter:image', content: images[0]?.url }),
111
+ h('meta', { name: 'robots', content: 'noindex' }),
98
112
  h('meta', { name: 'sku', content: sku }),
99
113
  ];
100
114
 
@@ -121,7 +135,7 @@ export default async function render(state, req, res) {
121
135
  formatPrice(price),
122
136
  fromHtml(description, { fragment: true }),
123
137
  specifications ? createBlock('specifications', specifications) : null,
124
- ...images.map((img) => h('p', createOptimizedPicture(img.url))),
138
+ ...images.map((img) => renderMedia(img)),
125
139
  ]),
126
140
  ...variants.map((variant) => h('div', [
127
141
  h('h2', variant.name),