Updated front dependencies

This commit is contained in:
Eliot Berriot 2020-02-25 15:42:44 +01:00
parent a7e7ad20a4
commit 7819c60164
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
7 changed files with 2312 additions and 1807 deletions

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
presets: [ presets: [
'@vue/app' '@vue/cli-plugin-babel/preset'
] ]
} }

View File

@ -14,6 +14,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.18.0", "axios": "^0.18.0",
"core-js": "^3.6.4",
"diff": "^4.0.1", "diff": "^4.0.1",
"django-channels": "^1.1.6", "django-channels": "^1.1.6",
"fomantic-ui-css": "^2.8.3", "fomantic-ui-css": "^2.8.3",
@ -40,22 +41,25 @@
"vuex-router-sync": "^5.0.0" "vuex-router-sync": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0", "@vue/cli-plugin-babel": "~4.2.2",
"@vue/cli-plugin-eslint": "^3.0.0", "@vue/cli-plugin-eslint": "~4.2.2",
"@vue/cli-plugin-pwa": "^4.1.2", "@vue/cli-plugin-pwa": "~4.2.2",
"@vue/cli-plugin-unit-mocha": "^3.0.0", "@vue/cli-plugin-unit-mocha": "~4.2.2",
"@vue/cli-service": "^3.0.0", "@vue/cli-service": "~4.2.2",
"@vue/test-utils": "^1.0.0-beta.20", "@vue/test-utils": "^1.0.0-beta.20",
"babel-eslint": "^10.0.3",
"chai": "^4.1.2", "chai": "^4.1.2",
"easygettext": "^2.6.3", "easygettext": "^2.6.3",
"eslint": "^5.16.0",
"eslint-plugin-html": "^4.0.5", "eslint-plugin-html": "^4.0.5",
"eslint-plugin-vue": "^6.1.2",
"glob-all": "^3.1.0", "glob-all": "^3.1.0",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"moxios": "^0.4.0", "moxios": "^0.4.0",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
"preload-webpack-plugin": "^3.0.0-beta.4", "preload-webpack-plugin": "^3.0.0-beta.4",
"purgecss-webpack-plugin": "^1.6.0", "purgecss-webpack-plugin": "^1.6.0",
"sass-loader": "^7.1.0", "sass-loader": "^8.0.2",
"sinon": "^6.1.5", "sinon": "^6.1.5",
"vue-template-compiler": "^2.5.17", "vue-template-compiler": "^2.5.17",
"webpack-bundle-size-analyzer": "^3.0.0" "webpack-bundle-size-analyzer": "^3.0.0"

View File

@ -71,7 +71,7 @@ export default {
}, },
onResponse: function (initialResponse) { onResponse: function (initialResponse) {
let results = {} let results = {}
let isEmptyResults = true let isEmptyResults = true
let categories = [ let categories = [
{ {
code: 'artists', code: 'artists',
@ -140,7 +140,7 @@ export default {
results: [] results: []
} }
initialResponse[category.code].forEach(result => { initialResponse[category.code].forEach(result => {
isEmptyResults = false isEmptyResults = false
let id = category.getId(result) let id = category.getId(result)
results[category.code].results.push({ results[category.code].results.push({
title: category.getTitle(result), title: category.getTitle(result),
@ -156,8 +156,8 @@ export default {
}) })
}) })
return { return {
results: isEmptyResults ? {} : results results: isEmptyResults ? {} : results
} }
}, },
url: this.$store.getters['instance/absoluteUrl']('api/v1/search?query={query}') url: this.$store.getters['instance/absoluteUrl']('api/v1/search?query={query}')
} }

View File

@ -33,7 +33,7 @@ export default new Router({
path: "/front", path: "/front",
name: "front", name: "front",
redirect: to => { redirect: to => {
const { hash, params, query } = to const { hash, query } = to
return { name: 'index', hash, query } return { name: 'index', hash, query }
} }
}, },

View File

@ -159,7 +159,7 @@ describe('store/auth', () => {
payload: {credentials: credentials, onError: spy} payload: {credentials: credentials, onError: spy}
}, () => { }, () => {
expect(spy.calledOnce).to.equal(true) expect(spy.calledOnce).to.equal(true)
done() done() // eslint-disable-line no-undef
}) })
}) })
it('fetchProfile', () => { it('fetchProfile', () => {

View File

@ -94,10 +94,15 @@ module.exports = {
} }
}, },
chainWebpack: config => { chainWebpack: config => {
config.plugins.delete('prefetch-embed') // config.plugins.delete('prefetch-embed')
config.plugins.delete('preload-embed') // config.plugins.delete('preload-embed')
config.plugins.delete('prefetch-index') // config.plugins.delete('prefetch-index')
// TODO: Remove this workaround once https://github.com/vuejs/vue-cli/issues/2463 is fixed
// Remove preload plugins for multi-page build to prevent infinite recursion
['embed', 'index'].forEach(page => {
config.plugins.delete(`preload-${page}`)
config.plugins.delete(`prefetch-${page}`)
})
// needed to avoid having big dependedncies included in our lightweight // needed to avoid having big dependedncies included in our lightweight
// embed.html, cf https://github.com/vuejs/vue-cli/issues/2381 // embed.html, cf https://github.com/vuejs/vue-cli/issues/2381
const options = module.exports const options = module.exports

File diff suppressed because it is too large Load Diff