Skip to content

Commit

Permalink
Remove compat build (#875)
Browse files Browse the repository at this point in the history
Bug: T351812
  • Loading branch information
hasanakg authored Feb 5, 2024
1 parent 7ccb748 commit 21df5e6
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 74 deletions.
15 changes: 0 additions & 15 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ module.exports = {
// "import Counter from '@/Counter.vue'"
// (no need for a full path)
"moduleNameMapper": {
"^vue$": "@vue/compat",
'^@vue/composition-api$': '@vue/compat',
'^@wmde/wikit-vue-components$':
'@wmde/wikit-vue-components/dist/wikit-vue-components-vue3compat.common.js',
'^wikit-dist(.*)$': "<rootDir>/node_modules/@wmde/wikit-vue-components/dist$1",
Expand All @@ -33,18 +31,5 @@ module.exports = {
// Further info: https://test-utils.vuejs.org/migration/#-vue-vue3-jest-jest-28
"testEnvironmentOptions": {
"customExportConditions": ["node", "node-addons"],
},
// For Vue migration build
// Add compat config to test as well
"globals": {
"vue-jest": {
"compilerOptions": {
compatConfig: {
MODE: 3,
COMPILER_V_ON_NATIVE: true,
COMPILER_V_BIND_SYNC: true
}
}
}
}
}
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"dependencies": {
"@inertiajs/inertia": "^0.11.0",
"@inertiajs/inertia-vue3": "^0.6.0",
"@vue/compat": "^3.3.8",
"@wmde/wikit-tokens": "^2.1.0-alpha.15",
"@wmde/wikit-vue-components": "^2.1.0-alpha.16",
"date-fns": "^3.3.1",
Expand Down
7 changes: 0 additions & 7 deletions resources/js/Components/ItemIdSearchTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ import { useStore } from '../store';
import { CdxTextArea, CdxField, CdxProgressBar } from "@wikimedia/codex";
import ValidationError from '../types/ValidationError';
// Run it with compat mode
// https://v3-migration.vuejs.org/breaking-changes/v-model.html
CdxTextArea.compatConfig = {
...CdxTextArea.compatConfig,
COMPONENT_V_MODEL: false,
};
const validationError: Ref<ValidationError> = ref(null);
const messages = useI18n();
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Components/LoadingOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { ref } from 'vue';
import { CdxProgressBar } from "@wikimedia/codex";
const props = withDefaults(defineProps<{
delay: number
visible: boolean
delay?: number
visible?: boolean
}>(), {
delay: 250,
visible: false
Expand Down
6 changes: 0 additions & 6 deletions resources/js/Pages/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,6 @@ import type { Ref } from 'vue';
import { computed, onMounted, ref } from 'vue';
import axios from 'axios';
// Run it with compat mode
// https://v3-migration.vuejs.org/breaking-changes/v-model.html
CdxCheckbox.compatConfig = {
...CdxCheckbox.compatConfig,
COMPONENT_V_MODEL: false,
};
interface MismatchDecision {
id: number,
item_id: string,
Expand Down
9 changes: 0 additions & 9 deletions resources/js/shims-vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ declare module "*.vue" {
export default component;
}

declare module 'vue' {
import { CompatVue } from '@vue/runtime-dom'
const Vue: CompatVue
export default Vue
export * from '@vue/runtime-dom'
const { configureCompat } = Vue
export { configureCompat }
}

declare module 'vue-banana-i18n';

declare module '@wikimedia/language-data';
Expand Down
2 changes: 1 addition & 1 deletion tests/Vue/Components/MismatchRow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('MismatchesRow.vue', () => {

await wrapper.find('.full-description-button').trigger('click');

const dialog = wrapper.find('.full-description-dialog .cdx-dialog');
const dialog = wrapper.find('.full-description-dialog.cdx-dialog');

expect(dialog.isVisible()).toBe(true);
});
Expand Down
19 changes: 0 additions & 19 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,10 @@ mix.ts('resources/js/app.ts', 'public/js')
.webpackConfig({
resolve: {
alias: {
vue: '@vue/compat',
'@vue/composition-api': '@vue/compat',
'@wmde/wikit-vue-components':
'@wmde/wikit-vue-components/dist/wikit-vue-components-vue3compat.common.js',
'wikit-dist': path.resolve(__dirname, './node_modules/@wmde/wikit-vue-components/dist'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
compilerOptions: {
compatConfig: {
MODE: 3,
COMPILER_V_ON_NATIVE: true,
COMPILER_V_BIND_SYNC: true
}
}
}
}
]
}
})
.vue({ version: 3})
Expand Down

0 comments on commit 21df5e6

Please sign in to comment.