Repository navigation
fix(web): keep the source pane within ES2022 - #257
Merged
Merged
Conversation
The Markdown source pane used Array.findLast, which is outside the web package ES2022 lib. A web-only install therefore fails typecheck and the stock build. Scan backwards from the existing blocks[0] fallback instead, with the same line-range behavior and no compiler config change.
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.
See CONTRIBUTING before starting engineering work.
Change
The Markdown source pane in
web/src/screens/library/page/Source.tsxusedArray.findLast, which is not in the web package's ES2022 lib. With a web-only install,tsc --noEmitfails on the call, so the web package's stock build fails.Replace it with a backward scan over the existing blocks, keeping the existing
blocks[0]fallback and selecting the same line range. Notsconfig, lib, dependency or compiler-config change is included.The failing command was the web package build,
npm run build -w web(which runstsc --noEmit && vite build). The repository rootnpm run builddoes not include thewebworkspace.Checks and limits
Run from the
fix/web-es2022-findlastworktree at5a332e21:npm run typecheck -w web- pass.npm run build -w web- pass;tsc --noEmitand the Vite bundle complete.npx --yes prettier --check web/src/screens/library/page/Source.tsx- pass.git diff --check- pass.rg findLast web/src- no matches.Limits:
esnextdeclarations; the committed code no longer relies on those declarations.Workspace
repo/, and read the relevant project guides.This contributor confirmation is not an automated claim that a host loaded policies.
Agent disclosure
git,gh,npm,npx(Prettier), TypeScript and Vite.