Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 5
ignore:
# Issue 5: @astrojs/check does not accept TypeScript 7 yet.
- dependency-name: "typescript"
versions: ["7.x"]
- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/typescript-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2026 OpenSourceOM
# SPDX-License-Identifier: Apache-2.0
name: TypeScript 7

on:
schedule:
# 15:00 UTC on the 1st. Stays quiet until @astrojs/check accepts TypeScript 7.
- cron: "0 15 1 * *"
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Comment on issue 5 when TypeScript 7 is accepted
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
range=$(npm view @astrojs/check@latest peerDependencies.typescript)
echo "typescript peer: ${range}"
# Published ranges look like "^5.0.0 || ^6.0.0".
printf '%s\n' "$range" | grep -Eq '(^|[^0-9])7\.' || exit 0
marker="<!-- typescript-7-ready -->"
if gh api --paginate "repos/${GITHUB_REPOSITORY}/issues/5/comments" --jq '.[].body' | grep -F -q "$marker"; then
exit 0
fi
gh issue reopen 5 --repo "$GITHUB_REPOSITORY" || true
gh issue comment 5 --repo "$GITHUB_REPOSITORY" --body "$(cat <<EOF
${marker}
\`@astrojs/check\` now accepts TypeScript 7 (\`${range}\`).

Remove the \`typescript\` \`7.x\` ignore in \`.github/dependabot.yml\`, then bump \`typescript\`. The ignore on pull request #1 can still suppress Dependabot, so bump the dependency directly or reopen that pull request.
EOF
)"
Loading