From dc8bef7928cb6a5e06a793a78652234276ca6fce Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 00:58:17 +0300 Subject: [PATCH 1/3] remove compat build --- build/webpack.base.conf.js | 8 -------- build/webpack.dev.conf.js | 4 +++- build/webpack.prod.conf.js | 4 +++- package.json | 1 - src/boot/after_store.js | 10 +--------- test/unit/index.js | 7 ------- yarn.lock | 5 ----- 7 files changed, 7 insertions(+), 32 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 65d398c80b..d7ff9b9a51 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -35,7 +35,6 @@ module.exports = { path.join(__dirname, '../node_modules') ], alias: { - 'vue': '@vue/compat', 'static': path.resolve(__dirname, '../static'), 'src': path.resolve(__dirname, '../src'), 'assets': path.resolve(__dirname, '../src/assets'), @@ -62,13 +61,6 @@ module.exports = { { test: /\.vue$/, loader: 'vue-loader', - options: { - compilerOptions: { - compatConfig: { - MODE: 2 - } - } - } }, { test: /\.jsx?$/, diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 159572ba1f..4605b93dfb 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -21,7 +21,9 @@ module.exports = merge(baseWebpackConfig, { new webpack.DefinePlugin({ 'process.env': config.dev.env, 'COMMIT_HASH': JSON.stringify('DEV'), - 'DEV_OVERRIDES': JSON.stringify(config.dev.settings) + 'DEV_OVERRIDES': JSON.stringify(config.dev.settings), + '__VUE_OPTIONS_API__': true, + '__VUE_PROD_DEVTOOLS__': false }), // https://github.com/glenjamin/webpack-hot-middleware#installation--usage new webpack.HotModuleReplacementPlugin(), diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index ed11ebad35..a67ed2f627 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -36,7 +36,9 @@ var webpackConfig = merge(baseWebpackConfig, { new webpack.DefinePlugin({ 'process.env': env, 'COMMIT_HASH': JSON.stringify(commitHash), - 'DEV_OVERRIDES': JSON.stringify(undefined) + 'DEV_OVERRIDES': JSON.stringify(undefined), + '__VUE_OPTIONS_API__': true, + '__VUE_PROD_DEVTOOLS__': false }), // extract css into its own file new MiniCssExtractPlugin({ diff --git a/package.json b/package.json index f9a58b87c2..1a743c1611 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "ruffle-mirror": "2021.12.31", "click-outside-vue3": "4.0.1", "vue": "^3.1.0", - "@vue/compat": "^3.1.0", "vue-i18n": "9.1.9", "vue-router": "4.0.14", "vue-template-compiler": "2.6.11", diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 87448c8c1e..768327084f 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -1,4 +1,4 @@ -import { createApp, configureCompat } from 'vue' +import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import vClickOutside from 'click-outside-vue3' @@ -15,14 +15,6 @@ import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js' import { applyTheme } from '../services/style_setter/style_setter.js' import FaviconService from '../services/favicon_service/favicon_service.js' -// disable compat for certain features -configureCompat({ - ATTR_FALSE_VALUE: false, - COMPONENT_V_MODEL: false, - INSTANCE_SET: false, - RENDER_FUNCTION: false -}) - let staticInitialResults = null const parsedInitialResults = () => { diff --git a/test/unit/index.js b/test/unit/index.js index 24d2825c94..83a2dcdba4 100644 --- a/test/unit/index.js +++ b/test/unit/index.js @@ -1,10 +1,3 @@ -import { configureCompat } from 'vue' -// disable compat for certain features -configureCompat({ - COMPONENT_V_MODEL: false, - INSTANCE_SET: false, - RENDER_FUNCTION: false -}) // require all test files (files that ends with .spec.js) const testsContext = require.context('./specs', true, /\.spec$/) testsContext.keys().forEach(testsContext) diff --git a/yarn.lock b/yarn.lock index a1206efff2..ca954c04d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1452,11 +1452,6 @@ html-tags "^3.1.0" svg-tags "^1.0.0" -"@vue/compat@^3.1.0": - version "3.2.31" - resolved "https://registry.yarnpkg.com/@vue/compat/-/compat-3.2.31.tgz#9c8bdf265eeba1777e5edb56cda73581e351a648" - integrity sha512-hhwJk/SRwpT2OADctj+t7QZCRIgh04AcelGpe6gdj0OxA75xpHnPrG+fmG37U3Z6WDrNHZpGvu2eXBzWXM4OVA== - "@vue/compiler-core@3.2.31": version "3.2.31" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.31.tgz#d38f06c2cf845742403b523ab4596a3fda152e89" From 2d7f242713edc45dbcc2811cd86d8864d093ce3f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 16:33:34 +0300 Subject: [PATCH 2/3] remove unused props to fix test --- src/components/mentions_line/mentions_line.vue | 2 -- src/components/status/status.vue | 1 - 2 files changed, 3 deletions(-) diff --git a/src/components/mentions_line/mentions_line.vue b/src/components/mentions_line/mentions_line.vue index f375e3b092..09b6a1d6c6 100644 --- a/src/components/mentions_line/mentions_line.vue +++ b/src/components/mentions_line/mentions_line.vue @@ -6,7 +6,6 @@ class="mention-link" :content="mention.content" :url="mention.url" - :first-mention="false" />