v5.0.0 - Vue 3 support!
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
- v-model prop/event renamed (Vue 3 convention) in
HotelDatePicker.vue:- prop
value→modelValue - emitted event
input→update:modelValue - If you use
v-model="show"in your template, no change needed. If you bind the prop/listener manually (:value/@input), update to:model-value/@update:model-value.
- prop
- Vue peer dependency bumped:
vue: ^2.6.14→vue: ^3.4.0. Consumers on Vue 2 cannot upgrade to this version. - Package is now ESM (
"type": "module"added) with a newexportsmap:mainpoints todist/vueHotelDatepicker.cjs,moduletodist/vueHotelDatepicker.es.js, andexports.require/exports.importmirror those two paths.- Bug found:
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).
- Bug found:
- Named
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. - Plugin install changed:
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)
- Build: Vue CLI (
vue-cli-service build --target lib) → Vite (vite build, lib mode → cjs/es/umd) - Dev server:
vue-cli-service serve→vite(newindex.htmlentry point) - Tests: Jest +
@vue/test-utilsv1 (propsData,attachToDocument) → Vitest +@vue/test-utilsv2 (props,attachTo) - Lint: ESLint + Airbnb config + Babel parser →
eslint-plugin-vue(vue3-essential) +eslint-plugin-prettierrecommended, no Babel - Sass:
sass+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')- Repo config:
babel.config.js,vue.config.jsremoved (no longer needed) - Community files added:
.github/ISSUE_TEMPLATE/*,.github/stale.yml - Added
CLAUDE.md(architecture notes for AI-assisted development)
Other
- Update Next/Prev month buttons to include aria labels by @wesselvdrest in #325
New Contributors
- @wesselvdrest made their first contribution in #325
Full Changelog: v4.6.0...v5.0.0