Skip to content

Commit

Permalink
feat!: bump minimum required Astro version to 3.0 and Starlight to 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Sep 20, 2023
1 parent 72d8471 commit 472837f
Show file tree
Hide file tree
Showing 10 changed files with 633 additions and 698 deletions.
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.14.1
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
},
"dependencies": {
"@astrojs/starlight": "0.6.1",
"astro": "2.10.12",
"sharp": "0.32.4",
"shiki": "0.14.3",
"@astrojs/starlight": "0.10.0",
"astro": "3.1.1",
"sharp": "0.32.6",
"shiki": "0.14.4",
"starlight-openapi": "workspace:*",
"starlight-package-managers": "0.1.0"
},
"engines": {
"node": ">=18"
"node": ">=18.14.1"
},
"packageManager": "pnpm@8.6.12",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client-image" />
/// <reference types="astro/client" />
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@hideoo/eslint-config": "1.5.1",
"@hideoo/prettier-config": "2.0.0",
"@hideoo/tsconfig": "2.0.1",
"astro": "2.10.12",
"astro": "3.1.1",
"eslint": "8.46.0",
"eslint-plugin-astro": "0.28.0",
"husky": "8.0.3",
Expand All @@ -24,7 +24,7 @@
"typescript": "5.1.6"
},
"engines": {
"node": ">=18"
"node": ">=18.14.1"
},
"packageManager": "pnpm@8.6.12",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight-openapi/components/Md.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Markdown } from '@astropub/md'
import { Markdown } from 'astro-remote'
import { capitalize } from '../libs/utils'
Expand All @@ -10,4 +10,4 @@ interface Props {
const { text } = Astro.props
---

{text && text.length > 0 && <Markdown of={capitalize(text)} />}
{text && text.length > 0 && <Markdown content={capitalize(text)} />}
1 change: 1 addition & 0 deletions packages/starlight-openapi/components/Tag.astro
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{' '}
<span>
<slot />
</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-openapi/components/Text.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const text: string | undefined = await Astro.slots.render('default')
{
text && text.length > 0 && (
<p>
{label && <b>{label}:</b>}
{label && <b>{label}: </b>}
{tag ? (
<Tag>
<Fragment set:html={text} />
Expand Down
5 changes: 2 additions & 3 deletions packages/starlight-openapi/libs/integration.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import markdownIntegration from '@astropub/md'
import type { AstroIntegration, AstroUserConfig } from 'astro'

import type { Schema } from './schema'
import { vitePluginStarlightOpenAPIComponents, vitePluginStarlightOpenAPISchemas } from './vite'

export function createStarlightOpenAPIIntegration(schemas: Schema[]) {
return function starlightOpenAPIIntegration(): AstroIntegration[] {
return function starlightOpenAPIIntegration(): AstroIntegration {
const starlightOpenAPI: AstroIntegration = {
name: 'starlight-openapi',
hooks: {
Expand All @@ -26,6 +25,6 @@ export function createStarlightOpenAPIIntegration(schemas: Schema[]) {
},
}

return [starlightOpenAPI, markdownIntegration()]
return starlightOpenAPI
}
}
11 changes: 6 additions & 5 deletions packages/starlight-openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0 && tsc --noEmit"
},
"dependencies": {
"@astropub/md": "0.2.0",
"@readme/openapi-parser": "2.5.0",
"astro-remote": "0.2.4",
"github-slugger": "2.0.0",
"kleur": "4.1.5"
},
"devDependencies": {
"@astrojs/starlight": "0.10.0",
"@playwright/test": "1.36.2",
"@types/node": "18.17.3",
"astro": "2.10.12",
"astro": "3.1.1",
"openapi-types": "12.1.3"
},
"peerDependencies": {
"@astrojs/starlight": ">=0.5.0",
"astro": ">=2.5.0"
"@astrojs/starlight": ">=0.9.0",
"astro": ">=3.0.0"
},
"engines": {
"node": ">=18"
"node": ">=18.14.1"
},
"packageManager": "pnpm@8.6.12",
"publishConfig": {
Expand Down
Loading

0 comments on commit 472837f

Please sign in to comment.