@ecomplus/storefront-renderer 2.10.3 → 2.10.5
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 +12 -0
- package/package.json +2 -2
- package/src/renderer.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.10.5](https://github.com/ecomplus/storefront/compare/@ecomplus/storefront-renderer@2.10.4...@ecomplus/storefront-renderer@2.10.5) (2023-05-11)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **template/banners:** rendering sizes for mobile version <source> ([c580e67](https://github.com/ecomplus/storefront/commit/c580e67e1a9f64277438e6707b444c725d2f9e17))
|
|
11
|
+
|
|
12
|
+
## [2.10.4](https://github.com/ecomplus/storefront/compare/@ecomplus/storefront-renderer@2.10.3...@ecomplus/storefront-renderer@2.10.4) (2023-04-24)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **deps:** update all non-major dependencies ([#894](https://github.com/ecomplus/storefront/issues/894)) ([b326f46](https://github.com/ecomplus/storefront/commit/b326f46a7eda4025d4f2a6ed14222bb6f8c4c6f4))
|
|
17
|
+
|
|
6
18
|
## [2.10.3](https://github.com/ecomplus/storefront/compare/@ecomplus/storefront-renderer@2.10.2...@ecomplus/storefront-renderer@2.10.3) (2023-04-11)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @ecomplus/storefront-renderer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomplus/storefront-renderer",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.5",
|
|
4
4
|
"description": "SSR for Storefront EJS views with E-Com Plus APIs",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/ecomplus/storefront/tree/master/@ecomplus/storefront-renderer#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@builder.io/partytown": "^0.
|
|
26
|
+
"@builder.io/partytown": "^0.8.0",
|
|
27
27
|
"@ecomplus/client": "^2.2.1",
|
|
28
28
|
"@ecomplus/i18n": "^1.32.2",
|
|
29
29
|
"@ecomplus/search-engine": "^2.6.1",
|
package/src/renderer.js
CHANGED
|
@@ -109,13 +109,13 @@ cmsCollections.forEach(collection => {
|
|
|
109
109
|
})
|
|
110
110
|
|
|
111
111
|
// abstracting comming image size handler for local images
|
|
112
|
-
const tryImageSize = src => {
|
|
113
|
-
let dimensions =
|
|
112
|
+
const tryImageSize = (src, fallbackDimensions = {}) => {
|
|
113
|
+
let dimensions = fallbackDimensions
|
|
114
114
|
if (typeof src === 'string' && src.startsWith('/')) {
|
|
115
115
|
try {
|
|
116
116
|
dimensions = imageSize(`template/public${src}`)
|
|
117
117
|
} catch (e) {
|
|
118
|
-
dimensions =
|
|
118
|
+
dimensions = fallbackDimensions
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
return dimensions
|