Skip to content

Commit 6b10c60

Browse files
authored
Merge pull request #291 from powersync-ja/fix-docs-build
Fix documentation build
2 parents c600362 + 270dc40 commit 6b10c60

File tree

4 files changed

+180
-137
lines changed

4 files changed

+180
-137
lines changed

.github/workflows/build-docs.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build docs
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
env:
10+
ALGOLIA_APP_ID: 123
11+
ALGOLIA_API_KEY: 123
12+
GH_URL: http://example.test
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
- uses: pnpm/action-setup@v2
21+
name: Install pnpm
22+
with:
23+
version: 9
24+
run_install: false
25+
- name: Get pnpm store directory
26+
shell: bash
27+
run: |
28+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29+
- uses: actions/cache@v3
30+
name: Setup pnpm cache
31+
with:
32+
path: ${{ env.STORE_PATH }}
33+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34+
restore-keys: |
35+
${{ runner.os }}-pnpm-store-
36+
- name: Install dependencies
37+
run: pnpm install
38+
- name: Build Packages
39+
run: pnpm build:packages
40+
- name: Build Docs
41+
run: pnpm docs:build

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"docusaurus-plugin-typedoc": "^1.0.1",
2828
"typedoc": "^0.25.13",
2929
"typedoc-plugin-markdown": "~4.0.3",
30-
"typescript": "~5.4.5"
30+
"typescript": "^5.5.3"
3131
},
3232
"browserslist": {
3333
"production": [

packages/web/src/db/sync/userAgent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export function getUserAgentInfo(nav?: NavigatorInfo): string[] {
1818

1919
const browser = getBrowserInfo(nav);
2020
const os = getOsInfo(nav);
21-
return [browser, os].filter((v) => v != null);
21+
// The cast below is to cater for TypeScript < 5.5.0
22+
return [browser, os].filter((v) => v != null) as string[];
2223
}
2324

2425
function getBrowserInfo(nav: NavigatorInfo): string | null {

0 commit comments

Comments
 (0)