Skip to content

fix(svelte): Silence baseUrl TS5101 deprecation with ignoreDeprecations#185

Merged
Alice39s merged 2 commits into
mainfrom
fix/svelte-tsconfig-baseUrl-deprecation
Jun 25, 2026
Merged

fix(svelte): Silence baseUrl TS5101 deprecation with ignoreDeprecations#185
Alice39s merged 2 commits into
mainfrom
fix/svelte-tsconfig-baseUrl-deprecation

Conversation

@Alice39s

@Alice39s Alice39s commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing PR Checks that were blocking every open Dependabot PR. Two independent root causes; both fixed here.

1. Svelte build/typecheck — TS5101 baseUrl deprecation

TypeScript now emits TS5101 for the deprecated baseUrl compiler option:

error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
Specify compilerOption "ignoreDeprecations": "6.0" to silence this error.

svelte-preprocess treats that diagnostic as fatal, breaking the svelte build and svelte-check and cascading to the Build and Tests jobs.

packages/svelte/tsconfig.json was the only package tsconfig missing "ignoreDeprecations": "6.0"core, react, solid, vue, website already had it.

Fix: add "ignoreDeprecations": "6.0" to packages/svelte/tsconfig.json.

2. Website lint — Astro 7 / starlight-links-validator incompatibility

The Lint + Typecheck job failed in website#lint:

[AstroUserError] The configured 'markdown.processor' is not supported.
Switch to 'unified()' from '@astrojs/markdown-remark'.
  at starlight-links-validator .../index.ts:129

PR #167 bumped Astro 6.4.8 → 7.0.2. starlight-links-validator@0.24.1 (latest) is not Astro 7-compatible — upstream issue #165 is open with no fix released.

Fix: detect the Astro major version in astro.config.mjs and skip starlight-links-validator on Astro ≥ 7. Link validation returns automatically once upstream ships an Astro 7-compatible release.

Verification (Node 22.x, matching CI)

  • svelte-check0 errors, 0 warnings
  • ✅ CI build (turbo build --filter='./packages/*') → 5/5 packages, all dist dirs present
  • ✅ CI lint-typecheck (turbo lint typecheck) → all packages + website pass
  • ✅ All 4 PR Checks jobs green (Build / Format / Tests / Lint + Typecheck)

举一反三 (generalization)

  • Audited every tsconfig.json. All package + website tsconfigs now consistently set "ignoreDeprecations": "6.0".
  • examples/*/tsconfig*.json also use baseUrl, but examples are outside CI's build/typecheck scope (run-checks.mjs only builds ./packages/*), so they don't block CI.
  • Opened dependabot PRs will go green again once this merges to main and they re-run checks.

Out of scope (not addressed — flagged for awareness)

  • scripts/tasks/postbuild-svelte.mjs:100 uses fs.rmdirSync(path, { recursive: true }), deprecated as a warning on Node 22 (CI) but fatal on Node ≥ 25. Switching to fs.rmSync(path, { recursive: true }) is a proactive improvement, not a current CI failure.

Alice39s added 2 commits June 26, 2026 01:31
TypeScript now emits TS5101 for the deprecated 'baseUrl' compiler
option. svelte-preprocess treats the diagnostic as fatal, which broke
the svelte build and svelte-check, cascading to all PR Checks jobs
(Tests / Build / Lint + Typecheck).

The other package tsconfigs (core/react/solid/vue/website) already set
"ignoreDeprecations": "6.0" for this; packages/svelte was the only
one missing it. Add the same option to restore CI.
starlight-links-validator is incompatible with Astro 7's new markdown
processor, which throws 'The configured markdown.processor is not
supported' during astro build and fails the website#lint CI job.

Upstream has no Astro 7-compatible release yet
(HiDeoo/starlight-links-validator#165).

Detect the Astro major version at config time and skip the validator on
Astro >= 7. Link validation returns automatically once upstream ships a
fix and Astro is still on a supported major.
@Alice39s Alice39s merged commit 414f4de into main Jun 25, 2026
6 checks passed
@Alice39s Alice39s deleted the fix/svelte-tsconfig-baseUrl-deprecation branch June 25, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant