browser-safe-subpaths: walk bench/preferences, deny node:, catch forgotten clients - #434
Merged
TheGreatAxios merged 2 commits intoAug 29, 2026
Conversation
Covers the two gaps CL-7124 found: a node:* import should be denied like any other server-only specifier, and a package.json declaring a ./client export with no ENTRIES ruling should fail loudly instead of being silently skipped.
…otten clients grep -l '"./client"' packages/*/package.json turned up seven packages declaring a browser-safe client, but ENTRIES only walked five — @corbits/bench/client and @corbits/preferences/client were never audited. The denylist also had no node:* pattern, so a Node-only import would pass silently. Add the two missing entries, deny node:*, and make the check itself fail when a package.json declares the conventional ./client export with no matching ENTRIES ruling, so a future client can't be forgotten the same way. Fixes CL-7124.
TheGreatAxios
force-pushed
the
cl-7124-checkbrowser-safe-subpaths-skips-two-declared-browser
branch
from
August 29, 2026 04:46
cc2536e to
74743e5
Compare
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.
Fixes CL-7124 — https://linear.app/abklabs/issue/CL-7124
Problem
scripts/checks/browser-safe-subpaths.tswalks a hardcodedENTRIESlist.grep -l '"./client"' packages/*/package.jsonturns up seven packages declaring a browser-safe client, butENTRIES(browser-safe-subpaths.ts:48-69) only walked five —@corbits/bench/clientand@corbits/preferences/clientwere never audited.DENYLIST_PATTERNS(browser-safe-subpaths.ts:71-76) also had nonode:*pattern, so a Node-only import would pass silently.Change
{ package: "@corbits/bench", subpath: "./client" }and{ package: "@corbits/preferences", subpath: "./client" }toENTRIES./^node:/toDENYLIST_PATTERNS.findUnruledClientExports: fails the check when anypackages/*/package.jsondeclares the conventional./clientexport with no matchingENTRIESruling, naming the package and telling the reader exactly what to add.Tests
scripts/checks/test/browser-safe-subpaths.test.ts: added a red/green case for anode:import being denied, and for an undeclared./clientexport failing (and a declared one not failing). Confirmed both were failing before the fix and pass after.bun test scripts/checks/test/browser-safe-subpaths.test.ts— 17 pass.bun run check:browser-safe-subpaths— clean, now walks 11 entries including bench and preferences.bun run check(full gate): the machine was under heavy concurrent load andtypecheckreported failures in 6 packages unrelated to this change (@corbits/sidecar-placement,@workbench/hub,@corbits/settings-ui,@corbits/catalog-tools,@workbench/onboarding,@workbench/web); re-runningtsc --noEmitfor two of them in isolation (sidecar-placement,apps/web) passed clean, confirming these were load-induced kills, not real errors — none of those packages are touched by this change.