diff --git a/changelog/unreleased/change-update-vue b/changelog/unreleased/change-update-vue index 077b533cbf5..705e373691e 100644 --- a/changelog/unreleased/change-update-vue +++ b/changelog/unreleased/change-update-vue @@ -19,3 +19,4 @@ https://github.com/owncloud/web/pull/8256 https://github.com/owncloud/web/pull/8257 https://github.com/owncloud/web/pull/8258 https://github.com/owncloud/web/pull/8282 +https://github.com/owncloud/web/pull/8288 diff --git a/packages/tsconfig/tsconfig.json b/packages/tsconfig/tsconfig.json index c6f3bdd6511..3a4bccd8bcf 100644 --- a/packages/tsconfig/tsconfig.json +++ b/packages/tsconfig/tsconfig.json @@ -84,12 +84,6 @@ "node_modules" ], "vueCompilerOptions": { - "experimentalCompatMode": 2, - "experimentalTemplateCompilerOptions": { - "compatConfig": { - "MODE": 2 - } // optional - }, - "target": 2.7 + "target": 3 } } diff --git a/packages/web-runtime/src/compatConfig.ts b/packages/web-runtime/src/compatConfig.ts deleted file mode 100644 index dcd9a3877ab..00000000000 --- a/packages/web-runtime/src/compatConfig.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { configureCompat } from 'vue' - -type CompatConfig = Parameters[0] -export const compatConfig: CompatConfig = { - MODE: 2 - // ATTR_ENUMERATED_COERCION: false, - // ATTR_FALSE_VALUE: false, - // COMPONENT_ASYNC: false, - // COMPONENT_FUNCTIONAL: false, - // COMPONENT_V_MODEL: false, - // CONFIG_DEVTOOLS: false, - // CONFIG_IGNORED_ELEMENTS: false, - // CONFIG_KEY_CODES: false, - // CONFIG_OPTION_MERGE_STRATS: false, - // CONFIG_PRODUCTION_TIP: false, - // CONFIG_SILENT: false, - // CONFIG_WHITESPACE: false, - // CUSTOM_DIR: false, - // FILTERS: false, - // GLOBAL_DELETE: false, - // GLOBAL_EXTEND: false, - // GLOBAL_MOUNT: false, - // GLOBAL_MOUNT_CONTAINER: false, - // GLOBAL_OBSERVABLE: false, - // GLOBAL_PRIVATE_UTIL: false, - // GLOBAL_PROTOTYPE: false, - // GLOBAL_SET: false, - // INSTANCE_ATTRS_CLASS_STYLE: false, - // INSTANCE_CHILDREN: false, - // INSTANCE_DELETE: false, - // INSTANCE_DESTROY: false, - // INSTANCE_EVENT_EMITTER: false, - // INSTANCE_EVENT_HOOKS: false, - // INSTANCE_LISTENERS: false, - // INSTANCE_SCOPED_SLOTS: false, - // INSTANCE_SET: false, - // OPTIONS_BEFORE_DESTROY: false, - // OPTIONS_DATA_FN: false, - // OPTIONS_DATA_MERGE: false, - // OPTIONS_DESTROYED: false, - // PRIVATE_APIS: false, - // PROPS_DEFAULT_THIS: false, - // RENDER_FUNCTION: false // comment in when vue-router, vue-gettext, ... are fixed/updated - // TRANSITION_CLASSES: false, - // TRANSITION_GROUP_ROOT: false, - // V_ON_KEYCODE_MODIFIER: false, - // WATCH_ARRAY: false, -} diff --git a/packages/web-runtime/src/index.ts b/packages/web-runtime/src/index.ts index ea1bd7f3d1e..ba49fd0906c 100644 --- a/packages/web-runtime/src/index.ts +++ b/packages/web-runtime/src/index.ts @@ -30,8 +30,7 @@ import { } from 'web-client/src/helpers' import { WebDAV } from 'web-client/src/webdav' import { DavProperty } from 'web-client/src/webdav/constants' -import { configureCompat, createApp } from 'vue' -import { compatConfig } from './compatConfig' +import { createApp } from 'vue' import PortalVue, { createWormhole } from 'portal-vue' import WebPlugin from './plugins/web' @@ -39,8 +38,6 @@ import Avatar from './components/Avatar.vue' import focusMixin from './mixins/focusMixin' import lifecycleMixin from './mixins/lifecycleMixin' -configureCompat(compatConfig) - export const bootstrapApp = async (configurationPath: string): Promise => { const app = createApp(pages.success) diff --git a/tests/unit/config/jest.config.ts b/tests/unit/config/jest.config.ts index dfeb9b64dac..71c58b67a7a 100644 --- a/tests/unit/config/jest.config.ts +++ b/tests/unit/config/jest.config.ts @@ -23,7 +23,6 @@ module.exports = { '\\.(css|less|scss)$': '/tests/unit/stubs/empty.js', '^@/(.*)$': '/$1', '^core-js$': '/node_modules/core-js', - '^vue$': '@vue/compat', '^mark.js$': '/node_modules/mark.js/src/vanilla.js', '^fuse.js$': '/node_modules/fuse.js/dist/fuse.esm.js', '^filesize$': '/node_modules/filesize/lib/filesize.esm.js', diff --git a/tests/unit/config/jest.init.ts b/tests/unit/config/jest.init.ts index adc7e700706..0a5911d6537 100644 --- a/tests/unit/config/jest.init.ts +++ b/tests/unit/config/jest.init.ts @@ -1,9 +1,4 @@ -import { configureCompat } from 'vue' import fetchMock from 'jest-fetch-mock' - -import { compatConfig } from '../../../packages/web-runtime/src/compatConfig' - -configureCompat(compatConfig) ;(window as any).define = jest.fn() ;(window as any).IntersectionObserver = jest.fn(() => ({ observe: jest.fn(), diff --git a/vite.config.ts b/vite.config.ts index 670b1a0ca15..b5935f4286d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,11 +18,7 @@ import browserslistToEsbuild from 'browserslist-to-esbuild' import { CompilerOptions } from '@vue/compiler-sfc' export const compilerOptions: CompilerOptions = { - whitespace: 'preserve', - compatConfig: { - MODE: 2, - COMPILER_V_ON_NATIVE: false - } + whitespace: 'preserve' } const buildConfig = { @@ -134,8 +130,6 @@ export default defineConfig(({ mode, command }) => { }, resolve: { alias: { - vue: '@vue/compat', - crypto: join(projectRootDir, 'polyfills/crypto.js'), buffer: 'rollup-plugin-node-polyfills/polyfills/buffer-es6', path: 'rollup-plugin-node-polyfills/polyfills/path', diff --git a/web.d.ts b/web.d.ts index 47850c4e538..492b64b8dd7 100644 --- a/web.d.ts +++ b/web.d.ts @@ -2,8 +2,6 @@ declare module 'vue' { export * from '@vue/runtime-dom' - const { configureCompat } = Vue - export { configureCompat } export interface GlobalComponents { Portal: typeof import('portal-vue')['Portal'] @@ -13,6 +11,7 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] } } + declare module '*.vue' { import { defineComponent } from 'vue' const component: ReturnType