mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Redirect the changelog page and date every changelog heading (#2951)
This commit is contained in:
1 parent
f07d46f970
commit
632b69f5e4
12 files changed
+113
-129
No files matched your search
+19
-11
@@ -137,9 +137,15 @@ const crawl = async (browser: Browser, base: string, paths: string[]) => {
|
|||||||
const path = queue.shift()!
|
const path = queue.shift()!
|
||||||
const page: Page = await context.newPage()
|
const page: Page = await context.newPage()
|
||||||
const report: PageReport = { url: path, errors: [], warnings: [] }
|
const report: PageReport = { url: path, errors: [], warnings: [] }
|
||||||
page.on('pageerror', (e) => report.errors.push(`script error: ${String(e).slice(0, 160)}`))
|
// A page can send the browser off the site, like changelog.html does. What
|
||||||
|
// it lands on is someone else's, so nothing it logs, throws or contains is
|
||||||
|
// ours to report.
|
||||||
|
const onSite = () => page.url().startsWith(base)
|
||||||
|
page.on('pageerror', (e) => {
|
||||||
|
if (onSite()) report.errors.push(`script error: ${String(e).slice(0, 160)}`)
|
||||||
|
})
|
||||||
page.on('console', (m) => {
|
page.on('console', (m) => {
|
||||||
if (m.type() !== 'error') return
|
if (m.type() !== 'error' || !onSite()) return
|
||||||
const text = m.text()
|
const text = m.text()
|
||||||
if (!CONSOLE_IGNORE.some((re) => re.test(text))) report.warnings.push(`console: ${text.slice(0, 160)}`)
|
if (!CONSOLE_IGNORE.some((re) => re.test(text))) report.warnings.push(`console: ${text.slice(0, 160)}`)
|
||||||
})
|
})
|
||||||
@@ -150,15 +156,17 @@ const crawl = async (browser: Browser, base: string, paths: string[]) => {
|
|||||||
try {
|
try {
|
||||||
await page.goto(base + path, { waitUntil: 'load', timeout: 60_000 })
|
await page.goto(base + path, { waitUntil: 'load', timeout: 60_000 })
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(500)
|
||||||
const r = (await page.evaluate(INSPECT)) as Inspection
|
if (onSite()) {
|
||||||
for (const id of r.duplicateIds) if (!VENDOR_ID_PREFIXES.some((p) => id.startsWith(p))) report.errors.push(`duplicate id "${id}"`)
|
const r = (await page.evaluate(INSPECT)) as Inspection
|
||||||
for (const t of r.missingTargets) report.errors.push(`no element for ${t}`)
|
for (const id of r.duplicateIds) if (!VENDOR_ID_PREFIXES.some((p) => id.startsWith(p))) report.errors.push(`duplicate id "${id}"`)
|
||||||
for (const n of r.nested) report.errors.push(`nested interactive: ${n}`)
|
for (const t of r.missingTargets) report.errors.push(`no element for ${t}`)
|
||||||
for (const src of r.imgNoAlt) report.warnings.push(`img without alt: ${src}`)
|
for (const n of r.nested) report.errors.push(`nested interactive: ${n}`)
|
||||||
for (const html of r.unnamed) report.warnings.push(`no accessible name: ${html}`)
|
for (const src of r.imgNoAlt) report.warnings.push(`img without alt: ${src}`)
|
||||||
for (const href of r.links) {
|
for (const html of r.unnamed) report.warnings.push(`no accessible name: ${html}`)
|
||||||
const key = href.split(/[?#]/)[0]!
|
for (const href of r.links) {
|
||||||
if (!links.has(key)) links.set(key, path)
|
const key = href.split(/[?#]/)[0]!
|
||||||
|
if (!links.has(key)) links.set(key, path)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
report.errors.push(`navigation: ${String(e).slice(0, 160)}`)
|
report.errors.push(`navigation: ${String(e).slice(0, 160)}`)
|
||||||
|
|||||||
@@ -31,7 +31,11 @@ const { version } = JSON.parse(readFileSync(join(repoRoot, 'core', 'package.json
|
|||||||
// The `## <version>` block of a changelog, without its heading.
|
// The `## <version>` block of a changelog, without its heading.
|
||||||
const versionBlock = (changelog: string): string => {
|
const versionBlock = (changelog: string): string => {
|
||||||
const lines = changelog.split('\n')
|
const lines = changelog.split('\n')
|
||||||
const start = lines.findIndex((line) => line.trim() === `## ${version}`)
|
// `## 1.5.0`, or `## 1.5.0 - 2026-09-05` once the date has been stamped on it.
|
||||||
|
const start = lines.findIndex((line) => {
|
||||||
|
const heading = line.trim()
|
||||||
|
return heading === `## ${version}` || heading.startsWith(`## ${version} - `)
|
||||||
|
})
|
||||||
if (start === -1) return ''
|
if (start === -1) return ''
|
||||||
|
|
||||||
const rest = lines.slice(start + 1)
|
const rest = lines.slice(start + 1)
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
// Adds the release date to the heading `changeset version` has just written, so
|
||||||
|
// every entry in a changelog reads `## 1.5.0 - 2026-09-05`.
|
||||||
|
//
|
||||||
|
// 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')
|
||||||
|
|
||||||
|
// Only a heading without a date, so running this twice changes nothing.
|
||||||
|
const lines = content.split('\n')
|
||||||
|
const index = lines.findIndex((line) => line.trim() === `## ${version}`)
|
||||||
|
if (index === -1) continue
|
||||||
|
|
||||||
|
lines[index] = `## ${version} - ${today}`
|
||||||
|
writeFileSync(changelog, lines.join('\n'))
|
||||||
|
stamped.push(`${name}/CHANGELOG.md: ## ${version} - ${today}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(stamped.length > 0 ? stamped.join('\n') : 'Nothing to stamp.')
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tabler/preview": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Updated the changelog page to redirect to tabler.io/changelog instead of rendering `CHANGELOG.md`.
|
||||||
+31
-31
@@ -1,6 +1,6 @@
|
|||||||
# @tabler/core
|
# @tabler/core
|
||||||
|
|
||||||
## 1.4.0
|
## 1.4.0 - 2025-07-13
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
@@ -19,19 +19,19 @@
|
|||||||
- 666a296: Fix list group item hoverable only with `.list-group-hoverable` class
|
- 666a296: Fix list group item hoverable only with `.list-group-hoverable` class
|
||||||
- cfd4cb6: Fix `.pagination-link` hover styles to non-active items
|
- cfd4cb6: Fix `.pagination-link` hover styles to non-active items
|
||||||
|
|
||||||
## 1.3.2
|
## 1.3.2 - 2025-05-19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- 446c34e: Fix README file in core package
|
- 446c34e: Fix README file in core package
|
||||||
|
|
||||||
## 1.3.1
|
## 1.3.1 - 2025-05-19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- a7f73d7: Fix README file in core package
|
- a7f73d7: Fix README file in core package
|
||||||
|
|
||||||
## 1.3.0
|
## 1.3.0 - 2025-05-19
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
- e675389: Fix missing border-radius to `.card-header-tabs`
|
- e675389: Fix missing border-radius to `.card-header-tabs`
|
||||||
- 9007e73: Fix FAQ accordion structure
|
- 9007e73: Fix FAQ accordion structure
|
||||||
|
|
||||||
## 1.2.0
|
## 1.2.0 - 2025-04-16
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
@@ -96,13 +96,13 @@
|
|||||||
- 6d6d1bd: Add responsive font size for form controls on mobile devices
|
- 6d6d1bd: Add responsive font size for form controls on mobile devices
|
||||||
- 6c566cf: Add new advanced table example
|
- 6c566cf: Add new advanced table example
|
||||||
|
|
||||||
## 1.1.1
|
## 1.1.1 - 2025-03-01
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- f29c911: Fix Documentation structure
|
- f29c911: Fix Documentation structure
|
||||||
|
|
||||||
## 1.1.0
|
## 1.1.0 - 2025-03-01
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
@@ -255,14 +255,14 @@
|
|||||||
- 94b83d4: Add support for changeset tool for more efficient and organized code changes
|
- 94b83d4: Add support for changeset tool for more efficient and organized code changes
|
||||||
- c51ff28: Fix colors in date range datepicker
|
- c51ff28: Fix colors in date range datepicker
|
||||||
|
|
||||||
## `1.0.0-beta24` - 2025-01-11
|
## 1.0.0-beta24 - 2025-01-11
|
||||||
|
|
||||||
- Enhanced documentation.
|
- Enhanced documentation.
|
||||||
- Updated illustrations and improved SVG handling in HTML.
|
- Updated illustrations and improved SVG handling in HTML.
|
||||||
- Updated copyright year in LICENSE file to 2025.
|
- Updated copyright year in LICENSE file to 2025.
|
||||||
- Added marketing pages plugin.
|
- Added marketing pages plugin.
|
||||||
|
|
||||||
## `1.0.0-beta23` - 2025-01-07
|
## 1.0.0-beta23 - 2025-01-07
|
||||||
|
|
||||||
- Documentation improvements.
|
- Documentation improvements.
|
||||||
- Added countup functionality and updated documentation example.
|
- Added countup functionality and updated documentation example.
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
- Fixed icon issues.
|
- Fixed icon issues.
|
||||||
- Fixed URL in documentation.
|
- Fixed URL in documentation.
|
||||||
|
|
||||||
## `1.0.0-beta22` - 2025-01-02
|
## 1.0.0-beta22 - 2025-01-02
|
||||||
|
|
||||||
- Fixed `@charset` CSS declaration in bundle.
|
- Fixed `@charset` CSS declaration in bundle.
|
||||||
- Fixed cells with inline icons.
|
- Fixed cells with inline icons.
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
- Read changelog from `CHANGELOG.md` file.
|
- Read changelog from `CHANGELOG.md` file.
|
||||||
- Initialized VS Code configuration.
|
- Initialized VS Code configuration.
|
||||||
|
|
||||||
## `1.0.0-beta21` - 2024-09-8
|
## 1.0.0-beta21 - 2024-09-08
|
||||||
|
|
||||||
- Updated dependencies.
|
- Updated dependencies.
|
||||||
- Updated Tabler Icons to v3.14.0 and the import script.
|
- Updated Tabler Icons to v3.14.0 and the import script.
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
- Improved heights, scrolls, and layouts in Docs examples.
|
- Improved heights, scrolls, and layouts in Docs examples.
|
||||||
- Fixed flags display in preview.
|
- Fixed flags display in preview.
|
||||||
|
|
||||||
## `1.0.0-beta20` - 2023-08-24
|
## 1.0.0-beta20 - 2023-08-24
|
||||||
|
|
||||||
- Update `bootstrap` to v5.3.1
|
- Update `bootstrap` to v5.3.1
|
||||||
- Add new `Chat` component
|
- Add new `Chat` component
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
- `Dockerfile` fix
|
- `Dockerfile` fix
|
||||||
- Switch from `npm` to `pnpm` for faster package installation
|
- Switch from `npm` to `pnpm` for faster package installation
|
||||||
|
|
||||||
## `1.0.0-beta19` - 2023-05-15
|
## 1.0.0-beta19 - 2023-05-15
|
||||||
|
|
||||||
- Add customizable Star Ratings component using `star-rating.js` library (#1571)
|
- Add customizable Star Ratings component using `star-rating.js` library (#1571)
|
||||||
- Add new "Filled" section to Icons page (#1574)
|
- Add new "Filled" section to Icons page (#1574)
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
- Fix text color in dark version of navbar (#1569)
|
- Fix text color in dark version of navbar (#1569)
|
||||||
- Changelog update
|
- Changelog update
|
||||||
|
|
||||||
## `1.0.0-beta18` - 2023-05-14
|
## 1.0.0-beta18 - 2023-05-14
|
||||||
|
|
||||||
- new page: Cookie banner
|
- new page: Cookie banner
|
||||||
- Unify dark mode with latest Bootstrap API and improve dark mode elements (#1561)
|
- Unify dark mode with latest Bootstrap API and improve dark mode elements (#1561)
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
- Dark mode lite colors improvement
|
- Dark mode lite colors improvement
|
||||||
- Fix non full width selects (#1392)
|
- Fix non full width selects (#1392)
|
||||||
|
|
||||||
## `1.0.0-beta17` - 2023-01-28
|
## 1.0.0-beta17 - 2023-01-28
|
||||||
|
|
||||||
- update `bootstrap` to v5.3.0
|
- update `bootstrap` to v5.3.0
|
||||||
- update icons to v2.1.2
|
- update icons to v2.1.2
|
||||||
@@ -438,7 +438,7 @@
|
|||||||
- move `@tabler/icons` to `dev-dependencies`
|
- move `@tabler/icons` to `dev-dependencies`
|
||||||
- fix #1370: avatar stacked list is not stacked anymore
|
- fix #1370: avatar stacked list is not stacked anymore
|
||||||
|
|
||||||
## `1.0.0-beta16` - 2022-11-12
|
## 1.0.0-beta16 - 2022-11-12
|
||||||
|
|
||||||
- new `Photogrid` page
|
- new `Photogrid` page
|
||||||
- `Steps` component improvements
|
- `Steps` component improvements
|
||||||
@@ -452,7 +452,7 @@
|
|||||||
- homepage navbar fix
|
- homepage navbar fix
|
||||||
- fix #1262 - `.bg-opacity-xx` class is not functioning properly
|
- fix #1262 - `.bg-opacity-xx` class is not functioning properly
|
||||||
|
|
||||||
## `1.0.0-beta15` - 2022-11-01
|
## 1.0.0-beta15 - 2022-11-01
|
||||||
|
|
||||||
- new `badges` page
|
- new `badges` page
|
||||||
- `<kbd>` styling
|
- `<kbd>` styling
|
||||||
@@ -469,12 +469,12 @@
|
|||||||
- `btn-actions` fixes
|
- `btn-actions` fixes
|
||||||
- replace `$text-muted` to css variable
|
- replace `$text-muted` to css variable
|
||||||
|
|
||||||
## `1.0.0-beta14` - 2022-10-21
|
## 1.0.0-beta14 - 2022-10-21
|
||||||
|
|
||||||
- fix active items in dark mode
|
- fix active items in dark mode
|
||||||
- update Jekyll to newest version
|
- update Jekyll to newest version
|
||||||
|
|
||||||
## `1.0.0-beta13` - 2022-10-18
|
## 1.0.0-beta13 - 2022-10-18
|
||||||
|
|
||||||
- update Bootstrap to 5.2.1, update dependencies
|
- update Bootstrap to 5.2.1, update dependencies
|
||||||
- new `tracking` component
|
- new `tracking` component
|
||||||
@@ -504,7 +504,7 @@
|
|||||||
- fix #1275 - remove last border-right on progress bar
|
- fix #1275 - remove last border-right on progress bar
|
||||||
- fix #1261 - broken offcanvas bg
|
- fix #1261 - broken offcanvas bg
|
||||||
|
|
||||||
## `1.0.0-beta12` - 2022-09-19
|
## 1.0.0-beta12 - 2022-09-19
|
||||||
|
|
||||||
- new "Job listing" page
|
- new "Job listing" page
|
||||||
- new "Sign in with cover" page
|
- new "Sign in with cover" page
|
||||||
@@ -529,7 +529,7 @@
|
|||||||
- fix form elements demo page radio buttons
|
- fix form elements demo page radio buttons
|
||||||
- replace `gulp-minify` with `gulp-terser`
|
- replace `gulp-minify` with `gulp-terser`
|
||||||
|
|
||||||
## `1.0.0-beta11` - 2022-07-05
|
## 1.0.0-beta11 - 2022-08-05
|
||||||
|
|
||||||
- new `Dropzone` component
|
- new `Dropzone` component
|
||||||
- new `Lightbox` component
|
- new `Lightbox` component
|
||||||
@@ -544,7 +544,7 @@
|
|||||||
- fix: #1125 incorrect chart display in the mobile version
|
- fix: #1125 incorrect chart display in the mobile version
|
||||||
- update Bootstrap to 5.2.0
|
- update Bootstrap to 5.2.0
|
||||||
|
|
||||||
## `1.0.0-beta10` - 2022-04-29
|
## 1.0.0-beta10 - 2022-04-29
|
||||||
|
|
||||||
- new `datatable` component
|
- new `datatable` component
|
||||||
- update Tabler Icons to v1.67
|
- update Tabler Icons to v1.67
|
||||||
@@ -553,7 +553,7 @@
|
|||||||
- replace !important modifier with more specific selectors (#1100)
|
- replace !important modifier with more specific selectors (#1100)
|
||||||
- new `FAQ` page
|
- new `FAQ` page
|
||||||
|
|
||||||
## `1.0.0-beta9` - 2022-02-26
|
## 1.0.0-beta9 - 2022-02-26
|
||||||
|
|
||||||
- fix: #1061 - list group item colors in light and dark modes
|
- fix: #1061 - list group item colors in light and dark modes
|
||||||
- new `tasks` dashboard
|
- new `tasks` dashboard
|
||||||
@@ -566,7 +566,7 @@
|
|||||||
- add `font-display: swap;` to improve font loading
|
- add `font-display: swap;` to improve font loading
|
||||||
- new `Boxed` layout
|
- new `Boxed` layout
|
||||||
|
|
||||||
## `1.0.0-beta8` - 2022-02-05
|
## 1.0.0-beta8 - 2022-02-05
|
||||||
|
|
||||||
- update dependencies
|
- update dependencies
|
||||||
- new vector maps demos
|
- new vector maps demos
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
- replace `badge` with `status-dot` in `navbar-notifications.html`
|
- replace `badge` with `status-dot` in `navbar-notifications.html`
|
||||||
- map tooltip fixes
|
- map tooltip fixes
|
||||||
|
|
||||||
## `1.0.0-beta7` - 2022-02-05
|
## 1.0.0-beta7 - 2022-02-05
|
||||||
|
|
||||||
- fix: #1019 - project-overview.html link not working
|
- fix: #1019 - project-overview.html link not working
|
||||||
- fix: #1010 - card with bottom tabs has incorrect border radius
|
- fix: #1010 - card with bottom tabs has incorrect border radius
|
||||||
@@ -588,7 +588,7 @@
|
|||||||
- RTL stylesheet fixes
|
- RTL stylesheet fixes
|
||||||
- new card action demos
|
- new card action demos
|
||||||
|
|
||||||
## `1.0.0-beta6` - 2022-01-18
|
## 1.0.0-beta6 - 2022-01-18
|
||||||
|
|
||||||
- pricing cards fix
|
- pricing cards fix
|
||||||
- fix bug `fw-...`, `.fs-...` is missed (#987)
|
- fix bug `fw-...`, `.fs-...` is missed (#987)
|
||||||
@@ -601,7 +601,7 @@
|
|||||||
- fix #959 - `node-sass` does not properly compile nested media queries
|
- fix #959 - `node-sass` does not properly compile nested media queries
|
||||||
- update package dependencies to newest version
|
- update package dependencies to newest version
|
||||||
|
|
||||||
## `1.0.0-beta5` - 2021-12-07
|
## 1.0.0-beta5 - 2021-12-07
|
||||||
|
|
||||||
**Tabler has finally lived to see dark mode! 🌝🌚**
|
**Tabler has finally lived to see dark mode! 🌝🌚**
|
||||||
|
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
- colors unify
|
- colors unify
|
||||||
- add `tom-select` and remove `choices.js`
|
- add `tom-select` and remove `choices.js`
|
||||||
|
|
||||||
## `1.0.0-beta4` - 2021-10-24
|
## 1.0.0-beta4 - 2021-10-24
|
||||||
|
|
||||||
- upgrade required node.js version to 14
|
- upgrade required node.js version to 14
|
||||||
- upgrade Bootstrap to 5.1
|
- upgrade Bootstrap to 5.1
|
||||||
@@ -626,14 +626,14 @@
|
|||||||
- fix #775 - litepicker not initializing
|
- fix #775 - litepicker not initializing
|
||||||
- fix `nouislider` import in dev
|
- fix `nouislider` import in dev
|
||||||
|
|
||||||
## `1.0.0-beta3` - 2021-05-08
|
## 1.0.0-beta3 - 2021-05-08
|
||||||
|
|
||||||
- upgrade Bootstrap to 5.0
|
- upgrade Bootstrap to 5.0
|
||||||
- upgrade dependencies
|
- upgrade dependencies
|
||||||
- change `$border-radius-pill` variable
|
- change `$border-radius-pill` variable
|
||||||
- badge vertical align fix
|
- badge vertical align fix
|
||||||
|
|
||||||
## `1.0.0-beta2` - 2021-03-29
|
## 1.0.0-beta2 - 2021-03-29
|
||||||
|
|
||||||
- update dependencies
|
- update dependencies
|
||||||
- `li` marker fix
|
- `li` marker fix
|
||||||
@@ -646,7 +646,7 @@
|
|||||||
- charts label fixes
|
- charts label fixes
|
||||||
- charts docs
|
- charts docs
|
||||||
|
|
||||||
## `1.0.0-beta` - 2021-02-17
|
## 1.0.0-beta - 2021-02-17
|
||||||
|
|
||||||
**Initial beta release of Tabler v1.0! Lots more coming soon though 😁**
|
**Initial beta release of Tabler v1.0! Lots more coming soon though 😁**
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"test": "turbo test",
|
"test": "turbo test",
|
||||||
"test:watch": "turbo test:watch",
|
"test:watch": "turbo test:watch",
|
||||||
"test:coverage": "turbo test:coverage",
|
"test:coverage": "turbo test:coverage",
|
||||||
"version": "changeset version",
|
"version": "changeset version && pnpm run stamp-changelog-dates",
|
||||||
|
"stamp-changelog-dates": "tsx .build/stamp-changelog-dates.ts",
|
||||||
"publish": "changeset publish",
|
"publish": "changeset publish",
|
||||||
"format:md": "tsx .build/reformat-mdx.mts",
|
"format:md": "tsx .build/reformat-mdx.mts",
|
||||||
"html-diff": "tsx .build/html-diff.ts check",
|
"html-diff": "tsx .build/html-diff.ts check",
|
||||||
|
|||||||
Generated
-44
@@ -328,9 +328,6 @@ importers:
|
|||||||
'@tabler/core':
|
'@tabler/core':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../core
|
version: link:../core
|
||||||
markdown-it:
|
|
||||||
specifier: ^15.0.1
|
|
||||||
version: 15.0.1
|
|
||||||
shiki:
|
shiki:
|
||||||
specifier: ^4.4.3
|
specifier: ^4.4.3
|
||||||
version: 4.4.3
|
version: 4.4.3
|
||||||
@@ -2404,9 +2401,6 @@ packages:
|
|||||||
argparse@2.0.1:
|
argparse@2.0.1:
|
||||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||||
|
|
||||||
argparse@3.0.1:
|
|
||||||
resolution: {integrity: sha512-nM4mHF/KM1v59ZNKX7zfusQz5wUAxR511YG8Vo6TyiV4aqhu++rbJW4v04xsWhpSsHFj66flT8P7znVpyO20xQ==}
|
|
||||||
|
|
||||||
aria-query@5.3.2:
|
aria-query@5.3.2:
|
||||||
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
|
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -2861,10 +2855,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==}
|
resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==}
|
||||||
engines: {node: '>=0.12'}
|
engines: {node: '>=0.12'}
|
||||||
|
|
||||||
entities@8.0.0:
|
|
||||||
resolution: {integrity: sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==}
|
|
||||||
engines: {node: '>=20.19.0'}
|
|
||||||
|
|
||||||
env-paths@2.2.1:
|
env-paths@2.2.1:
|
||||||
resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
|
resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@@ -3624,9 +3614,6 @@ packages:
|
|||||||
linkify-it@5.0.2:
|
linkify-it@5.0.2:
|
||||||
resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==}
|
resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==}
|
||||||
|
|
||||||
linkify-it@6.1.0:
|
|
||||||
resolution: {integrity: sha512-wJ/TwpSDTLepCrQoYWYIExIKg5Zchex2Nn5yk2mFnB+6PtdkHtyLx742md9csRjjOnGkKIS/RrbY7l8D6gT9Vw==}
|
|
||||||
|
|
||||||
list.js@2.3.1:
|
list.js@2.3.1:
|
||||||
resolution: {integrity: sha512-jnmm7DYpKtH3DxtO1E2VNCC9Gp7Wrp/FWA2JxQrZUhVJ2RCQBd57pCN6W5w6jpsfWZV0PCAbTX2NOPgyFeeZZg==}
|
resolution: {integrity: sha512-jnmm7DYpKtH3DxtO1E2VNCC9Gp7Wrp/FWA2JxQrZUhVJ2RCQBd57pCN6W5w6jpsfWZV0PCAbTX2NOPgyFeeZZg==}
|
||||||
engines: {node: ^6.0 || ^8.0 || ^10.0 || ^12.0 || >=14}
|
engines: {node: ^6.0 || ^8.0 || ^10.0 || ^12.0 || >=14}
|
||||||
@@ -3681,10 +3668,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==}
|
resolution: {integrity: sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
markdown-it@15.0.1:
|
|
||||||
resolution: {integrity: sha512-9/7gE95FNPkfUWrjJIoHZza2iLmuJlPD0UNMxPi7bxUrbCR525YZY0r+zyfes0dZI5ZZ/uNIXUJca0pJvtw41g==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
markdown-table@3.0.4:
|
markdown-table@3.0.4:
|
||||||
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
|
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
|
||||||
|
|
||||||
@@ -3764,9 +3747,6 @@ packages:
|
|||||||
mdurl@2.0.0:
|
mdurl@2.0.0:
|
||||||
resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
|
resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
|
||||||
|
|
||||||
mdurl@2.1.0:
|
|
||||||
resolution: {integrity: sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==}
|
|
||||||
|
|
||||||
meow@13.2.0:
|
meow@13.2.0:
|
||||||
resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==}
|
resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
@@ -4905,9 +4885,6 @@ packages:
|
|||||||
uc.micro@2.1.0:
|
uc.micro@2.1.0:
|
||||||
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
||||||
|
|
||||||
uc.micro@3.0.0:
|
|
||||||
resolution: {integrity: sha512-U3PppEkleoTnIfi8BozMx3yju3qc/L6SwqWo2Sw+54PX+PX0q9I+r1Um5HCmqD7n9VDX5/v3vQH/AjA6deDdtw==}
|
|
||||||
|
|
||||||
ufo@1.6.4:
|
ufo@1.6.4:
|
||||||
resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==}
|
resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==}
|
||||||
|
|
||||||
@@ -7275,8 +7252,6 @@ snapshots:
|
|||||||
|
|
||||||
argparse@2.0.1: {}
|
argparse@2.0.1: {}
|
||||||
|
|
||||||
argparse@3.0.1: {}
|
|
||||||
|
|
||||||
aria-query@5.3.2: {}
|
aria-query@5.3.2: {}
|
||||||
|
|
||||||
array-iterate@2.0.1: {}
|
array-iterate@2.0.1: {}
|
||||||
@@ -7874,8 +7849,6 @@ snapshots:
|
|||||||
|
|
||||||
entities@6.0.1: {}
|
entities@6.0.1: {}
|
||||||
|
|
||||||
entities@8.0.0: {}
|
|
||||||
|
|
||||||
env-paths@2.2.1: {}
|
env-paths@2.2.1: {}
|
||||||
|
|
||||||
error-ex@1.3.4:
|
error-ex@1.3.4:
|
||||||
@@ -8714,10 +8687,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
uc.micro: 2.1.0
|
uc.micro: 2.1.0
|
||||||
|
|
||||||
linkify-it@6.1.0:
|
|
||||||
dependencies:
|
|
||||||
uc.micro: 3.0.0
|
|
||||||
|
|
||||||
list.js@2.3.1:
|
list.js@2.3.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
string-natural-compare: 2.0.3
|
string-natural-compare: 2.0.3
|
||||||
@@ -8773,15 +8742,6 @@ snapshots:
|
|||||||
punycode.js: 2.3.1
|
punycode.js: 2.3.1
|
||||||
uc.micro: 2.1.0
|
uc.micro: 2.1.0
|
||||||
|
|
||||||
markdown-it@15.0.1:
|
|
||||||
dependencies:
|
|
||||||
argparse: 3.0.1
|
|
||||||
entities: 8.0.0
|
|
||||||
linkify-it: 6.1.0
|
|
||||||
mdurl: 2.1.0
|
|
||||||
punycode.js: 2.3.1
|
|
||||||
uc.micro: 3.0.0
|
|
||||||
|
|
||||||
markdown-table@3.0.4: {}
|
markdown-table@3.0.4: {}
|
||||||
|
|
||||||
markdownlint-cli@0.49.1(supports-color@5.5.0):
|
markdownlint-cli@0.49.1(supports-color@5.5.0):
|
||||||
@@ -9109,8 +9069,6 @@ snapshots:
|
|||||||
|
|
||||||
mdurl@2.0.0: {}
|
mdurl@2.0.0: {}
|
||||||
|
|
||||||
mdurl@2.1.0: {}
|
|
||||||
|
|
||||||
meow@13.2.0: {}
|
meow@13.2.0: {}
|
||||||
|
|
||||||
merge-stream@2.0.0: {}
|
merge-stream@2.0.0: {}
|
||||||
@@ -10674,8 +10632,6 @@ snapshots:
|
|||||||
|
|
||||||
uc.micro@2.1.0: {}
|
uc.micro@2.1.0: {}
|
||||||
|
|
||||||
uc.micro@3.0.0: {}
|
|
||||||
|
|
||||||
ufo@1.6.4: {}
|
ufo@1.6.4: {}
|
||||||
|
|
||||||
ultrahtml@1.7.0: {}
|
ultrahtml@1.7.0: {}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
---
|
---
|
||||||
import ProseLayout from '@shared/layouts/ProseLayout.astro'
|
// The changelog lives on the website now. The page stays so that the menu link,
|
||||||
import { renderMarkdown } from '@shared/lib/render-markdown'
|
// old bookmarks and the copy in the downloadable package all keep working.
|
||||||
import changelog from '../../core/CHANGELOG.md?raw'
|
import RedirectLayout from '@shared/layouts/RedirectLayout.astro'
|
||||||
|
import site from '@shared/data/site.json'
|
||||||
const changelogHtml = renderMarkdown(changelog)
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<ProseLayout title="Changelog" pageMenu="help.changelog">
|
<RedirectLayout url={site.changelogUrl} />
|
||||||
<Fragment set:html={changelogHtml} />
|
|
||||||
</ProseLayout>
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"opencollectiveUrl": "https://opencollective.com/tabler",
|
"opencollectiveUrl": "https://opencollective.com/tabler",
|
||||||
"xUrl": "https://x.com/tabler_io",
|
"xUrl": "https://x.com/tabler_io",
|
||||||
"linkedinUrl": "https://www.linkedin.com/company/tabler-io",
|
"linkedinUrl": "https://www.linkedin.com/company/tabler-io",
|
||||||
"changelogUrl": "https://github.com/tabler/tabler/releases",
|
"changelogUrl": "https://tabler.io/changelog",
|
||||||
"previewUrl": "https://preview.tabler.io",
|
"previewUrl": "https://preview.tabler.io",
|
||||||
"docsUrl": "https://docs.tabler.io",
|
"docsUrl": "https://docs.tabler.io",
|
||||||
"mapboxKey": "pk.eyJ1IjoidGFibGVyIiwiYSI6ImNscHh3dnhndjB2M3QycW85bGd0NXRmZ3YifQ.9LfHPsNoEXQH-xzz-81Ffw",
|
"mapboxKey": "pk.eyJ1IjoidGFibGVyIiwiYSI6ImNscHh3dnhndjB2M3QycW85bGd0NXRmZ3YifQ.9LfHPsNoEXQH-xzz-81Ffw",
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import { describe, expect, it } from 'vitest'
|
|
||||||
import { renderMarkdown } from './render-markdown'
|
|
||||||
|
|
||||||
describe('renderMarkdown', () => {
|
|
||||||
it('renders markdown to html', () => {
|
|
||||||
expect(renderMarkdown('some **bold** text')).toBe('<p>some <strong>bold</strong> text</p>\n')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('passes raw html through (html: true)', () => {
|
|
||||||
expect(renderMarkdown('<div class="x">y</div>')).toContain('<div class="x">y</div>')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('does not treat indented lines as code blocks (code rule disabled)', () => {
|
|
||||||
expect(renderMarkdown(' indented line')).not.toContain('<pre>')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// Renders markdown to HTML with markdown-it (html: true, indented code blocks off).
|
|
||||||
|
|
||||||
// @ts-ignore -- markdown-it ships no type declarations and @types/markdown-it
|
|
||||||
// is intentionally not added (build-time helper only).
|
|
||||||
import MarkdownIt from 'markdown-it'
|
|
||||||
|
|
||||||
const md = new MarkdownIt({ html: true })
|
|
||||||
|
|
||||||
md.disable('code')
|
|
||||||
|
|
||||||
/** Render a markdown string to HTML. */
|
|
||||||
export function renderMarkdown(src: string): string {
|
|
||||||
return md.render(src)
|
|
||||||
}
|
|
||||||
+1
-2
@@ -11,8 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"shiki": "^4.4.3",
|
"shiki": "^4.4.3",
|
||||||
"@tabler/core": "workspace:*",
|
"@tabler/core": "workspace:*"
|
||||||
"markdown-it": "^15.0.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/check": "^0.9.4",
|
"@astrojs/check": "^0.9.4",
|
||||||
|
|||||||
Reference in new issue
Block a user