diff --git a/.build/release-notes.ts b/.build/release-notes.ts index a1c86432d..e12468435 100644 --- a/.build/release-notes.ts +++ b/.build/release-notes.ts @@ -28,9 +28,7 @@ interface PackageJson { const { version } = JSON.parse(readFileSync(join(repoRoot, 'core', 'package.json'), 'utf8')) as PackageJson -// The `## ` block of a changelog, without its heading. The date line -// `stamp-changelog-dates` puts under the heading is not a bullet, so `bullets()` -// drops it. +// The `## ` block of a changelog, without its heading. const versionBlock = (changelog: string): string => { const lines = changelog.split('\n') const start = lines.findIndex((line) => line.trim() === `## ${version}`) diff --git a/.build/stamp-changelog-dates.ts b/.build/stamp-changelog-dates.ts deleted file mode 100644 index 7bdb372d5..000000000 --- a/.build/stamp-changelog-dates.ts +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env node -// Adds the release date under the heading `changeset version` has just written, -// so every entry in a changelog reads: -// -// ## 1.5.0 -// -// _2026-09-05_ -// -// The date is a line of its own, not part of the heading: changesets/action -// builds the version pull request body from the block under the heading whose -// text is exactly the version, and a `## 1.5.0 - 2026-09-05` heading made it -// fall back to the whole file, which blew the body size limit (#2960). -// -// The date is the day the version pull request was last regenerated, which the -// bot redoes on every push to dev. It can therefore be a day or two before the -// release when nothing lands in between. -// -// Run: pnpm run stamp-changelog-dates (part of `pnpm run version`) - -import { existsSync, readFileSync, writeFileSync } from 'node:fs' -import { join, dirname } from 'node:path' -import { fileURLToPath } from 'node:url' - -const __dirname = dirname(fileURLToPath(import.meta.url)) -const repoRoot = join(__dirname, '..') - -const packages = ['core', 'preview', 'docs'] - -interface PackageJson { - version: string -} - -const today = new Date().toISOString().slice(0, 10) -const stamped: string[] = [] - -for (const name of packages) { - const changelog = join(repoRoot, name, 'CHANGELOG.md') - if (!existsSync(changelog)) continue - - const { version } = JSON.parse(readFileSync(join(repoRoot, name, 'package.json'), 'utf8')) as PackageJson - const content = readFileSync(changelog, 'utf8') - - const lines = content.split('\n') - const index = lines.findIndex((line) => line.trim() === `## ${version}`) - if (index === -1) continue - - // Already stamped, so running this twice changes nothing. - if (/^_\d{4}-\d{2}-\d{2}_$/.test(lines[index + 2] ?? '')) continue - - lines.splice(index + 1, 0, '', `_${today}_`) - writeFileSync(changelog, lines.join('\n')) - stamped.push(`${name}/CHANGELOG.md: ## ${version} (${today})`) -} - -console.log(stamped.length > 0 ? stamped.join('\n') : 'Nothing to stamp.') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99271e708..873c5e37f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,6 +44,29 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # `changesets/action` fills the version pull request with one section per + # package (`## @tabler/core@1.5.1`, …), so a changeset that touches several + # packages shows up several times. Replace that body with the same notes the + # GitHub release gets: the intro from `.github/release-notes/.md` + # and the changes grouped as core / demo / docs, each listed once. The + # action rewrites the body on every push to dev, so this runs right after it. + - name: Write the release notes into the version pull request + if: steps.changesets.outputs.pr-number != '' + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ steps.changesets.outputs.pr-number }} + run: | + git fetch --depth=1 origin changeset-release/dev + git checkout --force --detach origin/changeset-release/dev + version=$(node -p "require('./core/package.json').version") + { + echo "Merging this pull request publishes \`@tabler/core@${version}\` to npm and creates the GitHub release. It is regenerated on every push to \`dev\`." + echo + pnpm run --silent release-notes + } > "${RUNNER_TEMP}/pr-body.md" + gh pr edit "${PR_NUMBER}" --body-file "${RUNNER_TEMP}/pr-body.md" + # `pnpm run build` above zipped preview/dist into packages-zip/; attach it to # the GitHub release that changesets/action just created for @tabler/core. - name: Attach the preview zip to the GitHub release diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 8d39e8fa0..c955ad001 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -2,8 +2,6 @@ ## 1.5.0 -_2026-09-05_ - ### Minor Changes - 9ea657b: Added `.text-gray-50` through `.text-gray-950` utility classes alongside the existing `.bg-gray-*` utilities. @@ -122,8 +120,6 @@ _2026-09-05_ ## 1.4.0 -_2025-07-13_ - ### Minor Changes - 9951fe9: Enhance button and hover animations @@ -143,24 +139,18 @@ _2025-07-13_ ## 1.3.2 -_2025-05-19_ - ### Patch Changes - 446c34e: Fix README file in core package ## 1.3.1 -_2025-05-19_ - ### Patch Changes - a7f73d7: Fix README file in core package ## 1.3.0 -_2025-05-19_ - ### Minor Changes - a1af801: Add FullCalendar integration @@ -191,8 +181,6 @@ _2025-05-19_ ## 1.2.0 -_2025-04-16_ - ### Minor Changes - c59bc9d: Add gradient background utilities @@ -228,16 +216,12 @@ _2025-04-16_ ## 1.1.1 -_2025-03-01_ - ### Patch Changes - f29c911: Fix Documentation structure ## 1.1.0 -_2025-03-01_ - ### Minor Changes - d3ae77c: Enable `scrollSpy` in `countup` module @@ -269,8 +253,6 @@ _2025-03-01_ ## 1.0.0 -_2025-01-28_ - ### Minor Changes - c276a8b: Add new `Tag` component @@ -393,8 +375,6 @@ _2025-01-28_ ## 1.0.0-beta24 -_2025-01-11_ - - Enhanced documentation. - Updated illustrations and improved SVG handling in HTML. - Updated copyright year in LICENSE file to 2025. @@ -402,8 +382,6 @@ _2025-01-11_ ## 1.0.0-beta23 -_2025-01-07_ - - Documentation improvements. - Added countup functionality and updated documentation example. - Do not display empty `
`. @@ -441,8 +419,6 @@ _2025-01-07_ ## 1.0.0-beta22 -_2025-01-02_ - - Fixed `@charset` CSS declaration in bundle. - Fixed cells with inline icons. - Fixed padding in code blocks. @@ -466,8 +442,6 @@ _2025-01-02_ ## 1.0.0-beta21 -_2024-09-08_ - - Updated dependencies. - Updated Tabler Icons to v3.14.0 and the import script. - Fixed invisible scrollbar in dark mode when navigating the preview. @@ -505,8 +479,6 @@ _2024-09-08_ ## 1.0.0-beta20 -_2023-08-24_ - - Update `bootstrap` to v5.3.1 - Add new `Chat` component - Add new `Tag` component @@ -533,8 +505,6 @@ _2023-08-24_ ## 1.0.0-beta19 -_2023-05-15_ - - Add customizable Star Ratings component using `star-rating.js` library (#1571) - Add new "Filled" section to Icons page (#1574) - Fix form controls bugs in dark mode (#1573) @@ -543,8 +513,6 @@ _2023-05-15_ ## 1.0.0-beta18 -_2023-05-14_ - - new page: Cookie banner - Unify dark mode with latest Bootstrap API and improve dark mode elements (#1561) - Update Tabler Icons to version 2.18 with 18 new icons added (#1560) @@ -568,8 +536,6 @@ _2023-05-14_ ## 1.0.0-beta17 -_2023-01-28_ - - update `bootstrap` to v5.3.0 - update icons to v2.1.2 - add 72 new brands, browsers logos update @@ -592,8 +558,6 @@ _2023-01-28_ ## 1.0.0-beta16 -_2022-11-12_ - - new `Photogrid` page - `Steps` component improvements - fix #1348: Make job listing responsive for smaller devices @@ -608,8 +572,6 @@ _2022-11-12_ ## 1.0.0-beta15 -_2022-11-01_ - - new `badges` page - `` styling - update icons to v1.109.0 @@ -627,15 +589,11 @@ _2022-11-01_ ## 1.0.0-beta14 -_2022-10-21_ - - fix active items in dark mode - update Jekyll to newest version ## 1.0.0-beta13 -_2022-10-18_ - - update Bootstrap to 5.2.1, update dependencies - new `tracking` component - new radio button version of `form-imagecheck` @@ -666,8 +624,6 @@ _2022-10-18_ ## 1.0.0-beta12 -_2022-09-19_ - - new "Job listing" page - new "Sign in with cover" page - new "Logs" page @@ -693,8 +649,6 @@ _2022-09-19_ ## 1.0.0-beta11 -_2022-08-05_ - - new `Dropzone` component - new `Lightbox` component - new `TinyMCS` component @@ -710,8 +664,6 @@ _2022-08-05_ ## 1.0.0-beta10 -_2022-04-29_ - - new `datatable` component - update Tabler Icons to v1.67 - fix: #1024 - fix Tom-select in dark mode @@ -721,8 +673,6 @@ _2022-04-29_ ## 1.0.0-beta9 -_2022-02-26_ - - fix: #1061 - list group item colors in light and dark modes - new `tasks` dashboard - fix: #1059 - upload button in form element in dark view has problem @@ -736,8 +686,6 @@ _2022-02-26_ ## 1.0.0-beta8 -_2022-02-05_ - - update dependencies - new vector maps demos - fixes update map on resize @@ -747,8 +695,6 @@ _2022-02-05_ ## 1.0.0-beta7 -_2022-02-05_ - - fix: #1019 - project-overview.html link not working - fix: #1010 - card with bottom tabs has incorrect border radius - uptime monitor mobile fixes @@ -762,8 +708,6 @@ _2022-02-05_ ## 1.0.0-beta6 -_2022-01-18_ - - pricing cards fix - fix bug `fw-...`, `.fs-...` is missed (#987) - avatar class fix @@ -777,8 +721,6 @@ _2022-01-18_ ## 1.0.0-beta5 -_2021-12-07_ - **Tabler has finally lived to see dark mode! 🌝🌚** - **Dark mode enabled!** @@ -796,8 +738,6 @@ _2021-12-07_ ## 1.0.0-beta4 -_2021-10-24_ - - upgrade required node.js version to 14 - upgrade Bootstrap to 5.1 - upgrade dependencies @@ -806,8 +746,6 @@ _2021-10-24_ ## 1.0.0-beta3 -_2021-05-08_ - - upgrade Bootstrap to 5.0 - upgrade dependencies - change `$border-radius-pill` variable @@ -815,8 +753,6 @@ _2021-05-08_ ## 1.0.0-beta2 -_2021-03-29_ - - update dependencies - `li` marker fix - page wrapper, nav fixes @@ -830,8 +766,6 @@ _2021-03-29_ ## 1.0.0-beta -_2021-02-17_ - **Initial beta release of Tabler v1.0! Lots more coming soon though 😁** - update Bootstrap to 5.0.0-beta2 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 333c70b25..9b392fa23 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,8 +2,6 @@ ## 1.5.0 -_2026-09-05_ - ### Minor Changes - 4a97921: Added `Accordion` documentation page with usage variants and Bootstrap `collapse` behavior examples. diff --git a/package.json b/package.json index 42b86ea73..3f6d3c982 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "test": "turbo test", "test:watch": "turbo test:watch", "test:coverage": "turbo test:coverage", - "version": "changeset version && pnpm run stamp-changelog-dates", - "stamp-changelog-dates": "tsx .build/stamp-changelog-dates.ts", + "version": "changeset version", "publish": "changeset publish", "format:md": "tsx .build/reformat-mdx.mts", "html-diff": "tsx .build/html-diff.ts check", diff --git a/preview/CHANGELOG.md b/preview/CHANGELOG.md index bd607d8ca..56e9db932 100644 --- a/preview/CHANGELOG.md +++ b/preview/CHANGELOG.md @@ -2,8 +2,6 @@ ## 1.5.0 -_2026-09-05_ - ### Minor Changes - 09d419a: Added a `charts-advanced` page and docs for two y-axes, chart annotations, a zoom brush and synced chart groups.