Skip to content

Commit

Permalink
Merge pull request vuestorefront#2825 from DivanteLtd/release/1.9
Browse files Browse the repository at this point in the history
DRAFT: Release/1.9
  • Loading branch information
patzick authored May 6, 2019
2 parents 0a18923 + 46596d6 commit 594618a
Show file tree
Hide file tree
Showing 214 changed files with 9,189 additions and 2,590 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
core/build/*.js
node_modules
core/modules/**/tests
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
env: { 'browser': true },
env: { 'browser': true, 'jest': true },
parser: 'vue-eslint-parser',
parserOptions: {
parser: "babel-eslint",
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ core/resource/i18n/nl-NL.json
core/resource/i18n/pl-PL.json
core/resource/i18n/pt-BR.json
core/resource/i18n/ru-RU.json

#unit testing
/test/unit/coverage
36 changes: 22 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
sudo: required
addons:
chrome: stable
language: node_js
node_js:
- "8"
- "10"

cache:
yarn: true
Expand All @@ -14,15 +9,28 @@ cache:
install:
- yarn

script:
- yarn lint
- yarn build

jobs:
include:
# - yarn test:unit
- stage: e2e
if: branch IN (master, develop)
- stage: Build
script:
- yarn installer:ci
# - yarn test:e2e:ci
- yarn lint
- yarn build
node_js: "8"
- script:
- yarn lint
- yarn build
node_js: "10"

- stage: Tests
script: yarn test:unit
name: "Unit Tests NodeJS 8"
node_js: "8"
- script: yarn test:unit
name: "Unit Tests NodeJS 10"
node_js: "10"
- script: yarn installer:ci
name: "E2E Tests"
if: branch IN (master, develop)
node_js: "8"
addons:
chrome: stable
46 changes: 45 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.9.0] - 2019.05.06

### Added
- 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
- Unit tests of cart module written in jest - @lukeromanowicz (#2305)
- validation for UTF8 alpha and alphanumeric characters in most checkout fields - @lromanowicz (#2653)
- helper to process config urls with default endpoint host `config.api.host` - @patzick (#2858)

### Changed / Improved
- The `core/helpers` parsing URL methods exchanged to `query-string` package - @pkarw (#2446)
- Unit tests in Karma are now removed in favor of jest - @lukeromanowicz (#2305)
- Material Icons are loaded asynchronously - @JKrupinski, @filrak (#2060)
- Update to babel 7 - @lukeromanowicz (#2554)

### Fixed
- Gallery low quality image in offline mode when high quality already cached - @patzick (#2557)
- Payment issue when no address set - @szafran89 (#2593)
- Search component result message when search term is less than 3 letters - @robwozniak (#2561)
- Removed childSku parameter in url for non-configurable products when using urlDispatcher - @Aekal (#2605)
- Image lazy loading after SSR reload - @pkarw (#2641)
- Modules can add custom URL - @pkarw (#2601)
- Url routes fixes - @pkarw (#2598, #2645, #2614)
- Fix for shopping cart actions when the `cartId` has been cleared out - @pkarw (#2567)
- Fixed always common cache issue for multistore - @filrak (#2595)
- Checkout copy address data will sync on later change - @haukebri (#2661)
- Fixed Safari style for sort-by select - @haukebri (#2642)
- fixed My orders in My Profile not refreshed after putting an order - @filrak (#2559)
- Refreshing product page on mobile device - @patzick (#2484)
- ESlint throwing errors about undefined jest globals in tests - @lukeromanowicz (#2702)
- Fixed changing the country when entering shipping address in checkout not updating shipping costs - @revlis-x (#2691)
- Instant Checkout fix - @qiqqq (#2750)
- Infinite loop on multistore page after reload - @patzick (#2713)
- Refreshing MyAccount page on multistore - @patzick (#2780)
- "Toggle password visible" button in password fields works the right way - @lromanowicz (#2772)
- Range queries to elasticsearch - @oskar1233 (#2746)
- BaseInput has min height now to avoid jumping on forms - @patzick (#2771)
- Orders with invalid address don't stack anymore in the queue and have proper notification popup - @AndreiBelokopytov, @lukeromanowicz (#2663)
- Offline orders with out of stock products don't stack anymore and get canceled after going back to online - @lukeromanowicz (#2740)
- Build ServiceWorker on Docker - @patzick (#2793)
- Product image load after comming back to online - @patzick (#2573)
- Insufficent validation for city field in checkout address - @lromanowicz (#2653)
- Incorrect hover activity on the 'filter by categories' in the search view on mobile - @idodidodi (#2783)
- Unit tests written in JavaScript now support async/await functions and dynamic import - @michaelKurowski, @lukeromanowicz (#2851)

## [1.8.5] - 2019.04.17

### Fixed
Expand Down Expand Up @@ -55,7 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improve tsconfig for better IDE paths support - @patzick, @filrak (#2474)
- fix breadcrumbs changing too early - @filrak, @pkarw (#2469, #2529)
- improved product gallery load view, shows correct image on reload - @patzick (#2481, #2482, #2488, #2501)
- Fix an issue where the index.html template within a theme is ignored - @EnthrallRecords (#2489)
- Fix an issue where the index.html template within a theme is ignored - @EnthrallRecords (#2489)
- Added async sidebar component with async off-screen components error handling and fetch retrying after coming back online - @filrak (#2408, #2451)
- Inconsistent filters behaviour - clear filters on page load - @patzick (#2435)
- fix price is never below 0 and user can't add 0 or below 0 products to cart - @RakowskiPrzemyslaw (#2437)
Expand Down
17 changes: 17 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
'modules': false
}
]
],
plugins: ['@babel/plugin-syntax-dynamic-import'],
env: {
test: {
plugins: ['transform-es2015-modules-commonjs', 'babel-plugin-dynamic-import-node'],
ignore: [/node_modules\/(?!lodash-es|@vue\/test-utils)/]
}
}
}
22 changes: 13 additions & 9 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"elasticCacheQuota": 4096
},
"seo": {
"useUrlDispatcher": false
"useUrlDispatcher": true
},
"console": {
"showErrorOnProduction" : true,
Expand All @@ -32,9 +32,12 @@
"host": "localhost",
"port": 8080
},
"api": {
"url": "http://localhost:8080"
},
"elasticsearch": {
"httpAuth": "",
"host": "localhost:8080/api/catalog",
"host": "/api/catalog",
"index": "vue_storefront_catalog",
"min_score": 0.02,
"csrTimeout": 5000,
Expand Down Expand Up @@ -83,6 +86,7 @@
"defaultStoreCode": "",
"storeViews": {
"multistore": false,
"commonCache": true,
"mapStoreUrlsFor": ["de", "it"],
"de": {
"storeCode": "de",
Expand All @@ -91,7 +95,7 @@
"name": "German Store",
"url": "/de",
"elasticsearch": {
"host": "localhost:8080/api/catalog",
"host": "/api/catalog",
"index": "vue_storefront_catalog_de"
},
"tax": {
Expand All @@ -118,7 +122,7 @@
"name": "Italian Store",
"url": "/it",
"elasticsearch": {
"host": "localhost:8080/api/catalog",
"host": "/api/catalog",
"index": "vue_storefront_catalog_it"
},
"tax": {
Expand All @@ -144,7 +148,7 @@
"twoStageCaching": true,
"optimizeShoppingCart": true,
"category": {
"includeFields": [ "id", "*.children_data.id", "*.id", "children_count", "sku", "name", "is_active", "parent_id", "level", "url_key", "product_count", "path"],
"includeFields": [ "id", "*.children_data.id", "*.id", "children_count", "sku", "name", "is_active", "parent_id", "level", "url_key", "url_path", "product_count", "path"],
"excludeFields": [ "sgn" ],
"categoriesRootCategorylId": 2,
"categoriesDynamicPrefetchLevel": 2,
Expand All @@ -155,11 +159,11 @@
},
"productList": {
"sort": "",
"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" ],
"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" ],
"excludeFields": [ "description", "configurable_options", "sgn", "*.sgn", "msrp_display_actual_price_type", "*.msrp_display_actual_price_type", "required_options" ]
},
"productListWithChildren": {
"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"],
"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"],
"excludeFields": [ "description", "sgn", "*.sgn", "msrp_display_actual_price_type", "*.msrp_display_actual_price_type", "required_options"]
},
"review": {
Expand Down Expand Up @@ -192,6 +196,7 @@
"tax_class_id",
"media_gallery",
"url_key",
"url_path",
"max_price",
"minimal_regular_price",
"special_price",
Expand Down Expand Up @@ -225,7 +230,6 @@
},
"cart": {
"bypassCartLoaderForAuthorizedUsers": true,
"multisiteCommonCart": true,
"serverMergeByDefault": true,
"serverSyncCanRemoveLocalItems": false,
"serverSyncCanModifyLocalItems": false,
Expand Down Expand Up @@ -351,7 +355,7 @@
},
"demomode": false,
"tax": {
"defaultCountry": "PL",
"defaultCountry": "US",
"defaultRegion": "",
"sourcePriceIncludesTax": false,
"calculateServerSide": true
Expand Down
7 changes: 3 additions & 4 deletions core/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,17 @@ once('__VUE_EXTEND_RR__', () => {
Vue.use(VueRouter)
})

const createApp = async (ssrContext, config): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vue, router: VueRouter, store: Store<RootState>}> => {
router = createRouter()
// sync router with vuex 'router' store
sync(store, router)
// TODO: Don't mutate the state directly, use mutation instead
store.state.version = '1.8.4'
store.state.version = process.env.APPVERSION
store.state.config = config
store.state.__DEMO_MODE__ = (config.demomode === true) ? true : false
if(ssrContext) Vue.prototype.$ssrRequestContext = ssrContext
if (!store.state.config) store.state.config = buildTimeConfig // if provided from SSR, don't replace it

const storeView = prepareStoreView(null) // prepare the default storeView
const storeView = prepareStoreView(storeCode) // prepare the default storeView
store.state.storeView = storeView
// store.state.shipping.methods = shippingMethods

Expand Down
8 changes: 7 additions & 1 deletion core/build/webpack.base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import autoprefixer from 'autoprefixer';
import HTMLPlugin from 'html-webpack-plugin';
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
import webpack from 'webpack';
import moment from 'moment';

fs.writeFileSync(
path.resolve(__dirname, './config.json'),
Expand Down Expand Up @@ -76,10 +77,15 @@ export default {
filename: 'index.amp.html',
chunksSortMode: 'none',
inject: isProd == false
}),
new webpack.DefinePlugin({
'process.env.__APPVERSION__': JSON.stringify(require('../../package.json').version),
'process.env.__BUILDTIME__': JSON.stringify(moment().format('YYYY-MM-DD HH:mm:ss'))
})
],
devtool: 'source-map',
entry: {
app: ['babel-polyfill', './core/client-entry.ts']
app: ['@babel/polyfill', './core/client-entry.ts']
},
output: {
path: path.resolve(__dirname, '../../dist'),
Expand Down
2 changes: 1 addition & 1 deletion core/build/webpack.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const config = merge(base, {
'process.env.VUE_ENV': '"client"'
}),
new VueSSRClientPlugin()
]
],
})

export default config;
1 change: 1 addition & 0 deletions core/build/webpack.prod.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))

const prodClientConfig = merge(baseClientConfig, {
mode: 'production',
devtool: 'nosources-source-map',
plugins: [
]
})
Expand Down
1 change: 1 addition & 0 deletions core/build/webpack.prod.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))

export default extendedConfig(baseServerConfig, {
mode: 'production',
devtool: 'nosources-source-map',
isClient: false,
isDev: false
})
2 changes: 1 addition & 1 deletion core/build/webpack.prod.sw.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SWPrecachePlugin from 'sw-precache-webpack-plugin';
module.exports = merge(base, {
mode: 'production',
target: 'web',
entry: ['babel-polyfill', './core/service-worker/index.js'],
entry: ['@babel/polyfill', './core/service-worker/index.js'],
output: {
filename: 'core-service-worker.js'
},
Expand Down
2 changes: 1 addition & 1 deletion core/build/webpack.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (config.server.useOutputCache) {
export default merge(base, {
mode: 'development',
target: 'node',
entry: ['babel-polyfill', './core/server-entry.ts'],
entry: ['@babel/polyfill', './core/server-entry.ts'],
output: {
filename: 'server-bundle.js',
libraryTarget: 'commonjs2'
Expand Down
Loading

0 comments on commit 594618a

Please sign in to comment.