Skip to content

Commit e444a2d

Browse files
authored
Merge branch 'master' into master
2 parents 51fd477 + 47398fc commit e444a2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+272
-112
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ core/resource/i18n/en-US.json
2323
core/resource/i18n/es-ES.json
2424
core/resource/i18n/fr-FR.json
2525
core/resource/i18n/it-IT.json
26-
core/resource/i18n/jp-JP.json
26+
core/resource/i18n/ja-JP.json
2727
core/resource/i18n/multistoreLanguages.json
2828
core/resource/i18n/nl-NL.json
2929
core/resource/i18n/pl-PL.json

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.10.5] - 28.11.2019
8+
9+
### Fixed
10+
- Disable product mutation when assigning product variant - @gibkigonzo (#3735)
11+
- Fix issue with Cannot assign to read only property 'storeCode' - @yuriboyko (#3748)
12+
- Render correct category links when multistore is active - @gibkigonzo (#3753)
13+
- Disable product mutation when assigning product variant - @gibkigonzo (#3735)
14+
- Fixed null value of search input - @AdKamil (#3778)
15+
- Sorting fixed on category page - @AdKamil (#3785)
16+
- Mount app in 'beforeResolve' if it's not dispatched in 'onReady' - @gibkigonzo (#3669)
17+
- change translation from jp-JP to ja-JP - @gibkigonzo (#3824)
18+
- Fix product images, my account link, warnings in console - @andrzejewsky (#3850)
19+
720
## [1.10.4] - 18.10.2019
821

922
### Fixed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -892,19 +892,19 @@ Vue Storefront is a Community effort brought to You by our great Core Team and s
892892
</a>
893893
</td>
894894
<td align="center" valign="middle">
895-
<a href="">
895+
<a href="https://www.sitewards.com/">
896896
<img
897-
src=""
898-
alt=""
897+
src="https://divante.com/partners/Vue-Storefront/Sitewards%20Logo.png"
898+
alt="Sitewards"
899899
height="40"
900900
>
901901
</a>
902902
</td>
903903
<td align="center" valign="middle">
904-
<a href="">
904+
<a href="https://codecoda.com/en">
905905
<img
906-
src=""
907-
alt=""
906+
src="https://divante.com/partners/Vue-Storefront/CodeCoda-800.png"
907+
alt="CodeCoda"
908908
height="40"
909909
>
910910
</a>
@@ -944,3 +944,5 @@ If you like to become our Partner just let us know via contributors@vuestorefron
944944
## The license
945945

946946
Vue Storefront source code is completely free and released under the [MIT License](https://github.com/DivanteLtd/vue-storefront/blob/master/LICENSE).
947+
948+
[![analytics](http://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FDivanteLtd%2Fvue-storefront&_u=MAC~&cid=1757014354.1393964045&tid=UA-108235765-10)]()

config/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
"order": "desc"
290290
},
291291
"sortByAttributes": {
292-
"Latest": "updated_at",
292+
"Latest": "updated_at:desc",
293293
"Price: Low to high":"final_price",
294294
"Price: High to low":"final_price:desc"
295295
},
@@ -403,7 +403,7 @@
403403
"i18n": {
404404
"defaultCountry": "US",
405405
"defaultLanguage": "EN",
406-
"availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "jp-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"],
406+
"availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "ja-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"],
407407
"defaultLocale": "en-US",
408408
"currencyCode": "USD",
409409
"currencySign": "$",

core/app.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vu
6868
store.state.version = process.env.APPVERSION
6969
store.state.config = config // @deprecated
7070
store.state.__DEMO_MODE__ = (config.demomode === true)
71-
if (ssrContext) Vue.prototype.$ssrRequestContext = ssrContext
71+
if (ssrContext) {
72+
// @deprecated - we shouldn't share server context between requests
73+
Vue.prototype.$ssrRequestContext = {output: {cacheTags: ssrContext.output.cacheTags}}
74+
75+
Vue.prototype.$cacheTags = ssrContext.output.cacheTags
76+
}
7277
if (!store.state.config) store.state.config = globalConfig // @deprecated - we should avoid the `config`
7378
const storeView = await prepareStoreView(storeCode) // prepare the default storeView
7479
store.state.storeView = storeView
@@ -87,6 +92,10 @@ const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vu
8792
Object.keys(coreMixins).forEach(key => {
8893
Vue.mixin(coreMixins[key])
8994
})
95+
96+
Object.keys(coreFilters).forEach(key => {
97+
Vue.filter(key, coreFilters[key])
98+
})
9099
})
91100

92101
// @todo remove this part when we'll get rid of global multistore mixin
@@ -99,10 +108,6 @@ const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vu
99108
})
100109
}
101110

102-
Object.keys(coreFilters).forEach(key => {
103-
Vue.filter(key, coreFilters[key])
104-
})
105-
106111
let vueOptions = {
107112
router,
108113
store,

core/client-entry.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,23 @@ const invokeClientEntry = async () => {
6363
})
6464
}
6565
router.onReady(async () => {
66+
// check if app can be mounted
67+
const canBeMounted = () => RouterManager.isRouteDispatched() && // route is dispatched
68+
!(router as any).history.pending && // there is no pending in router history
69+
!(app as any)._isMounted // it's not mounted before
70+
71+
if (canBeMounted()) {
72+
app.$mount('#app')
73+
}
6674
router.beforeResolve((to, from, next) => {
67-
if (!from.name) return next() // do not resolve asyncData on server render - already been done
68-
if (Vue.prototype.$ssrRequestContext) Vue.prototype.$ssrRequestContext.output.cacheTags = new Set<string>()
75+
if (!from.name) {
76+
next()
77+
if (canBeMounted()) {
78+
app.$mount('#app')
79+
}
80+
return // do not resolve asyncData on server render - already been done
81+
}
82+
if (!Vue.prototype.$cacheTags) Vue.prototype.$cacheTags = new Set<string>()
6983
const matched = router.getMatchedComponents(to)
7084
if (to) { // this is from url
7185
if (globalConfig.storeViews.multistore === true) {
@@ -99,14 +113,6 @@ const invokeClientEntry = async () => {
99113
}
100114
}))
101115
})
102-
// Mounting app
103-
if (!RouterManager.isRouteDispatched()) {
104-
RouterManager.addDispatchCallback(() => {
105-
app.$mount('#app')
106-
})
107-
} else {
108-
app.$mount('#app')
109-
}
110116
})
111117
registerSyncTaskProcessor()
112118
window.addEventListener('online', () => { onNetworkStatusChange(store) })

core/filters/price.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export function price (value) {
1010
}
1111
let formattedVal = Math.abs(parseFloat(value)).toFixed(2)
1212
const storeView = currentStoreView()
13-
13+
if (!storeView.i18n) {
14+
return value;
15+
}
1416
const prependCurrency = (price) => {
1517
return storeView.i18n.currencySign + price
1618
}

core/i18n/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ const loadDateLocales = async (lang: string = 'en'): Promise<void> => {
3333
const separatorIndex = localeCode.indexOf('-')
3434
if (separatorIndex) {
3535
localeCode = separatorIndex ? localeCode.substr(0, separatorIndex) : localeCode
36-
await import(/* webpackChunkName: "dayjs-locales" */ `dayjs/locale/${localeCode}`)
36+
try {
37+
await import(/* webpackChunkName: "dayjs-locales" */ `dayjs/locale/${localeCode}`)
38+
} catch (err) {
39+
Logger.debug('Unable to load translation from dayjs')()
40+
}
3741
}
3842
}
3943
}

core/i18n/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue-storefront/i18n",
3-
"version": "1.10.4",
3+
"version": "1.10.5",
44
"description": "Vue Storefront i18n",
55
"license": "MIT",
66
"main": "index.ts",
File renamed without changes.

0 commit comments

Comments
 (0)