Skip to content

Commit

Permalink
Merge pull request #44 from HiDeoo/hd-starlight-0-26-0
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Aug 16, 2024
2 parents 9dbd329 + 707be11 commit ce82dd2
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 106 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18

- name: Install dependencies
run: pnpm install

- name: Store Playwright Version
run: |
PLAYWRIGHT_VERSION=$(pnpm playwright --version | sed 's/Version //')
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
working-directory: packages/starlight-openapi

- name: Setup Playwright cache
id: cache-playwright
uses: actions/cache@v3
with:
key: playwright-${{ env.PLAYWRIGHT_VERSION }}
path: ~/.cache/ms-playwright

- name: Generates docs TypeScript types
run: pnpm astro sync
working-directory: docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -30,7 +30,7 @@ jobs:
version: 8.6.12

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
},
"dependencies": {
"@astrojs/starlight": "0.24.4",
"@astrojs/starlight": "0.26.0",
"@hideoo/starlight-plugins-docs-components": "^0.2.2",
"astro": "4.11.1",
"sharp": "0.32.6",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/libs/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function starlightOpenAPIDocsDemoPlugin(): StarlightPlugin {
}

function isSidebarGroup(item: unknown): item is SidebarGroup {
return 'items' in (item as SidebarGroup)
return typeof item !== 'string' && 'items' in (item as SidebarGroup)
}

export interface SidebarGroup {
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-openapi/libs/starlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function makeSidebarLink(label: string, link: string): SidebarLink {
}

function isSidebarManualGroup(item: NonNullable<StarlightUserConfigSidebar>[number]): item is SidebarManualGroup {
return 'items' in item
return typeof item !== 'string' && 'items' in item
}

function getOverviewHeadings({ document }: Schema): MarkdownHeading[] {
Expand Down
6 changes: 3 additions & 3 deletions packages/starlight-openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"github-slugger": "2.0.0"
},
"devDependencies": {
"@astrojs/starlight": "0.24.4",
"@astrojs/starlight": "0.26.0",
"@playwright/test": "1.36.2",
"@types/node": "18.17.3",
"astro": "4.11.1",
"openapi-types": "12.1.3"
},
"peerDependencies": {
"@astrojs/markdown-remark": ">=4.2.0",
"@astrojs/starlight": ">=0.19.0",
"astro": ">=4.2.7"
"@astrojs/starlight": ">=0.26.0",
"astro": ">=4.8.6"
},
"engines": {
"node": ">=18.14.1"
Expand Down
Loading

0 comments on commit ce82dd2

Please sign in to comment.