fix(web): get deno task check passing and add it to CI#79
Draft
andykais-claude wants to merge 4 commits into
Draft
fix(web): get deno task check passing and add it to CI#79andykais-claude wants to merge 4 commits into
deno task check passing and add it to CI#79andykais-claude wants to merge 4 commits into
Conversation
- Add real @std/* JSR types, zod, ts-pattern and @types/deno to web deps so svelte-check can resolve Deno-style imports and the Deno global - Add tsconfig.svelte.json mapping @forager/core and ~/* to core source while excluding the core package from the reported fileset - Declare App.Locals (forager, config) in app.d.ts - Remove unused kit.experimental.remoteFunctions from svelte.config.js - Point check scripts at tsconfig.svelte.json Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
- Re-declare SvelteKit $lib/$app path aliases in tsconfig.svelte.json (paths do not merge across extends) - Disable verbatimModuleSyntax and add DOM.AsyncIterable in the check config so Deno-valid imports and async-iterable streams type-check - Bridge TextDecoderStream/pipeThrough DOM lib variance in file_processor Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
- Type the media view runes as a discriminated union (file/series/grouped) with union-narrowing getters, fixing MediaResponse member access - Expose media/series/views as ts-rpc modules so InferSpec resolves the client type (fixes 'never' RPC call chains) - Fix real bugs in MediaSeriesRune.load_detailed_view (undefined refs) - Assorted fixes: settings setter casts, keybind actions, filmstrip config default, Header/SelectInput/StarInput props, hooks env casts Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
…pecheck - Type keybind listeners as the dispatched CustomEvent so detail access works - Relax Tag display/encode contracts to structural/model tag types - Fix svelte actions (focusable/scrollable) to accept their use: parameter - Narrow media_type before media_file access in the media_file endpoint - Correct RPC route adapter typing, queryparams index/serialize typing, TagAutoCompleteInput event/target typing, and misc component props - Enable the web 'deno task check' typecheck step in Web CI Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
deno task check passing for CI type safetydeno task check passing and add it to CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes
deno task --cwd packages/web check(svelte-check) pass with 0 errors, 0 warnings, and adds it as a Typecheck step in Web CI so PRs get TypeScript coverage. Previous attempt: #51.svelte-check passing with 0 errors
The problem & plan
svelte-check runs
tsc, which cannot resolve Deno-style imports (@forager/core,@std/*,jsr:) or theDenoglobal. With everything unresolved, most types collapsed toanyand errors were masked (139 reported). The plan was:Error trajectory:
139(mostly-any, masked) →242(types resolving) →0.Key changes
Type-resolution infrastructure
@std/*JSR types,zod,ts-pattern, and@types/denotopackages/webdeps sotscresolves Deno imports and theDenoglobal.tsconfig.svelte.jsonmapping@forager/core/~/*to core source and re-declaring the SvelteKit$lib/$appaliases (TS does not mergepathsacrossextends). DisabledverbatimModuleSyntaxand addedDOM.AsyncIterableso Deno-valid imports and async-iterable web streams type-check.App.Locals(forager,config); removed the unusedkit.experimental.remoteFunctions.Real type fixes (app code)
media_file/media_series/grouped) with union-narrowing getters; fixed genuine bugs (undefinedforager/media_responserefs inMediaSeriesRune).media/series/viewsas ts-rpc modules soInferSpecresolves the client type (previously everyclient.forager.*chain wasnever).MediaResponsebefore.media_fileaccess in the file endpoint; corrected RPC route adapter typing, queryparams index/serialize typing, event/target typing inTagAutoCompleteInput, svelteuse:action params, and misc component props/casts.file_processor.tsfor a TS DOM-libTextDecoderStream/pipeThroughvariance quirk (valid at runtime under Deno).CI
Typecheck(deno task check) step in.github/workflows/web.yml.Verification
deno task --cwd packages/web check→ 0 errors, 0 warnings, exit 0.deno task --cwd packages/web build→ succeeds.deno check packages/core/src/lib/file_processor.ts→ passes.AGENTS.md(unrelated to this change).To show artifacts inline, enable in settings.