v5.0.0 #338
matiasperrone
announced in
Announcements
v5.0.0
#338
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
v5.0.0 - Vue 3 migration
Summary
Vue 2 → Vue 3 migration, plus a full build/test/lint tooling swap (Vue CLI → Vite + Vitest).
Breaking changes
HotelDatePicker.vue:value→modelValueinput→update:modelValuev-model="show"in your template, no change needed. If you bind the prop/listener manually (:value/@input), update to:model-value/@update:model-value.vue: ^2.6.14→vue: ^3.4.0. Consumers on Vue 2 cannot upgrade to this version."type": "module"added) with a newexportsmap:mainpoints todist/vueHotelDatepicker.cjs,moduletodist/vueHotelDatepicker.es.js, andexports.require/exports.importmirror those two paths.vite.config.jsstill emits the CJS build asdist/vueHotelDatepicker.common.js, notdist/vueHotelDatepicker.cjs. As it stands,require('vue-hotel-datepicker')andexports.requirewill 404 — this needs a fix before publishing (rename the build output, or pointpackage.jsonback at.common.js).cssexport removed fromsrc/index.js(previouslyexport { css }alongside the default export). README usage already documents importing CSS viaimport 'vue-hotel-datepicker/dist/vueHotelDatepicker.css', so this only affects anyone who was using the named export directly.HotelDatePicker.install()now callsapp.component(HotelDatePicker.name ?? 'HotelDatePicker', HotelDatePicker), soapp.use(HotelDatePicker)(Vue 3 plugin pattern) works as expected.What's Changed
Prop changes
Day.vue—priceSymbolis no longerrequired; defaults to''.Price.vue—symboltype tightened from[String, null, undefined]toString(still defaults to'').Tooling / DX changes (internal, not library API)
vue-cli-service build --target lib) → Vite (vite build, lib mode → cjs/es/umd)vue-cli-service serve→vite(newindex.htmlentry point)@vue/test-utilsv1 (propsData,attachToDocument) → Vitest +@vue/test-utilsv2 (props,attachTo)eslint-plugin-vue(vue3-essential) +eslint-plugin-prettierrecommended, no Babelsass+sass-loader, legacy JS API (deprecation warning) →sassonly, Vitecss.preprocessorOptions.scss.api: 'modern'(deprecation warning gone)main.js:new Vue({ render: h => h(App) }).$mount('#app')→createApp(App).mount('#app')babel.config.js,vue.config.jsremoved (no longer needed).github/ISSUE_TEMPLATE/*,.github/stale.ymlCLAUDE.md(architecture notes for AI-assisted development)Other
New Contributors
Full Changelog: v4.6.0...v5.0.0
This discussion was created from the release v5.0.0.
All reactions