Skip to content

Commit 13d3554

Browse files
Merge pull request #11 from coder/cat/anthropic-llm-and-pages-base
fix: real Anthropic LLM mode, Pages SPA base path, Node 24 actions
2 parents 35322a0 + 2baf2b7 commit 13d3554

12 files changed

Lines changed: 107 additions & 39 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2222
- name: Set up yq
23-
uses: mikefarah/yq@b534aa9ee5d38001fba3cd8fe254a037e4847b37 # v4.44.6
23+
uses: mikefarah/yq@1b9b4ac5187171d2e5e3129be0cfa827c7f9d53d # v4.53.3
2424
- name: Parse YAML
2525
run: yq eval . config.yaml > /dev/null
2626
- name: Required keys present
@@ -57,7 +57,7 @@ jobs:
5757
- name: Checkout
5858
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5959
- name: Set up Python
60-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
60+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
6161
with:
6262
python-version: "3.12"
6363
- name: Install check-jsonschema
@@ -76,7 +76,7 @@ jobs:
7676
- name: Checkout
7777
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7878
- name: Set up Python
79-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
79+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
8080
with:
8181
python-version: "3.12"
8282
- name: Install
@@ -97,9 +97,9 @@ jobs:
9797
- name: Checkout
9898
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
9999
- name: Set up Node
100-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
100+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
101101
with:
102-
node-version: "20"
102+
node-version: "22"
103103
- name: Run markdownlint-cli2
104104
run: npx --yes markdownlint-cli2@0.18.1 "**/*.md" "!**/node_modules/**" "!LICENSE"
105105

@@ -117,9 +117,9 @@ jobs:
117117
- name: Install pnpm
118118
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
119119
with:
120-
version: 10.33.2
120+
version: 10.34.4
121121
- name: Set up Node
122-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
122+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
123123
with:
124124
node-version: "22"
125125
cache: "pnpm"

.github/workflows/scan.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Checkout
3232
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3333
- name: Set up Python
34-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
34+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
3535
with:
3636
python-version: "3.12"
3737
- name: Install
@@ -56,7 +56,7 @@ jobs:
5656
- name: Checkout scanner
5757
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5858
- name: Set up Python
59-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
59+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
6060
with:
6161
python-version: "3.12"
6262
- name: Install scanner
@@ -141,7 +141,7 @@ jobs:
141141
--skillspector-json out/skillspector.json \
142142
--output out/skill.json
143143
- name: Upload skill artifact
144-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v5.1.0
144+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
145145
with:
146146
name: skill-${{ matrix.namespace }}-${{ matrix.slug }}
147147
path: out/
@@ -158,15 +158,15 @@ jobs:
158158
- name: Checkout scanner
159159
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
160160
- name: Set up Python
161-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
161+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
162162
with:
163163
python-version: "3.12"
164164
- name: Install
165165
run: |
166166
python -m pip install --upgrade pip
167167
pip install -e .
168168
- name: Download all skill artifacts
169-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v5.0.0
169+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
170170
with:
171171
path: scans
172172
pattern: skill-*
@@ -178,7 +178,7 @@ jobs:
178178
run: |
179179
python -c "import json; r=json.load(open('latest.json')); print(json.dumps(r['summary'], indent=2))"
180180
- name: Upload scan-index artifact
181-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v5.1.0
181+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
182182
with:
183183
name: scan-index
184184
path: latest.json
@@ -194,12 +194,12 @@ jobs:
194194
- name: Checkout
195195
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
196196
- name: Download scan-index
197-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v5.0.0
197+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
198198
with:
199199
name: scan-index
200200
path: .
201201
- name: Download all skill artifacts
202-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v5.0.0
202+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
203203
with:
204204
path: skills
205205
pattern: skill-*
@@ -266,23 +266,23 @@ jobs:
266266
- name: Install pnpm
267267
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
268268
with:
269-
version: 10.33.2
269+
version: 10.34.4
270270
- name: Set up Node
271-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
271+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
272272
with:
273273
node-version: "22"
274274
cache: "pnpm"
275275
cache-dependency-path: site/pnpm-lock.yaml
276276
- name: Set up Python
277-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
277+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
278278
with:
279279
python-version: "3.12"
280280
- name: Install scanner
281281
run: |
282282
python -m pip install --upgrade pip
283283
pip install -e .
284284
- name: Download scan-index
285-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v5.0.0
285+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
286286
with:
287287
name: scan-index
288288
path: .
@@ -328,7 +328,7 @@ jobs:
328328
path: pages
329329
- name: Deploy Pages
330330
id: deploy
331-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
331+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
332332

333333
open-issue-on-failure:
334334
name: Open or update tracker issue

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ scanners:
3333
# the version in two places. Dependabot does not parse this file,
3434
# so a bumper bot lives outside the loop until the upstream
3535
# publishes to PyPI and the pin can move into pyproject.toml.
36-
pin: "skillspector @ git+https://github.com/NVIDIA/SkillSpector.git@2eb844780ab163f01468ecf142c40a2ec0fcaec0"
36+
pin: "skillspector @ git+https://github.com/NVIDIA/SkillSpector.git@7bc9c0feb663375ced6e7436008d082e6e3486ea"
3737
# Empty so .github/workflows/scan.yaml can append --no-llm
3838
# dynamically based on whether the LLM credential secret is set.
3939
flags: []

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
[tools]
33
python = "3.12"
44
node = "22"
5-
pnpm = "10.33.2"
5+
pnpm = "10.34.4"

site/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
/>
1919

2020
<link href="./src/styles.css" rel="stylesheet" />
21-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
21+
<link rel="icon" type="image/svg+xml" href="%BASE_URL%favicon.svg" />
2222
</head>
2323
<body class="size-full bg-coder-neutral-black text-coder-neutral-100">
2424
<div id="root" class="size-full">
2525
<noscript class="mx-auto block max-w-prose p-8">
2626
The Coder Skill Scanner site uses JavaScript to render scan reports.
2727
Please enable JavaScript, or open the
28-
<a href="/latest.json">raw JSON report</a> directly.
28+
<a href="%BASE_URL%latest.json">raw JSON report</a> directly.
2929
</noscript>
3030
</div>
3131
<script type="module" src="/src/main.tsx"></script>

site/public/404.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
<title>Coder Skill Scanner</title>
66
<script>
77
// GitHub Pages SPA fallback: capture the original path in a query
8-
// parameter and bounce to index.html, which restores it before React
9-
// Router boots. See site/src/main.tsx for the restore step.
10-
var target = "/?p=" + encodeURIComponent(
8+
// parameter and bounce to the SPA index, which restores it before
9+
// React Router boots. See site/src/main.tsx for the restore step.
10+
//
11+
// `%BASE_URL%` is substituted at build time by the
12+
// `rewrite-public-base-url` Vite plugin (see site/vite.config.ts),
13+
// so the bounce lands on the correct base prefix for both apex
14+
// sites (`/`) and project pages (`/<repo>/`).
15+
var target = "%BASE_URL%?p=" + encodeURIComponent(
1116
window.location.pathname + window.location.search
1217
) + window.location.hash;
1318
window.location.replace(target);

site/src/components/Layout/Layout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ type UtilityLink = {
2222
};
2323

2424
const utilityNav: UtilityLink[] = [
25-
{ href: "/latest.json", label: "Raw JSON" },
26-
{ href: "/schema.json", label: "Schema" },
25+
{ href: `${import.meta.env.BASE_URL}latest.json`, label: "Raw JSON" },
26+
{ href: `${import.meta.env.BASE_URL}schema.json`, label: "Schema" },
2727
{ href: "https://github.com/coder/coder-skill-scanner", label: "GitHub", external: true },
2828
{ href: "https://registry.coder.com", label: "Registry", external: true },
2929
];
3030

3131
const footerLinks: UtilityLink[] = [
32-
{ href: "/latest.json", label: "Raw JSON" },
33-
{ href: "/schema.json", label: "Schema (v1)" },
34-
{ href: "/history", label: "History" },
32+
{ href: `${import.meta.env.BASE_URL}latest.json`, label: "Raw JSON" },
33+
{ href: `${import.meta.env.BASE_URL}schema.json`, label: "Schema (v1)" },
34+
{ href: `${import.meta.env.BASE_URL}history`, label: "History" },
3535
{ href: "https://github.com/coder/coder-skill-scanner", label: "Source", external: true },
3636
{
3737
href: "https://github.com/coder/coder-skill-scanner/blob/main/LICENSE",
@@ -62,7 +62,7 @@ export const Layout: FC = () => {
6262
aria-label="Coder Skill Scanner home"
6363
>
6464
<img
65-
src="/logo.png"
65+
src={`${import.meta.env.BASE_URL}logo.png`}
6666
alt="Coder Skill Scanner"
6767
/* The source image is 2048x139 (aspect ~14.7). Without a
6868
max-width it renders ~412px wide at h-7, overflowing

site/src/lib/api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { HistoryIndex, Report } from "../types/report";
22

33
async function fetchJson<T>(path: string, signal?: AbortSignal): Promise<T> {
4-
const url = path.startsWith("/") ? path : `/${path}`;
4+
const url = path.startsWith("/")
5+
? path
6+
: `${import.meta.env.BASE_URL}${path}`;
57
const res = await fetch(url, { cache: "no-cache", signal });
68
if (!res.ok) {
79
throw new Error(`HTTP ${res.status} fetching ${path}`);

site/src/pages/HistoryPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const HistoryPage: FC = () => {
1818
<div className="mt-2 text-xs text-coder-neutral-400">
1919
History begins populating after the first scheduled scan. The latest
2020
snapshot is always available as the{" "}
21-
<a className="text-coder-sky hover:underline" href="/latest.json">
21+
<a
22+
className="text-coder-sky hover:underline"
23+
href={`${import.meta.env.BASE_URL}latest.json`}
24+
>
2225
raw JSON report
2326
</a>
2427
.

site/src/pages/OverviewPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export const OverviewPage: FC = () => {
3434
<ErrorState error={error}>
3535
<div className="mt-2 text-xs text-coder-neutral-400">
3636
Try fetching the{" "}
37-
<a className="text-coder-sky hover:underline" href="/latest.json">
37+
<a
38+
className="text-coder-sky hover:underline"
39+
href={`${import.meta.env.BASE_URL}latest.json`}
40+
>
3841
raw JSON report
3942
</a>{" "}
4043
directly.

0 commit comments

Comments
 (0)