Repository navigation
Conversation
index.ts re-exported getRateLimitStats, timeUntilNext, RateLimitStats and GlobalRateLimitStats from middleware.js, but those symbols do not exist anywhere in the codebase, so tsc and the tsup DTS build fail on a clean checkout. It also re-exported the trigger router utilities, which exist in middleware/triggerRouter.ts but were never surfaced through middleware.ts. - middleware.ts: re-export findTrigger/advancedOperatorsSearch and the trigger router types - index.ts: drop the four phantom rate-limit stats exports npx tsc --noEmit, npm run build and vitest (226 passed) are green.
CI has been red on every push since June: three lint errors and two unused
imports, plus one genuinely flaky assertion.
- session-key.ts: the '(string & {})' autocomplete-preserving idiom trips
@typescript-eslint/ban-types; '(string & Record<never, never>)' is the
same type without the banned syntax
- admin.ts: the intentional runtime require() disabled no-require-imports
but the rule that actually fires is no-var-requires — disable both
- expiring-map/health-monitor tests: drop unused imports
- webhook test: uptime is Date.now() - startTime in ms and is legitimately
0 within the same millisecond, so assert >= 0 instead of > 0
eslint, tsc --noEmit and the full vitest suite (305) are green.
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.
What does this change?
Two commits that make
mainbuild and CI green:index.tsre-exportsgetRateLimitStats,timeUntilNext,RateLimitStatsandGlobalRateLimitStatsfrommiddleware.js, but those symbols don't exist anywhere in the codebase —tscand the tsup DTS build fail on a clean checkout, which also breaksnpm installfrom a git URL (thepreparescript). It also re-exports the trigger-router utilities, which exist inmiddleware/triggerRouter.tsbut were never surfaced throughmiddleware.ts. This commit surfaces the real ones and drops the four phantoms.(string & {})idiom insession-key.ts→(string & Record<never, never>), same type without the banned syntax; the intentionalrequire('express')inadmin.tsneededno-var-requiresdisabled alongsideno-require-imports; two unused test imports) and one flaky assertion:health.uptimeisDate.now() - startTimein ms, legitimately0within the same millisecond, so>= 0instead of> 0.Why is it needed?
CI has been failing on every push to
mainsince June (build + lint). This restores the green baseline so subsequent PRs can be judged by their own diff.How was it tested?
npx tsc --noEmit,npm run lint(0 problems),npm run build,npx vitest run(226 passed) — the same four stepsci.ymlruns, on Node 22.Any breaking changes?
The four removed exports never compiled, so nothing that builds today can be importing them. If they were meant as a planned API, happy to implement them instead — say the word.