-
Notifications
You must be signed in to change notification settings - Fork 6
tech-debt: dedupe helpers, surface real errors, prune pass-throughs #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
72b27da
tech-debt(prune): remove stale root artifacts; document cleanup in CH…
ohong 64e7f20
tech-debt(errors): surface previously-swallowed failures in open-stat…
ohong 6368069
tech-debt(prune): inline pass-through wrappers; extract stripMarkdown…
ohong 8529848
tech-debt(web): consolidate date/contribution/focus-trap/og-script he…
ohong fd17c01
tech-debt(shared): extract @straude/shared package for cross-package …
ohong 25e5eb4
Merge WT4: inline pass-through wrappers; extract stripMarkdown
ohong b61cd41
Merge WT2: dedupe date/contribution/focus-trap/og helpers (web-internal)
ohong c397714
Merge WT1: extract @straude/shared workspace; cross-package dedup
ohong 99fe46f
Merge WT3: surface previously-swallowed failures
ohong e726aec
Merge WT5: remove stale root artifacts; CHANGELOG cleanup notes
ohong 14214b7
tech-debt(prune): delete orphaned files; un-export module-private hel…
ohong 83aa345
tech-debt(prune): remove three symbols un-exporting revealed as truly…
ohong a3f958f
ci: route typecheck through turbo so workspace deps build first
ohong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import { describe, it, expect } from "vitest"; | ||
| import { stripMarkdown } from "@/lib/utils/strip-markdown"; | ||
|
|
||
| describe("stripMarkdown", () => { | ||
| it("strips heading markers", () => { | ||
| expect(stripMarkdown("# Hello World")).toBe("Hello World"); | ||
| }); | ||
|
|
||
| it("strips bold (**) markers", () => { | ||
| expect(stripMarkdown("This is **bold** text")).toBe("This is bold text"); | ||
| }); | ||
|
|
||
| it("strips italic asterisk markers", () => { | ||
| expect(stripMarkdown("This is *italic* text")).toBe("This is italic text"); | ||
| }); | ||
|
|
||
| it("strips italic underscore markers", () => { | ||
| expect(stripMarkdown("This is _italic_ text")).toBe("This is italic text"); | ||
| }); | ||
|
|
||
| it("strips strikethrough markers", () => { | ||
| expect(stripMarkdown("This is ~~struck~~ text")).toBe( | ||
| "This is struck text", | ||
| ); | ||
| }); | ||
|
|
||
| it("strips inline code markers", () => { | ||
| expect(stripMarkdown("Use `code` here")).toBe("Use code here"); | ||
| }); | ||
|
|
||
| it("strips link syntax keeping the label", () => { | ||
| expect(stripMarkdown("Visit [Straude](https://straude.com) today")).toBe( | ||
| "Visit Straude today", | ||
| ); | ||
| }); | ||
|
|
||
| it("strips image syntax (link rule consumes the body, leaving the bang)", () => { | ||
| // The link rule runs before the image rule, so [alt](url) is captured | ||
| // first — only the leading "!" survives. Locked in to preserve current | ||
| // OG-card output byte-for-byte. | ||
| expect(stripMarkdown("Look  here")).toBe( | ||
| "Look !alt here", | ||
| ); | ||
| }); | ||
|
|
||
| it("strips unordered list bullet markers", () => { | ||
| expect(stripMarkdown("- first item")).toBe("first item"); | ||
| }); | ||
|
|
||
| it("strips ordered list markers", () => { | ||
| expect(stripMarkdown("1. first item")).toBe("first item"); | ||
| }); | ||
|
|
||
| it("strips blockquote markers", () => { | ||
| expect(stripMarkdown("> a quoted line")).toBe("a quoted line"); | ||
| }); | ||
|
|
||
| it("collapses double newlines to a single space", () => { | ||
| expect(stripMarkdown("para one\n\npara two")).toBe("para one para two"); | ||
| }); | ||
|
|
||
| it("collapses single newlines to a single space", () => { | ||
| expect(stripMarkdown("line one\nline two")).toBe("line one line two"); | ||
| }); | ||
| }); |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ohong/straude
Length of output: 1929
🏁 Script executed:
Repository: ohong/straude
Length of output: 846
🏁 Script executed:
Repository: ohong/straude
Length of output: 720
🏁 Script executed:
Repository: ohong/straude
Length of output: 637
Actual blocker:
packages/shared/tsconfig.jsonis missingrootDirconfiguration.The build fails with TS5011:
The
exportsfield inpackage.jsonis already correctly configured. The issue is thatpackages/shared/tsconfig.jsonneeds an explicitrootDirsetting:"compilerOptions": { "target": "ES2022", "module": "ESNext", "moduleResolution": "Bundler", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "isolatedModules": true, "declaration": true, "outDir": "./dist", + "rootDir": "./src" },Without this, the TypeScript compiler cannot build the package, so the declaration files are never generated, causing the TS2307 error in consuming packages.
🧰 Tools
🪛 GitHub Actions: CI
[error] 2-2: TypeScript (TS2307): Cannot find module '@straude/shared/format' or its corresponding type declarations.
🤖 Prompt for AI Agents