Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 594618a

Browse files
authored
Merge pull request #2825 from DivanteLtd/release/1.9
DRAFT: Release/1.9
2 parents 0a18923 + 46596d6 commit 594618a

File tree

214 files changed

+9189
-2590
lines changed

Some content is hidden

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

214 files changed

+9189
-2590
lines changed

.babelrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
core/build/*.js
22
node_modules
3-
core/modules/**/tests

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
root: true,
3-
env: { 'browser': true },
3+
env: { 'browser': true, 'jest': true },
44
parser: 'vue-eslint-parser',
55
parserOptions: {
66
parser: "babel-eslint",

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ core/resource/i18n/nl-NL.json
2929
core/resource/i18n/pl-PL.json
3030
core/resource/i18n/pt-BR.json
3131
core/resource/i18n/ru-RU.json
32+
33+
#unit testing
34+
/test/unit/coverage

.travis.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
sudo: required
2-
addons:
3-
chrome: stable
42
language: node_js
5-
node_js:
6-
- "8"
7-
- "10"
83

94
cache:
105
yarn: true
@@ -14,15 +9,28 @@ cache:
149
install:
1510
- yarn
1611

17-
script:
18-
- yarn lint
19-
- yarn build
20-
2112
jobs:
2213
include:
23-
# - yarn test:unit
24-
- stage: e2e
25-
if: branch IN (master, develop)
14+
- stage: Build
2615
script:
27-
- yarn installer:ci
28-
# - yarn test:e2e:ci
16+
- yarn lint
17+
- yarn build
18+
node_js: "8"
19+
- script:
20+
- yarn lint
21+
- yarn build
22+
node_js: "10"
23+
24+
- stage: Tests
25+
script: yarn test:unit
26+
name: "Unit Tests NodeJS 8"
27+
node_js: "8"
28+
- script: yarn test:unit
29+
name: "Unit Tests NodeJS 10"
30+
node_js: "10"
31+
- script: yarn installer:ci
32+
name: "E2E Tests"
33+
if: branch IN (master, develop)
34+
node_js: "8"
35+
addons:
36+
chrome: stable

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@ 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.9.0] - 2019.05.06
8+
9+
### Added
10+
- The Url Dispatcher feature added for friendly URLs. When `config.seo.useUrlDispatcher` set to true the `product.url_path` and `category.url_path` fields are used as absolute URL addresses (no `/c` and `/p` prefixes anymore). Check the latest `mage2vuestorefront` snapshot and reimport Your products to properly set `url_path` fields - #2010 - @pkarw
11+
- Unit tests of cart module written in jest - @lukeromanowicz (#2305)
12+
- validation for UTF8 alpha and alphanumeric characters in most checkout fields - @lromanowicz (#2653)
13+
- helper to process config urls with default endpoint host `config.api.host` - @patzick (#2858)
14+
15+
### Changed / Improved
16+
- The `core/helpers` parsing URL methods exchanged to `query-string` package - @pkarw (#2446)
17+
- Unit tests in Karma are now removed in favor of jest - @lukeromanowicz (#2305)
18+
- Material Icons are loaded asynchronously - @JKrupinski, @filrak (#2060)
19+
- Update to babel 7 - @lukeromanowicz (#2554)
20+
21+
### Fixed
22+
- Gallery low quality image in offline mode when high quality already cached - @patzick (#2557)
23+
- Payment issue when no address set - @szafran89 (#2593)
24+
- Search component result message when search term is less than 3 letters - @robwozniak (#2561)
25+
- Removed childSku parameter in url for non-configurable products when using urlDispatcher - @Aekal (#2605)
26+
- Image lazy loading after SSR reload - @pkarw (#2641)
27+
- Modules can add custom URL - @pkarw (#2601)
28+
- Url routes fixes - @pkarw (#2598, #2645, #2614)
29+
- Fix for shopping cart actions when the `cartId` has been cleared out - @pkarw (#2567)
30+
- Fixed always common cache issue for multistore - @filrak (#2595)
31+
- Checkout copy address data will sync on later change - @haukebri (#2661)
32+
- Fixed Safari style for sort-by select - @haukebri (#2642)
33+
- fixed My orders in My Profile not refreshed after putting an order - @filrak (#2559)
34+
- Refreshing product page on mobile device - @patzick (#2484)
35+
- ESlint throwing errors about undefined jest globals in tests - @lukeromanowicz (#2702)
36+
- Fixed changing the country when entering shipping address in checkout not updating shipping costs - @revlis-x (#2691)
37+
- Instant Checkout fix - @qiqqq (#2750)
38+
- Infinite loop on multistore page after reload - @patzick (#2713)
39+
- Refreshing MyAccount page on multistore - @patzick (#2780)
40+
- "Toggle password visible" button in password fields works the right way - @lromanowicz (#2772)
41+
- Range queries to elasticsearch - @oskar1233 (#2746)
42+
- BaseInput has min height now to avoid jumping on forms - @patzick (#2771)
43+
- Orders with invalid address don't stack anymore in the queue and have proper notification popup - @AndreiBelokopytov, @lukeromanowicz (#2663)
44+
- Offline orders with out of stock products don't stack anymore and get canceled after going back to online - @lukeromanowicz (#2740)
45+
- Build ServiceWorker on Docker - @patzick (#2793)
46+
- Product image load after comming back to online - @patzick (#2573)
47+
- Insufficent validation for city field in checkout address - @lromanowicz (#2653)
48+
- Incorrect hover activity on the 'filter by categories' in the search view on mobile - @idodidodi (#2783)
49+
- Unit tests written in JavaScript now support async/await functions and dynamic import - @michaelKurowski, @lukeromanowicz (#2851)
50+
751
## [1.8.5] - 2019.04.17
852

953
### Fixed
@@ -55,7 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5599
- Improve tsconfig for better IDE paths support - @patzick, @filrak (#2474)
56100
- fix breadcrumbs changing too early - @filrak, @pkarw (#2469, #2529)
57101
- improved product gallery load view, shows correct image on reload - @patzick (#2481, #2482, #2488, #2501)
58-
- Fix an issue where the index.html template within a theme is ignored - @EnthrallRecords (#2489)
102+
- Fix an issue where the index.html template within a theme is ignored - @EnthrallRecords (#2489)
59103
- Added async sidebar component with async off-screen components error handling and fetch retrying after coming back online - @filrak (#2408, #2451)
60104
- Inconsistent filters behaviour - clear filters on page load - @patzick (#2435)
61105
- fix price is never below 0 and user can't add 0 or below 0 products to cart - @RakowskiPrzemyslaw (#2437)

babel.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
'modules': false
7+
}
8+
]
9+
],
10+
plugins: ['@babel/plugin-syntax-dynamic-import'],
11+
env: {
12+
test: {
13+
plugins: ['transform-es2015-modules-commonjs', 'babel-plugin-dynamic-import-node'],
14+
ignore: [/node_modules\/(?!lodash-es|@vue\/test-utils)/]
15+
}
16+
}
17+
}

config/default.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"elasticCacheQuota": 4096
1818
},
1919
"seo": {
20-
"useUrlDispatcher": false
20+
"useUrlDispatcher": true
2121
},
2222
"console": {
2323
"showErrorOnProduction" : true,
@@ -32,9 +32,12 @@
3232
"host": "localhost",
3333
"port": 8080
3434
},
35+
"api": {
36+
"url": "http://localhost:8080"
37+
},
3538
"elasticsearch": {
3639
"httpAuth": "",
37-
"host": "localhost:8080/api/catalog",
40+
"host": "/api/catalog",
3841
"index": "vue_storefront_catalog",
3942
"min_score": 0.02,
4043
"csrTimeout": 5000,
@@ -83,6 +86,7 @@
8386
"defaultStoreCode": "",
8487
"storeViews": {
8588
"multistore": false,
89+
"commonCache": true,
8690
"mapStoreUrlsFor": ["de", "it"],
8791
"de": {
8892
"storeCode": "de",
@@ -91,7 +95,7 @@
9195
"name": "German Store",
9296
"url": "/de",
9397
"elasticsearch": {
94-
"host": "localhost:8080/api/catalog",
98+
"host": "/api/catalog",
9599
"index": "vue_storefront_catalog_de"
96100
},
97101
"tax": {
@@ -118,7 +122,7 @@
118122
"name": "Italian Store",
119123
"url": "/it",
120124
"elasticsearch": {
121-
"host": "localhost:8080/api/catalog",
125+
"host": "/api/catalog",
122126
"index": "vue_storefront_catalog_it"
123127
},
124128
"tax": {
@@ -144,7 +148,7 @@
144148
"twoStageCaching": true,
145149
"optimizeShoppingCart": true,
146150
"category": {
147-
"includeFields": [ "id", "*.children_data.id", "*.id", "children_count", "sku", "name", "is_active", "parent_id", "level", "url_key", "product_count", "path"],
151+
"includeFields": [ "id", "*.children_data.id", "*.id", "children_count", "sku", "name", "is_active", "parent_id", "level", "url_key", "url_path", "product_count", "path"],
148152
"excludeFields": [ "sgn" ],
149153
"categoriesRootCategorylId": 2,
150154
"categoriesDynamicPrefetchLevel": 2,
@@ -155,11 +159,11 @@
155159
},
156160
"productList": {
157161
"sort": "",
158-
"includeFields": [ "type_id", "sku", "product_links", "tax_class_id", "special_price", "special_to_date", "special_from_date", "name", "price", "priceInclTax", "originalPriceInclTax", "originalPrice", "specialPriceInclTax", "id", "image", "sale", "new", "url_key", "status", "tier_prices", "configurable_children.sku", "configurable_children.price", "configurable_children.special_price", "configurable_children.priceInclTax", "configurable_children.specialPriceInclTax", "configurable_children.originalPrice", "configurable_children.originalPriceInclTax" ],
162+
"includeFields": [ "type_id", "sku", "product_links", "tax_class_id", "special_price", "special_to_date", "special_from_date", "name", "price", "priceInclTax", "originalPriceInclTax", "originalPrice", "specialPriceInclTax", "id", "image", "sale", "new", "url_path", "url_key", "status", "tier_prices", "configurable_children.sku", "configurable_children.price", "configurable_children.special_price", "configurable_children.priceInclTax", "configurable_children.specialPriceInclTax", "configurable_children.originalPrice", "configurable_children.originalPriceInclTax" ],
159163
"excludeFields": [ "description", "configurable_options", "sgn", "*.sgn", "msrp_display_actual_price_type", "*.msrp_display_actual_price_type", "required_options" ]
160164
},
161165
"productListWithChildren": {
162-
"includeFields": [ "type_id", "sku", "name", "tax_class_id", "special_price", "special_to_date", "special_from_date", "price", "priceInclTax", "originalPriceInclTax", "originalPrice", "specialPriceInclTax", "id", "image", "sale", "new", "configurable_children.image", "configurable_children.sku", "configurable_children.price", "configurable_children.special_price", "configurable_children.priceInclTax", "configurable_children.specialPriceInclTax", "configurable_children.originalPrice", "configurable_children.originalPriceInclTax", "configurable_children.color", "configurable_children.size", "configurable_children.id", "configurable_children.tier_prices", "product_links", "url_key", "status", "tier_prices"],
166+
"includeFields": [ "type_id", "sku", "name", "tax_class_id", "special_price", "special_to_date", "special_from_date", "price", "priceInclTax", "originalPriceInclTax", "originalPrice", "specialPriceInclTax", "id", "image", "sale", "new", "configurable_children.image", "configurable_children.sku", "configurable_children.price", "configurable_children.special_price", "configurable_children.priceInclTax", "configurable_children.specialPriceInclTax", "configurable_children.originalPrice", "configurable_children.originalPriceInclTax", "configurable_children.color", "configurable_children.size", "configurable_children.id", "configurable_children.tier_prices", "product_links", "url_path", "url_key", "status", "tier_prices"],
163167
"excludeFields": [ "description", "sgn", "*.sgn", "msrp_display_actual_price_type", "*.msrp_display_actual_price_type", "required_options"]
164168
},
165169
"review": {
@@ -192,6 +196,7 @@
192196
"tax_class_id",
193197
"media_gallery",
194198
"url_key",
199+
"url_path",
195200
"max_price",
196201
"minimal_regular_price",
197202
"special_price",
@@ -225,7 +230,6 @@
225230
},
226231
"cart": {
227232
"bypassCartLoaderForAuthorizedUsers": true,
228-
"multisiteCommonCart": true,
229233
"serverMergeByDefault": true,
230234
"serverSyncCanRemoveLocalItems": false,
231235
"serverSyncCanModifyLocalItems": false,
@@ -351,7 +355,7 @@
351355
},
352356
"demomode": false,
353357
"tax": {
354-
"defaultCountry": "PL",
358+
"defaultCountry": "US",
355359
"defaultRegion": "",
356360
"sourcePriceIncludesTax": false,
357361
"calculateServerSide": true

core/app.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,17 @@ once('__VUE_EXTEND_RR__', () => {
6161
Vue.use(VueRouter)
6262
})
6363

64-
const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
64+
const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
6565
router = createRouter()
6666
// sync router with vuex 'router' store
6767
sync(store, router)
6868
// TODO: Don't mutate the state directly, use mutation instead
69-
store.state.version = '1.8.4'
69+
store.state.version = process.env.APPVERSION
7070
store.state.config = config
7171
store.state.__DEMO_MODE__ = (config.demomode === true) ? true : false
7272
if(ssrContext) Vue.prototype.$ssrRequestContext = ssrContext
7373
if (!store.state.config) store.state.config = buildTimeConfig // if provided from SSR, don't replace it
74-
75-
const storeView = prepareStoreView(null) // prepare the default storeView
74+
const storeView = prepareStoreView(storeCode) // prepare the default storeView
7675
store.state.storeView = storeView
7776
// store.state.shipping.methods = shippingMethods
7877

core/build/webpack.base.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import autoprefixer from 'autoprefixer';
77
import HTMLPlugin from 'html-webpack-plugin';
88
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
99
import webpack from 'webpack';
10+
import moment from 'moment';
1011

1112
fs.writeFileSync(
1213
path.resolve(__dirname, './config.json'),
@@ -76,10 +77,15 @@ export default {
7677
filename: 'index.amp.html',
7778
chunksSortMode: 'none',
7879
inject: isProd == false
80+
}),
81+
new webpack.DefinePlugin({
82+
'process.env.__APPVERSION__': JSON.stringify(require('../../package.json').version),
83+
'process.env.__BUILDTIME__': JSON.stringify(moment().format('YYYY-MM-DD HH:mm:ss'))
7984
})
8085
],
86+
devtool: 'source-map',
8187
entry: {
82-
app: ['babel-polyfill', './core/client-entry.ts']
88+
app: ['@babel/polyfill', './core/client-entry.ts']
8389
},
8490
output: {
8591
path: path.resolve(__dirname, '../../dist'),

core/build/webpack.client.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const config = merge(base, {
3232
'process.env.VUE_ENV': '"client"'
3333
}),
3434
new VueSSRClientPlugin()
35-
]
35+
],
3636
})
3737

3838
export default config;

core/build/webpack.prod.client.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))
77

88
const prodClientConfig = merge(baseClientConfig, {
99
mode: 'production',
10+
devtool: 'nosources-source-map',
1011
plugins: [
1112
]
1213
})

core/build/webpack.prod.server.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))
88

99
export default extendedConfig(baseServerConfig, {
1010
mode: 'production',
11+
devtool: 'nosources-source-map',
1112
isClient: false,
1213
isDev: false
1314
})

core/build/webpack.prod.sw.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import SWPrecachePlugin from 'sw-precache-webpack-plugin';
66
module.exports = merge(base, {
77
mode: 'production',
88
target: 'web',
9-
entry: ['babel-polyfill', './core/service-worker/index.js'],
9+
entry: ['@babel/polyfill', './core/service-worker/index.js'],
1010
output: {
1111
filename: 'core-service-worker.js'
1212
},

core/build/webpack.server.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (config.server.useOutputCache) {
1919
export default merge(base, {
2020
mode: 'development',
2121
target: 'node',
22-
entry: ['babel-polyfill', './core/server-entry.ts'],
22+
entry: ['@babel/polyfill', './core/server-entry.ts'],
2323
output: {
2424
filename: 'server-bundle.js',
2525
libraryTarget: 'commonjs2'

0 commit comments

Comments
 (0)