Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Astro 5 #12

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/healthy-grapes-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'starlight-showcases': minor
---

⚠️ **BREAKING CHANGE:** The minimum supported version of Starlight is now `0.30.0`.

Please follow the [upgrade guide](https://github.com/withastro/starlight/releases/tag/%40astrojs/starlight%400.30.0) to update your project.
12 changes: 0 additions & 12 deletions docs/.prettierignore

This file was deleted.

12 changes: 6 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"lint": "eslint . --cache --max-warnings=0",
"format": "prettier -w --cache --ignore-unknown ."
"lint": "eslint . --cache --max-warnings=0"
},
"dependencies": {
"@astrojs/starlight": "^0.24.4",
"@astrojs/starlight": "^0.30.1",
"@hideoo/starlight-plugins-docs-components": "^0.2.2",
"astro": "^4.11.1",
"sharp": "^0.33.4",
"astro": "^5.0.5",
"sharp": "^0.33.5",
"starlight-showcases": "workspace:*"
},
"engines": {
Expand All @@ -36,7 +35,8 @@
"homepage": "https://github.com/HiDeoo/starlight-showcases",
"repository": {
"type": "git",
"url": "https://github.com/HiDeoo/starlight-showcases.git"
"url": "https://github.com/HiDeoo/starlight-showcases.git",
"directory": "docs"
},
"bugs": "https://github.com/HiDeoo/starlight-showcases/issues",
"lint-staged": {
Expand Down
3 changes: 2 additions & 1 deletion docs/src/content/config.ts → docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { docsLoader } from '@astrojs/starlight/loaders'
import { docsSchema } from '@astrojs/starlight/schema'
import { defineCollection } from 'astro:content'

export const collections = {
docs: defineCollection({ schema: docsSchema() }),
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
}
4 changes: 2 additions & 2 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ hero:
- text: Getting Started
link: /getting-started/
icon: rocket
variant: primary
- text: Demo
link: /demo/
icon: external
icon: right-arrow
variant: minimal
---

import { Card, CardGrid } from '@astrojs/starlight/components'
Expand Down
9 changes: 0 additions & 9 deletions eslint.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import hideoo from '@hideoo/eslint-config'

export default hideoo()
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@
"author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",
"type": "module",
"scripts": {
"lint": "pnpm -r lint",
"format": "pnpm -r format",
"lint": "astro check --noSync && pnpm -r lint",
"format": "prettier -w --cache --ignore-unknown .",
"version": "pnpm changeset version && pnpm i --no-frozen-lockfile"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.10",
"@hideoo/eslint-config": "^3.0.1",
"@astrojs/check": "^0.9.4",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.10",
"@hideoo/eslint-config": "^4.0.0",
"@hideoo/prettier-config": "^2.0.0",
"@hideoo/tsconfig": "^2.0.1",
"astro": "^4.9.1",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"typescript": "^5.4.5"
"@types/node": "^18.19.68",
"astro": "^5.0.5",
"eslint": "^9.17.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-showcases/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.eslintcache
.prettierignore
eslint.config.mjs
tsconfig.json
tsconfig.tsbuildinfo
12 changes: 0 additions & 12 deletions packages/starlight-showcases/.prettierignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import type { ImageMetadata } from 'astro'
import type { ComponentProps } from 'astro/types'
import { Image } from 'astro:assets'

export type ShowcaseProfileCardProps = Props
Expand All @@ -21,6 +22,13 @@ if (typeof picture === 'string') {
const imageImport = await picture
src = imageImport.default
}

const imageProps = {
src,
alt: '',
height: '50',
width: '50',
} as ComponentProps<typeof Image>
---

<div class="starlight-showcases-profile-card">
Expand All @@ -30,7 +38,7 @@ if (typeof picture === 'string') {
</a>
{description && <span class="starlight-showcases-profile-description" set:html={description} />}
</span>
<Image class="starlight-showcases-profile-picture" {src} alt="" width="50" height="50" />
<Image {...imageProps} class="starlight-showcases-profile-picture" alt="" />
</div>

<style>
Expand Down
13 changes: 13 additions & 0 deletions packages/starlight-showcases/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import hideoo from '@hideoo/eslint-config'

export default hideoo({
ignores: ['eslint.config.mjs'],
languageOptions: {
parserOptions: {
project: ['../../tsconfig.json'],
},
},
rules: {
'unicorn/filename-case': 'off',
},
})
9 changes: 4 additions & 5 deletions packages/starlight-showcases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
"./package.json": "./package.json"
},
"scripts": {
"lint": "eslint . --cache --max-warnings=0",
"format": "prettier -w --cache --ignore-unknown ."
"lint": "eslint . --cache --max-warnings=0"
},
"dependencies": {
"@astro-community/astro-embed-twitter": "^0.5.4",
"@astro-community/astro-embed-youtube": "^0.5.2"
"@astro-community/astro-embed-twitter": "^0.5.8",
"@astro-community/astro-embed-youtube": "^0.5.6"
},
"peerDependencies": {
"@astrojs/starlight": ">=0.23.0"
"@astrojs/starlight": ">=0.30.0"
},
"engines": {
"node": ">=18"
Expand Down
6 changes: 0 additions & 6 deletions packages/starlight-showcases/tsconfig.json

This file was deleted.

Loading
Loading