chore: adding changelog generator

This commit is contained in:
Saeid Zareie 2024-04-01 20:30:33 +03:30
parent 46f7ffb65a
commit 732b8f3020
5 changed files with 1134 additions and 0 deletions

1
.env.example Normal file
View File

@ -0,0 +1 @@
githubToken = ghp_111111111111111111111111111111111111

833
CHANGELOG.md Normal file
View File

@ -0,0 +1,833 @@
## v0.10.2...v0.10.3
[compare changes](https://github.com/radix-vue/shadcn-vue/compare/v0.10.2...v0.10.3)
### 🚀 Enhancements
- Blocks ([#428](https://github.com/radix-vue/shadcn-vue/pull/428))
### 🩹 Fixes
- Can't install `drawer` in js project ([cd3d244](https://github.com/radix-vue/shadcn-vue/commit/cd3d244))
- Pin input highlight border ([#432](https://github.com/radix-vue/shadcn-vue/pull/432))
- **hover-card:** Add emits from `radix-vue` ([#435](https://github.com/radix-vue/shadcn-vue/pull/435))
### 📖 Documentation
- Adding contribution guide ([#413](https://github.com/radix-vue/shadcn-vue/pull/413))
- Resizable verticalDemo example code error ([#414](https://github.com/radix-vue/shadcn-vue/pull/414))
- Fix combobox.md ref usage ([#420](https://github.com/radix-vue/shadcn-vue/pull/420))
- Fix `AccountForm.vue` example select language empty state ([#442](https://github.com/radix-vue/shadcn-vue/pull/442))
### 🏡 Chore
- Correct spelling in search functionality ([#418](https://github.com/radix-vue/shadcn-vue/pull/418))
- Correct the spelling of col-span to colspan ([#417](https://github.com/radix-vue/shadcn-vue/pull/417))
- Lint and enable Volar hybrid mode ([#419](https://github.com/radix-vue/shadcn-vue/pull/419))
- Update Dashboard03.vue ([#446](https://github.com/radix-vue/shadcn-vue/pull/446))
### ❤️ Contributors
- Lucas Bois ([@LucasBois1](http://github.com/LucasBois1))
- Roman Slonov ([@romanslonov](http://github.com/romanslonov))
- Artemiy ([@Artemiy111](http://github.com/Artemiy111))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Zernonia ([@zernonia](http://github.com/zernonia))
- Dev By Ray ([@devbyray](http://github.com/devbyray))
- Tortorse <hello@tortorse.com>
- Carl Lewis Castillo ([@carllewisc](http://github.com/carllewisc))
- HelloAhao096 ([@helloAhao096](http://github.com/helloAhao096))
- Saeid Zareie ([@Saeid-Za](http://github.com/Saeid-Za))
## v0.10.1...v0.10.2
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.10.1...v0.10.2)
### 🚀 Enhancements
- `PinInput` with `input-otp` demos and styles ([#402](https://github.com/Saeid-Za/shad/pull/402))
- `breadcrumb` component ([#405](https://github.com/Saeid-Za/shad/pull/405))
### 🩹 Fixes
- Unable to close `Combobox` with esc key ([#401](https://github.com/Saeid-Za/shad/pull/401))
### 💅 Refactors
- Code preview ([#411](https://github.com/Saeid-Za/shad/pull/411))
### 📖 Documentation
- Adding dark-mode setup page ([#384](https://github.com/Saeid-Za/shad/pull/384))
- Adding mail example ([#389](https://github.com/Saeid-Za/shad/pull/389))
- Resizable demos not working ([#399](https://github.com/Saeid-Za/shad/pull/399))
- Fix small issue of collapsed sidenav in mail page ([#396](https://github.com/Saeid-Za/shad/pull/396))
- Stackblitz not showing code on app.vue ([6d0cde4](https://github.com/Saeid-Za/shad/commit/6d0cde4))
- Fix sb having wrong path ([d4c7b01](https://github.com/Saeid-Za/shad/commit/d4c7b01))
- Fixes breadcrumb installation command ([#412](https://github.com/Saeid-Za/shad/pull/412))
### 🏡 Chore
- Fix hydration issue ([86a0ef2](https://github.com/Saeid-Za/shad/commit/86a0ef2))
- Docs stuff ([#400](https://github.com/Saeid-Za/shad/pull/400))
- Update deps ([4672f22](https://github.com/Saeid-Za/shad/commit/4672f22))
- Update deps ([8e58b6e](https://github.com/Saeid-Za/shad/commit/8e58b6e))
- Release v0.10.2 ([874ee64](https://github.com/Saeid-Za/shad/commit/874ee64))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Lucas Bois ([@LucasBois1](http://github.com/LucasBois1))
- Saeid Zareie
- Davlatov Shahzod <shahzod@davlatov.space>
## v0.10.0...v0.10.1
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.10.0...v0.10.1)
### 🩹 Fixes
- Make c12 look only for `components.json` for now ([#388](https://github.com/Saeid-Za/shad/pull/388))
### 🏡 Chore
- Remove uneeded plugin ([d580237](https://github.com/Saeid-Za/shad/commit/d580237))
- Release v0.10.1 ([b516995](https://github.com/Saeid-Za/shad/commit/b516995))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
## v0.9.0...v0.10.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.9.0...v0.10.0)
### 🚀 Enhancements
- Pin input ([#325](https://github.com/Saeid-Za/shad/pull/325))
- Tags input ([#328](https://github.com/Saeid-Za/shad/pull/328))
- Add ScrollBody and ScrollOverlay demos for Dialog ([#287](https://github.com/Saeid-Za/shad/pull/287))
- `vaul-vue` integration ([#374](https://github.com/Saeid-Za/shad/pull/374))
- Use unjs modules and improve cli from main shadcn-ui source, custom ui dir ([#324](https://github.com/Saeid-Za/shad/pull/324))
- `resizeable` component ([#385](https://github.com/Saeid-Za/shad/pull/385))
### 🩹 Fixes
- `CommandItem` hightlighted bg ([#322](https://github.com/Saeid-Za/shad/pull/322))
- Calendar weeks alignment ([#344](https://github.com/Saeid-Za/shad/pull/344))
- `vue-sonner` wrong props ([5d91767](https://github.com/Saeid-Za/shad/commit/5d91767))
### 💅 Refactors
- Update `SelectItem.vue` to put the check icon on the left ([#340](https://github.com/Saeid-Za/shad/pull/340))
### 📖 Documentation
- Add simple column pinning example ([#320](https://github.com/Saeid-Za/shad/pull/320))
- Minor fix to display the correct icon on dark mode ([#326](https://github.com/Saeid-Za/shad/pull/326))
- Update landing page ([aef277b](https://github.com/Saeid-Za/shad/commit/aef277b))
- Calendar typo ([#330](https://github.com/Saeid-Za/shad/pull/330))
- Add line highlighting for resolve paths instructions ([#331](https://github.com/Saeid-Za/shad/pull/331))
- Add `Geist` default font ([#339](https://github.com/Saeid-Za/shad/pull/339))
- Add `Input with icon` example ([#346](https://github.com/Saeid-Za/shad/pull/346))
- Add `ScrollArea` to `TableOfContent.vue` ([#351](https://github.com/Saeid-Za/shad/pull/351))
- Fix `DataTableColumnHeader` usage ([#359](https://github.com/Saeid-Za/shad/pull/359))
- Fix form examples tag capitalization ([#367](https://github.com/Saeid-Za/shad/pull/367))
- Add new example for slider in form ([#377](https://github.com/Saeid-Za/shad/pull/377))
- Adding skeleton card example ([#382](https://github.com/Saeid-Za/shad/pull/382))
- Adding remaining usages of drawer ([#380](https://github.com/Saeid-Za/shad/pull/380))
- Adding more examples for `DropdownMenu` and `Select` components ([c487137](https://github.com/Saeid-Za/shad/commit/c487137))
### 🏡 Chore
- Bump radix-vue ([32552dc](https://github.com/Saeid-Za/shad/commit/32552dc))
- Revert dismissable ([67d10e1](https://github.com/Saeid-Za/shad/commit/67d10e1))
- Bump radix-vue ([a01c83c](https://github.com/Saeid-Za/shad/commit/a01c83c))
- Build registry ([999676a](https://github.com/Saeid-Za/shad/commit/999676a))
- Bump radix ([60fbe49](https://github.com/Saeid-Za/shad/commit/60fbe49))
- Update antfu config, update root deps ([#347](https://github.com/Saeid-Za/shad/pull/347))
- Build registry ([48f3ee0](https://github.com/Saeid-Za/shad/commit/48f3ee0))
- **cli:** Update detypes version to fix the problem that calendar cannot be installed ([#348](https://github.com/Saeid-Za/shad/pull/348))
- Update DialogScrollContent component ([0aaad53](https://github.com/Saeid-Za/shad/commit/0aaad53))
- Build registry ([83c3c20](https://github.com/Saeid-Za/shad/commit/83c3c20))
- Bump radix ([27fae5c](https://github.com/Saeid-Za/shad/commit/27fae5c))
- Remove unused imports in utils ([#364](https://github.com/Saeid-Za/shad/pull/364))
- Update deps ([0265b48](https://github.com/Saeid-Za/shad/commit/0265b48))
- Build registry ([a02d16c](https://github.com/Saeid-Za/shad/commit/a02d16c))
- Release v0.10.0 ([33003de](https://github.com/Saeid-Za/shad/commit/33003de))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Saeid Zareie
- ɹǝʞɹɐԀ UǝʌS <hello+dev@svenparker.com>
- Braden Wong ([@braden-w](http://github.com/braden-w))
- Hannes Küttner <kuettner.hannes@gmail.com>
- Dunqing <dengqing0821@gmail.com>
- Michael Krebs <michikrbs@gmail.com>
- Roman Hrynevych ([@romanhrynevych](http://github.com/romanhrynevych))
- Greg Sanderson <gregsanderson@vidbeo.com>
- Jared Jolton
- Victor Garcia ([@TortitasT](http://github.com/TortitasT))
- Lucas Nunes ([@lucascnunes](http://github.com/lucascnunes))
## v0.8.7...v0.9.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.7...v0.9.0)
### 🚀 Enhancements
- Toggle group ([#275](https://github.com/Saeid-Za/shad/pull/275))
- Calendar component inherits the VCalendar slots ([#285](https://github.com/Saeid-Za/shad/pull/285))
- **sonner:** Add `sonner` component ([#301](https://github.com/Saeid-Za/shad/pull/301))
### 🩹 Fixes
- Add whitespace-nowrap for Button, Select, Tab ([#266](https://github.com/Saeid-Za/shad/pull/266))
- Select popper position ([#272](https://github.com/Saeid-Za/shad/pull/272))
- Prevent page zoom while tapping carousel buttons ([#274](https://github.com/Saeid-Za/shad/pull/274))
- Github action error ([18fafd7](https://github.com/Saeid-Za/shad/commit/18fafd7))
- Github action error ([f1c6267](https://github.com/Saeid-Za/shad/commit/f1c6267))
- Radio group indicator fill ([#280](https://github.com/Saeid-Za/shad/pull/280))
- Hide navigation in "time" mode ([#283](https://github.com/Saeid-Za/shad/pull/283))
- Separator background color ([#295](https://github.com/Saeid-Za/shad/pull/295))
- `ScrollAreaThumb` width in horizontal orientation ([#309](https://github.com/Saeid-Za/shad/pull/309))
- Weekdays spacing ([#300](https://github.com/Saeid-Za/shad/pull/300))
- Month and year popover ([#317](https://github.com/Saeid-Za/shad/pull/317))
- **cli:** Cannot add Carousel component without enabled typescript ([#318](https://github.com/Saeid-Za/shad/pull/318))
- **cli:** Add `xl` item to borderRadius in tailwind.config template ([#319](https://github.com/Saeid-Za/shad/pull/319))
### 💅 Refactors
- Use `class` as prop to prevent class duplication with `cn` function ([#241](https://github.com/Saeid-Za/shad/pull/241))
- Tailwindcss, remove all unnecessary arbitrary values, update TailwindCSS to v3.4 ([#269](https://github.com/Saeid-Za/shad/pull/269))
### 📖 Documentation
- Corrected a url typo ([#279](https://github.com/Saeid-Za/shad/pull/279))
- Fix a typo in form ([#281](https://github.com/Saeid-Za/shad/pull/281))
- Add @types/node section in Vite installation ([#289](https://github.com/Saeid-Za/shad/pull/289))
- Update vite installation ([#250](https://github.com/Saeid-Za/shad/pull/250))
- Fix new line-number, fix highlight color on txt md block in shikiji ([#299](https://github.com/Saeid-Za/shad/pull/299))
### 🏡 Chore
- Test publish pipeline ([72ed16a](https://github.com/Saeid-Za/shad/commit/72ed16a))
- Update the pipeline to allow deploy for forked pr ([6ff7b6f](https://github.com/Saeid-Za/shad/commit/6ff7b6f))
- Add conditional to the branch naming ([8860b44](https://github.com/Saeid-Za/shad/commit/8860b44))
- Bump action version ([53c539d](https://github.com/Saeid-Za/shad/commit/53c539d))
- Run build registry ([e65fe20](https://github.com/Saeid-Za/shad/commit/e65fe20))
- Update deps and vitepress ([#278](https://github.com/Saeid-Za/shad/pull/278))
- Fix `vue-sonner` Unknown file extension ".css" ([#302](https://github.com/Saeid-Za/shad/pull/302))
- Add `vue-sonner` to dependencies in registry files ([42f0086](https://github.com/Saeid-Za/shad/commit/42f0086))
- Simplify GitHub issues report ([#312](https://github.com/Saeid-Za/shad/pull/312))
- Rebuild registry, fresh lockfile ([ed70e4e](https://github.com/Saeid-Za/shad/commit/ed70e4e))
- Fix testing pipeline ([6c99fd6](https://github.com/Saeid-Za/shad/commit/6c99fd6))
- Cleanup ([69576af](https://github.com/Saeid-Za/shad/commit/69576af))
- Release v0.9.0 ([5dc01fa](https://github.com/Saeid-Za/shad/commit/5dc01fa))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- ItsTPM ([@itsTPM](http://github.com/itsTPM))
- Dunqing <dengqing0821@gmail.com>
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Roman Hrynevych ([@romanhrynevych](http://github.com/romanhrynevych))
- Wasim Thoufiq ([@wasimTQ](http://github.com/wasimTQ))
- Jackson Bowe ([@JacksonBowe](http://github.com/JacksonBowe))
- Pier107 ([@PiervitoCreanza](http://github.com/PiervitoCreanza))
- Robert Shaw ([@xiaoluoboding](http://github.com/xiaoluoboding))
- Trolladam
- Rukshan Ranatunge <arkruka@gmail.com>
- Valentin Hutter <valentinhutter1296@gmail.com>
- Anton Reshetov ([@antonreshetov](http://github.com/antonreshetov))
- Cvsouth <contact@colinsouth.com>
- Broki ([@brokiem](http://github.com/brokiem))
## v0.8.6...v0.8.7
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.6...v0.8.7)
### 🚀 Enhancements
- Add `carousel` component ([#227](https://github.com/Saeid-Za/shad/pull/227))
- **cli:** Add JSON schema ([#256](https://github.com/Saeid-Za/shad/pull/256))
- Add style to work with v-calendar time picker ([#243](https://github.com/Saeid-Za/shad/pull/243), [#265](https://github.com/Saeid-Za/shad/pull/265))
### 🩹 Fixes
- Typo for @nuxt/kit import ([9adf96d](https://github.com/Saeid-Za/shad/commit/9adf96d))
- Input `attrs` not reactive ([#228](https://github.com/Saeid-Za/shad/pull/228))
- Dialog props missing ([#242](https://github.com/Saeid-Za/shad/pull/242))
- **module:** Fixed the typo ([#249](https://github.com/Saeid-Za/shad/pull/249))
- **cli:** Safelist `dark` when CSS variable colors are used. ([#255](https://github.com/Saeid-Za/shad/pull/255))
- **popover:** Add max-height to SelectContent ([#263](https://github.com/Saeid-Za/shad/pull/263), [#264](https://github.com/Saeid-Za/shad/pull/264))
- Nuxt module throwing error due to parsing error ([#267](https://github.com/Saeid-Za/shad/pull/267))
### 📖 Documentation
- Update nuxt to allow manual module ([1d2cce5](https://github.com/Saeid-Za/shad/commit/1d2cce5))
- Prevent default browser behaviour with `ctrl-k/j` in `useMagicKeys` ([#246](https://github.com/Saeid-Za/shad/pull/246))
### 🏡 Chore
- **cli:** Match cli prompt question (global CSS) with the documentation ([989c0e2](https://github.com/Saeid-Za/shad/commit/989c0e2))
- Bump version ([856ab15](https://github.com/Saeid-Za/shad/commit/856ab15))
- Upgrade deps ([1d563bb](https://github.com/Saeid-Za/shad/commit/1d563bb))
- Run registry ([ab835ff](https://github.com/Saeid-Za/shad/commit/ab835ff))
- Release v0.8.7 ([d3806fc](https://github.com/Saeid-Za/shad/commit/d3806fc))
### ✅ Tests
- Fix test missing safelist ([f46e2b9](https://github.com/Saeid-Za/shad/commit/f46e2b9))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Valentin Hutter <valentinhutter1296@gmail.com>
- Roman Hrynevych ([@romanhrynevych](http://github.com/romanhrynevych))
- Antoine Lethimonnier ([@WarningImHack3r](http://github.com/WarningImHack3r))
- Hai Yang Tang <knightopress@gmail.com>
- Wasim Thoufiq ([@wasimTQ](http://github.com/wasimTQ))
- Hubert Kowalski ([@hubcio2115](http://github.com/hubcio2115))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Starker-xp
- Paras Solanki ([@ParasSolanki](http://github.com/ParasSolanki))
## v0.8.5...v0.8.6
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.5...v0.8.6)
### 🩹 Fixes
- Allow .ts or .js extension in module package ([#225](https://github.com/Saeid-Za/shad/pull/225))
- Toggle not setting pressed property on init ([#223](https://github.com/Saeid-Za/shad/pull/223))
- **Module:** HMR not working when edit component load too slow ([#235](https://github.com/Saeid-Za/shad/pull/235))
### 📖 Documentation
- Add missing API references ([c75b402](https://github.com/Saeid-Za/shad/commit/c75b402))
- Make <DataTable /> reactive ([#229](https://github.com/Saeid-Za/shad/pull/229))
- Replace nbsp with a space when copying ([#230](https://github.com/Saeid-Za/shad/pull/230))
- Change cards radius to `rounded-lg` ([#231](https://github.com/Saeid-Za/shad/pull/231))
### 🏡 Chore
- Update test snapshot ([eccfc99](https://github.com/Saeid-Za/shad/commit/eccfc99))
- Fix `ComboboxDemo.vue` types ([#233](https://github.com/Saeid-Za/shad/pull/233))
- Run build registry ([af57b63](https://github.com/Saeid-Za/shad/commit/af57b63))
- Release v0.8.6 ([755d864](https://github.com/Saeid-Za/shad/commit/755d864))
### ✅ Tests
- Include radix-vue in deps ([3a049d5](https://github.com/Saeid-Za/shad/commit/3a049d5))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- ItsTPM ([@itsTPM](http://github.com/itsTPM))
- Jan Kremlacek ([@jankremlacek](http://github.com/jankremlacek))
- Gary Thomas <garyedwardthomas@yahoo.ie>
## v0.8.4...v0.8.5
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.4...v0.8.5)
### 🩹 Fixes
- Theme switcher current colors ([#198](https://github.com/Saeid-Za/shad/pull/198))
- **Button:** Missing `asChild` ([#203](https://github.com/Saeid-Za/shad/pull/203))
- Avoid failing resolve types by adding `radix-vue` to project deps in `shadcn-vue init` before the `add` command ([#216](https://github.com/Saeid-Za/shad/pull/216))
### 📖 Documentation
- Fix create project command typo ([#208](https://github.com/Saeid-Za/shad/pull/208))
- Change docs link in sheet component ([#211](https://github.com/Saeid-Za/shad/pull/211))
- Fix `vee-validate` checkbox and radio-group examples ([#213](https://github.com/Saeid-Za/shad/pull/213))
### 🏡 Chore
- Fix `ThemingLayout.vue` TooltipContent color in dark mode ([58bad18](https://github.com/Saeid-Za/shad/commit/58bad18))
- Fix label `for` attribute in registry examples ([f82e401](https://github.com/Saeid-Za/shad/commit/f82e401))
- Release v0.8.5 ([2513dc5](https://github.com/Saeid-Za/shad/commit/2513dc5))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Björn <beejaz@please.wtf>
- Sadeghbarati ([@sadeghbarati](http://github.com/sadeghbarati))
- Sasa Markovic ([@quayspwn](http://github.com/quayspwn))
- Josh Larsen ([@joshlarsen](http://github.com/joshlarsen))
## v0.8.3...v0.8.4
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.3...v0.8.4)
### 🚀 Enhancements
- **cli:** Add collapsible animations by default ([#186](https://github.com/Saeid-Za/shad/pull/186))
- Nuxt module ([#197](https://github.com/Saeid-Za/shad/pull/197))
### 🩹 Fixes
- Checkbox icon off-center fix ([#184](https://github.com/Saeid-Za/shad/pull/184))
- Calendar transition bug ([#195](https://github.com/Saeid-Za/shad/pull/195))
- Input duplicated class name, remove type="text" ([#194](https://github.com/Saeid-Za/shad/pull/194))
### 📖 Documentation
- Fix demo after refactoring ([8d1dfe8](https://github.com/Saeid-Za/shad/commit/8d1dfe8))
- Fix typo `dialog.md` ([#192](https://github.com/Saeid-Za/shad/pull/192))
- Add `color-scheme` ([#193](https://github.com/Saeid-Za/shad/pull/193))
### 🏡 Chore
- Lint, fix frozen lockfile ([6921911](https://github.com/Saeid-Za/shad/commit/6921911))
- Bump deps version ([7a09929](https://github.com/Saeid-Za/shad/commit/7a09929))
- Release v0.8.4 ([3778a51](https://github.com/Saeid-Za/shad/commit/3778a51))
### ✅ Tests
- Hide failing test temporary, fix test ([1a1e229](https://github.com/Saeid-Za/shad/commit/1a1e229))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Youssef ([@lovlyx](http://github.com/lovlyx))
- Emir Büçkün ([@emirbuckun](http://github.com/emirbuckun))
- Benjamin Gervan ([@bgervan](http://github.com/bgervan))
- Lucas Goyeche <lgyech@gmail.com>
## v0.8.2...v0.8.3
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.2...v0.8.3)
### 🩹 Fixes
- Set default node version to `18` in CodeSandbox ([#164](https://github.com/Saeid-Za/shad/pull/164))
- Devops revert publish pipeline ([447b7a0](https://github.com/Saeid-Za/shad/commit/447b7a0))
- Add missing presentation role in new-york style ([#175](https://github.com/Saeid-Za/shad/pull/175))
### 💅 Refactors
- Use pathe instead of node:path ([#179](https://github.com/Saeid-Za/shad/pull/179))
### 📖 Documentation
- Add shadcn/vue VSCode extension ([#163](https://github.com/Saeid-Za/shad/pull/163))
- Update TeamSwitcher.vue ([#167](https://github.com/Saeid-Za/shad/pull/167))
- **form:** Fix closing of form tags in VeeValidate document ([#171](https://github.com/Saeid-Za/shad/pull/171))
### 🏡 Chore
- Update DatePicker.vue ([#165](https://github.com/Saeid-Za/shad/pull/165))
- Bump radix-vue version ([31a7198](https://github.com/Saeid-Za/shad/commit/31a7198))
- Update deps ([9074d75](https://github.com/Saeid-Za/shad/commit/9074d75))
- Release v0.8.3 ([a9c3c87](https://github.com/Saeid-Za/shad/commit/a9c3c87))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Ole Marius Løset ([@olemarius](http://github.com/olemarius))
- Anonimus Programus ([@anonimusprogramus](http://github.com/anonimusprogramus))
- Rishabh Dubey ([@rishabhd1](http://github.com/rishabhd1))
- Selemondev ([@selemondev](http://github.com/selemondev))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
## v0.8.1...v0.8.2
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.1...v0.8.2)
### 🩹 Fixes
- Missing dependencies for calendar ([4fcfb4e](https://github.com/Saeid-Za/shad/commit/4fcfb4e))
- Pipeline with some missing ([ceb090d](https://github.com/Saeid-Za/shad/commit/ceb090d))
- Toggle A all not working ([#157](https://github.com/Saeid-Za/shad/pull/157))
- Also parse tyepscript file ([#159](https://github.com/Saeid-Za/shad/pull/159))
### 📖 Documentation
- Fix `nuxt.config.ts` configuration for auto-import components directories ([#154](https://github.com/Saeid-Za/shad/pull/154))
- Improve the API reference of all the components ([#152](https://github.com/Saeid-Za/shad/pull/152))
- Fix announcement typo ([#155](https://github.com/Saeid-Za/shad/pull/155))
### 🏡 Chore
- Update registry ([5da2eef](https://github.com/Saeid-Za/shad/commit/5da2eef))
- Release v0.8.2 ([31b7014](https://github.com/Saeid-Za/shad/commit/31b7014))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Youssef ([@lovlyx](http://github.com/lovlyx))
- Selemondev ([@selemondev](http://github.com/selemondev))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
## v0.8.0...v0.8.1
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.8.0...v0.8.1)
### 🩹 Fixes
- Pnpm frozen lockfile ([6c39518](https://github.com/Saeid-Za/shad/commit/6c39518))
### 📖 Documentation
- Appearance Form Label Fix ([#149](https://github.com/Saeid-Za/shad/pull/149))
- Fix component preview alias path ([#150](https://github.com/Saeid-Za/shad/pull/150))
### 🏡 Chore
- Bump radix-vue version ([c9402fe](https://github.com/Saeid-Za/shad/commit/c9402fe))
- Kick build ([f9243d4](https://github.com/Saeid-Za/shad/commit/f9243d4))
- Update registry ([#151](https://github.com/Saeid-Za/shad/pull/151))
- Release v0.8.1 ([670b12c](https://github.com/Saeid-Za/shad/commit/670b12c))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Pratik Patel ([@pratik227](http://github.com/pratik227))
## v0.7.0...v0.8.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.7.0...v0.8.0)
### 🚀 Enhancements
- Add toast ([#122](https://github.com/Saeid-Za/shad/pull/122))
### 🩹 Fixes
- Build ([67e6f1a](https://github.com/Saeid-Za/shad/commit/67e6f1a))
- **cli:** Missing props/emits when disable typescript ([#105](https://github.com/Saeid-Za/shad/pull/105))
### 🏡 Chore
- Release v0.8.0 ([91d0553](https://github.com/Saeid-Za/shad/commit/91d0553))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Nik <nikhilkutinha@protonmail.com>
- Dunqing <dengqing0821@gmail.com>
## v0.6.1...v0.7.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.6.1...v0.7.0)
### 🚀 Enhancements
- Stackblitz/codesandbox editor ([#130](https://github.com/Saeid-Za/shad/pull/130))
### 🩹 Fixes
- Customizer code text color ([#125](https://github.com/Saeid-Za/shad/pull/125))
### 📖 Documentation
- Add Astro guide ([#118](https://github.com/Saeid-Za/shad/pull/118))
- Improve API Reference for the Data Table Component ([#134](https://github.com/Saeid-Za/shad/pull/134))
### 🏡 Chore
- Update pipeline for forked branch ([2494c55](https://github.com/Saeid-Za/shad/commit/2494c55))
- Upgrade deps ([c8551d5](https://github.com/Saeid-Za/shad/commit/c8551d5))
- Bump Radix Vue v1 ([#139](https://github.com/Saeid-Za/shad/pull/139))
- Build registry ([27dc777](https://github.com/Saeid-Za/shad/commit/27dc777))
- Release v0.7.0 ([5120ad2](https://github.com/Saeid-Za/shad/commit/5120ad2))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Selemondev ([@selemondev](http://github.com/selemondev))
- Xavier Vila Rubio ([@XavierVilaRubio](http://github.com/XavierVilaRubio))
## v0.6.0...v0.6.1
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.6.0...v0.6.1)
### 🩹 Fixes
- Add v-bind="$attrs" to DatePicker in Calendar ([#117](https://github.com/Saeid-Za/shad/pull/117))
### 💅 Refactors
- Transform css variables for components ([#129](https://github.com/Saeid-Za/shad/pull/129))
### 🏡 Chore
- Build registry ([f96d00e](https://github.com/Saeid-Za/shad/commit/f96d00e))
- Release v0.6.1 ([63197f0](https://github.com/Saeid-Za/shad/commit/63197f0))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Ole Marius Løset ([@olemarius](http://github.com/olemarius))
## v0.5.0...v0.6.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.5.0...v0.6.0)
### 🚀 Enhancements
- **cli:** Support `tailwind.config.mjs` file ([#120](https://github.com/Saeid-Za/shad/pull/120))
### 🏡 Chore
- Update vite.md ([#111](https://github.com/Saeid-Za/shad/pull/111))
- Fix lint, wrong initial value ([b46f4f7](https://github.com/Saeid-Za/shad/commit/b46f4f7))
- Release v0.6.0 ([f995f53](https://github.com/Saeid-Za/shad/commit/f995f53))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Dunqing <dengqing0821@gmail.com>
- Greg Sanderson <gregsanderson@vidbeo.com>
## v0.3.2...v0.4.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.3.2...v0.4.0)
### 🚀 Enhancements
- Add `vee-validate` ([#85](https://github.com/Saeid-Za/shad/pull/85))
### 🏡 Chore
- Fix demo reactivitiy ([9b4b0c2](https://github.com/Saeid-Za/shad/commit/9b4b0c2))
- Build registry ([d2aa753](https://github.com/Saeid-Za/shad/commit/d2aa753))
- Release v0.4.0 ([137ecb8](https://github.com/Saeid-Za/shad/commit/137ecb8))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
## v0.3.1...v0.3.2
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.3.1...v0.3.2)
### 🩹 Fixes
- Avatar class typo ([#97](https://github.com/Saeid-Za/shad/pull/97))
### 🏡 Chore
- Run build registry ([a46215f](https://github.com/Saeid-Za/shad/commit/a46215f))
- Release v0.3.2 ([8c2e6f1](https://github.com/Saeid-Za/shad/commit/8c2e6f1))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Muhammad Mahmoud ([@MuhammadM1998](http://github.com/MuhammadM1998))
## v0.3.0...v0.3.1
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.3.0...v0.3.1)
### 🩹 Fixes
- Add emits to the tabs component ([#93](https://github.com/Saeid-Za/shad/pull/93))
- Hotfix for tabs wasn't import correctly ([7fd9ebe](https://github.com/Saeid-Za/shad/commit/7fd9ebe))
### 📖 Documentation
- Update select.md with correct docs link ([#94](https://github.com/Saeid-Za/shad/pull/94))
### 🏡 Chore
- Release v0.3.1 ([1d678d9](https://github.com/Saeid-Za/shad/commit/1d678d9))
### ❤️ Contributors
- Zernonia <zernonia@gmail.com>
- Léo Gallot ([@leogallot](http://github.com/leogallot))
- Björn <beejaz@please.wtf>
## v0.2.0...v0.3.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.2.0...v0.3.0)
### 🚀 Enhancements
- Implement utilities from `radix vue` ([#89](https://github.com/Saeid-Za/shad/pull/89))
### 🏡 Chore
- Bump radix-vue version ([bd1953d](https://github.com/Saeid-Za/shad/commit/bd1953d))
- Bump radix-vue version ([9355cd1](https://github.com/Saeid-Za/shad/commit/9355cd1))
- Build registry ([b9bbaaa](https://github.com/Saeid-Za/shad/commit/b9bbaaa))
- Release v0.3.0 ([97a6369](https://github.com/Saeid-Za/shad/commit/97a6369))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
## v0.1.9...v0.2.0
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.1.9...v0.2.0)
### 🩹 Fixes
- Complete textarea ([8b4a0b4](https://github.com/Saeid-Za/shad/commit/8b4a0b4))
### 💅 Refactors
- Replace iconify icons with `@radix-icons/vue` for newyork style ([#87](https://github.com/Saeid-Za/shad/pull/87))
### 🏡 Chore
- Bump radix-vue version ([46d0645](https://github.com/Saeid-Za/shad/commit/46d0645))
- Bump radix-vue version ([88c159d](https://github.com/Saeid-Za/shad/commit/88c159d))
- Release v0.2.0 ([2001d1b](https://github.com/Saeid-Za/shad/commit/2001d1b))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Ahmed <ahmedmayara789@gmail.com>
## v0.1.8...v0.1.9
[compare changes](https://github.com/Saeid-Za/shad/compare/v0.1.8...v0.1.9)
### 🩹 Fixes
- Ssr issue with popper components ([f192d15](https://github.com/Saeid-Za/shad/commit/f192d15))
- Update extension for tailwindconfig ([#68](https://github.com/Saeid-Za/shad/pull/68))
- Dialog overlay background color ([#76](https://github.com/Saeid-Za/shad/pull/76))
### 📖 Documentation
- Fix className reference ([97e9b57](https://github.com/Saeid-Za/shad/commit/97e9b57))
- Update Nuxt 3 installation guide for Typescript issue fix ([#71](https://github.com/Saeid-Za/shad/pull/71))
### 🏡 Chore
- Update registry ([2040d59](https://github.com/Saeid-Za/shad/commit/2040d59))
- Add release workflow ([48ec8b3](https://github.com/Saeid-Za/shad/commit/48ec8b3))
- Updates charts using unovis/vue ([#77](https://github.com/Saeid-Za/shad/pull/77))
- Run build registry ([2f15799](https://github.com/Saeid-Za/shad/commit/2f15799))
- Release v0.1.9 ([5613a70](https://github.com/Saeid-Za/shad/commit/5613a70))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Ahmed Mayara ([@ahmedmayara](http://github.com/ahmedmayara))
- Selemondev ([@selemondev](http://github.com/selemondev))
## v0.1.0...v0.1.8
[compare changes](https://github.com/Saeid-Za/shad/compare/9399f6606a438c4f9e713ea09fa58b0fcffd0c30...v0.1.8)
### 🚀 Enhancements
- Add new-york style components ([#27](https://github.com/Saeid-Za/shad/pull/27))
- Add new-york style demos, fix wrong icon in dropdown-menu and select components ([#30](https://github.com/Saeid-Za/shad/pull/30))
- Add themes ([#32](https://github.com/Saeid-Za/shad/pull/32))
- Add style switcher ([b37ba51](https://github.com/Saeid-Za/shad/commit/b37ba51))
- Theming apply to whole site ([d6c5a2f](https://github.com/Saeid-Za/shad/commit/d6c5a2f))
- Add profile section in forms example ([#44](https://github.com/Saeid-Za/shad/pull/44))
- Add combobox, commands ([#52](https://github.com/Saeid-Za/shad/pull/52))
- Add `taze` ([#48](https://github.com/Saeid-Za/shad/pull/48))
- Update exampels with command component ([69a4983](https://github.com/Saeid-Za/shad/commit/69a4983))
- **cli:** Support remove type when non-typescript ([#45](https://github.com/Saeid-Za/shad/pull/45))
- Complete utils test ([ef452df](https://github.com/Saeid-Za/shad/commit/ef452df))
- Improve installation section to accommodate other frameworks ([#63](https://github.com/Saeid-Za/shad/pull/63))
- Add command palette ([#59](https://github.com/Saeid-Za/shad/pull/59))
- **cli:** Add overwrite confirmation for existing components ([#66](https://github.com/Saeid-Za/shad/pull/66))
- **cli:** Support adding all components ([#65](https://github.com/Saeid-Za/shad/pull/65))
### 🩹 Fixes
- Cli installation error ([ec0c3cc](https://github.com/Saeid-Za/shad/commit/ec0c3cc))
- Dark mode ([167cfcd](https://github.com/Saeid-Za/shad/commit/167cfcd))
- Mobile view scroll, missing logo ([aed6f4d](https://github.com/Saeid-Za/shad/commit/aed6f4d))
- Missing import ([d39220e](https://github.com/Saeid-Za/shad/commit/d39220e))
- **cli:** Break caused by non-existence of `tsconfig.app.json` ([#38](https://github.com/Saeid-Za/shad/pull/38))
- **cli:** Shouldn't load tsconfig when typescript disabled ([#43](https://github.com/Saeid-Za/shad/pull/43))
- Component and utils alias does not update imports in file ([#53](https://github.com/Saeid-Za/shad/pull/53))
- Customizer code not populating ([3e61384](https://github.com/Saeid-Za/shad/commit/3e61384))
- Babel/core required ([22e46c1](https://github.com/Saeid-Za/shad/commit/22e46c1))
- Nuxt config ([27ac382](https://github.com/Saeid-Za/shad/commit/27ac382))
- **cli:** Should move `detype` to `dependencies` ([#61](https://github.com/Saeid-Za/shad/pull/61))
- Frozen pnpm ([2e06f2e](https://github.com/Saeid-Za/shad/commit/2e06f2e))
- Test workflow failing ([3643394](https://github.com/Saeid-Za/shad/commit/3643394))
- Tooltip popover trigger issue ([e9634a9](https://github.com/Saeid-Za/shad/commit/e9634a9))
### 💅 Refactors
- **apps/www:** Use `vite` postcss depdendecy, use `tsx` instead of `ts-node` ([#42](https://github.com/Saeid-Za/shad/pull/42))
### 📖 Documentation
- Updates cli info ([c677f55](https://github.com/Saeid-Za/shad/commit/c677f55))
- Update icons ([5c70929](https://github.com/Saeid-Za/shad/commit/5c70929))
- Improve docs site ([7200c53](https://github.com/Saeid-Za/shad/commit/7200c53))
- Update meta data ([5a96372](https://github.com/Saeid-Za/shad/commit/5a96372))
- Update all link to gh ([9f4bb10](https://github.com/Saeid-Za/shad/commit/9f4bb10))
- Fix footer link ([#40](https://github.com/Saeid-Za/shad/pull/40))
- View transition api ([0bc0dcb](https://github.com/Saeid-Za/shad/commit/0bc0dcb))
- Improve the installation section for each component ([#50](https://github.com/Saeid-Za/shad/pull/50))
- Update docs build, some content ([0456a5b](https://github.com/Saeid-Za/shad/commit/0456a5b))
- Update meta for command ([6aa476d](https://github.com/Saeid-Za/shad/commit/6aa476d))
### 🏡 Chore
- Bump version ([b89d7d3](https://github.com/Saeid-Za/shad/commit/b89d7d3))
- Release 0.1.0 ([16a42b1](https://github.com/Saeid-Za/shad/commit/16a42b1))
- Remove empty string for react ([31e30b0](https://github.com/Saeid-Za/shad/commit/31e30b0))
- Add responsive design ([ee809cb](https://github.com/Saeid-Za/shad/commit/ee809cb))
- Update readme with credits ([6dff115](https://github.com/Saeid-Za/shad/commit/6dff115))
- Upadte to use composables ([22e548f](https://github.com/Saeid-Za/shad/commit/22e548f))
- Change exmaple styling from default to new-york ([0b03032](https://github.com/Saeid-Za/shad/commit/0b03032))
- Bump version, fix className ([2aeedf5](https://github.com/Saeid-Za/shad/commit/2aeedf5))
- Update registry ([bd12584](https://github.com/Saeid-Za/shad/commit/bd12584))
- Bump version ([8e5a636](https://github.com/Saeid-Za/shad/commit/8e5a636))
- Bump cli 0.1.2 ([686ac00](https://github.com/Saeid-Za/shad/commit/686ac00))
- Updated invalid link and correct shadecn naming ([#46](https://github.com/Saeid-Za/shad/pull/46))
- Bump radix-vue version ([912be8e](https://github.com/Saeid-Za/shad/commit/912be8e))
- Add publish www workflow ([7abf5b2](https://github.com/Saeid-Za/shad/commit/7abf5b2))
- Fix responsiveness ([7e8b7c5](https://github.com/Saeid-Za/shad/commit/7e8b7c5))
- Update registry ([2507fbe](https://github.com/Saeid-Za/shad/commit/2507fbe))
- Bump registry version ([5798c47](https://github.com/Saeid-Za/shad/commit/5798c47))
- Release 0.1.4 ([9a32567](https://github.com/Saeid-Za/shad/commit/9a32567))
- Cleanup ([0b39d05](https://github.com/Saeid-Za/shad/commit/0b39d05))
- Add nuxt fixtures ([54e8f52](https://github.com/Saeid-Za/shad/commit/54e8f52))
- Bump version ([e5984a1](https://github.com/Saeid-Za/shad/commit/e5984a1))
- Update pnpm-lock ([e730a73](https://github.com/Saeid-Za/shad/commit/e730a73))
- Bump version 0.1.6 ([e8ece02](https://github.com/Saeid-Za/shad/commit/e8ece02))
- Add testing workflows ([08f6b28](https://github.com/Saeid-Za/shad/commit/08f6b28))
- Bump version 0.1.7 ([cb2ac06](https://github.com/Saeid-Za/shad/commit/cb2ac06))
- Add contribution.md ([05da2d8](https://github.com/Saeid-Za/shad/commit/05da2d8))
- Release v0.1.8 ([f4701c3](https://github.com/Saeid-Za/shad/commit/f4701c3))
### ✅ Tests
- Add test not fully functioning yet ([bc545c9](https://github.com/Saeid-Za/shad/commit/bc545c9))
- Improve testing for cli ([afcdbf9](https://github.com/Saeid-Za/shad/commit/afcdbf9))
### 🎨 Styles
- Prevent linked whitespace in footer ([#37](https://github.com/Saeid-Za/shad/pull/37))
### ❤️ Contributors
- Zernonia ([@zernonia](http://github.com/zernonia))
- Dunqing <dengqing0821@gmail.com>
- Ahmed Mayara ([@ahmedmayara](http://github.com/ahmedmayara))
- Selemondev ([@selemondev](http://github.com/selemondev))
- Libon ([@libondev](http://github.com/libondev))
- Sadegh Barati ([@sadeghbarati](http://github.com/sadeghbarati))
- Josh King ([@kn0wn](http://github.com/kn0wn))
- Nicolas Hedger ([@nhedger](http://github.com/nhedger))
- Nikolas Evers

7
changelog.config.ts Normal file
View File

@ -0,0 +1,7 @@
import type { ChangelogConfig } from 'changelogen'
const config: Partial<ChangelogConfig> = {
repo: 'radix-vue/shadcn-vue',
}
export default config

143
scripts/changelog.ts Normal file
View File

@ -0,0 +1,143 @@
import { execSync } from 'node:child_process'
import { consola } from 'consola'
import { versionBump } from 'bumpp'
import { type SemverBumpType, generateMarkDown, getCurrentGitBranch, loadChangelogConfig } from 'changelogen'
import { inc } from 'semver'
import { $fetch } from 'ofetch'
import { determineBumpType, getContributors, getLatestCommits, isGitClean, loadWorkspace, updateChangelogFile } from './utils'
import 'dotenv/config'
const remoteName = 'origin'
// Taken from Nuxt Repo (https://github.com/nuxt/nuxt/tree/main/scripts)
async function main() {
const isClean = isGitClean()
if (!isClean) {
consola.error('Git Repository is not clean, there are changes that are not commited yet.')
process.exit(1)
}
const workspace = await loadWorkspace(process.cwd())
const currentVersion = workspace.find('www').data.version
const bumpType: SemverBumpType = await determineBumpType() || 'patch'
const inferredNewVersion = inc(currentVersion, bumpType)
const isInferredOk = await consola.prompt(`Staring to release '${bumpType}' version from v${currentVersion} -> v${inferredNewVersion}, is this OK?`, {
type: 'confirm',
})
// exit process when no valid input is recieved
if (typeof isInferredOk !== 'boolean')
process.exit()
let newVersion: string | null = null
if (isInferredOk) {
newVersion = inferredNewVersion
}
else {
consola.info('Please select next version manually.')
const result = await versionBump({
currentVersion,
files: [],
})
newVersion = result.newVersion
}
consola.info(`Releasing version: v${newVersion}`)
const config = await loadChangelogConfig(process.cwd(), {})
const repo = config.repo.repo!
const releaseBranch = await getCurrentGitBranch()
consola.info(`Fetching latest commits ...`)
const allCommits = await getLatestCommits()
const filteredCommits = allCommits.filter((commit) => {
const isChore = commit.type === 'chore'
const isDependencyScope = commit.scope === 'deps'
const isBreaking = commit.isBreaking
const isTypeInConfig = config.types[commit.type]
return isTypeInConfig && (!isChore || !isDependencyScope || isBreaking)
})
consola.info(`Generating changelog ...`)
const changelog = await generateMarkDown(filteredCommits, config)
// Create and push a branch with bumped versions if it has not already been created
const branchExists = execSync(`git ls-remote --heads ${remoteName} v${newVersion}`).toString().trim().length > 0
if (!branchExists) {
consola.info(`Pushing a new branch named v${newVersion} to ${remoteName}`)
execSync(`git checkout -b v${newVersion}`, { stdio: 'ignore' })
for (const pkg of workspace.packages.filter(p => !p.data.private))
workspace.setVersion(pkg.data.name, newVersion!)
await workspace.save()
execSync(`git commit -am v${newVersion}`, { stdio: 'ignore' })
consola.info(`Updating changelog.md file ...`)
updateChangelogFile(`v${currentVersion}`, `v${newVersion}`)
execSync(`git commit --amend --no-edit`, { stdio: 'ignore' })
execSync(`git push -u ${remoteName} v${newVersion}`, { stdio: 'ignore' })
}
// Get the current PR for this release, if it exists
consola.info(`Fetching the created PR ...`)
const [currentPR] = await $fetch<any[]>(`https://api.github.com/repos/${repo}/pulls?head=v${newVersion}`)
const contributors = await getContributors(repo, process.env.githubToken!)
const releaseNotes = [
currentPR?.body,
changelog
.replace(/### ❤️ Contributors[\s\S]*$/, ''),
'### ❤️ Contributors',
contributors.map(c => `- ${c.name} (@${c.username})`).join('\n'),
].join('\n')
// Create a PR with release notes if none exists
if (!currentPR) {
consola.info(`Creating v${newVersion} PR with release notes`)
await $fetch(`https://api.github.com/repos/${repo}/pulls`, {
method: 'POST',
headers: {
Authorization: `token ${process.env.githubToken}`,
},
body: {
title: `v${newVersion}`,
head: `v${newVersion}`,
base: releaseBranch,
body: releaseNotes,
draft: true,
},
})
}
else {
consola.info(`Updating v${newVersion} PR with release notes`)
await $fetch(`https://api.github.com/repos/${repo}/pulls/${currentPR.number}`, {
method: 'PATCH',
headers: {
Authorization: `token ${process.env.githubToken}`,
},
body: {
body: releaseNotes,
},
})
}
consola.success(`Done, check https://github.com/${repo}/pulls`)
}
main().catch((err) => {
consola.error(err)
process.exit(1)
})

150
scripts/utils.ts Normal file
View File

@ -0,0 +1,150 @@
import { execSync } from 'node:child_process'
import { promises as fsp } from 'node:fs'
import { $fetch } from 'ofetch'
import { resolve } from 'pathe'
import { globby } from 'globby'
import { execaSync } from 'execa'
import { determineSemverChange, getGitDiff, loadChangelogConfig, parseCommits } from 'changelogen'
export interface Dep {
name: string
range: string
type: string
}
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T
export type Package = ThenArg<ReturnType<typeof loadPackage>>
export async function loadPackage(dir: string) {
const pkgPath = resolve(dir, 'package.json')
const data = JSON.parse(await fsp.readFile(pkgPath, 'utf-8').catch(() => '{}'))
const save = () => fsp.writeFile(pkgPath, `${JSON.stringify(data, null, 2)}\n`)
const updateDeps = (reviver: (dep: Dep) => Dep | void) => {
for (const type of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) {
if (!data[type])
continue
for (const e of Object.entries(data[type])) {
const dep: Dep = { name: e[0], range: e[1] as string, type }
delete data[type][dep.name]
const updated = reviver(dep) || dep
data[updated.type] = data[updated.type] || {}
data[updated.type][updated.name] = updated.range
}
}
}
return {
dir,
data,
save,
updateDeps,
}
}
export async function loadWorkspace(dir: string) {
const workspacePkg = await loadPackage(dir)
const pkgDirs = (await globby(['packages/*', 'apps/*'], { onlyDirectories: true })).sort()
const packages: Package[] = []
for (const pkgDir of pkgDirs) {
const pkg = await loadPackage(pkgDir)
if (!pkg.data.name)
continue
packages.push(pkg)
}
const find = (name: string) => {
const pkg = packages.find(pkg => pkg.data.name === name)
if (!pkg)
throw new Error(`Workspace package not found: ${name}`)
return pkg
}
const rename = (from: string, to: string) => {
find(from).data._name = find(from).data.name
find(from).data.name = to
for (const pkg of packages) {
pkg.updateDeps((dep) => {
if (dep.name === from && !dep.range.startsWith('npm:'))
dep.range = `npm:${to}@${dep.range}`
})
}
}
const setVersion = (name: string, newVersion: string, opts: { updateDeps?: boolean } = {}) => {
find(name).data.version = newVersion
if (!opts.updateDeps)
return
for (const pkg of packages) {
pkg.updateDeps((dep) => {
if (dep.name === name)
dep.range = newVersion
})
}
}
const save = () => Promise.all(packages.map(pkg => pkg.save()))
return {
dir,
workspacePkg,
packages,
save,
find,
rename,
setVersion,
}
}
export async function determineBumpType() {
const config = await loadChangelogConfig(process.cwd())
const commits = await getLatestCommits()
const bumpType = determineSemverChange(commits, config)
return bumpType === 'major' ? 'minor' : bumpType
}
export async function getLatestCommits() {
const config = await loadChangelogConfig(process.cwd())
const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0']).stdout
return parseCommits(await getGitDiff(latestTag), config)
}
export async function getContributors(repo: string, token: string) {
const contributors = [] as Array<{ name: string, username: string }>
const emails = new Set<string>()
const latestTag = execSync('git describe --tags --abbrev=0').toString().trim()
const rawCommits = await getGitDiff(latestTag)
for (const commit of rawCommits) {
if (emails.has(commit.author.email) || commit.author.name === 'renovate[bot]')
continue
const { author } = await $fetch<{ author: { login: string, email: string } }>(`https://api.github.com/repos/${repo}/commits/${commit.shortHash}`, {
headers: {
Accept: 'application/vnd.github.v3+json',
Authorization: `token ${token}`,
},
})
if (!contributors.some(c => c.username === author.login))
contributors.push({ name: commit.author.name, username: author.login })
emails.add(author.email)
}
return contributors
}
export function isGitClean() {
const result = execSync('git status --porcelain').toString().trim()
return result.length === 0
}
export function updateChangelogFile(fromCommit: string, toCommit: string) {
execSync(`npx changelogen@latest --output --from ${fromCommit} --to ${toCommit}`)
}